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

Support RN 0.60+ autolinking #118

Open
WoodyWoodsta opened this issue Aug 22, 2019 · 12 comments
Open

Support RN 0.60+ autolinking #118

WoodyWoodsta opened this issue Aug 22, 2019 · 12 comments

Comments

@WoodyWoodsta
Copy link

Installing this module and using it results in the error indicating that the module does not support the new autolinking.

https://facebook.github.io/react-native/blog/2019/07/03/version-60#native-modules-are-now-autolinked

@sam17896
Copy link

@WoodyWoodsta have you found any work around yet for this problem, i am getting error 'React/RCTBridgeModule.h' file not found

@WoodyWoodsta
Copy link
Author

That sounds unrelated.

@cubabit
Copy link

cubabit commented Sep 4, 2019

It is kind of related, it is what happens if you manually link then try to build.

@wkoutre
Copy link

wkoutre commented Sep 17, 2019

@sam17896 any luck figuring this out?

@wkoutre
Copy link

wkoutre commented Sep 27, 2019

FWIW I figured this out.

I have a fork working with autolinking.

In case you want to do it on your own, the TLDR is:

  • Create a RCTBraintree.podspec
  • Remove ios/RCTBraintree/Braintree repo
  • in the podspec add something like:
  s.dependency 'Braintree', '4.11.0'
  s.dependency 'BraintreeDropIn'
  s.dependency 'Braintree/PayPal'
  s.dependency 'Braintree/Apple-Pay', '4.11.0'
  s.dependency 'Braintree/3D-Secure'
  s.dependency 'Braintree/DataCollector'
  • 4.11.0 because 4.9.6 has a syntactical issue
  • You may not need all of these dependencies (my app does)

Checkout the podspec in the fork above for an example if you're unsure. Good learning experience!

@alexkendall
Copy link

@sam17896 Where you able to find a solution to that issue?

@alexkendall
Copy link

alexkendall commented Apr 7, 2021

@wkoutre Your fork isn't currently compiling for me. I'm receiving deprecation errors for some of the methods.

@wkoutre
Copy link

wkoutre commented Apr 7, 2021

@alexkendall If you're able to share some logs, I can check it out. Currently using my fork in production without issues.

@alexkendall
Copy link

alexkendall commented Apr 7, 2021

@wkoutre Thanks for taking a look. Currently I'm receiving the following errors:

.../ios/Pods/Braintree/BraintreeUI/Drop-In/BTDropInErrorAlert.m:79:1: Implementing deprecated method

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:71:1: Method 'alertView:clickedButtonAtIndex:' declared here

.../ios/Pods/BraintreeDropIn/BraintreeDropIn/BTDropInController.m:199:176: 'bottomLayoutGuide' is deprecated: first deprecated in iOS 11.0 - Use view.safeAreaLayoutGuide.bottomAnchor instead of bottomLayoutGuide.topAnchor

.../ios/Pods/BraintreeDropIn/BraintreeDropIn/BTDropInController.m:324:68: 'topLayoutGuide' is deprecated: first deprecated in iOS 11.0 - Use view.safeAreaLayoutGuide.topAnchor instead of topLayoutGuide.bottomAnchor

XCode Version 12.4

@wkoutre
Copy link

wkoutre commented Apr 7, 2021

Hm, it seems like (for some reason) warnings are being treated as errors; I'd look into that (check your compiler flags)

@alexkendall
Copy link

alexkendall commented Apr 7, 2021

@wkoutre My compiler flags have "Treat Warnings as Errors" set to "No". Unsure how to work around this. What version of react-native and Xcode are you currently using?

@wkoutre
Copy link

wkoutre commented Apr 8, 2021

Hey, sorry @alexkendall -- missed this response yesterday.

I'm on react-native@0.63.4 and Xcode 12.4 using new build system (not legacy).

Is it possible for you to point me to a repo replicating the issue you're having?

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

5 participants