Post

Replies

Boosts

Views

Activity

Reply to How should I access @AppStorage and @SceneStorage values outside of views?
I just stumbled across this question. I know this is an old thread, but I know the answer for AppStorage. AppStorage is just a more convenient way of writing to UserDefaults. When you're not in a View just use the standard functions for dealing with UserDefaults (UserDefaults.standard.value, UserDefaults.standard.string, etc). I know this works because when I rewrote my app's UI in SwiftUI I had my Views use AppStorage but my underlying, non-view code I left untouched that was using UserDefaults.standard and it continued to work. Just make sure to use the same name in both places.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’21
Reply to SiriTipView showing ${APPLICATIONNAME} instead of my app's name.
My app language is set to system language. I switch between that and German.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to Xcode 14: Publishing changes from within view updates
Found an interesting blog post about this. https://www.donnywals.com/xcode-14-publishing-changes-from-within-view-updates-is-not-allowed-this-will-cause-undefined-behavior/
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to SiriTipView showing ${APPLICATIONNAME} instead of my app's name.
I have now tested on an iPhone running iOS 16 beta 8 using Xcode 14 beta 6. The problem is still happening. The app name is populated correctly in the shortcut in the Shortcuts app. I can use the phrase with the app name when I ask Siri to run the new shortcut. SiriTipView still shows ${APPLICATIONNAME} in my phrase.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to Xcode 14: Publishing changes from within view updates
That's my scenario also (sheet).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to How should I access @AppStorage and @SceneStorage values outside of views?
I just stumbled across this question. I know this is an old thread, but I know the answer for AppStorage. AppStorage is just a more convenient way of writing to UserDefaults. When you're not in a View just use the standard functions for dealing with UserDefaults (UserDefaults.standard.value, UserDefaults.standard.string, etc). I know this works because when I rewrote my app's UI in SwiftUI I had my Views use AppStorage but my underlying, non-view code I left untouched that was using UserDefaults.standard and it continued to work. Just make sure to use the same name in both places.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Unable to present. Please file a bug.
This problem finally stopped happening for me with the RC of Xcode and iOS 15.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21