Simulator/device does not sync with iCloud - ios

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.

Related

App is crashing when opening through TestFlight (Swift, 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.

Xcode 9 crashing when running split view app on iPhone

After working just fine on both iPhone and iPad for a month, my Xcode 9 app has consistently started crashing causing me the following fatal problem: When I build & run it on an iPhone (simulator or device) Xcode completes loading the app and then crashes too fast for me to copy/paste the error from the debugger. When I run on iPad it works fine leading me to believe this is a result of something related to the split master/detail view.
If I use either an exception breakpoint or an "all C++ exceptions" it will stop at the AppDelegate class and crash if I hit play. If I use only an "all Objective-C exceptions" it will crash as before.
In the debug view hierarchy I get the following errors as well:
Error: Unable to capture view hierarchy.
Details: Log Title: Data source expression execution failure.
Log Details: error evaluating expression “(id)
[[(Class)objc_getClass("DBGTargetHub") sharedHub]
performRequestWithRequestInBase64:#"...
Log Method: -[DBGDataSourceConnectionLibViewDebugger
_executeLLDBExpression:forRequest:onPotentialThread:iteration:]
_block_invoke_2
Method: -[DBGViewDebugger updateDebugHierarchy]_block_invoke_2
I have tested other apps and this issue is unique to the app I am working on. Any ideas or debugging tips for how to proceed? I might just have to redo this whole project again if I can't even find the root cause of this! Appreciate any help.
Quick solution: Reset Simulator Device
I managed to resolve the above issue thanks to some serious digging. First, to resolve the instantaneous crash problem, I set a breakpoint at every line in the app delegate. That allowed me to narrow the error to a memory handling problem. From there I started running the code on one of each device available, and realized the crash only occurred on devices I had used earlier in development. Resetting those devices solved the problem.
The core issue here is that when you clean/rebuild your xcode program, it updates the app code on the device, but not necessarily the data model information. So when I changed my data model by including new data and renaming old data it was not properly updated.

Xcode 8 simulator extremely slow

I am running Xcode 8 on macOS Sierra 10.12.2, and there seems to be a problem with running the simulator on my first "Hello World!" app (simulating iPhone 7 Plus). As you can see, I am very new at app development.
The simulator gets stuck at the loading bar with the Apple logo for about 10 to 15 minutes, and then gives me the message of "The operation couldn't be completed. (Mach error -308 - (ipc/mig) server died)".
I dug around the web and found solutions suggesting to go to Product > Clean in Xcode, also Simulator > Reset Content and Settings... in Simulator.
After which, the system gets stuck at the spinning clock for about 20 minutes and gives me the error message "Unable to contact local DTServiceHub to bless simulator connection" (solution I found online tells me to "Reset Content and Settings...")
I'm just really lost here because the error codes seems inconsistent in ways I cannot explain. Maybe it is my laptop? (Early 2011 MacBook Pro 15" 4GB ram, 2.2GHz Corei7)
Thank you in advance for your effort to help me.
On older/slower Macs the first run of an App on a simulator will be slow like this and an error often occurs:
The Apple logo bit is the simulator initialising (just like a real device when you cold start it) - just be patient and let it finish.
The error I suspect is something in XCode timing out due to be excessive delay. If this happens don't clean, just re-run: the simulator should not need to re-initialise so everything should be quicker and on my slow Mac setup the error does not tend to re-occur (unless I shut down or close the simulator - in which case I have to wait for it to re-initialise again!)
Helpfully you can manage without getting a new Mac :o)
I usually do this on Xcode 8.3.3.
Uncheck Debug->Optimize Rendering for Window Scale
Check again Debug->Optimize Rendering for Window Scale
It will work now
No Xcode simulator is not slow, It may be because slow animation is checked
Select Simulator
Debug Option and uncheck slow animation
That's work for me. Hope it works for you

Build stops when running for the first time in a day and shows Restore the connection to "iPhone 5" and run "Quiz" again

I am having a problem with my Xcode 6. Sometimes when I run in simulator the build stops after few minutes and shows:
Restore the connection to "iPhone 5" and run "Quiz" again, or if "Quiz" is still running, you can attach to it by selecting Debug > Attach to Process > Quiz.
This problem usually occurs when the app is running for the first time in a day. If I run again, it works perfectly.. I don't know what that problem was :(
Thank you..
As mentioned on my post in the dev forums and in the Xcode 6.1 release notes, this is unfortunately a known issues with the iOS Simulator.
3) "(Domain = FBSOpenApplicationErrorDomain, Code = 4)", "(Domain
NSPOSIXErrorDomain, Code = 3"),
"Domain=IDEUnitTestsOperationsObserverErrorDomain Code=3", "Lost
Connection to ...", "Debugger disconnected", or app getting SIGKILLed
soon after launch
Upon installation of an app, SpringBoard will
SIGKILL that app's process in order to force a relaunch of the app
with the new executable. The problem is that there is a race
condition whereby SpringBoard may accidentally SIGKILL a new process
that we just launched rather than the old process. Which of the
various error messages you get depends on exactly when in the launch
process the SIGKILL was delivered. Normally, this shouldn't happen,
so the advise is to just try again (sorry =/). If you find that this
happes to you all the time or more frequently than you can tollerate,
we are incredibly sorry. We are aware that systems with slower disk
I/O will see this happen more frequently than faster systems, so if
you are using an NFS home directory, you may want to create a local
directory for your simulator data and setup a simlink to it from
~/Library/Developer/CoreSimulator

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