Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
App can build
App build fails
In Debug mode
In Release mode
Debug mode or Release mode, same result:
clang: error: no such file or directory: '/Users/{my-username}/Library/Developer/Xcode/DerivedData/myapp-cnmaojnjvqijpresrebtdrwvdjzc/Build/Products/Release-iphonesimulator/libCodePush.a'
Examples folder run node create-app.js appName [email protected] [email protected] command to generate plain CodePushified React Native app. Please see description on top of create-app.js file content if needed(The more info the faster we will be able to address it!)
An extra fact to help: In Debug mode, it only fails the FIRST time. When I run build again, it always works the second time.
It may be a clue that libCodePush.a lives both at root and inside of /Products folder in the Workspace:

Tail end of build output from my CI:
...
The issue seems to be caused by the way that react-native link connected the library. It resulted in a duplicate entry for file libCodePush.a. Manually removing this has settled the issue.
@octodriver where did you remove the duplicate entry from? I'm stuck with the same error now. Thanks!
@octodriver we are waiting for you response
in the end, i still end up getting the duplicate inside the Libraries/CodePush.xcodeproj, that was not the issue.
What ended up fixing my problem was:
pod install)sudo gem install cocoapods)pod update)pod install)My RN version = 0.55.2
My Podfile looks like this:
target 'myapp' do
platform :ios, '9.0'
rn_path = '../node_modules/react-native'
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'React', path: rn_path, subspecs: [
'Core',
'CxxBridge',
'DevSupport',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
]
pod 'AppCenter/Crashes', '~> 1.5.0'
pod 'AppCenter/Analytics', '~> 1.5.0'
pod 'AppCenterReactNativeShared', '~> 1.4.0'
pod 'CodePush', :path => '../node_modules/react-native-code-push'
end
Important note: you have to have target = 9.0 as shown above
also, the latest React (55) has different pod entries from before: 'CxxBridge', 'DevSupport',
I have the same problem, removed duplicates from file {projectname}.xcodeproj
@sobiso thanks I removed duplicates and also worked !
Same here, had duplicate errors as well as missing libCodePush.a after clearing DerivedData.
Our solution was similar to those above:
1) Comment out codepush in podfile
cd ios && pod install && cd ..
react-native unlink code-push-react-native
react-native link code-push-react-native
(uncomment codepush line in podfile)
cd ios && pod install && cd ..
react-native run-ios
Worked like a charm for us.
I just remove tvOS in codepush project.
I fixed it this way:
-Click on the project target => Link Binary with Libraries
-Remove libCodePush.a
-Add libCodePush.a file from CodePush.xcodeproj/Products (as opposed to the one from the root directory)
Most helpful comment
I fixed it this way:
-Click on the project target => Link Binary with Libraries
-Remove
libCodePush.a-Add
libCodePush.afile from CodePush.xcodeproj/Products (as opposed to the one from the root directory)