Post

Replies

Boosts

Views

Activity

Comment on How does let statement work?
Thanks. Would your code you gave me above be the same as the following? var appDelegate: AppDelegate? = { return UIApplication.shared.delegate as? AppDelegate } or var appDelegate: AppDelegate? { get { return UIApplication.shared.delegate as? AppDelegate } }
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’22
Comment on When will type Error not cast to type NSError?
What do you think about the following part of answer to my post on stackoverflow asking this same question? Short Answer Yes, there could be a need to cast to an NSError conformance. NSError has attributes that the Swift Error does not. If you're working with older codebases, or you want what an NSError has to offer, you may be dealing with them from time to time.
Topic: App & System Services SubTopic: General Tags:
Aug ’22
Comment on Why does the intent property not show for NSExtensionContext?
No. There are three functions that don't show up either. I think it's because I haven't enabled certain capabilities in Signing & Capabilities for the main target in the project. The three functions are interfaceParametersDescription() which is used by SiriKit, and dismissNotificationContentExtension() and performNotificationDefaultAction() which I presume are used by User Notification or Remote Notification.
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’22
Comment on NSCoding error messages using NSKeyedUnarchiver.unarchivedObject(ofClass:from:)
I found this old post of mine. NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(_:) has been deprecated. I still need a solution for this. What is _NSInlineData? When I run the following code I get the following in debug window: print(type(of: FileManager.default.ubiquityIdentityToken)) print(type(of: FileManager.default.ubiquityIdentityToken!)) Optional<NSCoding & NSCopying & NSObject> _NSInlineData
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’22