Posts

Post not yet marked as solved
7 Replies
5.4k Views
I recently downloaded the 4th beta of Xcode to start testing my apps with. So I started with my newest project that had been loading just fine, but now everytime I goto my main storyboard it eathier does not load and the loading symbol just stays there, or it loads and I get the error "An internal error has occurred editing functionality may be limited." When it does load though however, some (the number varys depending on the time) or all of the view controllers are completly black or cannot be edited. And if they are edited, it freezes Xcode and nothing gets saved. I am able to however open a new project and that storyboard loads just fine. What would be a possible fix or solution to this problem?I have also triedRestarting my MacCleaning the projectDeleting the Derived DataReinstalling the BetaInstalling the Beta Command Line tools (I never got a promt and thought that maybe why I was getting this)Googling for other ideas tooHopfully that helps too knowing what I have done. At this point I am thinking it maybe a problem with my project not Xcode but I am not sure becouse when I run the app it works and interacts just fine, so it is only the interface builder in Xcode.
Posted Last updated
.
Post not yet marked as solved
1 Replies
2.6k Views
I am working on adding support for macOS for one of my iOS and iPadOS apps. I got everything working to the point that it would run but as soon as it tried to load the CloudKit data store it crashes with the repeated error "setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access." What would be causing this error when running the app on macOS and it tries to load user data from CloudKit? I have allowed incoming and outgoing connections and allowed User Selected Files to read/write. What am I missing besides this?
Posted Last updated
.
Post marked as solved
2 Replies
969 Views
I cannot change my existing core data stack to NSPersistentCloudKitContainer because that is only a iOS 13 and later support feature but I would like to have that set for iOS 13 and later while having NSPersistentContainer for earlier versions.I have a decent amount of experience working with swift and iOS but have not ever had to do something like this for versioning and certain vars/lets on certain verions.This is my code for my coredata stack for the iOS 13 and later for NSPersistentCloudKitContainer: lazy var persistentContainer: NSPersistentCloudKitContainer = { let container = NSPersistentCloudKitContainer(name: "Shopping_App") container.loadPersistentStores(completionHandler: { (storeDescription, error) in if let error = error as NSError? { fatalError("Unresolved error \(error), \(error.userInfo)") } }) return container }()This is my code for iOS 12 and earlier: lazy var persistentContainer: NSPersistentContainer = { let container = NSPersistentContainer(name: "Shopping_App") container.loadPersistentStores(completionHandler: { (storeDescription, error) in if let error = error as NSError? { fatalError("Unresolved error \(error), \(error.userInfo)") } }) return container }()How could I keep both of these but have the first for iOS 13 and later and the second for iOS 12 and earlier? I would like to have one var for both if that is even possible and if that is not possible I would like a easy solution that makes it so I do not have to rewrite all that I have already to include two different versions and vars.
Posted Last updated
.