rogchap / react-native-twilio

A React Native wrapper for the Twilio mobile SDK
MIT License
92 stars 43 forks source link

Linker error: libRCTTwilio.a does not contain bitcode (REOPEN) #5

Open EricWithCare opened 8 years ago

EricWithCare commented 8 years ago

This previous issue was opened and subsequently closed, but it remains unresolve. https://github.com/rogchap/react-native-twilio/issues/4

See above link to see full description

EricWithCare commented 8 years ago

I found this command online that apparently tells you if there is bitcode in your library: otool -l yourlib.a | grep bitcode. I ran this command on the three libraries in the Twilio projects: libcrypto.a, libssl.a, libTwilioClient.a and it does not appear that these libraries have bitcode in them. Since these are precompiled libraries I don't know of a way to have them recompiled

rogchap commented 8 years ago

Those libraries come straight from Twilio, I can't compile them either. Maybe try opening an issue with Twilo?

EricWithCare commented 8 years ago

Ok, I will open one with them and see how they respond. Just curious, how are you building your app? Do you have Bitcode Enabled? Are you limiting to just a single architecture?

EricWithCare commented 8 years ago

Update It appears there was an update on Mar 30 2016 to the Twilio Library that adds Bitcode support. Twilio Client iOS SDK Changes I tried dropping the newest version in. My app is now able to Archive but it still isn't able to be submission to the App Store. It's seen as a Generic Xcode Archive.

Still working on issue.

EricWithCare commented 8 years ago

I was able to resolve the issue. I had to do two things to the RCTTwilio library project in order for it to work.

  1. Update the Twilio Client SDK files with newest version
  2. In the RCTTwilio project, go to Build Settings -> set Skip Install to 'YES' This allowed me to archive the project and submit it to the App Store.

This is not a long term solution since the changes need to be made in the package itself. If you think this is the right solution, do you think you can update the library?

UPDATE Made a mistake in the instructions, Skip Install should be set to 'YES'

rogchap commented 8 years ago

Good investigative work @EricWithCare Can you put together a PR?

EricWithCare commented 8 years ago

Ok, I will try to do that. Just so you know though, the newer version of libTwilioClient.a is larger than 100mb (above the github limit). So I plan on using the git lfs extension. Let me know if this would be a problem.

rogchap commented 8 years ago

Are you able to zip it (tar) to make it under 100MB, we use a prepublish command to unzip when you npm install. Have a look at the package.json scripts

On Thu, 16 Jun 2016 at 04:15, Eric Yuen notifications@github.com wrote:

Ok, I will try to do that. Just so you know though, the newer version of libTwilioClient.a is larger than 100mb (above the github limit). So I plan on using the git lfs extension. Let me know if this would be a problem.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rogchap/react-native-twilio/issues/5#issuecomment-226273515, or mute the thread https://github.com/notifications/unsubscribe/AAQfrFlzkI079SN5dlZUtKIrEi56Tk_tks5qMEFNgaJpZM4IxbTA .

EricWithCare commented 8 years ago

I'm not too familiar with how the npm and package.json works, but I don't see anything related to what you're talking about regarding the prepublish script. What am I missing?

rogchap commented 8 years ago

My bad!! It was for another one of my OOS. But we should add the same concept for this project:

https://github.com/kayla-tech/react-native-card-io/blob/develop/package.json#L11

Basic Idea is to store in git a zip version of the lib, and by adding this script in the package.json it will unzip on install.

EricWithCare commented 8 years ago

I've created the Pull Request with the necessary changes HERE. I hope everything passes. When do you think you will merge the changes and publish a new version to npm. I'm in need of it within the next week.

Thanks