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

Xcode can't archive project, but build without any problems: "library not found for -lDoubleConversion" #25788

Closed
rnnyrk opened this issue Jul 23, 2019 · 5 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@rnnyrk
Copy link

rnnyrk commented Jul 23, 2019

Hi there,

I'm stuck for quite some time now. I can't seem to Archive my project via Xcode. When I do I get the following errors:
Screenshot 2019-07-23 at 16 56 13

The strange thing is that running a Build of the project doesn't give any errors or problems.
I've already tried almost everything I can find on the internet, but like I said; I'm stuck. :(

I'm using react native with a Podfile which looks as following:

platform :ios, '11.0'

target 'Project' do
  pod 'React', :path => '../node_modules/react-native/'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'
  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      targets_to_ignore = %w(React yoga)

      if targets_to_ignore.include? target.name
        target.remove_from_project
      end
    end
  end

  target 'ProjectTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

And this are the linked libraries via Xcode:
Screenshot 2019-07-23 at 17 28 32

The problem seems to be there since I've added the Podfile. I didn't archive for a while, but before I used the Podfile and all Libraries where linked via Xcode there was no problem archiving (but then I experienced issues with adding custom libraries).

React Native version:
React Native Environment Info:
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 51.95 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.11.0 - ~/.nvm/versions/node/v10.11.0/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.11.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 26, 28, 29
Build Tools: 28.0.3, 29.0.0
System Images: android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.9 => 0.59.9
npmGlobalPackages:
react-native-cli: 2.0.1

Steps To Reproduce

  1. cd ios & pod clean & pod install
  2. open .xcworkspace
  3. Select TEST scheme (with react-native-scheme-manager)
  4. Clean build folder with cmd + shift + k
  5. Run project on iPhone 8, connected device (no errors)
  6. Archive project (error as above)

Furthermore I've also tried different solutions like deleting all libraries via Xcode "Linked Framework and Libraries" and manually adding them via Pods like in this issue: #20492

Because it is only on Archiving I'm thinking it has something to do with minifying. Is this even possible? Or any other suggestions? Thanks in advance for the help!

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.60 and verify if the issue still exists.

The "Resolution: Old Version" label will be removed automatically once you edit your original post with the results of running `react-native info` on a project using the latest release.

@jose-verissimo
Copy link

I have the same issue, I was using version 0.57.0, and after upgrading to version 0.60.4, I get this problem "library not found for -lDoubleConversion".

Already wasted 2 days trying to solve it, building an app from scratch results in the same exact issue... Any ideas?

@rnnyrk
Copy link
Author

rnnyrk commented Jul 24, 2019

My project was being build by using Cocoapods 1.7.3. The issue is resolved by upgrading to 1.7.5! You can update by running sudo gem install cocoapods

@rnnyrk rnnyrk closed this as completed Jul 24, 2019
@jose-verissimo
Copy link

My solution was to remove the DoubleConversion library that was being added from node_modules and instead use Cocoapods if anyone wondering.

DM for more details.

@gunnartorfis
Copy link

I had tried literally everything suggested by the awesome community. I had been emailing with @jose-verissimo and he was extremely helpful.

The solution for me was to create an empty Swift file through Xcode and let Xcode create a Bridging-header.h file. The key was to not delete the Swift file after Xcode creating the bridging header file.

@facebook facebook locked as resolved and limited conversation to collaborators Oct 6, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants