UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

UltimatePortfolio Project: Unable to initialize without a valid iCloud account

Forums > SwiftUI

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.

2      

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

2      

Thanks for the thought but I do have an active account. Realized at start of project I would need one for the CloudKit integration.

2      

BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.

Get it on Hacking with Swift+

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.

2      

I was going to say that the simulator is very hit and miss! Have you tried on real device and see if get the same error! It will only be a problem when syncing with other devices, which means that you can carry on with the rest of the project.

2      

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.

2      

Bad memory access exception could mean you want to access f.e. an optional or an attribute which doesn't have a value.

2      

2      

I have a different problem. My data syncs perfectly on different simulators that are logged into the same iCloud account. But when i put the app on testflight to test this on my devices, they dont sync. Is this beasue I'm using testflight?

2      

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

1      

@vandan Did you deploy your database schema to production in CloudKit console on your developer portal?

@barbaradabney36
Do you have an active Developer Account with Apple, you need one for CloudKit integration in your app.

1      

Some time earlier this year I had worked with too many hackers who i thought will help me out with hacking into my wife's phone but later end up getting ripped off my cash .. not until one of my close old friend got me introduce to him on spyhackpro9 @gmail com. the best when it comes to hacking I'd say .. Right after I hacked into her phone and saw too many texts with her lover .. I wasn't settled at all , so I had to run a DNA test on our only child who is just 3 and to my greatest surprise she wasn't mine .. Thanks to Doom hackers .. because without them I won't have realized about all this . contact them .. Email:spyhackpro9 @gmail com

   

Some time earlier this year I had worked with too many hackers who i thought will help me out with hacking into my wife's phone but later end up getting ripped off my cash .. not until one of my close old friend got me introduce to him on spyhackpro9 @gmail com. the best when it comes to hacking I'd say .. Right after I hacked into her phone and saw too many texts with her lover .. I wasn't settled at all , so I had to run a DNA test on our only child who is just 3 and to my greatest surprise she wasn't mine .. Thanks to Doom hackers .. because without them I won't have realized about all this . contact them .. Email:spyhackpro9 @gmail com

   

Most of these cheap spyware’s do not really offer value for money. The IT firm I work with hires two ethical hackers from time to time. They might be able to help, They mentioned they offer phone spying services. They are very discreet so I cant share their contact details here. They always say putting themselves out there will blow their cover so they try to remain anonymous. You can write me using this email address if you want more details,hackrontech @gmail com

   

I have been in a situation before where I felt I needed to get proof to show him that he has been cheating before he would allow himself to be removed from the house, basically, I suspected that he uses WhatsApp, Snapchat, Text messages & Facebook messenger accounts more, and he has a face recognition security attached to it. I did what I had to do to save myself by hacking into his phone without any suspicious activities. If you are in that situation, be confident that it can be done. You may need to use a private investigator to be sure Mr SYLVESTER. G. BRYANT Also known as spyhackpro Is one of the best private investigators, you can contact him via the following details below Email:hackrontech @gmail com

   

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.