Post

Replies

Boosts

Views

Activity

Reply to PhotoKit request AddOnly authorization error:Domain=com.apple.photos.error Code=46104
Seems to work in iOS 15, so this is what I'm doing now: requestAuthorization {   /// got permissions } func requestAuthorization(completion: @escaping (() -> Void)) {   if #available(iOS 15, *) { /// works, so use `addOnly`     PHPhotoLibrary.requestAuthorization(for: .addOnly) { (status) in       if status == .authorized || status == .limited {         completion()       }     }   } else if #available(iOS 14, *) { /// use `readWrite` directly instead. This will ask for both read and write access, but at least it doesn't crash...     PHPhotoLibrary.requestAuthorization(for: .readWrite) { (status) in       if status == .authorized || status == .limited {         completion()       }     }   } else { /// for older iOS just do `requestAuthorization`     PHPhotoLibrary.requestAuthorization { (status) in       if status == .authorized {         completion()       }     }   } }
Sep ’21
Reply to "Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed"
Here's some similar problems: When running on older iOS Simulator, error “Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding” - https://stackoverflow.com/q/65172944/14351818 (I asked) Simulator crashing with iOS < 14. Started happening since Big Sur - https://developer.apple.com/forums/thread/667921 iOS Simulator is Crashing on startup - https://stackoverflow.com/q/64071652/14351818
Dec ’20
Reply to Simulator crashing with iOS < 14. Started happening since Big Sur
Same here. Here's some similar problems: When running on older iOS Simulator, error “Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding” - https://stackoverflow.com/q/65172944/14351818 (I asked) "Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed" - https://developer.apple.com/forums/thread/667088 iOS Simulator is Crashing on startup - https://stackoverflow.com/q/64071652/14351818
Dec ’20
Reply to DragGesture freezes when a second finger is added
Hey @Claude31, thanks for your help! It's now working if I do @GestureState private var isPressed = false ... let drag = DragGesture(minimumDistance: 0) .updating($isPressed) { (value, gestureState, transaction) in gestureState = true } return content .gesture(drag) .onChange(of: isPressed, perform: { (pressed) in if pressed { print("changed") } else { print("ended") } }) as suggested by someone else and also Apple. Here's the feedback Apple sent: Thank you for filing this feedback report. We reviewed your report and determined the behavior you experienced is currently functioning as intended. The gesture is cancelled in this case not ended (two fingers can't match a one-finger drag). You can use GestureState to handle the cancellation. You can close this feedback by clicking on the "Close Feedback" link. Thank you.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’20
Reply to VNRecognizeTextRequest doesn't recognize Dansk language "da-DK"
I think these are the currently supported languages (in iOS 14): [ "en-US" , "fr-FR" , "it-IT" , "de-DE" , "es-ES" , "pt-BR" , "zh-Hans" , "zh-Hant" ] Dansk isn't on there -- the most similar would probably be "de-DE" (German). And in iOS 13, the only supported language is "en-US". Check out this blog (it's in Japanese but you can use Google Translate) koze.hatenablog.jp/entry/2020/06/23/093000
Topic: Media Technologies SubTopic: General Tags:
Sep ’20