iOS simulator dropping managed objects on entering background - ios

When my app is running on simulator and I press the home button it enters the background properly. But when I put the app back in the foreground, it has apparently dropped all the managed objects in memory, and the app crashes when I try to resume using it. There's no code in the any of the callbacks for the app changing state that would cause that, and the app has never displayed this behavior before.
What changed was going to xCode 6 / iOS 8 on the simulator, and I also applied "Reset content and settings" in response to this problem.
The app behaves problem-free on actual devices, both iOS 7 and iOS 8. Is this another bug with the new iOS simulator?

If you did "reset content and settings" with the app in the background, you probably blew away all its context. You should terminate the apps in the background before running that.

Related

iOS: Blank titles of buttons, labels

I am using the latest software. Xcode 12 and iOS 14
After installing the app from Xcode whether it was a simulator or a real device everything just fine. But, when re-launching the app after stopping the application from running through Xcode everything just blank.
I believe the problem is not related to the appearance mode because I already tried that.
The first image shows the notification page when I run the app through Xcode.
The second image shows the notification page when I run the app normally (Pressing the app without Xcode). It's not only the notification controller, all the app is facing the issue.
Just created a new project and copied my code into it. The project worked as expected

libGDX iOS home button kills the game

I'm developing a libGDX game for Android and iOS (MobiDevelop's RoboVM fork). Android works perfectly, but I have a issue on iOS. When the iPhone home button is pressed to leave the game, and I launch the game again by tapping on icon, the game does not resume from where it was paused, but instead restarts, which means the loading screen is displayed, all assets are reloaded, and the main menu appears. Like a fresh/new start of the app. I do not have any specific configuration for the iOS module in my libgdx project and am using what was pregenerated.
Is it possible to tell iOS that I do not want to kill the process? I want to switch to pause/sleeping mode only.
I found a reason of this problem. I tested it on the real device, therefore I was unable to see a logs. When I switch to simulator and look at the logs, I found a NullPointerException. This was a cause of application crash. When I fix this bug, everything works as I expected. After iPhone home button is pressed, pause() method of com.badlogic.gdx.Screen is called and after rerun the game, it continues from exactly where it stops / pauses.
I learned a lesson: make a tests on simulator at first :-)
While I am entirely unfamiliar with libGDX, I can tell you that except for a few very specific cases (VOIP etc.), you cannot control what iOS does with your app when the home button gets pressed.
Furthermore, it is the responsibility of the developer to save the app's state when the app leaves the foreground since this is not something that is or can be handled automatically in a performant way.

iOS 8 app goes background in open

After iOS 8 release, we are getting feedback from some users about our app that whenever users try to start app, operating system navigate it to background. I was able to examine this issue myself and I see that OS does not terminate app or app does not crash. In fact, app appears in background apps menu. Whenever user tries to open the app it closes itself something as if “simulating user's home button touch”. Of course, I’m not doing something like this by code. And this issue only show 100 in 1 and only in iOS 8 devices. It shows any kind of devices from iPhone 4S to 5S.
Have you ever encounter an issue like this?

Custom keyboard doesn't load on device

I'm doing a custom keyboard for iOS and am pretty much finished. However, I did the debugging on the simulator, but when I tried to run it on a device, the keyboard simply won't load. The device is running on iOS 8.
I don't think I'm using any non-Cocoa Touch classes that would run on the simulator but not on a device. Also, the debugger won't attach to the app, so I don't know what's happening for sure. The view where the keyboard should be does show, but no content appears or is there a background color change.
Any ideas?
It's quite common even in iOS 8 GM.
Try to remove the keyboard in Settings, restart your phone and add the keyboard again. That works for me most of the time.

iOS Default.png always comes up on some devices

I have an app and the Default.png images always comes up on some devices when coming back from background.
It would seem to be happening for apps that were created after I upgraded to XCode 4.6.1.
I tried the solution suggested here:
IOS Default.png show every time when my app enter foreground from background
and no go.
If I run the app on iPhone 5 with 6.1.4, the Default only comes up once when the app is initially launched. After that, it never comes up.
If I run the app on my iPad 3 with 6.1.3, the Default always comes up after coming back from background.
My QA lead sees the issue on her iPad 3 with 6.1.4.
Did they change something in the XCode project settings?
Genrally Your App Enter in to Foreground ,IOS 5 simulator displays a Lunch Image where IOS 4.3 simulator take a screen shot of the App when it was entering in to background , but testing on real device its work perfect.
I found the answer by chance here:
Prevent Splash Screen from showing after returning from background
Turns out I had set UIStatusBarStyle in my info.plist and that caused the issue on iPad 3.

Resources