I would like to do my app open when iPhone is turned on. I saw that have some people saying can be using voip key in Info.plist but I tried and can't to do that. Do someone have any idea to help me? Thanks
In short, iphone does not have any access to permission to edit about "onboot" or "onstartup."
Thus, without jailbreaking this would not be possible.
Check the links I provided on your comment.
This would not happen, your app will be active in background through pushkit only when your app dismissed before device goes off.
VOIP - The app provides Voice-over-IP services. Apps with this key are automatically launched after system boot so that the app can reestablish VoIP services. Apps with this key are also allowed to play background audio.
Even with "voip" present in "UIBackgroundModes" in "plist", iOS App does not auto start after device reboot in iOS10
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW1
Related
Could someone tell me "How to detect launch app via MFi device on iPhone"?
Apple announced several major changes for a new Location Permission Flow on iOS 13.
(https://gimbal.com/ios-13-location-permissions/)
If want to get the GPS signal, the user need to select while in using or always.
And set up showsBackgroundLocationIndicator = YES, the app could get the GPS in the background.
It works well on the normal case(Launch with press the icon on the mobile screen).
But I figure out it could not receive the GPS if launch app via MFi device.
I also report it on the Apple bug report(https://feedbackassistant.apple.com/feedback/7537501)
I got a workaround but the first one is how to detect launch app via MFi device on iPhone.
By the way, I also check the argument of UIApplicationMain, but no use.
Please help or try to give some ideas about how to achieve this. Thanks!
Test Steps
1. First launch & user accept the location permission
2. Confirm the GPS could be used & check the setting page
3. Force close the app
4. Plug with the lighting and launch via MFi device
Answer my final solution.
I figure out if the app launch via the MFi device, the initial flow will enter applicationDidEnterBackground and not run to applicationDidBecomeActive. So, I just add a flag to record that and detect the EAAccessory status.
Share for who guys have a same problem. Hope this could be helped.
iOS 15 can use CLLocation's sourceInfo(CLLocationSourceInformation) to determine location information is from Xcode or MFI.
I have written an app that automatically restarts on a Significant Location Change if it was closed.
When the device is first powered on, I have configured the device settings to insist on entering the passcode before using the device.
I can't seem to get my app to run if I haven't entered in the passcode.
So: Is there some documentation that says I must enter the passcode before running apps - or is there some obscure setting in the application that needs to be made?
I have spent a huge amount of time trying to find information one way or the other in Apple's documentation, but cannot.
Yes, the passcode is needed before any apps are restarted into the background.
If an iOS device with a passcode lock is restarted, no application can launch in the background prior to the device first being unlocked.
This behavior, and resulting limitations, are by design.
[Source: Apple Developer Technical Support (DTS) late Febrary 2016]
I am a bit confused as when I run the Apple Watch extension App schema on the simulator I see only that the Apple Watch app gets lunched. However I am not sure what will happen with real hardware once we get our hands on the Apple Watch.
I'd like to understand the following:
Do I need to start the corresponding iPhone App on the phone before
starting the App on the Apple Watch?
If the answer to 1 is no then, can I
start an iPhone App from the App on the Apple Watch? If the answer to 2
is yes then how can I start the iPhone App in a way that is not in
the background? (I found handleWatchKitExtensionRequest can trigger
background tasks but I haven't found any documentation yet for
that - I also found the Handoff Api which allows you to resume a task on the device but I don't like that it requires an iCloud account and I am not sure how to structure an App/watch interaction without forcing the user to adopt iCloud).
Given that the Apple Watch App extension resides on the iPhone App
bundle does this mean that when you start the Apple Watch App it needs a
connection and proximity with the iPhone device? I assume that there will
be a bluetooth connection and that it won't be possible to start
some apps if the user and its watch are away from the Iphone (what's
the range?)
Many Thanks
No.
No.
Unless you are on a Wifi network recognized by both your Watch and your iPhone, they'll need to be relatively close to each other. Guessing at range is useless – a number of factors can impact the useable distance of BTLE.
I am developing a WatchKit extension for one of my Apps where I really want to have the iPhone App running in the foreground, since it is doing the heavy lifting and is designed to use location services only when active. I know openParentApplication:reply only opens the App in the background (unless it is already active). What I am currently trying out is using a custom URL scheme for my App, and having the App initially open itself from within the handleWatchKitExtension code in the App Delegate. This works perfectly in the Simulator. Unfortunately I did not have this approach ready when I tested my App on real Apple Watches. Does anyone see a problem with this approach to bring the iPhone App to the foreground from the Apple Watch?
On iOS, apps can't bring themselves to the foreground. The best thing you can do is to post a local notification (UILocalNotification, see https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html) and invite the user to bring your app to the foreground.
But for your use case, why not just have your phone app use location services in the background?
This is not possible. The Apple Watch Programming Guide states that the app on the iPhone will run in the background if it was not active before.
Is there a way to know when the device is rebooted in ios, like "BOOT_COMPLETED" permission in android. Went through internet and could not find and appropriate answer. Any help would be appreciated.
https://github.com/lithium3141/BootLaunch
You can refer this page but one think, if your app doesn't have voip feature means Apple will reject your application.
Apple State in their document:
https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW1
UIBackgroundModes
voip-The app provides Voice-over-IP services. Apps with this key are automatically launched after system boot so that the app can
reestablish VoIP services. Apps with this key are also allowed to play
background audio.
remote-notification-The app uses remote notifications as a signal that there is new content available for download. When a remote
notification arrives, the system launches or resumes the app in the
background and gives it a small amount of time to download the new
content.
This value is supported in iOS 7.0 and later.
voip key is the technique used most of the voip applications like skype.