Closed chetstone closed 2 years ago
Finally got it. In step 4 of Issue #13, I had to add $(SDKROOT)/usr/lib/swift at the beginning of LIBRARY_SEARCH_PATHS. This got it to build, but it was still crashing on the device.
Then, adding Runpath Search Path finally got it to run on the device
Environment
info Fetching system and libraries information... System: OS: macOS 11.6.1 CPU: (8) arm64 Apple M1 Memory: 214.31 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.13.1 - ~/.nodenv/versions/16.13.1/bin/node Yarn: 1.22.17 - /opt/homebrew/bin/yarn npm: 8.1.2 - ~/.nodenv/versions/16.13.1/bin/npm Watchman: 2021.05.31.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /Users/chet/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 29, 30 Build Tools: 29.0.2, 29.0.3, 30.0.3 System Images: android-29 | Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 4.2 AI-202.7660.26.42.7486908 Xcode: 13.1/13A1030d - /usr/bin/xcodebuild Languages: Java: 1.8.0_102 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.3 => 0.62.3 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Things I’ve done to figure out my issue
Upgrading version
0.62.3
Description
I used upgrade-helper except for the pbxproj file, as suggested by @pvinis in Issue #13. ( I assume when he says, "Upgrade all other files except the .xcodeproj file" he means the `.xcodeproj/project.pbxproj` file)
At this stage, the app still worked on the simulator (iPad or iPhone with iOS 14.5 or 15.0) but not on an iPad running 14.8.1 or on "My Mac (Designed for iPad)". This all worked on RN 0.61.4 with this setup (M1, XCode 13.1).
The error when running on the iPad was
The final error was the same running on My Mac, except it was preceded by many messages like:
Rather than follow @pvinis convoluted instructions, I thought I would try Mike Hardy's podfile postinstall hook instead.
This is my Podfile at that stage
(Between each step I was careful to completely clean the build and rerun pod install).
Again at this point the app worked on the simulator but on my iPad it crashed with this message:
So then I reverted those changes and worked through the steps in Issue #13.
After each of the first three steps, I tested and got the same result -- simulator works but device fails with the above error.
Finally after the fourth step, the build failed with this error:
I also had these warnings when running pod install:
I tried building on an Intel machine with XCode 12.5.1, using the Mike Hardy podfile postinstall step and not even the simulator works: