Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to verify bitcode in QBImagePicker.framework/QBImagePicker #58

Closed
rops opened this issue Sep 2, 2016 · 23 comments
Closed

Failed to verify bitcode in QBImagePicker.framework/QBImagePicker #58

rops opened this issue Sep 2, 2016 · 23 comments

Comments

@rops
Copy link

rops commented Sep 2, 2016

  • react-native-image-crop-picker v0.8.0
  • react-native v0.32.0

I'm getting this error when building from command line with xcodebuild:

Failed to verify bitcode in QBImagePicker.framework/QBImagePicker:

Woks fine from XCode. Has anyone experienced that?

@rops
Copy link
Author

rops commented Sep 2, 2016

If I don't add the pre-built libraries included in this repo but add them as pods it works fine.

pod "QBImagePickerController"
pod 'RSKImageCropper'

So I guess the pre-built frameworks here have something wrong?

@ivpusic
Copy link
Owner

ivpusic commented Sep 2, 2016

just tried it on my personal and on brand new test project. It works on both places.

xcodebuild clean build -scheme testProject

did you provide some additional args or?

If you go to yourProject/Libraries/imageCropPicker/Libraries you can find frameworks.

They are xcodeprojects with Aggregate target. If you run Aggregate target, script for building *.framework will run. You will get output into node_modules/react-native-image-crop-picker/ios/ImageCropPickerSDK.

You can try playing with configuration of frameworks, build Aggregate target for each framework, copy built *.framework into your project, and see if you can solve this issue.

@rops
Copy link
Author

rops commented Sep 5, 2016

Sorry my bad. Building works. I got the error while exporting the archive.

xcodebuild archive -archivePath foo.xarchive
xcodebuild -exportArchive -archivePath foo.xarchive -exportOptionsPlist bar.plist

bar.plist set uploadBitcode and compileBitcode to true. Not sure if may be related

@ivpusic
Copy link
Owner

ivpusic commented Sep 5, 2016

maybe related to this #61?

@rops
Copy link
Author

rops commented Sep 5, 2016

If I set compileBitcode = false in the exportOptionsPlist I don't get any error. Could it be that the pre-built libraries were built with bitcode support off?

@rops
Copy link
Author

rops commented Sep 5, 2016

Actually both QBImagePicker and RSKImageCropper have ENABLE_BITCODE=true. If it was disabled, compilation would have failed

@ivpusic
Copy link
Owner

ivpusic commented Sep 5, 2016

you don't have to use pre-built versions. They are for development purposes -> they include simulator and device ARCHs. You can compile them as you wish, and just include *.framework (from framework Products folder) to embedded binaries.

@ivpusic
Copy link
Owner

ivpusic commented Sep 6, 2016

@erdostom
Copy link

erdostom commented Sep 6, 2016

When I try compile the *.framework from the Products folder, I get the following error:

Info.plist of “Myapp.app/Frameworks/QBImagePicker.framework” specifies a simulator platform for the CFBundleSupportedPlatforms key

Will try the v0.8.1. next.

EDIT: v0.8.1 fixed the issue for me, thank you @ivpusic

EDIT2: When I build for production, I get a whole myriad of errors. Do you think it might be worth it to update the Readme w instructions if you want to avoid embedding binaries?

screen shot 2016-09-06 at 19 14 10

screen shot 2016-09-06 at 19 14 04

screen shot 2016-09-06 at 19 13 56

screen shot 2016-09-06 at 19 13 50

screen shot 2016-09-06 at 19 13 43

@ivpusic
Copy link
Owner

ivpusic commented Sep 7, 2016

@erdostom will add section to readme about not using pre-built *.framework(s) for production build

@erdostom edit: done. 7be283b. Anything else to add from your point of view to readme file?

@erdostom
Copy link

erdostom commented Sep 7, 2016

@ivpusic I was not able to get it working yet. The premade binaries work OK, but I can't build my own. I'm following the the discussion in #61, here's what I did:

  1. Remove premade binaries from Embedded Binaries
  2. Build for Generic Device
  3. Received following error:

screen shot 2016-09-07 at 09 54 54

EDIT: also tried adding the SDK folder to my Header Search Path, with no luck

EDIT 2: another round of deleting / reinstalling ended up solving the problem. I was then able to successfully upload to iTunes connect (Yay!). My overall feedback would be to structure this plugin in a way that optimizes for easy installation, so that it Just Works -- even at the detriment of performance during development. Just my 2 cents tho. Thanks for your work in this project.

@ivpusic
Copy link
Owner

ivpusic commented Sep 7, 2016

Glad to hear that it works for you. First installation instruction were with cocoa pods. This "just worked" if you had cocoa-pods enabled project. Some people were complaining about cocoa-pods, having issues with project setup, complaining about no rnpm support, so I decided to step away from cocoa-pods. This introduced some issues like this, because library depends on two external frameworks which has to be somehow present on runtime.

Do you have some ideas how to make it more "user friendly" or?

@erdostom
Copy link

erdostom commented Sep 7, 2016

The easiest for me would be if rnpm linked the required frameworks, and that was the whole install process. If we have to embed binaries, it would be easiest if we could embed the same ones for both dev and prod.

@parkerdan
Copy link

parkerdan commented Sep 7, 2016

I can't get rid of the "Unsupported Architecture" errors and everything thing else that comes with them. I've read/tried all of this and issue #61, still unable to get anything to work.

The only way I can get an app with this package to iTunes Connect, is with Cocoa Pods.

I generated a Podfile and pulled in QBImagePickerController along with RSKImageCropper as the only two pods and everything is great....

@superandrew213
Copy link
Contributor

superandrew213 commented Sep 7, 2016

Try removing & unlinking react-native-image-crop-picker and cocoa pods etc, everything to do with react-native-image-crop-picker.

Then:

  1. npm i --save react-native-image-crop-picker
  2. react-native link react-native-image-crop-picker
  3. Add Embedded binaries

f2e94b10-7394-11e6-9c56-c9a61642976a

@parkerdan
Copy link

Any chance to throw in an option to resize multiple images?

On Sep 8, 2016, at 1:45 AM, Ivan Pusic notifications@github.com wrote:

@parkerdan https://github.com/parkerdan stay with pods, as this is defenitely better way for this library to handle external dependencies. Will update readme for other people as well.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #58 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ALjvrJ7r1XC0aBhEKNzk0yHbasvObjlTks5qn68ZgaJpZM4JzzSq.

@ivpusic
Copy link
Owner

ivpusic commented Sep 8, 2016

@parkerdan I would say currently it is out of scope.

@parkerdan
Copy link

@ivpusic no worries. I just accomplished this on my machine for iOS, about to try for android....although I've never "written" obj-c or java before, I have something working locally and the speed of the response is noticeably faster now. I just added a resizeMultiple bool option and found a resizing function. Great job on this package.

@ivpusic
Copy link
Owner

ivpusic commented Sep 8, 2016

@parkerdan, I just added section about installing dependencies via cocoa-pods https://github.com/ivpusic/react-native-image-crop-picker#cocoapods-users

@ivpusic
Copy link
Owner

ivpusic commented Sep 8, 2016

@rops, I will close this issue. Please check latest post-install instructions and try using latest lib version.

@ivpusic ivpusic closed this as completed Sep 8, 2016
@ShuBuShao
Copy link

我遇到了这个问题 Failed to verify bitcode in QBImagePicker.framework/QBImagePicker
我通过 将项目的 build Settings -> Build Options -> Enable Bitcode 设置为no 解决了问题 , 打包成功

@roycclu
Copy link

roycclu commented Jan 13, 2018

@ShuBuShao

Hi, having some problem here. But Build Settings -> Build Options -> Enable Bitcode 设置为no did not fix it.

Any other suggestions?

@Y-JH
Copy link

Y-JH commented May 6, 2019

我遇到了类似的问题,是接入顶象无感验证后出现的。报错:Failed to verify bitcode in DingxiangCaptchaSDK.framework/DingxiangCaptchaSDK: error: Cannot extract bundle
解决了问题!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants