Reputation: 2332
I am trying to build an iOS app and get this error. I have the project, target, and podfile all specifying iOS deployment target of 14.2. I am using Xcode V12.2.
fatal error: module map file '/Users/USERNAME/Library/Developer/Xcode/DerivedData/APPNAME-hevjyrbzqmxstztjalctjwmbxffm/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap' not found 1 error generated.
When I navigate to that directory I do not see the YogaKit.modulemap file in there. How do I configure the build to copy it to that directory or otherwise fix this error?
I am opening the .xcworkspace project file.
I already did:
rm -rf ~/Library/Developer/Xcode/DerivedData/
pod deintegrate
pod update
This is an expo ejected bare app using react-native 0.63.3 and cocoapods v1.10.0. I'm building on a Mac Mini M1.
Any help would be greatly appreciated.
Upvotes: 18
Views: 27832
Reputation: 1585
I had this problem, for me I just did npm install in the root and pod install in the /ios folder
Upvotes: 1
Reputation: 5947
I solved using the next code in Podfile ..proyect/ios/Podfile
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
#To fix issue _OBJC_CLASS_$_RCTBundleURLProvider
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
# config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
# To solve xcode 14 issue not signing some pod projects
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
Upvotes: 0
Reputation: 639
I added
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
To my Podfile in the following loop:
post_install do |installer|
end
Like:
post_install do |installer|
react_native_post_install(installer)
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
Upvotes: 3
Reputation: 12562
In my case, I had opened the file myapp.xcodeproj
and tried to build/archive the project. I could not build because the build always failed.
This time I selected File
> Open
> Selected the ios
directory in my project i.e. myapp>packages>myapp>ios
. Then, I tried to build the app. This time it worked.
You make sure you open myapp.xcworkspace
file instead of .xcodeproj
.
Upvotes: 19
Reputation: 25393
I managed to resolve the issue in my app. I had a mismatch between the ios version in Xcode and Podfile.
I changed my Podfile to platform :ios, '9.0'
and ran pod install
again.
That did the trick.
Upvotes: 2
Reputation: 3096
Make sure that the iOS deployment target version is equal or higher than the version in the podfile
Upvotes: 9
Reputation: 1
In my case, I had to do the following, to get the Archive working with XCode 12 in React Native project,
Upvotes: 0
Reputation: 530
Check your project AND target's 'Build Settings', search with keyword 'valid_archs', if valid_archs config item exists, make sure the value for key DEBUG is 'arm64 armv7 x86_64', in other words, make sure the value contains x86_64.
Upvotes: 4