I am not using react-native-config here. Still during react-native run-ios I am getting below error.
:1:10: fatal error: '/Users/anurag/cmg/cmg/cmg_app/ios/build/Build/Products/GeneratedInfoPlistDotEnv.h' file not found
include "/Users/anurag/cmg/cmg/cmg_app/ios/build/Build/Products/GeneratedInfoPlistDotEnv.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
** BUILD FAILED **
The following build commands failed:
Preprocess build/Build/Intermediates.noindex/cmg_app.build/Debug-iphonesimulator/cmg_app.build/Preprocessed-Info.plist cmg_app/Info.plist
(1 failure)
Thanks in Advance
Related
Building a React Native Expo app (prebuild on iOS, not using Expo Go) and running into this esoteric error that I can't seem to find elsewhere on the internet.
I'll post it here for the next unlucky React Native dev, and perhaps I'll find a solution and post that too.
expo run:ios output:
⚠️ (../../Library/Developer/Xcode/DerivedData/MyProject-epxolwjjgmimbdefugnlecrdysuv/Build/Intermediates.noindex/PrecompiledHeaders/MyProject-Bridging-Header-2vyenlvwppgam.dia:1:1)
Command PrecompileSwiftBridgingHeader failed with a nonzero exit code
^ Could not read serialized diagnostics file: error(in target 'MyProject' from project 'MyProject')
❌ error: generate-pch command failed with exit code 1 (use -v to see invocation)
› 1 error(s), and 1 warning(s)
Failed to build iOS project. "xcodebuild" exited with error code 65.
Xcode build output:
<unknown>:0: error: error opening input file '/Users/jh/Code/MyProject/ios/MyProject/MyProject-Bridging-Header.h' (No such file or directory)
<unknown>:0: error: cannot open file '/Users/jh/Library/Developer/Xcode/DerivedData/MyProject-epxolwjjgmimbdefugnlecrdysuv/Build/Intermediates.noindex/PrecompiledHeaders/MyProject-Bridging-Header-e8n926ydzbc0.dia' for diagnostics emission (No such file or directory)
/Users/jh/Library/Developer/Xcode/DerivedData/MyProject-epxolwjjgmimbdefugnlecrdysuv/Build/Intermediates.noindex/PrecompiledHeaders/MyProject-Bridging-Header-e8n926ydzbc0.dia:1:1: warning: Could not read serialized diagnostics file: error("Failed to open diagnostics file") (in target 'MyProject' from project 'MyProject')
Command PrecompileSwiftBridgingHeader failed with a nonzero exit code
Expo SDK version 44. I'm on a 2022 Mac Studio M1.
Okay, found the solution!
I had used npx react-native-rename to rename my project, but it didn't rename the Swift bridging header.
It's located in ios/MyProject/<oldname>-Bridging-Header.h.
renamed: ios/MyProject/OldName-Bridging-Header.h -> ios/MyProject/MyProject-Bridging-Header.h
While I was doing this, I also discovered that several of my bundle identifiers hadn't been moved over either. Do a codebase search for com.yourorganization.youroldbundlename to find & replace those too.
The locations I had to update:
./ios/MyProject.xcodeproj/project.pbxproj
./ios/MyProject/Info.plist
./app.json
I used this command to obfuscate my project.
swiftShield -automatic -project-root .../ObfuscatingProject -automatic-project-file .../ObfuscatingProject/ObfuscatingProject.xcodeproj -automatic-project-scheme ObfuscatingProject
Response says this,
The following build commands failed:
Ld .../Developer/Xcode/DerivedData/ObfuscatingProject-dbsfnftojfasjxfbiayltcmwtvvw/Build/Products/Debug-iphoneos/ObfuscatingProject.app/ObfuscatingProject normal arm64
(1 failure)
Why I am having this error and how to fix it?
I am getting this error while Archiving the project. Don't know why i am getting this error. Researched couldn't figure it out
Command /Applications/Xcode.app/Contents/Developer/usr/bin/actool failed with exit code 1
Trying to build my Phonegap app in the terminal and getting these errors. Where do I go from here? Is there a way to identify the code 74?
xcodebuild: error: Unable to read project
cannot be opened because the project file cannot be parsed.
Error: phonegap Command failed with exit code 74.
After doing some research I believe it's because I was linking to: xmlns:gap="http://phonegap.com/ns/1.0">
but I should have been linking to:
xmlns:cdv="http://cordova.apache.org/ns/1.0">
I'm using this plugin https://github.com/katzer/cordova-plugin-email-composer for composing a mail. But it suddenly stopped working and then I removed it. After adding it back when running cordova build ios it trows this error:
/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
^
Error: An error occurred while building the ios project.** BUILD FAILED **
The following build commands failed:
Ld build/device/app.app/app normal armv7
(1 failure)
** BUILD FAILED **
The following build commands failed:
Ld build/emulator/app.app/app normal i386
(1 failure)
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/cordova/src/compile.js:65:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Process.ChildProcess._handle.onexit (child_process.js:802:5)
Do you now how to fix this?
I tried changing cordova version to 3.0,3.1,3.2 but it still doesn't work(all other plugins work just fine).
If I add plugins before cordova build build passes but email plugin still doesnt work.