IOS side loaded App changing current location - ios

Trying to develop my first application which will just be side loaded to my device. I am unsure if I can even do what I'm looking for; I'm trying to change the current location on my device via my application. I know this is done with the Xcode debugger but can it be done solely on the application with no connection to the computer? Basically I have a few buttons, each one I want to change the location to somewhere different. Do I just code the coordinates to set with the button and thats all? Will this show on my maps application and such? Thanks.

What you ask is not possible. The GPS hardware is what reports location to the phone. Xcode is able to do this because it is reporting location to the simulator, which has no GPS hardware on its own

Related

How can I use ARKit while using Slide Over/Split Screen on iPadOS?

I have an app that uses ARKit to detect faces and send over the network the coordinates of interest, which works well. I would like this app to run in background, still sending the data over the network, while I would be using another app (almost) fullscreen.
The option 'Enable multiple windows' is activated in info.plist, but as soon as I launch my other app, the ARKit app stops sending information (the app actually probably stops).
Is there a simple way to do this, and at least is this feasible? Thanks!
This is not possible at this point. Camera and AR stuff is disabled at a system level in apps when they are displayed in Slide Over or Split View.
I'd recommend displaying a warning message when Slide Over/Split Screen is being used saying that you should use the app in full screen mode. See this answer under a different question for details.

Working fine on iPhone but crashing on ipad

I made an Ecommerce app for iPhone and iPad using objective c. The app is working fine on iPhone but crashing a lot on iPad. I am getting lot of memory warning on iPad. I tried different things to get it control but not getting any success. Apps has features like
As per user current location it shows the store on map view and list view.
During checking user can order as per his current location or can place an order for different location.
Add favorite product and favorite store
Can anyone suggest what I might be doing wrong or anything I should implement to get it fixed.
Use Instruments. That's actually the only device that anyone can give you. And of course be aware that if your app is in the background, crashing after a memory warning is quite normal and not something the user will even notice.

GPS based VS Beacon based ranging? Which governs Lock screen left corner app icon

There are two approaches for showing an app/app suggestion (incase not installed) on the iphone lock screen / app switcher. One is GPS based, in which the IOS decides which app to show as a suggestion. Another is beacon based, in which a particular beacon is identified.
If location services are enabled for multiple apps and say all these apps are also using beacon based approach to show their icons on the lock screen left corner, which app icon will be shown by the IOS?
Since location services are enabled for these apps,and say there is another relevant app which is NOT using beacon based approach (using just the GPS based approach), can IOS give preference to beacon based apps over the GPS based this new app.?
For instance, Estimote’s NYC office is on the same block as an Equinox gym and our phones intelligently and automatically alert us to use that app. It’s super easy and intuitive to open the app while walking into the gym - and in the process, streamline the check-in flow with the gym’s front desk. However, because it solely uses GPS geofences, the accuracy is poor. We actually get the Equinox icon over 1 block away, and there is no control for the brands or stores (in this case Equinox) on how this appears.
Apple's suggestion of apps not installed on the phone based on proximity uses an undocumented technique. While I have verified it uses GPS as an input, I have never been able to confirm that beacons are used at all.
Regardless of whether beacons are used, because this is an undocumented feature, it is unlikely you will find a way to customize the behavior.
AFAIK, Apple has never shared the implementation details of how the lock screen icon AKA "suggested apps" feature works.
However, we did some experiments at Estimote and noticed that being inside a CLRegion (both the "GPS" CLCircularRegion, and CLBeaconRegion work) that an app monitors for via Core Location, consistently makes the app's icon show up on the lock screen. So it seems that both beacons and GPS location fall into the same mechanism that governs the location-based suggestions. (Note that in iOS 9, that's not just the lock screen icon, but also a bar at the bottom of the app switcher.)
Unfortunately, we weren't able to establish what happens if you're inside multiple qualifying CLRegions, belonging to different apps. We suspect it might have something to do with the order in which the apps register regions for monitoring, but were never able to get consistent results.
Furthermore, since this whole behavior is undocumented, Apple can change it at any time. Just something to be aware of.
Side note: handoff always trumps suggested apps.

Location updates issue for iOS 7

I'm developing an iOS map application, so it's essential to receive location data consistently.
What is happening now is that the system allows the to app load the map and that's it!
The location getting instruction seems to freeze, even the network traffic indicator at the top bar disappears. Simply when I go to Settings->Privacy->Location Updates, switch off location updates for my app and then switch it back on. The map loads the current location.
What could be the possible causes to this?, please advice.
Use:
[_mapView setUserTrackingMode:MKUserTrackingModeFollow animated:YES];
This will smoothly follow the users current location. If you drag the map it will even set the tracking mode back to MKUserTrackingModeNone which is usually the behaviour you want.

CLLocationManager default coordinate values

I'm learning to develop iOS apps and I try them on simulater only. Now, in my app I use CLLocationManager to get my current location coordinates. But when I run the app no matter where I am I get the same results for all the coordinate values(altitude,longitude,latitude). They do not change even if I move to another location. What I wonder is how does CLLocationManager get values? If it does not work on simulater then where do the values that never change come from? According to the coordinates I guess it's a default value that shows London if no coordinates are available.
Try Resetting the iOS Simulator, erasing all applications and settings.
And when you run CLLocationManager using application, it will probably ask for permission to use location, something like what you would see in you device.
I've been using iOS Simulator, and it gives location of my computer for the simulator all the time. I guess it's affected by your internet connection and IP address. Since many computers don't come with GPS, it's the only way to know the location of the computer.
The simulator always gives the location of Apple headquarters at Cupertino. It does not use computer's gps or location.
Simulator may use skyhook to check your location which is bounded to WiFi hotspot (if it was added with it's coordinates) and if you move in radius of WiFi coverage than your location won't be changed at all.
On the menu bar, go to Debug, then select Location, Custom Location and then you can input coordinates to simulate from. The Simulator will not always provide you the same feedback as a device would.

Resources