Post

Replies

Boosts

Views

Activity

Reply to macOS : Accessing UserDefaults when App Group is enabled
Looks like you are right :-) It works and I can ignore the warning. My original issue was that items were never saved, but it was another problem with @State in a SwiftUI view. It was not related to UserDefaults. Thanks for the highlight :-) One more thing : The shared preferences file is corrected created in ~/Library/Group Containers directory, but the defaults command line does not see it. ➜	~ defaults read com.stormacq.mac.MyApp 2020-09-07 10:25:53.188 defaults[82827:947786] Domain com.stormacq.mac.MyApp does not exist ➜	~ defaults read TEAM_ID.com.stormacq.mac.MyApp 2020-09-07 10:26:05.088 defaults[82857:947925] Domain TEAM_ID.com.stormacq.mac.MyApp does not exist The same with non-shared preferences works correctly. Can defaults read Group Containers ?
Sep ’20
Reply to codesign fails when started from SSH, succeed in Terminal
I found a workaround but I don't understand the root cause. Instead of installing the Apple WWDR G3 intermediate certificate in the keychain I am building dynamically at run time with if [ ! -f $CERTIFICATES_DIR/AppleWWDRCAG3.cer ]; then echo "Downloadind Apple Worlwide Developer Relation GA3 certificate" curl -s -o $CERTIFICATES_DIR/AppleWWDRCAG3.cer https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer fi echo "Installing Apple Worlwide Developer Relation GA3 certificate" security import $CERTIFICATES_DIR/AppleWWDRCAG3.cer -t cert -k "${KEYCHAIN_NAME}" "${AUTHORISATION[@]}" I now install the certificate in the System keychain. This is the only extra certificate I do install. When in System keychain, it is correctly picked up by codesign, not when it is in my custom (unlocked) keychain. if [ ! -f $CERTIFICATES_DIR/AppleWWDRCAG3.cer ]; then echo "Downloadind Apple Worlwide Developer Relation GA3 certificate" curl -s -o $CERTIFICATES_DIR/AppleWWDRCAG3.cer https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer fi echo "Installing Apple Worlwide Developer Relation GA3 certificate into System keychain" SYSTEM_KEYCHAIN=/Library/Keychains/System.keychain sudo security import $CERTIFICATES_DIR/AppleWWDRCAG3.cer -t cert -k "${SYSTEM_KEYCHAIN}" "${AUTHORISATION[@]}"
Sep ’21
Reply to Cannot remove App ID / Identifier
Hello @eskimo I have the same problem as @mjharper above. I tried the steps you proposed and this worked (I am using Xcode 14.0.1) Nevertheless I have "older" tests, that were never submitted to the App Store for which identifiers are lying around and can not be removed. Error message is : "The bundle 'F36WHU2A76' cannot be deleted. Delete all the Apps related to this bundle to proceed." I have only a few Apps on the AppStore, I triple checked none are using this test identifier. Any other suggestion to clean up our list of identifiers ? Thanks
Oct ’22
Reply to swipeActions on macOS?
Even with two columns and a Label. It does not work for me. I am using Xcode 14 and Monterey var body: some View {         VStack {             List(podcast.episodes!) { episode in                 EpisodeView(podcast: podcast, episode: episode)                     .swipeActions(edge: .trailing) {                         Button (action: { self.deleteEpisode(episode) }) {                             Label("Delete", systemImage: "trash")                         }                         .tint(.red)                     }             }         }     }
Nov ’22
Reply to Swift existential types: how to create generic Views that conform to a protcol ?
One possible solution to this is to use composition instead of inheritance. The approach is detailed here https://stackoverflow.com/a/77250029/663360 and it works. However, for my own understanding, I still wonder how an inheritance pattern would work. I understand Swift resolves types at compile time (vs Objective-C, Java, Python, Typescript) and that prevents using existential types. Is there a way to solve my problem through inheritance and protocols ?
Oct ’23