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

iOS Archiving "bitcode bundle" issue #154

Closed
atulmy opened this issue Feb 4, 2019 · 34 comments
Closed

iOS Archiving "bitcode bundle" issue #154

atulmy opened this issue Feb 4, 2019 · 34 comments

Comments

@atulmy
Copy link

atulmy commented Feb 4, 2019

When Archiving for iOS, following error is generated:

ld: bitcode bundle could not be generated because '/node_modules/react-native-razorpay/ios/Razorpay.framework/Razorpay' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/node_modules/react-native-razorpay/ios/Razorpay.framework/Razorpay' for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Xcode: 10.1
React Native: 0.58.3
react-native-razorpay: 2.0.19

CC: @iThink32

@iThink32
Copy link
Contributor

iThink32 commented Feb 5, 2019

@atulmy two things , first enable bitcode on your main project and RazorpayCheckout.xcodeproj found in the libraries section.
Secondly for archiving there is a video on this link , please check it out
https://razorpay.com/docs/ios/integration-videos/
It is named creating an app archive.

@atulmy
Copy link
Author

atulmy commented Feb 5, 2019

@iThink32
I was able to archive before upgrading to React Native: 0.58.3

I also have the script and bitcode enabled for both main project and RazorpayCheckout.xcodeproj:

screenshot 2019-02-05 at 1 02 19 pm

screenshot 2019-02-05 at 1 01 25 pm

@iThink32
Copy link
Contributor

iThink32 commented Feb 5, 2019

@atulmy ideally archiving should not depend on react-native version.Can you cross check and see if your missing something?

@atulmy
Copy link
Author

atulmy commented Feb 5, 2019

@iThink32 I did check and re-tried installing the framework following along with the videos for installation and archiving. Still no luck. All other 3rd party libraries in the project are working fine with updated React Native version except Razorpay. However in the development mode it works fine, so there must be an issue/bug within the library with archiving.

@iThink32
Copy link
Contributor

iThink32 commented Feb 5, 2019

@atulmy see there is no code change between debug and archive mode , now since your saying that it is failing to archive on the latest react-native version means that there is something that has changed on that version causing archive to fail.Moreover all our frameworks are built with bitcode enabled.Nonetheless make sure that you have not set build active architecture as yes for any project (main or razorpay).
I suggest you to to try archiving our example project with the same steps given in the video and let me know if you still face any issue as we will have a common base to cross verify.

@atulmy
Copy link
Author

atulmy commented Feb 5, 2019

it is failing to archive on the latest react-native version means that there is something that has changed on that version causing archive to fail.

Yes, that's where I need help with. Razorpay does not support latest RN?

@iThink32
Copy link
Contributor

iThink32 commented Feb 5, 2019

@atulmy we have not received any issues with the latest version of RN , moreover if it compiles successfully it means that there is no source code issues , this is clearly a build setting issue so please try archiving our example app on the latest version and let me know if you still face any issues.

@iThink32
Copy link
Contributor

iThink32 commented Feb 5, 2019

@atulmy hey just check with the example app , if you face issues we can have a hangouts call and ill help you fix it , cool?

@atulmy
Copy link
Author

atulmy commented Feb 5, 2019

Has Razorpay team already tested with latest RN?

@iThink32
Copy link
Contributor

iThink32 commented Feb 6, 2019

@atulmy yes we have run uitests of our framework on the latest version on rn

@atulmy
Copy link
Author

atulmy commented Feb 6, 2019

Unfortunately due to continuous issues with Razorpay iOS integration, we have decided to find an alternative payment gateway integration meanwhile. Thank you for your support.

@iThink32
Copy link
Contributor

iThink32 commented Feb 6, 2019

@atulmy as far as my knowledge goes this is your first issue raised with us , nonetheless if ever decide to switch back you are always welcome.

@iThink32 iThink32 closed this as completed Feb 6, 2019
@iThink32 iThink32 reopened this Feb 6, 2019
@iThink32
Copy link
Contributor

iThink32 commented Feb 6, 2019

@atulmy to answer your question the example in this repo is currently using the latest version of rn to cross verify.

@Jibin2015
Copy link

@iThink32 I am also facing the same issue.

I have installed the latest razorpay node module using yarn and followed manual linking given below:

  1. In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]

  2. Go to node_modules ➜ react-native-razorpay and add RazorpayCheckout.xcodeproj

  3. In XCode, in the project navigator, select your project. Add libRazorpayCheckout.a to your project's Build Phases ➜ Link Binary With Libraries

  4. Run your project (⌘+R)

  5. In case you get a symbols not found error , go to settings of the main project , find framework search paths and add the following $(PROJECT_DIR)/../node_modules/react-native-razorpay/ios/

  6. Also make sure the razorpay framework is added in the embedded binaries section and you have Always Embed Swift Standard Binaries set to yes in build settings.

I created a fresh react native project and tried this one but still not able to archive the build. It is working fine in debug mode.

Any help would be appreciated!

@nikhilboranaarit
Copy link

nikhilboranaarit commented Feb 8, 2019

@iThink32 I am also facing the same issue.

I have installed the latest razorpay node module using yarn and followed manual linking given below:

  1. In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]
  2. Go to node_modules ➜ react-native-razorpay and add RazorpayCheckout.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRazorpayCheckout.a to your project's Build Phases ➜ Link Binary With Libraries
  4. Run your project (⌘+R)
  5. In case you get a symbols not found error , go to settings of the main project , find framework search paths and add the following $(PROJECT_DIR)/../node_modules/react-native-razorpay/ios/
  6. Also make sure the razorpay framework is added in the embedded binaries section and you have Always Embed Swift Standard Binaries set to yes in build settings.

I created a fresh react native project and tried this one but still not able to archive the build. It is working fine in debug mode.

Any help would be appreciated!
RNV : "react-native": "0.57.8",
"react-native-razorpay": "^2.0.19",
screenshot 2019-02-05 at 6 14 38 pm

im also facing the same issue and have placed a support request few days ago. "Your ticket number is #369371." still no response.

Update: Same issue on the sample project. using xcode Version 10.1 (10B61).
screenshot 2019-02-08 at 11 13 00 am

@iThink32
Copy link
Contributor

iThink32 commented Feb 8, 2019

@nikhilboranaarit @Jibin2015 have you tried the steps in this video?
https://youtu.be/HVGUBRot7VA
Also make sure that you have enabled bitcode on your main project and RazorpayCheckout.xcodeproj

@nikhilboranaarit
Copy link

nikhilboranaarit commented Feb 8, 2019

@iThink32, yes its enable, and I have tried both the script, but it didn't work.

Try to archive your sample project too, it also give the same error.

@iThink32
Copy link
Contributor

iThink32 commented Feb 8, 2019

@nikhilboranaarit ok , are you free for a hangouts call? can you give me your gmail id?

@iThink32
Copy link
Contributor

iThink32 commented Feb 8, 2019

@nikhilboranaarit @Jibin2015 have a look at this link
https://medium.com/@heitorburger/static-libraries-frameworks-and-bitcode-6d8f784478a9
try setting -fembed-bitcode in the release mode of Other C flags of RazorpayCheckout.project and your main project.
Users of cocoa pods need not do this.

@atulmy
Copy link
Author

atulmy commented Feb 8, 2019

screenshot 2019-02-08 at 6 57 00 pm

screenshot 2019-02-08 at 6 58 27 pm

Does not work. Still same error.

@iThink32
Copy link
Contributor

iThink32 commented Feb 8, 2019

@atulmy ok give us a day or two , will look into this and get back to you.

@iThink32
Copy link
Contributor

iThink32 commented Feb 8, 2019

@atulmy also make sure you set the setting on the project level not on the target level.

@atulmy
Copy link
Author

atulmy commented Feb 8, 2019

@iThink32 send us screenshots with your suggestions.

@iThink32
Copy link
Contributor

iThink32 commented Feb 8, 2019

@atulmy have a look at the link , it is very well explained but nonetheless we will work on it and get back to you guys.

@atulmy
Copy link
Author

atulmy commented Feb 10, 2019

@atulmy ok give us a day or two , will look into this and get back to you.

@iThink32 any update?

@nikhilboranaarit
Copy link

@iThink32 we can have a call or Team Viewer session regarding this issue today.

@iThink32
Copy link
Contributor

iThink32 commented Feb 11, 2019

@nikhilboranaarit sure can you give me your gmail id? We can have a hangouts call

@iThink32
Copy link
Contributor

@nikhilboranaarit @Jibin2015 @atulmy we have fixed this issue from our end and released a new version on all our supported platforms. Please Update to version 2.0.20.

@Jibin2015
Copy link

Sure! Will try it & let you know the feedback and thanks for the support.

@Jibin2015
Copy link

@iThink32 Thank you so much. It worked for me.

@iThink32
Copy link
Contributor

iThink32 commented Feb 12, 2019

closing as this issue is fixed.Reopen if required.

@ShrutiThakur01
Copy link

ShrutiThakur01 commented Sep 30, 2020

Hi ,

I am facing same issue and unable to release the app in Appstore. App is already in App Store and i want to release new version now. This issue is in my latest build . I am able to build the product and its also running properly on iOS devices.
When i select product==> archive then its showing as build failed.

ld: bitcode bundle could not be generated because '/Users/XXX/XXX/XXX/ios/Flutter/Flutter.framework/Flutter' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/XXX/XXX/XXX/ios/Flutter/Flutter.framework/Flutter' for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)

In my pod file ==>

platform :ios, '10.0'
config.build_settings['ENABLE_BITCODE'] = 'YES'
config.build_settings['SWIFT_VERSION'] = '5.2'

Please help.

Thanks,
shruti

@lalkrishna
Copy link

@nikhilboranaarit @Jibin2015 @atulmy we have fixed this issue from our end and released a new version on all our supported platforms. Please Update to version 2.0.20.

how we can solve this issue on building framework? Im experiencing the same with another framework.

@cuirhong
Copy link

cuirhong commented Mar 19, 2021

  1. Before 'Archive'
  2. Execute 'flutter build ios --release'
flutter build ios --release
  1. continue 'Archive'

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

7 participants