|
I am following the UltimatePortfolio app video series and am on Video 6: Showing, deleting, and synchronizing issues. The app is designed to sync using iCloud. When I try to build and run the app I get the following error: Domain=NSCocoaErrorDomain Code=134400 "Unable to initialize without a valid iCloud account. I am confident I have set up iCloudKit in the app as described by Paul. I have also logged into my iCloud account and iCloud Drive on the simulator (I'm simulating an iPhone 14 Plus) which I found from web searches was often sited as the issue but I still get the error. Any ideas on cause and correction? I'm pretty much at a standstill for this project until I can get the iCloud issue resolved. Thanks. |
|
Do you have an active Apple Developer Account? You need one for CloudKit support in your app. https://developer.apple.com/help/account/reference/supported-capabilities-ios |
|
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure and A/B test your entire paywall UI without any code changes or app updates. Sponsor Hacking with Swift and reach the world's largest Swift community! |
|
Hm, this happens for me always with the Watch Simulator. This doesn't work and never syncs. You can try to reset the Simulator or delete it and create a new one. I don't know how many hours I wasted with fixing a "bug" which was simply a Simulator issue. |
|
|
|
I just tried running the app on my iPad and get the same crash. So I build and start the app, the app opens on the device but with no UI elememts, just a blank screen, the iCloud account error shows up in the Debug Area and the app just does nothing. After a short while (30 seconds or so) I also get a bad memory access exception: (@main) Thread 1: EXC_BAD_ACCESS (code=2, address=0x7ff7b0977ff8). Not sure what is causing what at this point. I guess I could turn off the iCloud syncing but a focus of the project is iCloud syncing so if I can get it running would be preferable. May have to go through code line-by-line and see if there is something I can find or perhaps copy/paste Paul's code in the writeup for each video if all else fails. |
|
Bad memory access exception could mean you want to access f.e. an optional or an attribute which doesn't have a value. |
|
|
|
|
|
I'm currently immersed in the UltimatePortfolio app video series, specifically delving into Video 6, which covers showcasing, deleting, and syncing issues within the application. The app's architecture is built around seamless synchronization utilizing iCloud. However, upon attempting to execute the app, I encountered an error message that reads: "Domain=NSCocoaErrorDomain Code=134400" with the accompanying note stating, "Unable to initialize without a valid iCloud account." Despite meticulously following Paul's instructions on integrating iCloudKit into the app, and ensuring my iCloud account is logged in along with iCloud Drive within the simulator (emulating an iPhone 14 Plus), the error persists. I've conducted thorough web searches which commonly attribute this issue to simulator settings, yet the problem persists unabated. I'm currently at an impasse with this project until I can resolve the iCloud synchronization snag. Any insights or guidance on diagnosing and rectifying this matter would be immensely appreciated www.junkrecolet.com |
|
@vandan Did you deploy your database schema to production in CloudKit console on your developer portal? @barbaradabney36 |
|
A bad memory access exception typically occurs when attempting to access an optional or an attribute that doesn't have a value. Check this [sunasusa.com] |
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure and A/B test your entire paywall UI without any code changes or app updates.
Sponsor Hacking with Swift and reach the world's largest Swift community!
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.