-
Notifications
You must be signed in to change notification settings - Fork 22
Duplicate symbols error when build with CocoaPods #43
Comments
@maoesx If you're using Cocoapods you shouldn't need to run |
I thought that too, so I tried run pod install without link @adobe/react-native-acpcore, I noticed that in the podfile the line "pod 'RCTACPCore', :path => '../node_modules/@adobe/react-native-acpcore'" was no longer there. And if I continue run the app with initSDK(){ it will claim "TypeError: Cannot read property 'setLogLevel' of undefined" |
@maoesx I followed your reproduction steps and saw this log on RN 0.60.0 and got this log:
I'm guessing 0.60.0 made auto linking more forgiving if you're already manually linked as I compiled without error. The second error your posted I would suggest trying to remove |
Tried these steps:
|
@maoesx can you share your podfile (or some portion of it enough to run |
platform :ios, '10.0' target 'BMAApp' do
end post_install do |installer|
end |
@maoesx I wasn't able to reproduce your issue with a new app running RN 0.59.3. Here are the steps I took:
updated podfile with your podfile ran
update App.js to include some SDK code
I've created a repo with the app, hope this helps: https://github.com/nporter-adbe/gitissuedupe |
Thank you for the effort, I notice you still run both react-native link @adobe/react-native-acpcore and pod install? |
@maoesx Yeah, the |
I'm able to run your demo flawlessly too, seems it's my local issue. Thanks a lot anyway. |
@maoesx glad to hear the sample I provided built as expected. We have a note in the README to run pod install if you’re using Cocoapods, but I think I can improve the wording. Thanks for the feedback! |
I'm getting 88 duplications in both acpcore and acpanalytics |
@samitha9125 please post exact steps to replicate in a fresh app. You should not have duplicate symbols unless you have installed the SDK multiple times. |
Sure. What I did was in my project,
This generated 88 duplicated files. Also after this issue, I did manual linking for both core and analytics and disabled autolinking with Autolinking works perfectly and project builds without any issues when I removed acpcore and acpanalytics |
@samitha9125 what version of react native are you using? |
@maoesx react native 0.61.2 |
@samitha9125 I am unable to reproduce your issue on I followed the steps provided and I can build and launch the app without error. Please ensure you have followed the install instructions correctly. It might be helpful to checkout the issues in the react native repo related to duplicate symbols for what might be causing this issue in your project: https://github.com/facebook/react-native/issues?utf8=%E2%9C%93&q=is%3Aissue+duplicate+symbols This issue seems to fix a similar issue: facebook/react-native#25484 |
Expected Behaviour
App should be successful build after link library and pod install
Actual Behaviour
Shows duplicate symbols error
Steps to Reproduce
npm install @adobe/react-native-acpcore
react-native link @adobe/react-native-acpcore
cd ios/ && pod install
cd .. && react-native run-ios
Platform and Version
Node v10.15.0
Npm 6.4.1
react-native-cli: 2.0.1
react-native: 0.59.3
Logs taken while reproducing problem
info duplicate symbol OBJC_CLASS$_ADBAlertViewController in:
/appPath/node_modules/@adobe/react-native-acpcore/ios/libs/libACPCore_iOS.a(ADBAlertHandler.o)
/appPath/Build/Products/Debug-iphonesimulator/libRNAdobeAnalytics.a(ADBMessageAlert.o)
duplicate symbol OBJC_METACLASS$_ADBAlertViewController in:
/appPath/node_modules/@adobe/react-native-acpcore/ios/libs/libACPCore_iOS.a(ADBAlertHandler.o)
/appPath/ios/build/BMAApp/Build/Products/Debug-iphonesimulator/libRNAdobeAnalytics.a(ADBMessageAlert.o)
info ld: 2 duplicate symbols for architecture x86_64
info clang: error:
info linker command failed with exit code 1 (use -v to see invocation)
The text was updated successfully, but these errors were encountered: