mapbox / mapbox/mapbox-navigation-ios
[Question] Why does Mapbox try to use CoreMotion?
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 918
- Forks
- 326
- Avg merge
- 1h 16m
- Merged PRs (30d)
- 3
Description
When compiling default iOS examples, I noticed that Xcode gives the following warning:
```
{"msg":"#Warning Error reading file", "file":"\/\/private\/var\/Managed Preferences\/mobile\/com.apple.CoreMotion.plist", "error":"Error Domain=NSCocoaErrorDomain Code=257 \"The file “com.apple.CoreMotion.plist” couldn’t be opened because you don’t have permission to view it.\" UserInfo={NSFilePath=\/\/private\/var\/Managed Preferences\/mobile\/com.apple.CoreMotion.plist, NSURL=file:\/\/\/\/private\/var\/Managed%20Preferences\/mobile\/com.apple.CoreMotion.plist, NSUnderlyingError=0x103048c90 {Error Domain=NSPOSIXErrorDomain Code=1 \"Operation not permitted\"}}"}
```
which indicates that CoreMotion capability is not present.
This can be fixed by adding this capability to info.plist, like this:
```
NSMotionUsageDescription
This app uses motion data to [... insert your explanation here ...]
```
But I wonder if it's actually needed by MapBox (and if it is, should this capability be included in all examples with some reasonable description)?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the default iOS examples and their Info.plist files, then trace whether Mapbox or one of its dependencies accesses CoreMotion. Confirm whether the warning is expected and whether the examples need NSMotionUsageDescription; done means documenting the finding or updating the affected example configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100