question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing .xcodeproj for iOS projects

See original GitHub issue

Description

During upgrade the project from react-native 0.60.* to react-native c it was observer that react native does not have *.xcodeproj files anymore. That make it impossible to use the latest and greatest react native in project that uses Carthage. There is also nothing about it in docs. For example, https://reactnative.dev/docs/integration-with-existing-apps says that CocoaPods are needed, but that is not an option for existing projects that uses Carthage. Same for https://reactnative.dev/docs/upgrading.html, it does not cover this case.

As a result migration to the latest react native is blocked:

Screenshot 2020-10-16 at 00 13 51

React Native version:

System:
    OS: macOS 10.15.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 6.23 GB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
    Yarn: 1.22.4 - ~/.nvm/versions/node/v12.16.1/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 26, 27, 28, 29
      Build Tools: 27.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.2
      System Images: android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6626763
    Xcode: 11.3.1/11C505 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_242 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.3 => 0.63.3 
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Use existing project with Carthage
  2. Try to integrate react native to this project

Or

  1. Use existing react native project with Carthage with RN version <= 0.60.*
  2. Try to upgrade react native to this project

Expected Results

Snack, code example, screenshot, or link to a repository:

Not needed

Additional information

According to official RN documentation linking-libraries-ios

If the library has native code, there must be an .xcodeproj file inside its folder. Drag this file to your project on Xcode (usually under the Libraries group on Xcode);

it is also clearly stated that there must be an .xcodeproj and this is how iOS development happens.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:17
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
rectified95commented, Oct 20, 2020

Thanks for describing your pains points with the upgrade to latest. Still, this is not strictly a new functionality regression. Please recreate this issue in the upgrade-support repo, as indicated by the issue templates: https://github.com/react-native-community/upgrade-support

5reactions
sanderfrenkencommented, Oct 16, 2020

To elaborate a bit, by removing the .xcodeproj files manual linking of react-native has become AFAIK close to impossible. The only way I can think of now is by creating references from all the react-native sources in node_modules in the consuming project. This however is a cumbersome job and in addition very error prone (think of missed files, or adding sources that are only needed for testing to the actual build target).

By disabling manual linking, the only way for any project to use react-native seems to be by using CocoaPods. IMO, this is not a solution that fits all.

There are many existing projects that rely heavily on Carthage for example, or SPM.

By forcing CocoaPods, one can only decide to either use both CocoaPods and the other dependency manager (welcome trouble, this is definitely not advisable nor maintainable) in the same project, or migrate the complete project to CocoaPods. But the latter is not even always possible, as for example some specific dependencies might not be available using CocoaPods.

I am very curious if there is another way of using the latest react-native in a project while not using CocoaPods.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Project ...xcodeproj cannot be opened because it is missing its ...
The cause of the bug is that the .xcodeproj file is missing its containing pbxproj file, right? This is usually present when you...
Read more >
xcode "Products" folder missing in… | Apple Developer Forums
xcode "Products" folder missing in project navigator ... Then close the project in Xcode and open MyProject.xcodeproj/project.pbxproj in a text editor.
Read more >
expected ios/runner.xcodeproj but this file is missing. - You.com
Please try the following: Create a new flutter project. Run the project - confirm its in good working order (you will see xcode...
Read more >
Xcode Project error: xcodeproj cannot be opened because it is ...
The Xcode project file is a package (so it's really a folder). The project.pbxproj is stored inside the package. Go to Finder, right-click...
Read more >
missing project.pbxproj file, how to restore it? - Reddit
it seems like I only got the project folder and the xcode project file ... What to consider if Apple opens up the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found