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] broken build because of libRazorpayCheckout.a #63

Closed
philly25 opened this issue Mar 26, 2018 · 39 comments
Closed

[iOS] broken build because of libRazorpayCheckout.a #63

philly25 opened this issue Mar 26, 2018 · 39 comments

Comments

@philly25
Copy link
Contributor

philly25 commented Mar 26, 2018

All was ok, but couple of days ago my iOS build has been broken with this error:

Undefined symbols for architecture arm64: "_OBJC_CLASS_$__TtC8Razorpay8Razorpay", referenced from: objc-class-ref in libRazorpayCheckout.a(RazorpayCheckout.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I can get rid of this error only by removing libRazorpayCheckout.a from Project target -> General -> Linked Frameworks and Libraries. But this is not acceptable. So why could it happen?

RN: 0.44.0
react-native-razorpay: 1.4.2
Xcode: 9.2

@ggarg2
Copy link

ggarg2 commented Apr 1, 2018

Hi Team,

I am also getting the same error after updating the version. Please solve this because of this error we are not able to submit our app in apple store.

ld: warning: object file (/Users/rupaligovil/Library/Developer/Xcode/DerivedData/bag2bag-aeiddmyaikbledelxhhghkkqhphi/Build/Products/Release-iphonesimulator/libReactNativeConfig.a(ReactNativeConfig.o)) was built for newer iOS version (9.2) than being linked (8.0) ld: warning: Auto-Linking /Users/ggarg2/Documents/dev/mobileApp3/ios/Razorpay/Razorpay.framework/Razorpay compiled with older version of Swift language (4.0) than previous files (unknown ABI version 0x06) Undefined symbols for architecture x86_64: "_OBJC_CLASS_$__TtC8Razorpay8Razorpay", referenced from: objc-class-ref in RazorpayCheckout-8D1A1DF27E13B16D.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

@codebymani
Copy link

codebymani commented Apr 7, 2018

@philly25 @ggarg2 me too facing same issue . Have you guys found any solution?

screen shot 2018-04-07 at 9 15 52 pm

React-Native: 0.55.1
react-native-razorpay: 2.0.2
Xcode: 9.3

@iThink32
Copy link
Contributor

iThink32 commented Apr 10, 2018

Yes the solution is to go to Build Settings of your main project , search for framework search paths and add the path as $(PROJECT_DIR)/../node_modules/react-native-razorpay/ios/
Another Note please make sure Always Embed Swift Libraries is set to yes and that you add Razorpay.framework to your embedded binaries

Please note :- We have released 2.0.3 please update your current package.

@codebymani
Copy link

codebymani commented Apr 10, 2018

Thank you @iThink32

@iThink32
Copy link
Contributor

Closing this issue as it has been fixed.Please reopen if any issue persists

@91ranjan
Copy link

I did everything you mentioned but still couldn't get it working.

"react-native": "0.55.2",
"react-native-razorpay": "^2.0.5",

  1. Added to the framework path
    Uploading Screen Shot 2018-05-21 at 10.40.13 AM.png…

  2. Enabled Swift1

screen shot 2018-05-21 at 10 39 27 am

  1. add to Embedded Binaries

screen shot 2018-05-21 at 10 38 58 am

But I am still getting the same error. Please help me out.

@iThink32
Copy link
Contributor

A request please reopen issues before commenting , anyway which Xcode version are you using?

@iThink32 iThink32 reopened this May 21, 2018
@91ranjan
Copy link

Sure, Will keep that in mind.

My Xcode version is "Version 9.3.1 (9E501)"

@iThink32
Copy link
Contributor

iThink32 commented May 22, 2018

Alright , so two things first of all make sure that you have made the module map changes that is specified in the readme , delete derived data , go through the integration steps once and see if u've missed something and retry.If it still doesn't work we can have a team viewer session to help you fix it.

@91ranjan
Copy link

I will try it tonight and update here.

@amitbravo
Copy link

same problem here, There should be linking through cocoapods, thats a better option.

@iThink32
Copy link
Contributor

@amitbravo try what I told above and let me know if you still face any issue.

@amitbravo
Copy link

it was not header search path , but "framework search path" where I needed to put the line "$(PROJECT_DIR)/../node_modules/react-native-razorpay/ios/" and now its working

@iThink32
Copy link
Contributor

hey @amitbravo I've written framework search path itself above.

@91ranjan
Copy link

91ranjan commented Jun 8, 2018

@iThink32 Hey I did everything but couldn't get it to work. "Native Modules cannot be null". How can i make connect over team viewer with you?

@91ranjan
Copy link

91ranjan commented Jun 8, 2018

@iThink32 Sent you the mail with creds.

@iThink32
Copy link
Contributor

closing this issue due to inactivity , please reopen if it persists

@Prateek479
Copy link

@iThink32 : Hey I am still facing the issue after following all the steps mentioned here . can you please help :(

@iThink32
Copy link
Contributor

Please reopen issues before commenting.Anyway what issue are you facing ? can you describe in brief.

@iThink32 iThink32 reopened this Jun 24, 2018
@Prateek479
Copy link

@iThink32 : followed the steps and added the library as per directions , attaching screen shots for same

screen shot 2018-06-26 at 1 29 44 pm

screen shot 2018-06-26 at 1 29 29 pm

screen shot 2018-06-26 at 1 29 15 pm

screen shot 2018-06-26 at 1 29 08 pm

on running command "npm run ios" , I am getting following console error :



 === BUILD TARGET RazorpayCheckout OF PROJECT RazorpayCheckout WITH CONFIGURATION Debug ===


Check dependencies

Not running swift-stdlib-tool: ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES is enabled, but the product type 'Static Library' is not a wrapper type.

Unable to run command 'Libtool libRazorpayCheckout.a' - this target might include its own product.


** BUILD FAILED **


The following build commands failed:

	Check dependencies
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/addUpMath.app
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Underlying error (domain=MIInstallerErrorDomain, code=4):
	Failed to chmod /Users/pojha/Library/Developer/CoreSimulator/Devices/7F446955-5229-42CE-A97F-94F6E0FB22E8/data/Library/Caches/com.apple.containermanagerd/Bundle/Application/380EF799-8F6B-4944-9644-D07EDCFBF6F5/addUpMath.app/addUpMath : No such file or directory

while running build from Xcode its shows :

screen shot 2018-06-26 at 1 33 05 pm

@iThink32
Copy link
Contributor

Hey @Prateek479 We now have integration videos , you can watch this and try it , if you still face issues ill help you fix it.

The link is https://youtu.be/hE-F0QqTwnI.

All these links will be uploaded on our docs page but for now you can use this.

@Prateek479
Copy link

@iThink32 : followed video steps , still facing the same error

@iThink32
Copy link
Contributor

@Prateek479 please give me your email-id

@Prateek479
Copy link

@iThink32 : its prateek479@gmail.com

@iThink32
Copy link
Contributor

closing as this issue is fixed

@salujaharkirat
Copy link

@iThink32 i just migrated from 0.48.3 to 0.57.2 and upgraded to latest version of react-native-razorpay which is 2.0.14. I have xcode version 9.2 and I am getting following error.

I tried following steps:-

  1. Adding $(PROJECT_DIR)/../node_modules/react-native-razorpay/ios/ to yes under framework search paths
  2. Added RazorpayFramework to Embedded Libraries
  3. Made Always Embed Swift Libraries as true

Till this point it was not working then tried following:-

4.closing xcode
5. removed derivedData folder
6. cleaning and rebuilding

Still it fails. Please help?

@iThink32
Copy link
Contributor

@jinxac please reopen issues before commenting.Anyway our framework is compiled with Swift 4.2 which is only supported on Xcode 10 and above.It is mentioned in the readme , please go through it before integrating it.

@iThink32 iThink32 reopened this Oct 12, 2018
@iThink32
Copy link
Contributor

iThink32 commented Oct 12, 2018

@jinxac refer watch our react-native integration video on this page , it will help you

https://razorpay.com/docs/ios/integration-videos/

There is also an example folder , place it in another location and use it as a reference.

@salujaharkirat
Copy link

salujaharkirat commented Oct 12, 2018

@iThink32 we need the latest UPI payment options because of which I was trying to update. Can you please tell which build is compatible with xcode 9.2 and contains new UI options , I will try using the same.

@iThink32
Copy link
Contributor

@jinxac Our latest release does not support anything below Xcode 10 , Xcode 9.2 is very old I recommend you to update to Xcode 10 and use our latest SDK.

@salujaharkirat
Copy link

salujaharkirat commented Oct 12, 2018 via email

@iThink32
Copy link
Contributor

@jinxac yes it is unstable but it I've made it to work on it.You have two options either upgrading to Xcode 9.4 and using the SDK version that is three versions old keeping in mind that the latest release will have the latest iOS 11+ fixes or moving to Xcode 10.
If you don't have to make a critical release soon I suggest moving to Xcode 10 as the react-native community is fixing most of the issues else you can stick to Xcode 9.4

@salujaharkirat
Copy link

@iThink32 will the upi payment options be available if i use three versions old SDK?

@iThink32
Copy link
Contributor

@jinxac yes but it won't have iPhone X fixes and improvements, please consider moving to the latest framework.

@iThink32
Copy link
Contributor

closing due to inactivity.

@rishiankush
Copy link

rishiankush commented Mar 7, 2019

Getting this error:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$__TtC8Razorpay8Razorpay", referenced from:
      objc-class-ref in libRazorpayCheckout.a(RazorpayCheckout.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

screen shot 2019-03-07 at 5 41 57 pm

screen shot 2019-03-07 at 5 43 12 pm

Added Razorpay.framework in both Embedded Binaries as well as Linked Frameworks and Libraries

I am using Xcode version 10.1 and latest version of Razorpay 2.0.20
RN version: 0.58.4
Any leads??

@yogesh1623
Copy link

am using Xcode version 10.1 and latest version of Razorpay 2.0.20
RN version: 0.58.4
My build is running in debug mode , but in release mode I am facing error.

Screen Shot 2019-04-19 at 6 42 12 PM

@morfsys
Copy link

morfsys commented Nov 1, 2019

Please re open this, I've added the framework and also that url in framework search path, Still I get this error
Screenshot 2019-11-01 at 6 06 34 PM

@ankitkumar003
Copy link

Razorpay Version: 2.1.32
Xcode: 11.2.1

Error: clang: error: no such file or directory: '/Users/ankit/Library/Developer/Xcode/DerivedData/Panasonic_MTP_RN-hfrkrwdcstywuqgdvsifxtbhscqz/Build/Products/Debug-iphonesimulator/libRazorpayCheckout.a'
Command Ld failed with a nonzero exit code

Almost tried everything, framework path, Always Embed Libraries, linking process.
Although, removing "libRazorpayCheckout.a" file from Frameworks, libraries and embedded content, removes the error but it doesn't resolve the purpose.

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