For an iPad, or iPod touch, is there a way to find out if the device has GPS?
Extra Credit: What if the iPad itself does not, but it is connected to a third-party GPS unit? Can I determine this?
Apple does not provide a function to directly query the device if it has GPS capabilities or not. There are two possible solutions to your problem:
Query the device type and determine if it has GPS based on that. This is described here.
The way Apple recommends: have a look at their documentation here (Section "Determining the available Hardware Support"). Basically you create an instance of CLLocationManager and set the desired accuracy to the highest level, after that you can query its accuracy; if it's not very accurate, it's likely that the device does not have GPS.
Hope this helps. :)
For iOS 6 or higher, you might want to try
+ (BOOL)[CLLocationManager deferredLocationUpdatesAvailable]
According to the documentation:
Deferred location updates require the presence of GPS hardware and may not be supported on all iOS devices.
Only GPS can deliver the location attributes: course and speed.
And as a general rule, you need GPS for precise location, a device whitout GPS will deliver a location.getHoricontalAccuracy() higher than 30- 40m. (Using accuracy setting of CLLLocationAccuracyBest)
So In that case you dont have an accurate position and can ignore that always. (Independnet if the device has GPS or not)
Download altimeter or similar app. Turn off cell data and wifi before you ever use the downloaded app. Then launch the app and see if it will give you Your current altitude. If it works you have GPS if it doesn't then you don't
Related
We are looking for a way to send GPS location to iPhone or iPad through bluetooth. The benefits of doing so is that an external GPS device could produce more accurate location than the build-in GPS device in iOS. For our testing purposes, it would also be nice to be able to produce GPS manually by QAs.
We are pretty sure this is possible but we don't know how. We heard about this kind of external GPS device from one of our customers. Simple googling we found this one this device, which does exactly what we are looking for.
We know that it is possible to generate fake GPS location using GPX file through Xcode. Please refer to this SO for more details. But this is not what we are looking for. We don't want to teach the QA how to build and debug with Xcode.
In a nutshell, we want to know how to send GPS location to iOS device via bluetooth. Eventually, we would like to build a simple app (maybe on Mac) and we can set up some GPS locations for testing.
P.S.: A similar question was asked a couple of years ago but it seems very much outdated. This link explains the supported supported bluetooth profiles by Apple. But I don't see anything related.
Any link to sample code or documentation will be very much appreciated. Thank you!
As far as we know, we are not able to send GPS location to our device via Bluetooth. Apple only allow pairing with a small set of known Bluetooth GPS manufactures.
I have created an app that I want to know the magneticHeading. I have coded it in every way possible that I thought it would work. From there I have been testing my app on the simulator but it wont give me the magneticHeading Value.
I have looked for this before and I believe the answer is that the simulator will not give you this value. I haven't found anything that flat out said it so I just want to check with the community for my exact situation:
Will the iPhone simulator give you the magneticHeading Data.
Would it with a gpx file?
Your assumptions are correct because the simulator does not have the required hardware, which in this case is the magnetometer. You can determine way points, routes etc with a .gpx file but as far as orienting the display to correlate with the direction the user is facing, you'll need a compass. Testing on an actual device with the required hardware would therefor be preferable.
The use of location services requires user authorization. In addition, some location services require the presence of specific hardware on the given device. For example, heading information is available only on devices that contain a hardware compass.
This is taken from CLLocationManager Class Reference
For a list of devices that have the magnetometer hardware have a look at iOS Device Compatibility Reference
We are looking for a way to send GPS location to iPhone or iPad through bluetooth. The benefits of doing so is that an external GPS device could produce more accurate location than the build-in GPS device in iOS. For our testing purposes, it would also be nice to be able to produce GPS manually by QAs.
We are pretty sure this is possible but we don't know how. We heard about this kind of external GPS device from one of our customers. Simple googling we found this one this device, which does exactly what we are looking for.
We know that it is possible to generate fake GPS location using GPX file through Xcode. Please refer to this SO for more details. But this is not what we are looking for. We don't want to teach the QA how to build and debug with Xcode.
In a nutshell, we want to know how to send GPS location to iOS device via bluetooth. Eventually, we would like to build a simple app (maybe on Mac) and we can set up some GPS locations for testing.
P.S.: A similar question was asked a couple of years ago but it seems very much outdated. This link explains the supported supported bluetooth profiles by Apple. But I don't see anything related.
Any link to sample code or documentation will be very much appreciated. Thank you!
As far as we know, we are not able to send GPS location to our device via Bluetooth. Apple only allow pairing with a small set of known Bluetooth GPS manufactures.
I know this might be unanswerable until the Apple Watch is released.
But does anyone know if there may be a way to determine the rough distance (in feet) between an Apple Watch and an iPhone?
Currently, the WatchKit framework does not give you this kind of information, since third-party apps are still quite limited in what they can do. For example, they require a connection to the iPhone.
There is some speculation that later this year, third-party developers will be given more access to the hardware, e.g., bluetooth, accelerometer, pulse, NFC, etc.
My question could sound simple or stupid, but I just want to make things clear. I'm using accelerometer in an app, and I want to know how can I use the new iPhone 5S M7 motion co-processor, at the moment I'm receiving accelerometer data using CoreMotion.framework method - (void)startAccelerometerUpdatesToQueue:(NSOperationQueue *)queue withHandler:(CMAccelerometerHandler)handler;, is it enough? This is an universal approach (good for devices which doesn't have M7 co-processor)? Or I must do something else? Where can I read and learn about how to use the new M7 processor in an app? Thanks.
M7 co-processor will enable applications to be aware of what type of
movement the user is experiencing, such as driving, walking, running
or sleeping. then Application could be the ability to do indoor tracking and mapping.
The Apple M7 co-processor collects, processes and stores sensor data
even if the device is asleep, and applications can retrieve data when
the device is powered up again. This will reduce power draw of the
device and save battery life
For more info refer this wiki
Well I am not certain, but it seems pretty obvious that the M7 would be used to implement CoreMotion on devices that have it, just like the A7 CPU would be used to provide the computing foundation on devices that have it.
I very much doubt there is anything you need to do to enable it; you just get better data I guess.