App is crashing when opening through TestFlight (Swift, iOS) - ios

I have a problem, when I test my iOS App on a real device or when I testing it in the simulator all is working as expected, but when I submit the app to TestFlight and I want to open it on my device the app is instantly crashing on launch. My last changes on the app was that I added the option that the user can pick another App Icon, nothing else. But now the app is crashing in TestFlight. Anybody has an idea what I can do?
Sometimes I get this error:
<NSError: 0x28227d6e0; domain: BSServiceConnectionErrorDomain; code: 3 (OperationFailed); reason: "XPC error received on message reply handler">;and thisMultiple RBSRunningReasonAttribute provided: 13 vs 20254. First one wins, but client should be fixed for assertion 31-112-6223`
I already tried to changes Scheme to Release but nothing changes still works on the simulator and the real device.

Related

Xamarin.iOS app crashes on startup on iOS13 on Testflight

I have tested the application on Testflight and as soon as I open it everything works correctly. The problem comes when I close the app and open it again, at that moment the application crashed and does not let me open it anymore.
I am testing on my iphone 6s with iOS 13.1.3.
Can anyone help me, please?
The App Center SDKs work well for capturing crash information. You can then see it in the App Center Portal
I have already added AppCenter to the project, and now I can see the analytics, but it doesn't catch me crash error.
About the configuration of AppCenter, I have added to the AppDelegate.cs (FinishedLaunching)
AppCenter.Start("bxxxxxxxxxxxxxxxxxxxxxxxxxxx3a0",
typeof(Analytics), typeof(Crashes));
Crashes.NotifyUserConfirmation(UserConfirmation.AlwaysSend);
Crashes.SetEnabledAsync(true);
And to the App.xaml.cs
AppCenter.LogLevel = LogLevel.Verbose;
AppCenter.Start("ios=b41cxxxxxxxxxxxxxxxxxxxxxxxxxx0;" +
"uwp={Your UWP App secret here};" +
"android={Your Android App secret here}",
typeof(Analytics), typeof(Crashes));
Crashes.NotifyUserConfirmation(UserConfirmation.AlwaysSend);
I test the Crashes.GenerateTestCrash on the simulator and It works, but exaclty the iPhone crash no

HockeySDK Warning - How to test crash reporting?

I got this warning when running my application with HockeyApp integration:
[HockeySDK] WARNING: Detecting crashes is NOT enabled due to running the app with a debugger attached.
Crash reports are not sent and no alert is displayed when opening the app again.
Any one have any idea how to resolve this issue?
This has very simple reasons:
If you are running the app with Xcode attached, your app is connected to lldb, Xcode's debugger. When lldb is attached, it will of course do its job as a debugger and catch any exception or crash that occurs. This means that the crash can never reach the HockeyApp SDK or any other crash reporting SDK while lldb is attached at the same time.
The solution is also pretty simple. If you just want to make sure the SDK is integrated properly and will catch crashes, do the following:
Do a quick "Build & Run" to install the current version of the app on the simulator or device.
Click the "Stop" button in Xcode to stop the debugging session.
Manually start the app on the device or simulator by tapping or clicking the app icon.
Cause a crash.
Restart the app. Now the HockeySDK should process the crash report and show a dialog to approve crash log sending.
One thing to keep in mind: Make sure to not make the app crash immediately after app start as this would not give the SDK enough time to process and send the crash report before crashing again.
Hockey app sdk by default does not send report when a debugger is attached. There is nothing wrong with this.
It will send report when a archive build that release to ur tester cause a crash. I personally think this should and remain as this because you are trying to track crashes from your tester not when you are developing.

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.

Simulator/device does not sync with iCloud

From time to time I'm getting errors that my iOS 8 device or simulator will sometimes not sync with iCloud (Drive). The following message appears (multiple times) in the output log:
CoreData: iCloud: Error: failed to receive initial sync notification
call back in 90 seconds
Only reinstalling the app helps.
Has anyone experienced the same issue or got some information about this?
I have seen that error (today) on an iPad running iOS 8. I fixed it by performing a reset (hold power and home/sleep buttons until the Apple logo appears). After that when I reran my app it synced immediately.
For the simulator it may be sufficient just to quit the simulator and relaunch. However, I have seen cases where restarting the computer was required.
I'm not sure what the cause of the issue is but hopefully the above help.

iOS7 xCode 5, how to get crash logs from a development build on device?

I playtested the game that I'm making on my development iPad, while it was not connected to xCode. There were 4 instances where the game just crashed/closed.
If I remember correctly, these crashes should create a crash report which can be visible in the Organizer>Devices>Device Logs. However, upon checking this, I see only 1 (instead of 4) reports, most of which are marked as "unknown".
Is there a way for me to refresh the device logs, or make sure that my device does keep logs of all crashes that happened while not connected to xCode?

Resources