prscX / react-native-photo-editor

React Native: Native Photo Editor
Apache License 2.0
1.12k stars 241 forks source link

UIApplicationMain problem on IOS #150

Open hamdigatri opened 3 years ago

hamdigatri commented 3 years ago

Hello, When I try to use PhotoEditor on an IOS device the app crashes and I get this error in xcode :

Screenshot 2020-10-12 at 7 50 48 PM

This is my code : item => { RNFetchBlob.config({ fileCache: true }) .fetch('GET', BASE_URL + '/Resource/' + item.uri) .then(res => { PhotoEditor.Edit({ path: res.path(), onDone: newPath =>console.log("newPath"), colors: ['red', 'black', 'cyan', 'green', 'yellow'], hiddenControls: ['crop', 'share', 'sticker'] }); }); } P.S I thought that its a path problem so I tried the moveFile solution using RNFS but its the same issue. I'am using react-native 0.61.5 if this can help. Anyone knows what could be the issue please ?

CuongNguyenLD commented 3 years ago

+1 same issue

ChrisConway commented 3 years ago

I had exactly the same error. After debugging it turned out that the statement photoEditor.stickers = imageStickers is causing the error (see image). iOS-Crash-PhotoEditor

Fix: add the stickers to your target (see image)

iOS-Fix-PhotoEditor