How to keep location based Apple Watch app up to date? - apple-watch

According to Apple, iOS apps should not do geocoding while in the background.
However, WatchKit apps are required to have up to date information for their glances. Since a glance should be prepared before being displayed to the user, how do location based apps keep their location information current while keeping in line with Apple policies?
For example, a weather app could geocode the latest location data (retrieved in the background) when the app is opened on iPhone, before being displayed to the user. A watchkit extension for this same app technically isn't allowed to geocode in the background - so when should it do it?

Related

I am getting Missing Purpose String but i have added that in info.plist The Missing Purpose String is "NSNearbyInteractionAllowOnceUsageDescription"

The Error I am getting on email from Apple App Store while I am publishing my app to Apple App Store Testflight from my mac , although I am unable to see my build on testflight forum.And the email from Apple App Store is as under.
Dear Developer,
We identified one or more issues with a recent delivery for your app, "IDTAG Nearby Interaction" 1.0 (1.0). Please correct the following issues, then upload again.
ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSNearbyInteractionAllowOnceUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).
I have already the below strings into my Info.plist
<key>Privacy - Nearby Interaction Allow Once Usage Description</key>
<string>Nearby Interaction app uses our u1 chip for better experience to show other peers location.</string>
<key>Privacy - Nearby Interaction Usage Description</key>
<string>Nearby Interaction app uses our u1 chip for better experience to show other peers location.</string>
According to Apple Documentation
( Nearby Interaction Allow Once Usage Description ) will be deprecated in iOS 15. That's why I have already added ( Privacy - Nearby Interaction Usage Description ) in my project but still I am having the above mentioned issue in my project by Apple store.

ALAssetsLibrary and Location Services in iOS 6

I'm in the process of upgrading one of my apps to support iOS6 and iPhone5. In the previous version, I had to prompt the user to enable Location Services in order to display photos using the ALAssetsLibrary. I've noticed that in iOS 6, I can disable location services and it still displays all images correctly. Is this something that has changed in iOS6. The documentation states that you still need Location Services enabled but the documentation also states that it's for iOS4 and above. I can't find any mention regarding iOS6 specifically.
The change is (more or less) documented in the iOS SDK Release Notes for iOS 6:
In iOS 6, there are improved privacy controls for Calendar, Reminders,
Contacts, and Photos. Users will see access dialogs when an app tries
to access any of those data types. The user can switch access on and
off in Settings > Privacy.
Also, the ALAssetsLibrary has a new method authorizationStatus, which is available since iOS 6.
In iOS 5, there was no privacy setting for Photos, and the user had to allow access to Location Services because a photo might contain location data. This was (I think) annoying and confusing, and I am glad that it is fixed in iOS 6.

Delete an App's data when it is uninstalled in iOS

I am new to iOS development, Now I am creating an app that will store contact information to address book from the app. (This app will store your friend's contact details like mobile number and email etc. on your address book when he/she installed the same app on their iPhone and accepted you as their friend).
The app contact is differentiated to native contacts by putting a note property as app name.
My question is, When you uninstall/delete the app it clear all data except contacts which are stored by the app itself. So How to delete the contacts too?
App target platform is, iOS 5 & later & xCode version 4.5.2
Thanks
You can't. If your app saves contact to the user's iPhone contacts, there is no way of deleting them when your app gets deleted.
There is no way to detect app deletion. So there is no way to delete your data before deletion. So answer is no.

Can i hook into significant location change service so that i can track a Phone latest location?

i would love to build a auto-start with OS app which runs in IOS background(like a daemon) and when the phone changed its location the app send some information(userid,GPS,time......)to a web server immediately, in addition to,i want my app has no icon and users can not easily find it is on running or easily delete it. so i just wondering if these is some location-change notification i can hook into so that i can perform my code? anyone give me a good idea? i dont want put my app on appstore instead of i packaged it in deb,so i can use any private api or other non-official methods....
You can use CoreLocation native framework.we can access the current location of the user/device dynamically. follow the link for instructions coreLocation tutorials
According to Apple's Documents and guidelines, I don't think an app can exist without icon. The SDK doesn't have this feature as well. And no private API will be accepted into App Store. However, you can post your project on unofficial AppStores for jailbroken phones.

Location services control from iphone app

I installed an application from app store that uses gps. I have only put the app on install and it itself was added to the location services with button turned on. Whereas my r&d regarding turning location services on from my iphone app results that i cannot do it directly from my code. Can anybody explain this situation and answer me that whether the app can set location services at install time or is it something else
you cannot change the location services settings from your code.
when you first install/launch the app, it is the OS who ask for the usage of location services from User - not your application when your app just start code to find location.
User is given privilege to enable/disable location services usage for the app - as per apple policy.