We have an iOS app for which we've updated the UI and branding.
If we produce a test build of the new app, and run it over the existing app (i.e. upgrading it), it runs fine.
However, if we quickly press the home button to exit the app, and quickly go back in again, it shows a cached old copy of that screen while it's loading. This is jarring in our case, as the colours are completely changed in the new app.
Is there any way to prevent this?
Related
I have a relatively small app, a couple of views managed by a StackNavigator.
I have three custom fonts (TTF), used throughout the app.
The app works fine on the simulator for both Android and iOS - custom fonts display as expected.
I have now begun submitting my app to TestFlight and running it on device - two separate iPhones, so far.
When first loaded, the app works as expected and the fonts display correctly.
However, when the app goes into the background, and then is pulled into the foreground again, the fonts revert back to system fonts. (The page that is pulled from background actually looks correct, it is when the stack switches to another view that those fonts are incorrect.)
If I force close the app, then relaunch, everything is fine again until the next time it goes into the background.
Any thoughts on why these resources are not displaying?
Circling back to answer this for future readers:
I stripped my app down to parts. Generated a new project with the latest RN version, etc.
Built out a minimal project with react-navigation and it crashed.
Removed navigation, and used conditional rendering to display pages and it crashed.
Stripped it down further, and ultimately found that setting the Display Name in XCode was the culprit: my app name had a '?' (question mark) in it.
iOS guideline say this is ok, and nothing broke on deployment, but something about React Native and reloading the context with this character broke something. My gut says that the question mark in some globbing routine to find the font files was causing it to miss.
Removed the question mark and it renders fine coming back into the foreground.
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.
I have an IOS swift app that I'm working on that seems to run fine. When I press the home button to exit it while running, the app icon turns grey and I can't go back into the app nor delete it. The only way tot go back is if I double tap the home button and find the app under all the running apps. What is causing this issue?
I was trying to change the app name and maybe messed up some setting because even earlier iteration of the app doesn't work so it's not a bug in code.
I am trying to create a settings bundle for a new app. When I use the default version, that is correctly displayed, yet when I just touch the file, by adding and deleting a space, for example, I get a totally empty screen as you may see in the attached screenshot. What is worst is that, even I restore the original settings, the screen remains as such until I delete them altogether and recreate them after running the app once without the settings.
It seems to be a general bug hopefully only affecting the development device. Quitting the settings restores it. To clarify the issue happens act second time the app is launched, even without touching the screen.
I am working in Instruments and need to use the Allocations/Leaks profile, but for some reason my application won't run with those templates. I have a login screen, which is initially presented modally and once logged in will disappear modally as well. It opens the app and begins the login process, but once it logs in it begins to dismiss the page modally, but only makes it down as far as the bottom of the nav bar. It then freezes at that point and I can't do anything, but it continues to profile the running operation. I have reset everything and cleared all data in the iOS simulator. I also tried it on all of the different versions of the simulator including a physical device.
The problem is that this does not occur when I run the app regularly or when I use the Time Profiler template.
Why is Instruments not working with my app when using Allocations/Leaks/Zombies?