Post

Replies

Boosts

Views

Activity

Reply to What if I remove app?
I think you are mistaken. I clicked the option "Remove App", and I got a message saying that app name will be released to other developers and put in my removed apps list. I think you are correct that I can add that app back anytime, just that I might have to use a different name if another developer decides to use the name I had been using before I removed the app.
Mar ’20
Reply to NSCoding error messages using NSKeyedUnarchiver.unarchivedObject(ofClass:from:)
Here's what code I have now: let defaultFileManager: FileManager = FileManager.default let standardUserDefaults = UserDefaults.standard let ubiquityIdentityToken = defaultFileManager.ubiquityIdentityToken let oldDataUbiquityIdentityToken = standardUserDefaults.data(forKey: UserDefaultsKeys.ubiquityIdentityToken) do { // Save ubiquity identity token let dataUbiquityIdentityToken: Data = try NSKeyedArchiver.archivedData(withRootObject: ubiquityIdentityToken!, requiringSecureCoding: false) standardUserDefaults.set(dataUbiquityIdentityToken, forKey: UserDefaultsKeys.ubiquityIdentityToken) let oldUbiquityIdentityToken = try NSKeyedUnarchiver.unarchivedObject(ofClass: (NSCoding & NSCopying & NSObjectProtocol).self, from: oldDataUbiquityIdentityToken!) } catch { print(error) }Here are the red code-time errors that appear on the line below the comments in the code:'NSCoding & NSCopying & NSObjectProtocol' cannot be used as a type conforming to protocol 'NSCoding' because 'NSCoding' has static requirementsStatic method 'unarchivedObject(ofClass:from:)' requires that 'NSCoding & NSCopying & NSObjectProtocol' inherit from 'NSObject'I get the argument I put in for the 'forClass' parameter from the declaration of FileManager.ubiquityIdentityToken in Apple's documentation, which says:@NSCopying var ubiquityIdentityToken: (NSCoding & NSCopying & NSObjectProtocol)? { get }What threw me off at the beginning is the fact that the errors appear before I even put in the arguments in the placeholders.
Apr ’20