Post

Replies

Boosts

Views

Activity

Reply to Bookmark or watch forum thread?
Thanks a lot Quinn!!! The following don't seem to be working for me: Upvoting an answer, shows as upvoted but when I signout the upvote doesn't show as upvoted Email notification as mentioned above don't work even selected Also it would be nice to have email notifications checked by default for the question you ask, as most people would expect that by default. IMHO improving the website can directly improve the engagement with in the developers as more people will use the forums and more questions would get asked and answered.
Jun ’22
Reply to Couple questions about NavigationSplitView in SwiftUI
Selection: You need maintain a @State variable for selection and pass it to List's selection parameter as a binding To restore selection state across app launches use @SceneStorage All you need is shown in the video link below, watch it slowly and understand the concepts Console Warnings onChange(of: UpdateTrigger) action tried to update multiple times per frame A NavigationLink is presenting a value of type "Category" but there is no matching navigation destination visible from the location of the link. The link cannot be activated. Feedback has been submitted for the above mentioned warnings and Apple Engineers are aware of this bug, so you can ignore it for now MacOS Sidebar You can tap on the sidebar button to open the sidebar I think there is an option in NavigationSplitView configuration, you need to check the documentation columnVisibility but I haven't mentioned to get it working Reference: Please watch https://developer.apple.com/wwdc22/10054 It has sample code to do exactly what you want (you can copy code by clicking on the code tab)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’22
Reply to Xcode 13.2 - Internal error : Missing Package Description Module
Swift Packages - Problem AppStore Version has a problem when used on projects that use Swift packages, It throws the error Internal error: missingPackageDescriptionModule Workaround Download Xcode 13.2 (13C90) from https://developer.apple.com/download/release/ which seems to work ok Note: In case you download from Developer portal and delete the old Xcode, you might need to add the Git and Apple accounts. Otherwise you wouldn't be able to add packages / re-fetch packages
Dec ’21
Reply to NSSecureCoding allowed classes list
@eskimo I am facing the same issue while working with Share Extensions. Adding a share extension on a blank new project and running it throws the same warning: Info.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>NSExtensionActivationRule</key> <dict> <key>NSExtensionActivationSupportsWebURLWithMaxCount</key> <integer>1</integer> </dict> </dict> <key>NSExtensionMainStoryboard</key> <string>MainInterface</string> <key>NSExtensionPointIdentifier</key> <string>com.apple.share-services</string> </dict> </dict> </plist> Warning [Foundation] *** -[NSXPCDecoder validateAllowedClass:forKey:]: NSSecureCoding allowed classes list contains [NSObject class], which bypasses security by allowing any Objective-C class to be implicitly decoded. Consider reducing the scope of allowed classes during decoding by listing only the classes you expect to decode, or a more specific base class than NSObject. This will become an error in the future. Allowed class list: {( "'NSObject' (0x7fff862bc6e8) [/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib]" )}
Nov ’21
Reply to How do I use async/await with NotificationCenter?
func observeNotifications() async { //Use any notification name appropriate     let customNotificationName = Notification.Name("custom")     let notifications = NotificationCenter.default.notifications(named: customNotificationName,                                                                  object: nil) //If you want to receive only notifications from a specific sender then specify that in object     //notifications is an AsyncSequence     //Each iteration in the loop would run asynchronously as when new notification is added to the sequence     for await notification in notifications {         print(notification)     } }
Topic: Community SubTopic: Apple Developers Tags:
Nov ’21