UIApplicationExitsOnSuspend is there an equivalent for iOS 8? - ios

UIApplicationExitsOnSuspend is only applicable to links against SDK 4, is there an equivalent for iOS8?
The app that I am working on has to exit and leave no trace for the user resume from, as the app provides a pay for service, and it requires that the next person using it cannot resume from where the previous user may have left.
I tried things like exit/abort and the latter but all appear to leave a trace to resume from...

In the info.plist for your app click "+" to add a new entry and select "Application does not run in background", for the value select "YES".
When an iOS app moved to the background it takes a snap shot and displays this in the multitasker, you will want to make sure that this doesn't occur when the app is terminated as you may be displaying sensitive information. If this is the case then look in to ignoreSnapshotOnNextApplicationLaunch to prevent that snapshot image from being taken.

Related

How to fully deactivate Apple App Clip - it still pops up

I added Apple App Clip but later removed it not yet needed. It was added "Advanced App Clip Experience", later deactivated, but when you bring the NFC tag to the phone, an alert still pops up with an empty content and message "This app clip is not currently available in your country or region".
Deactivated Advanced app clip in App Store Connect
Expired all builds in TestFlight, which contain App Clips
Everything in app association file, domains for app clips, etc - removed
So why NFC scanning still present App Clip, but not redirect me in app/safari as earlier?
I had the same problem. The fix was to ensure that the App Clip Experience was deactivated in App Store Connect.
I submitted a binary/build that contained an App Clip to Testflight so that I could access the Advance App Clip settings.
Deactivated the App Clip Experience (your step #1)
Waited a day to account for the caching system, and now, after testing, scanning my QR Code (in your case, it would be triggering the event with the NFC tag) produces the correct results.
It is important to note that even though you may have a live app that does not contain an App Clip, you must still deactivate it in Advance App Clip.

App freezes several seconds before start on device

I'm a free developer and I use my swift application on my iPhone 7. I'm using Swift 3 and iOS 10.
So the problem is, sometimes (like 2 of 10 times) when I start the app, iOS freezes like 5 seconds before my app actualy comes to the screen. In this time I only see the app icon is in the highlighted state. This only happens with my own app, not with other apps.
My app also does nothing special on startup and this only happens on the real device, the debugger in Xcode always starts immediately.
So is this a normal behavior? And does it work properly when I decide to put it on the App Store?
Thanks in advance.
I have had this happen to me before. No, this does not happen when it is put out on the App Store. One way to get around this is to use TestFlight. You can upload your archive to apple and select on the 'TestFlight' tab of your app. Click on internal testing and then click on your email and the version of the app you want to test. You should then get an email on your Apple ID telling you to test the app, and it will let you download it. Good question :)
To test the same version which would have been uploaded to the store quickly, change the build configuration to release. To do so, click on your app's name (top left), press edit schema, click the build configuration dropdown, also deselect debug executable. (make sure to turn it back when you're going to debug, or create a new schema with the above settings to let you switch quickly in the future)
You might also try using instruments, that lag on startup might happen if you're trying to load many things in memory on your initial view controller's viewDidLoad or app delegate's didFinishLaunchingWithOptions load, especially when trying to load big files such as images, videos or large plists. You might want to try using instruments (the time profiler instrument specifically) in order to check it out.

How to keep app running on apple watch instead of automatically going back to watch face?

I'm developing a WatchKit app that I want to stay in focus until the user actively selects another app or goes back to the watch using the digital crown. Just like with the built-in Workout app.
I don't want the app to be visible on screen forever, just that when I look at the watch after some minutes I want to have updated information for my app without having to go back to the app manually due to automatic switch to the watch face.
I don't think you can control this in your app, at least not in WatchOS 1. The only way I think this can be done is for the user to select "Resume To: Last Used App" in Settings > Activate on Wrist Raise.
Apps such as Nike+ currently advise users to change this setting before starting a run.
WatchOS 2 allows apps to register as fitness apps, that will contribute as a workout and will resume when the watch is activated / raised.

exit application when click button - iOS [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Exit application in iOS 4.0
I have a AlertView which displays some text and an "OK" button. Is there any way to exit application when clicked on OK button?
exit(X), where X is a number (according to the doc) should work.
But it is not recommended by Apple and won't be accepted by the AppStore.
Why? Because of these guidelines (one of my app got rejected):
We found that your app includes a UI control for quitting the app.
This is not in compliance with the iOS Human Interface Guidelines, as
required by the App Store Review Guidelines.
Please refer to the attached screenshot/s for reference.
The iOS Human Interface Guidelines specify,
"Always Be Prepared to Stop iOS applications stop when people press
the Home button to open a different application or use a device
feature, such as the phone. In particular, people don’t tap an
application close button or select Quit from a menu. To provide a good
stopping experience, an iOS application should:
Save user data as soon as possible and as often as reasonable because
an exit or terminate notification can arrive at any time.
Save the current state when stopping, at the finest level of detail
possible so that people don’t lose their context when they start the
application again. For example, if your app displays scrolling data,
save the current scroll position."
> It would be appropriate to remove any mechanisms for quitting your
app.
Plus, if you try to hide that function, it would be understood by the user as a crash.
You can use exit method to quit an ios app :
exit(0);
You should say same alert message and ask him to quit
Another way is by using [[NSThread mainThread] exit]
However you should not do this way
According to Apple, your app should not terminate on its own. Since the user did not hit the Home button, any return to the Home screen gives the user the impression that your app crashed. This is confusing, non-standard behavior and should be avoided.

Error "This app does not have access to your photos"

My app is working good on iPhone 5 but has a problem in iPhone 4 with the same iOS 6.0.
The problem is: When I try to open the photo gallery this issue came "This app does not have access to your photos and video"?
How can I solve this in my application programmatically?
There is nothing in the app what you could do.
The first time you attempt to access the library iOS will ask the user whether the App may access the library/photos or not. In your case the user using the iphone 4 tapped on 'no'.
At the same time an entry is created in the settings/privacy/photos/ with the display name of your app and your small settings icon (if you provided one - otherwise the standard icon will be shrinked automatically)
Go there and switch from off to on.
Do not expect this switch to take effect while the app is running. Along with the address book, not the photographed, I even observe some crashes when this setting is changed while the app is running.

Resources