-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Archiving react native project with cocoapods error duplicate symbols #12814
Comments
I received the same problem and fixed it by following http://stackoverflow.com/questions/42021796/react-native-xcode-project-product-archive-fails-with-duplicate-symbols-for-arch Like the answer says, its because of being linked through react-native's initial setup and in my case also getting linked through cocoapods as well (I just figured I would add my experience here on how I fixed it for extra reference) Im not sure about the null part of the NativeMethods though |
When I removed
from my How to deal with it keeping configuration only in one place in Podfile or XCode? |
+1 on that @bitsal |
I have the same issue. Is anyone able to fix this? |
@vinhtq We've just removed Cocoapods from the project at all. |
So the suggestion is to get rid of Cocoapods at all? I have just started using it because it was recommended in some library. |
I wouldn't say it is a suggestion, it is a workaround to move a project forward ;) |
clovs answer in #12042 solved the issue for me.. |
For me, none of the above solutions worked so I´ll write what It worked if is helpful for anyone. My Podfile has React and Yoga like (and other Pods):
Hope it helps someone else! |
@andfk Thanks, that worked. Automated step 3 from your instruction:
Cocoapods:
Final
|
So I get the duplicate symbols with Archive issue but also see the problem where if the react libraries are only referenced in the podfile then react-native run-ios fails to find the references. e.x. @habovh has the red error screen. The workaround above works but shouldn't be needed. I think the react-native cli may have an issue with it's build command where the podfile references are not being linked. |
@andfk Thanks bro!!! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions. |
@JPeer264 I didn't dive deep into that topic, basically on top of that hack I figured that google maps component was breaking the internal dependencies and the order of how it's compiled. If you find the real story behind why is it failing, please do share it here or somewhere. Thanks. |
@alloy since you commented on #8534. Note that I'm reproducing this even now at RN 0.52. I can run my app on device and simulators fine, but now when I want to archive for upload to app store, I'm getting this in Xcode:
I'm still looking at what workarounds there are with this. But since this issue is a year old, is this really persisting for this long? Is there this few people using RN and Pods that are uploading to app store? I'm looking at removing some libs from Xcode that duplicates, but last time I tried it I ran into other errors: My # Uncomment the next line to define a global platform for your project
platform :ios, '9.0' # 8.3 until react-native-firebase 3.2.0: Specs satisfying the `RNFirebase (from `../node_modules/react-native-firebase/ios`)` dependency were found, but they required a higher minimum deployment target.
target 'wonderswipe' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# Can't use with Firebase pod? https://github.com/invertase/react-native-firebase/issues/252#issuecomment-316340974
# use_frameworks!
# Pods for wonderswipe
pod 'Firebase/Core'
# pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios' # http://invertase.io/react-native-firebase/#/installation-ios
# # pod 'RNFirebase', :path => '../../ios/RNFirebase.podspec' # https://github.com/invertase/react-native-firebase/releases/tag/v3.2.0
# pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga" # RN 0.48 and below
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga' # RN 0.49+
# https://facebook.github.io/react-native/docs/integration-with-existing-apps.html
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'BatchedBridge', # Required For React Native 0.45.0+?
'Core',
'tvOS', # WORKAROUND: https://github.com/facebook/react-native/issues/17027
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43 fixes https://github.com/facebook/react-native/issues/15775#issuecomment-327971300
'RCTText',
'RCTNetwork',
'RCTWebSocket', # needed for debugging
# Add any other subspecs you want to use in your project
]
# [OPTIONAL PODS] - comment out pods for firebase products you won't be using.
# pod 'Firebase/AdMob'
# pod 'Firebase/Crash'
# pod 'Firebase/DynamicLinks'
pod 'Firebase/Auth'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Database'
pod 'Firebase/Firestore'
pod 'Firebase/Storage'
pod 'Firebase/Messaging' # Need setup: http://invertase.io/react-native-firebase/#/installation-ios?id=_3-cloud-messaging-optional
pod 'Firebase/Performance'
# https://rnfirebase.io/docs/v3.2.*/crashlytics/ios
# Add new pods below this line
pod 'react-native-orientation', :path => '../node_modules/react-native-orientation'
# target 'wonderswipe-tvOSTests' do
# inherit! :search_paths
# # Pods for testing
# end
#
# target 'wonderswipeTests' do
# inherit! :search_paths
# # Pods for testing
# end
end
#target 'wonderswipe-tvOS' do
# # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# # use_frameworks!
#
# # Pods for wonderswipe-tvOS
#
# target 'wonderswipe-tvOSTests' do
# inherit! :search_paths
# # Pods for testing
# end
#
#end
# WORKAROUND: https://github.com/facebook/react-native/issues/17274#issuecomment-356363557
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'yoga'
target.build_configurations.each do |config|
config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
config.build_settings['GCC_WARN_64_TO_32_BIT_CONVERSION'] = 'NO'
end
end
end
end |
I removed libRCTNetwork.a, libRCTWebSocket.a, libRCTText.a from being linked in Xcode. But when I run the app on device, I get this error:
|
If you use CocoaPods to pull in React, then you should not be adding any static React libs to your project yourself, i.e. all the |
No. libRCT*.a needs to be linked or I get #12814 (comment) The only working solution after trying everything is #12814 (comment) |
This trick worked for me https://stackoverflow.com/a/46678210/988941 |
Anyone else getting the duplicate UUID warning from cocoapods after using the suggested workaround? I added
and am seeing this on
I tried reverting my change just to see if that was indeed what caused the warning, and after I removed it and re-installed the warnings are gone. |
Got the exact same issue after adding the trick. So I am looking for another solution (but didn't find anything yet...) |
I can confirm what MoOx describes. I’m seeing same stuff on bunch of my
projects on top of cocoapods.
…On Thu, Feb 15, 2018 at 12:25 AM MoOx ***@***.***> wrote:
Got the exact same issue after adding the trick.
I didn't find a way to "fix" this warnings (except a solution that seems
to ignore those and that update Podfile.lock CHECKSUM each time your do pod
install which sucks a lot if your add lock file into git).
So I am looking for another solution (but didn't find anything yet...)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12814 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABxW7-O36bD-IB35AMhjof6XYcA0f2WXks5tU-oUgaJpZM4MXkPA>
.
|
@stueynet at stackoverflow answer worked for me. It's basically adding the following snippets to the podfile
|
@abdulhameedalyousef that solution worked for me |
That doesn't work for me. I get multiple errors of Manually deleting React from Xcode works for me (which is obviously still tedious). There's still no proper fix after more than a year? |
@fungilation, these are apparently just warnings ;) |
No they are not. Build or archiving would fail |
@eugenehp thanks, your answer help me. |
Glad it helped.
…On Tue, Sep 25, 2018 at 3:07 AM qinlan ***@***.***> wrote:
@eugenehp <https://github.com/eugenehp> thanks, your answer help me.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12814 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABxW72qwnNoTWHwodWY3kMDHrAhAN8gyks5uegB0gaJpZM4MXkPA>
.
|
FYI There’s a Podfile option to disable deterministic UUIDs, maybe that will help some of you: install! 'cocoapods', :deterministic_uuids => false |
Hi! This might be caused by the fact that you have If you still experience this issue, please check your local setup, and check if you're using the newest version of XCode / CocoaPods / React Native. If the issue still persist please comment below and we can reopen it 😁 |
its always always always (usually) straight up bc somehow somewhere youre
including it twice im tellin u what....
rofl
gl
God bless
…On Tue, Mar 19, 2019 at 9:30 AM Michał Chudziak ***@***.***> wrote:
Closed #12814 <#12814>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12814 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AO-zkV59-cAaFNIVNT-HmWisvNl2FoSDks5vYPSYgaJpZM4MXkPA>
.
|
Two years later... |
same issue on RN 0.59 |
same issue on RN 0.59.3 |
59.10 |
0.60.0 |
Same here on 0.60.0 |
Same here....... |
After installing Xcode 11 I've got the same issue. Nice. |
Same here on 0.60.5 |
Description
Updated my project to 0.42.0. After getting everything working in simulator and device on both Debug and Release scheme, I tried to archive with and without fastlane so I can submit to app store. I expected it to work, but the archive failed with duplicate symbols.
Reproduction
Recreated from react native cli
added podfile
pod installed
attached my team on General -> Signing
https://github.com/ethantran/ReactNativeWithCocoaPods
Solution
I am aware of this issue #8534
I tried removing all libRCT*.a and libReact.a as he suggested but with no luck. Removing those will lead to errors such as RCTRawText not found. Perhaps I did not understand what he meant.
Additional Information
CocoaPods version: 1.2.0
The text was updated successfully, but these errors were encountered: