Cross posted from: https://groups.google.com/forum/#!topic/cocoapods/7LV3LKI0hHE
React Native is moving towards Cocoapods being used by default for all newly created projects and using it to support a feature called "autolinking" (see here for details). This is primarily to fix a major pain point that users have with linking library dependencies in their iOS projects. Previously, over 50% of the "bugs" reported for library maintains would just be people linking the library incorrectly due to their lack of native iOS development knowledge. With Cocoapods and autolinking we hope this will go away.
One issue that we think React Native users might have is if they accidentally open the Xcodeproj file instead of the Xcworkspace and get build errors. We want to make it as clear as possible what went wrong to users who may have much iOS development experience and not understand the difference between the files. As this is not a React Native specific issue, but something all Cocoapod users need to remember, I think it best to ask for some advice.
You should see them side by side in your project folder. The xcworkspace is created by cocoapods and needs to be opened instead of the xcodeproj. So that xcode resolves dependencies properly.
xcworkspace file corresponds to a “workspace” created in Xcode via File > New > Workspace... . You can open them in Xcode, just like you can open projects.
In the Project navigator, Control-click in the empty space and choose Add Files to “workspaceName”. In the sheet that appears, select an Xcode project (a file with a . xcodeproj filename extension). Click Add to add the project to the workspace.
Open your project folder and rename OLD. xcworkspace to NEW. xcworkspace. In the correct named master folder, there will be a newly named .
You can move the .xcodeproj
file to other sub folders.
And add xcodeproj 'yoursubfolder/test.xcodeproj'
above target 'test' do
in your podfile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With