How to use a launch storyboard or XIB? - ios

iOS App Store did not reject but downloaded app can not complete app launch
Published version in App Store stays on startup then closes.
My NativeScript-Vue app was updated from NS v6
I have re-generated splash images
runs fine through ns run ios --device or ns run ios --emulator
I can run app on iphone 6S using Xcode too
I can even publish to Apple Store and it's excepted.
But released app can not start and stays in the launch screen for a while then closes.
It looks like It's the same error I was getting in my previous attempt to build.
My app runs only if Main Interface area is empty
If I select LaunchScreen or LaunchScreen.storyboard app stays on launchScreen for ever.
Details:
I am getting errors after build analysis such as;
/Users/user/Documents/myapp-mobil/platforms/ios/Pods/MaterialComponents/components/Tabs/src
/MDCTabBarViewController.m:213:5: nil passed to a callee that requires a non-null 1st parameter
and
/Users/cemkaan/Documents/myapp-mobil/platforms/ios/sebappmobil/Resources/Assets.xcassets:1:1: Launch images are deprecated in iOS 13.0. Use a launch storyboard or XIB instead.
iOS Development Target: 12.4
It was rejected from the app store with a Binary Rejected notice
iOS crash log which I have shared as a gist. says:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
UNUSED SPACE AT START
__TEXT 1003e8000-1003ec000 [ 16K] r-x/r-x SM=COW ...p/myappmobil
Am I doing something wrong in Main Interface area?
Is there any way to determine; why the published version can not complete the app launch?

Related

App crashing in every first launch from TestFlight

My app got crashed in every first launch from Testflight. It runs perfectly well from debugger. After installing from Testflight, it shows splash screen for more than 20 seconds on first launch, then got crashed. But it works fine on second or third launch. No crash report generated in crashlytics and iTunes.
I created ipa file and installed directly through devices option in xCode and it showing
failed to launch after 20.00s (launchIntent: foreground-interactive)
on first launch. It takes more than 20 seconds to launch in debugger too.
As the app is failing to launch in 20 seconds iOS is killing the process. No 3rd party SDK will be able to provide a crash report for this! You need to check the crash report on the actual device for more details.
You are doing something early in your apps code (most likely applicationDidFinishLaunching) which is taking too long and blocking the main thread.

iPhone 6S/iOS 9.1 : Can't find crash log with code 0xdeadfa11

I just discovered it is possible to force quit a frozen application on iOS.
According to the Technical Note TN2151 I should get a crash log on my device with code 0xdeadfa11 but I have no such crashlog.
The exception code 0xdeadfa11 indicated that an application has been force quit by the user. Force quits occur when the user first holds down the On/Off button until "slide to power off" appears, then holds down the Home button. It's reasonable to assume that the user has done this because the application has become unresponsive, but it's not guaranteed - force quit will work on any application.
Note: Terminating a suspended app by removing it from the multitasking tray does not generate a crash report. Once an app has suspended, it is eligible for termination by iOS at any time, so no crash report will be generated.
Is it an apple bug or are there some additional steps I am missing ?
EDIT
If I check the device console after the force quit I see this log :
ReportCrash[2074] : Stackshot code 0xdeadfa11 not tasked,
ignoring
Seems that for whatever reason iOS decides not to generate deadfall crash report.
I tried to generate force quit on three devices:
1)iPad 3 (iOS 8)
2)iPad Air (iOS 9.2)
3)iPhone 5 (iOS 9.2.1)
When I tried to generate crash on all three devices via xcode while debugging, no crash log was generate instead I got the following error message:
Message from debugger: Terminated due to signal 9
which I think similar to your message:
Service exited due to signal: Killed: 9
and when I tried to generate crash without debugging and seeing log via device logs then I found:
1)For iPad 3 (iOS 8): Crash log was generated, screenshot attached.
2)For iPad Air (iOS 9.2): Crash log was not generated.
3)For iPhone 5 (iOS 9.2.1): Crash log was not generated.
As per my understanding, when you try to generate force quit via xcode while debugging, it does not get generated and for case try to generate crash while without debugging directly in your device then it might be os (iOS 9) specific reason.
P.S: And Service exited due to signal: Killed: 9 is generated due to memory issues, and high CPU consumption tasks.
Hope this might help you further.
The Apple note says that Terminating a suspended app by removing it from the multitasking tray does NOT generate a crash report. I don't think you will have a log.

iOS app crashes immediately when debugging AppleWatch app on Simulator (not on device)

I've got an AppleWatch app that is working fine in Simulator and Device, but when I call openParentApplication, it appears that the parent app is crashing immediately because I see this in the console output:
The UIApplicationDelegate in the iPhone App never called reply()...
When I try to manually launch the parent iOS app in the Simulator it crashes there too immediately. I don't have time to attach the debugger (which is already attached to the AppleWatch app) to see what is crashing it. Note that the parent app runs fine when the AppleWatch is running and I'm using a real iPhone. I can also run the app fine on the Simulator when not debugging the AppleWatch app.
I've tried resetting the Simulator, but problem persists.
I'm just not sure how to debug this. Any help is appreciated.
Start an explicit background task in handleWatchKitRequest. Otherwise, your app gets killed before it reaches reply().
Refer to this post for a code example on how to create a background task.
In turns out that after commenting out all code in the parent app's didFinishLaunching and stripping almost all code out of the watch extension, the problem was indeed at a lower level.
The Simulator has a
Debug | Open System Log...
menu option that showed the crash logs, which contained:
Dyld Error Message: Library not loaded:
#rpath/MyCore.framework/MyCore Referenced from:
/Users/me/Library/Developer/CoreSimulator/Devices/A2061705-DDDF-477C-9AAA-E50GG43A6350/data/Containers/Bundle/Application/DEB7FB25-8233-4B9F-8DAB-9FF8AE42BF33/MyApp.app/MyApp
Reason: no suitable image found. Did find:
/Users/me/Library/Developer/CoreSimulator/Devices/A2061705-DDDF-477C-9AAA-E50FF43A6350/data/Containers/Bundle/Application/DEB7FB25-8553-4B9F-8DAB-9FF8AE95BF33/MyApp.app/Frameworks/MyCore.framework/MyCore:
mach-o, but wrong architecture
My Swift app has a few dependent Swift projects that are used by the app and extension. Getting the Swift frameworks to link has been a major pain. I've included the dependent frameworks (compiled in the same workspace) as embedded binaries. This works when running on the device, or on the Simulator, but not when running in this hybrid watch app + parent app Simulator context.
I changed the embedded binary references to point to the frameworks under ...DerivedData...Debug-iphonesimulator, as opposed to ...DerivedData...Debug-iphoneos, and the problem went away.
Still hoping the Swift framework story will improve.
Are you seeing an actual crash? That message has appeared for me plenty of times without the host app crashing.
99% of the time, that error appears because developers aren't opening a background task to complete their work in handleWatchKitRequest. Without the background task, the OS kills your app in the background before it has a chance to reply.

iOS Simulator Crash in App with Embedded Binary

I'm having a strange issue and wondering if anyone knows what is going on. In Xcode 6.2, if you follow these steps:
create a new workspace
create a new iOS > Application> Single View Application project in
the workspace
create a new iOS > Framework & Library > Cocoa Touch Framework
project in the workspace
add the framework as an embedded binary in the app
build and run the app on any 8.2 simulator and then stop it
launch the app from within the simulator
Every time you try to launch the app from within the simulator (not running it from Xcode, but actually clicking on the app icon inside the simulator) the app crashes on startup. The only thing I see in the system log is:
Apr 3 20:04:53 MacBook com.apple.CoreSimulator.SimDevice.6B002DFB-FE6C-4295-BA22-742E4CEE2B6D.launchd_sim[61494] (UIKitApplication:com.test.TestApp[0xcb1d][61787]): Service exited due to signal: Trace/BPT trap: 5
Apr 3 20:04:53 MacBook.local SpringBoard[61507]: Application 'UIKitApplication:com.test.TestApp[0xcb1d]' crashed.
Apr 3 20:04:53 MacBook assertiond[61511]: assertion failed: 14C1514 12D508: assertiond + 14743 [849F745E-3AAA-3638-91FF-892312A54F42]: 0x1
Does anyone know if this is by-design or if embedded binaries work correctly? I'm hesitant to add an embedded binary to my app if the app always crashes in the simulator.
Thanks!
- Tom B.

iOS app runs in simulator, ad-hoc distribution crash on launch

My iOS app runs correctly in the simulator and debugging device but when running on an ad-hoc allocated device, the app crashes and according to the app called "console" the app crashes with signal 9, killed 9 and also the app is killed with for termination assertion. I'm lost at this point as what to do. Let me know if you need more information.
Here's the link to the code: https://www.dropbox.com/s/ch48v8uiyx7wiqh/Animal.zip
Besides the other answers, which are good suggestions, a common root cause of this problem is that the Debug configuration can sometimes mask dangling pointer memory bugs. Do the following:
Run the app in the simulator with release configuration. If it crashes. . .
Use log statements and reruns to narrow in on the cause (debugger won't be available).

Resources