Post

Replies

Boosts

Views

Activity

NSInternalInconsistencyException even inside performChanges block
I have a popular app and i'm seeing a sporadic crash that I don't understand:Fatal Exception: NSInternalInconsistencyException This method can only be called from inside of -[PHPhotoLibrary performChanges:completionHandler:] or -[PHPhotoLibrary performChangesAndWait:error:]Here is the code, it crashes on line 3 (creationRequestForAssetFromImage) below: PHPhotoLibrary.shared().performChanges({ guard let changeRequest = PHAssetChangeRequest.creationRequestForAssetFromImage(atFileURL: animatedImageFileURL), let albumChangeRequest = PHAssetCollectionChangeRequest.init(for: album), let placeholder = changeRequest.placeholderForCreatedAsset else { WLog("ActionExecuter: error, couldn't init creationRequests") completionBlock(nil) return } ...Clearly this IS in a performChanges block.Full stack of crash, from line 3 above onwards:Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x184da6d8c __exceptionPreprocess 1 libobjc.A.dylib 0x183f605ec objc_exception_throw 2 Photos 0x193cad220 -[PHPhotoLibrary recordInsertRequest:] 3 Photos 0x193c3cf78 -[PHChangeRequestHelper initForNewObjectWithUUID:changeRequest:] 4 Photos 0x193c6dfc4 -[PHAssetCreationRequest initForNewObjectWithUUID:] 5 Photos 0x193c699c0 +[PHAssetCreationRequest _creationRequestForAssetUsingUUID:] 6 Photos 0x193c69ce4 +[PHAssetCreationRequest creationRequestForAssetFromImageAtFileURL:]I am wondering if this is some threading issue. Is there a rule about what thread performChanges et al have to be called from?It seems to be slower devices that hit this: iOS 11 on an iPad Air 1 is the latest crash in the wild I saw of this one.Thanks for any help
4
0
2.5k
Sep ’18
Does generating app-specific shared secret invalidate master secret?
Hi there,I'm getting ready to transfer my app, which requires my app to have an app-specific shared secret.The app is currently live, and using the MASTER secret.My question is:If I generate the app-specific shared secret, will the live app still be able to use the MASTER secret, ie. until I can get an update out that uses the shared secret? I realize the app itself should not contain the secret, but in this case it does :Sthankstim
4
0
4.0k
Sep ’18