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
Reply to installing Monterey in separate APFS volume?
Note: Profile installation has to be done on the current volume Profile installation Download macOS beta profile from the developer portal Install the beta profile on your existing volume (this can’t be installed on the new volume) Download macOS Beta System Preferences > Software Update now will show the macOS beta Tap on Upgrade now Downloading of the macOS beta will start Create a separate Volume https://support.apple.com/en-us/HT208891 Open Disk Utility Select Macintosh HD (top most item) Add a new volume (no need to allocate any space) Remove Profile from existing volume This is required so that macOS beta updates don’t appear on your current volume, otherwise might end up accidentally updating to macOS beta on your current volume https://beta.apple.com/sp/betaprogram/unenroll Open System Preferences > Software Update Click Details > Restore Defaults Installing macOS Beta The macOS Beta installer would ask for the location / volume Tap on show all disks to make all volumes visible Select the volume you newly created Install
Topic: Community SubTopic: Apple Developers Tags:
Oct ’21
Reply to How to make sticky card like in Apple Music
I think What's new in SwiftUI talk explains this https://developer.apple.com/wwdc22/10052 (11:39) https://developer.apple.com/documentation/swiftui/radialgradient/presentationdetents(_:)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
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.
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Any xcode code samples for live activity on ios16?
I think it should be part of widgetkit. Might be worth checking out widget kit sessions in wwdc22
Replies
Boosts
Views
Activity
Jun ’22
Reply to How to set the holding priority with NavigationSplitView
Could you check https://developer.apple.com/documentation/swiftui/view/navigationsplitviewcolumnwidth(_:)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to NavigationStack and NavigationSplitView Runtime warnings
Based on the Apple Engineer's response this is a bug, I have also filed feedback and mentioned it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Drag (and drop) in SwiftUI List with children on macOS
Instead of onDrag you could do the following: Row(entry: $0) .itemProvider { //Return some NSItemProvider representing your row content }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Swift Concurrency (async let) - Cancellation
@Claude31 Thanks, that makes sense, had a skewed understanding, I think I understand better now, thanks!
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’21
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
Replies
Boosts
Views
Activity
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]" )}
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Scrolling Issue in macOS Monterey (21A5522h) M1 Macbook Pro
This again seems to be happening in macOS 12.0.1 (21A558) Feedback submitted - FB9716734
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to installing Monterey in separate APFS volume?
Note: Profile installation has to be done on the current volume Profile installation Download macOS beta profile from the developer portal Install the beta profile on your existing volume (this can’t be installed on the new volume) Download macOS Beta System Preferences > Software Update now will show the macOS beta Tap on Upgrade now Downloading of the macOS beta will start Create a separate Volume https://support.apple.com/en-us/HT208891 Open Disk Utility Select Macintosh HD (top most item) Add a new volume (no need to allocate any space) Remove Profile from existing volume This is required so that macOS beta updates don’t appear on your current volume, otherwise might end up accidentally updating to macOS beta on your current volume https://beta.apple.com/sp/betaprogram/unenroll Open System Preferences > Software Update Click Details > Restore Defaults Installing macOS Beta The macOS Beta installer would ask for the location / volume Tap on show all disks to make all volumes visible Select the volume you newly created Install
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to @FocusedBinding not working for iOS (using it for Commands)
I have submitted a Feedback FB9701749 for this issue, it would be great if someone could have a look at it, thanks.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Swift Concurrency (async let) - Cancellation
@eskimo could you help with this, I am not sure if my understanding is wrong or if it is a bug
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21