Posts

Post not yet marked as solved
0 Replies
594 Views
When I configure a 'Sprinkler' type accessory (with an 'Irrigation system' service as the primary service) in the Homekit Simulator or when I create the same accessory in code using the HAP and then add that accessory to the home app, some characteristics are missing. For instance the switch for setting the accessory 'Active'(enabled) doesn't show. When I use third party apps (like Eve or Home+) everything works as expected.
Posted
by TheMisfit.
Last updated
.
Post not yet marked as solved
1 Replies
254 Views
In a SwiftUI-lifecyle App I have two (viewless-)controllers that are owned by the App-struct itself. Within an app with a delegate-based-lifecyle I would have used 'NSApplication.shared.delegate' to get acces to the App (and the two properties in it). How do I accomplish the same with a SwiftUI-lifecyle?
Posted
by TheMisfit.
Last updated
.
Post not yet marked as solved
9 Replies
1.8k Views
In my project I use several third party Swift-packages and a single target. Everything builds and runs fine. However SwiftUI-views don't show any previews. When I press 'Resume' and 'Diagnostics' on the canvas it says: Swift package target 'CNIOSHA1' is linked as a static library by 'HAP' and 2 other targets. This will result in duplication of library code.
Posted
by TheMisfit.
Last updated
.
Post not yet marked as solved
0 Replies
316 Views
Hi, I created a Core Data model for a Swift Project and take full advantage of the auto-generated subclasses of NSManagedObject. However I would like now to extend those subclasses because my entities contain several transient attributes. How can I do that in Swift and keep the possibility to regenerate my NSManagedObjects if changes are made to the xcdatamodeld.
Posted
by TheMisfit.
Last updated
.
Post marked as solved
3 Replies
1.2k Views
When trying to add the example code from WWDC 2020 to my project I get dyld: lazy symbol binding failed: Symbol not found: _$s2os6LoggerVMa ... Expected in: /usr/lib/swift/libswiftos.dylib @available(OSX 10.16, *) let logger = Logger(subsystem: "com.example.Fruta", category: "giftcards") @available(OSX 10.16, *) @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate {     var window: NSWindow!     func applicationDidFinishLaunching(_ aNotification: Notification) {         logger.log("logged Message")
Posted
by TheMisfit.
Last updated
.
Post marked as solved
4 Replies
2.3k Views
Hi,In my Mac OS app I'm trying to create an UUID from a stringthe code is taken straight from the documentation but it returns nil every timeimport Foundation let test1 = UUID(uuidString: "E621E1F8-C36C-495A-93FC-0C247A3E6E5F") // Returns nil let test2 = UUID() //Works fineit works fine in a playground but not in my app.any ideas?
Posted
by TheMisfit.
Last updated
.