App freezes/behaves strangely when opening FROM App Store - ios

We have an app on the App Store that is experiencing problems.
The app works fine through XCode, the app works fine when launched from the iPhone/iPad/iPod "dock" (the screens with all the apps, not sure what the official name is). However when trying to open the app straight from the App Store by pressing the "Open"-button, the app behaves strangely. The behaviour is also different on different devices.
We have 3 devices we can test on, an iPhone 7 Plus running iOS 10.3.1 (also tested on 10.2.1), an iPad Air 2 running 10.2.1 and an iPod Touch Gen 5 running 9.3.
iPhone behaviour: App opens then gets stuck at a black screen with an empty title bar.
iPad behaviour: App opens, skips the entire first tutorial view and continues to work as it should.
iPod behaviour: App works as it should.
The iPhone 7 Plus running 10.2.1 behaved exactly the same as when it's running 10.3.1.
I have tried finding more information about this problem but have so far been unable to. Have there been any other cases like this, and if so, is there a fix?
UPDATE: I HAD THE CHANCE TO TEST THIS ON AN IPAD RUNNING 9.X, THERE WERE NO PROBLEMS, SO THIS SEEMS TO BE A 10.X ISSUE

My problem ended up being the following. I pass the launchOptions from this function
-(BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
to another function and then check whether it is nil or not. However when it launched from the App Store it wasn't nil, specifically the following key:
[[launchOptions objectForKey:UIApplicationLaunchOptionsSourceApplicationKey] isEqual: #"com.apple.AppStore"]
It was trying to run code for when the launchOptions aren't nil, when in fact they were, except for that key.

Related

iOS App works fine with Simulator but Crashes with a real iOS device

I know there are already similar problems on StackOverflow, but mine is a little different. So when I launch my app on the simulator, it works just fine, however, when I launch it on a device, it loads everything and launches the app but as soon as it does that, both my Xcode and the app on my phone crash.
I have no code to post as my Xcode crashes but if you know why this is happening or any code that may be useful to you, please let me know.
I think you should follow the orders to figure out what the problem is:
1、Make sure your device type and iOS Version is right. Some newer apis do may cause crash on old iOS version. If your device's iOS version is not the same as the version of your simulator, maybe it's the reason.
2、If you're using iPhone 5 or iPhone 5c. That means your device does not support 64 bit calculation. Check it out.
3、Add Global Exception from exception panel. Switch to exception panel -> click plus button on the left bottom of the panel -> Choose one or more global Breakpoint you want to add. Then you should get where is wrong before it crash.

iOS Sharing Extension works on Device but not in Simulator

I had to delete the Sharing Extension I had in my project and start it over from scratch - its working just fine on my iPhone6 now, but its not showing up in the Simulator - which is very weird.
The Photos App in the Simulator for example is unable to see my App. Same goes for the Settings App: its not seeing my App (there's no on/off switch there to enable it.)
I know I did everything right - cause its working fine on the iPhone - but its still a drag cause testing it on my iPhone just takes longer than it would on the Simulator.
I'm thinking there's some tiny little setting - some little checkbox I need to check somewhere to get it working in the Simulator again - any ideas?

iphone app on iphone 6 every now and then switches to background

I am in the process of testing one of my apps. It works fine on iphone 4s and 5. On iphone 6 however, my tester is reporting that every now and then the app goes to background and he need to relaunch. I would assume it is crashing but he is not able to replicate it (which means there is something really wrong).
Any idea how to go about figuring out what's going on there? All three phones are on ios 9.0.2 all code base is Swift 2.0.
You could add Crashlytics. I included a link below. It works really well. It will send you crash reports with a stack trace.
Crashlytics Link

App hanged only in iPhone 4 with iOS 7.1

I am creating an iPhone app with some user authentication screens. I have created these screens in Storyboard. For example, landing screens, sign in screens, Sign up Screens etc.. and made connections between them using model segue. Every things work fine.
The Problem is that the app hangs in my iPhone 4 with iOS 7.1. I have also tested it on 4s, 5 and 5s all with iOS 7.1. In all these devices App works fine and fast without hanging.
Can anyone suggest me why it hangs when i go from one screen to other screen like (Sign In, Sign Up, etc..) in iPhone 4.
Since you are using Google Maps SDK, you could check this issue.
I encountered the same problem, and in the end I ended up switching to Apple maps, since Gmaps has a tendency to leak memory, for what I witnessed at least...
iPhone 4 is a single-core device while all the other iOS7 ready devices are dual-core. Maybe it can't keep up with initializing your view and thats why it lags.
You should try Time Profiler from Instruments to catch what is too much for a single-core device.
I have this same error when I was trying to launch an UIAlertView in the start of application.
Try not to launch do anything in main thread before you have set your window key and visible in
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
...
[self.window makeKeyAndVisible];
}
I hope this helps

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