Ensure that the application's Info.plist contains a value for CFBundleIdentifier. Print: Entry, ":CFBundleIdentifier", Does Not Exist - ios

I am attempting to build my first iOS app using this repo:
https://github.com/pmusaraj/discourse-mobile-single-site-app
When building, I receive an error and cannot move forward. I am an absolute noob who will spend long hours on this, but have no idea if I’ve reached a point of failure in the code that I can move beyond with some simple tweaking, or if I must wait for my Issue (opened on the repo) to be resolved by the dev. I assume the dev is busy with other projects and may not have time to help.
Perhaps my software is too new for this? Should I try versioning back react-native and XCode? I could downgrade to XCode 9.2 (Dec 2017 to March 2018 version) and react-native to 0.53.0 (January 2018 version).
My machine:
Mac OSX: 10.14.6
react-native-cli: 2.0.1
react-native: 0.58.6
XCode: 10.3 (build 10G8)
Issue: The info.plist file is not playing nicely with the builder. Inside /ios/DiscoSingle/Info.plist, I see CFBundleIdentifier properly defined as:
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
This looks correct to me.
Here’s the error when running react-native ios-build:
The following build commands failed:
Ld /Users/user919021/Desktop/discourse/ios/build/Build/Products/Debug-iphonesimulator/DiscoSingle.app/DiscoSingle normal x86_64
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/DiscoSingle.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/DiscoSingle.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/DiscoSingle.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:629:11)
at Object.execFileSync (child_process.js:647:13)
at Promise.then (/Users/user919021/Desktop/discourse/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)
at process._tickCallback (internal/process/next_tick.js:68:7)

From my experience, the Bundle Identifier name in your git, was forgot to fill. so, you must add that bundle identifier name in info plist> Signing & capabilities. You can add something like: com.habiesmart.myapps, etc.
Just like that, and eureka! you can run that project!
Best, Habie.

Error cause: In my case, I moved the info.plist which broke the build. The error continued to occur after moving the info.plist back.
Solution: Everything regarding bundle appeared to be correct. The fix was to change an unrelated entry in the info.plist and run the build. This caused the process to correct itself. Then I set the changed info.plist entry back to its original setting and again, the build ran successfully.
(FWIW, I picked "Application supports indirect input..." to change)

In my case everything was correct in Info.plist file. Bundle identifier were also there for respective environments. Issue was with GoogleService-Info.plist file. It was missing at given path.

For those still having the same issues you probably moved your info.plist file you need to tell Xcode where to find it go to build settings and ensure the correct path for the info.plist file is stated there. Here is an image:

In my case, it was something with my main storyboard or launch screen. I think I deleted them on the file system and then tried to build a project but got the error at the end. After I deleted those files in the Xcode project and added them back it started to run on a simulator.

It could be multiple reason
For below is worked
#UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
}
Added bundle identifier in Info.plist & error gone.
Project->Info.plist->Open as source code
<key>CFBundleIdentifier</key>
<string>com.CompanyName.movies</string>

Sometime it's a little bit strange, in my case I suggest we check our project directory in finder because sometime our plist file doesn't stay inside the right directory as we set inside our Project Build Setting so Xcode doesn't be able to locate that plist file, and because of that compiler will show this error.
This was my problem I try to figure this out for almost 30 min, then I decide to open my project directory, and I see that the plist file didn't stay inside the right directory as I set inside Project Build Setting.
This happen because I tried to separate Project Target Schema.
Hope this help someone who face this problem and can't figure it out like me too.

I found that while there was an Info.plist file in the directory with the App declaration I mustn't be adding properties there but rather need to click the project title on the left pane to access the project navigator, then, select my target, then, select "build settings" and scroll down to Info.plist values.

Related

xcode 13 executable file not found

I've an error with xcode 13. When i try to run my app on a real device (arm64 architecture) i got the following error:
Executable Not Found
Domain: DVTMachOErrorDomain
Code: 5
Recovery Suggestion: /path/to/file/MyApp.app is not a valid path to an executable file. Please rebuild the project to ensure that all required executables are created. Check your project setting to ensure that a valida executable will be built.
has anyone ever had this problem? The build process finish without errors. Right now i've excluded x86_64 architecture from "Excluded Architectures" option and set the parameter "Architectures" to "Standard Architectures (arm64, armv7)".
TARGET -> Build Settings, search 'VALID'.
Set VALID_ARCHS, add if run with a simulator, else set arm64.
I faced the same problem and resolved it by deleting files and folders below,
Pods ,
Podfile.lock and
mme.xcworkspace
And running pod install
This Error occur because there was a missing file.
Click on the Error icon on the top header and you redirect to errors there you notice there are some files that are not there or missing.
Added the file and run your project again working correctly.
I got the same error and it was just because I didn't change the build settings correctly after I renamed the folder where Info.plist belongs to.
So I needed to change this setting so that it was the same with the actual path of Info.plist:
Did you make sure that the executable file MyApp located in your folder /path/to/file/MyApp.app/ matches the value of the Executable file attribute in your Info project file?
On my machine, the executable path is : /Users/.../DerivedData/Debug-iphonesimulator/Runner.app/Runner. I noticed that the executable name (Runner in my case) was wrong in the Info file. Correcting it fixed the issue for me.
See the the screenshot below :
Check if there are any deleted files(which happens when you pull the code from Git) and add those files back, Close Xcode, Restart the system, Clean the Project and Run the Project this Worked for me.
I had this error as well.
This is not a blanked solution fix.
For me Xcode had some broken references to files, so I had to connect them and set the file location to be "relative to group" vs "relative to project"
The error was being incorrectly reported as "Executable not found" when building the error was more clear.
Build input file cannot be found: '/Users/MY_USER_NAME/Programs/ios/PROJECT_DIR/SRC/file.xib' is not found.
Some file is missing, you just have to add from project folder. Just restart your Mac and open XCode with your project, you will see the missing file.
I have previously tried every possible solution like cleaning derived data, running pod install but nothing worked. Try above solution
Perhaps the executable file entry is wrong in your Info.plist?
The entry Executable file should be set to $(EXECUTABLE_NAME).
Targets -> Build Settings, search plist
Set Generate Info.plist File to No, set Info.plist File with your info.plist file path.
That's works for me.
I encountered this issue just now after setting up a new prefix header to my product target with a wrong file path:
$(SRCROOT)/$(PROJECT_NAME)/PrefixHeader.h
Correct it to
$(SRCROOT)/$(PROJECT_NAME)/PrefixHeader.pch
resolved my issue. What a stupid Xcode!
pod install or pod install --repo-update should work !
For me, I removed the files in Recovered Reference folder. Then this error gone.
Fast forward to 2022, I got this error after having installed a TestFlight version and was trying to run from Xcode. I deleted the app off my phone, ran again, and was able to install successfully. I hope this helps someone!

Could not get GOOGLE_APP_ID in Google Services file from build environment

For setting up firebase i am using two config 1.GoogleService-Info-test.plist, 2.GoogleService-Info-prdn.plist for UAT and Production. For installing crashlytics using firebase i have followed firebase documentation https://firebase.google.com/docs/crashlytics/get-started?authuser=1#ios. But when i try to run, it throws error in build phase while running script.
I tried without changing config file name and it worked.
Error msg at build phase while running fabric run script "Could not get GOOGLE_APP_ID in Google Services file from build environment".
Can anyone suggest better solution to achieve my requirement.
This is one way you can do it, by having your projects environments separated by targets, by doing so you can then add your different plist files and just check the target that they belong to, that way when you compile the target it will take it's corresponding plist file
Another way to do it, or to look up how to do it, it's called multiple environments with firebase, here are some helpful links
Use different GoogleService-Info.plist for different build schemes
https://medium.com/rocket-fuel/using-multiple-firebase-environments-in-ios-12b204cfa6c0
This worked for me:
When install Crashlytic with Firebase, for multiple scheme, you can have error Could not get GOOGLE_APP_ID in Google Services file from build environment. You can fix it by:
In Build Settings, add a user define for file name in User Defined:
In Build Phases, tap plus button, New Run Script Phase above your Crashlytic build phase, and type this code to the text field. Remember to rename %YOUR_CUSTOM_PATH_TO_FOLDER% to your path to Plist files:
GOOGLE_SERVICE_INFO_PLIST_FROM="${PROJECT_DIR}/%YOUR_CUSTOM_PATH_TO_FOLDER%/${FIREBASE_CONFIG_FILE}.plist"
BUILD_APP_DIR="${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}"
GOOGLE_SERVICE_INFO_PLIST_TO="${BUILD_APP_DIR}/GoogleService-Info.plist"
cp "${GOOGLE_SERVICE_INFO_PLIST_FROM}" "${GOOGLE_SERVICE_INFO_PLIST_TO}"
This worked for me:
Make sure you add the Xcode Crashlytics build phase after Copy Bundle Resources.
I had this in my "Build Phases" and it's works
"${PODS_ROOT}/FirebaseCrashlytics/run"
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/MyApp/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
Our project only one target, but we need to use two Firebase config files GoogleService-Info-Prod.plist and GoogleService-Info-Dev.plist.
I had this in my "Build Phases" and it works.
if [ "${CONFIGURATION}" = "Release" ]; then
${PODS_ROOT}/FirebaseCrashlytics/run -gsp ${PROJECT_DIR}/RushCard/FirebaseConfig/GoogleService-Info-Prod.plist
else
${PODS_ROOT}/FirebaseCrashlytics/run -gsp ${PROJECT_DIR}/RushCard/FirebaseConfig/GoogleService-Info-Dev.plist
fi
In my case I created New Run Script Phrase above Compile Sources, that's why I always see
Could not get GOOGLE_APP_ID in Google Services file from build environment
When I moved Crashlytic's run script at the end of list bug was disappear. Please look the following screen shot:
And article about it is here
I use multiple configurations for several white-labelled apps. I added a User-Defined variable FIREBASE_SUFFIX and changed my script to the following:
${PODS_ROOT}/FirebaseCrashlytics/run -gsp ${PROJECT_DIR}/Firebase/GoogleService-Info-${FIREBASE_SUFFIX}.plist
NOTE: I use Carthage for firebase here: https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md. If you're this same setup, you should use something like this instead (replace the path to where you put your script files):
${PROJECT_DIR}/scripts/run -gsp ${PROJECT_DIR}/Firebase/GoogleService-Info-${FIREBASE_SUFFIX}.plist
Another way is to make sure one plist keeps the original name GoogleService-Info.plist
Different targets meant more work to update CI for me.
This is valid for Xcode 11 at least, not tested on any other versions
I was using new Firebase/Crashlytics which beta and getting error "No Google App ID or Google Services file provided" when I try to upload manually dSYMS
Here is command:
/path/to/pods/directory/FirebaseCrashlytics/upload-symbols
-gsp/path/to/GoogleService-Info.plist -p ios /path/to/dSYMs
Then I reliaze there should be space between "-gsp" and path to Google.plist after that It worked.
The solution for me was removing the call to upload-symbols script.
One of the Crashlytics guides mentions you should add this:
${PODS_ROOT}/FirebaseCrashlytics/run
/path/to/pods/directory/FirebaseCrashlytics/upload-symbols <- Not needed
I misinterpreted this... the run script already calls upload-symbols so there's no need to add a second call.
Make sure in Xcode file explorer (i.e on the left side) "GoogleService-Info.plist" is showing. If not you have to drag and drop "GoogleService-Info.plist" in the Xcode panel.
In my case problem is I copy-pasted the file in the project location, due to this file reference is missing in the Project info.
Well all above answers purpose a possible solution for this issue, in my case GoogleService.plist file was missing from 'Copy Bundle Resources' by adding into it worked in my case..
To check the file goto
Project Directory >> Build Phases >> Copy Bundle Resources
add it add here if you find missing.
If these solutions provided above do not work, I solved mine by going to Build phases as shown on this image. Click on plus and add Google plist
I was able to fix this by locate where is my GoogleService-Info.plist, copy it to ios folder in Flutter and run with this script
"$PODS_ROOT/FirebaseCrashlytics/upload-symbols" --flutter-project "$PROJECT_DIR/firebase_app_id_file.json" -gsp "$PROJECT_DIR/GoogleService-Info.plist" -p ios "$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME"
Update:
I found a better solution:
Just upgrade all firebase package to lastest version
Remove Crashlytics build script
Run flutter clean, flutter pub get
pod install (in ios folder)
I had this issue because I didn't download GoogleService-Info.plist file from Firebase console.
If you have your project on Firebase but missing this file in Xcode, don't worry, you don't need to do the setup again from the beginning. Just go to:
Project Settings > General > Scroll down and in the "Your Apps" panel you will see the file and you can download it and import it in the Xcode project.
I had the same error, also due to the fact that I have multiple bundle identifier and therefore I have a build phase script called Firebase Script (that pinpoints to the correct GoogleService-Info.plist ) that was running after the Crashlytics script.
The solution is to run Firebase Script before the Crashlytics script.
In my case I had a different name in my file, his name was GoogleService-Enterprise-Info.plis when I change it to the normal name GoogleService-Info.plist, IT WORK FINE !!
I faced the same issue for #react-native-firebase/crashlytics
In case you are facing this issue, you probably have missed the 'ios setup' instruction mentioned in below link. Please follow the instruction to fix the issue.
https://rnfirebase.io/#generating-ios-credentials
Just download from Settings of your projects and place for your correct target which you are running.
This error would be shown if there is a space in your project name or in the path of your project.
Read more in this GitHub Issue
Additionally to other answers..
I faced that problem with exact same error message and in my case everything was ok with file GoogleService-Info.plist except that it was genereated with wrong Bundle ID for application (it was changed in XCode much later than initial Firebase setup happened), so I had to create new app in Firebase Console with correct Bundle ID (it's not able to edit) and download new GoogleService-Info.plist
If you are using one of the popular build scripts going around for handling multiple different environments, it is probably useful to know that you should use a different GoogleService-Info.plist destination based on the target platform:
// iOS
PLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app
// watchOS
PLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.appex
// macOS
PLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources
Ultimate guide:
Assure that in Runner folder you have file GoogleService-Info.plist and it is attached in your project
If you don't have this file go to Firebase Console, add you IOS app and download the GoogleService-Info.plist file, then add it to you project's Runner folder by XCode.
If there is no such file in XCode but it exists physically in the folder then right click on Runner folder (in Runner project) -> Add files to Runner -> Select that file
If you want to use multiple flavors add ENV_SUFFIX in Runner (target) -> Build Settings -> User-Defined (on the bottom)
Still in the target's Runner change tab to Build Phases -> Press Plus button -> New Run Script Phase -> Name it as Copy GoogleService-Info.plist and add this line
cp Runner/GoogleService-Info_${ENV_SUFFIX}.plist Runner/GoogleService-Info.plist
IMPORTANT! This script has to be before Initialize Crashlytics step or any other Firebase related script (you can drag it to the top)
Add other GoogleService-Info.plist files with suffix for the env. In my case those would be the _dev _prod and _tst files from the first screen shot
Enjoy multiflavor app
Try downgrading, it worked for me!
I used:
'Fabric', '1.9.0'
'Crashlytics', '3.12.0'

Xcode 10 - Can't Build React Native Application

Since updating the Xcode 10, I cannot build and run my app either on a physical device or on the simulator. I have tried via the terminal and directly through Xcode. What I have tried:
Removing my repo and re pulling.
https://github.com/facebook/react-native/issues/19573
https://github.com/facebook/react-native/issues/14382
https://medium.com/#swyx/if-you-get-a-third-party-config-h-35a3c54e9278
Print: Entry, ":CFBundleIdentifier", Does Not Exist
"config.h" file not found in iOS project of React native
I do not know what is left to do. I have had all the errors outlined in the above links. the main one that I am having trouble with at the moment is that config.h does exist and cfbundleidentifier", does not exist.
After following the instructions layed out in all the links provided, all I needed to do was run npm audit fix and it started working.

Xcode 10, Command CodeSign failed with a nonzero exit code

Every time I build a console is showing this message.
CodeSign /Users/admin/Desktop/AppStoreBuild/Project201/build/Debug-iphonesimulator/Project.app (in target: Desker)
cd /Users/admin/Desktop/AppStoreBuild/Project201
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "-"
/usr/bin/codesign --force --sign - --entitlements /Users/admin/Desktop/AppStoreBuild/Project201/build/Project.build/Debug-iphonesimulator/Project.build/Project.app.xcent --timestamp=none /Users/admin/Desktop/AppStoreBuild/Project201/build/Debug-iphonesimulator/Project.app
/Users/admin/Desktop/AppStoreBuild/Project201/build/Debug-iphonesimulator/Project.app: resource fork, Finder information, or similar detritus not allowed
Command CodeSign failed with a nonzero exit code
...
Is there any way to identify the cause of this failure? It's showing Signing Identity: "-" when I try to run in the simulator also. why do we need signing identity in simulator? And one more thing is if I quit Xcode and restart, it will build properly when I change code or add a method will again build failing.
I had that problem and Xcode failed to compile on the device, but on simulator, it worked fine.
I solved with these steps:
Open keychain access.
Lock the 'login' keychain.
Unlock it, enter your PC account password.
Clean Project in the product menu.
Build it Again.
And after that everything works fine.
None of the listed solutions worked for me. In another thread it was pointed out that including a folder named "resources" in the project causes this error. After renaming my "resources" folder, the error went away.
For some people this happens after adding a .png file to an existing .scn assets folder, plus also a .wav file.
Xcode, owing to increased security, doesn't like extensions on files. You can fix these one at a time by cd'ing into the directory where the file is and removing their extended file attributes using the 'xattr' command in Terminal.
To Remove All Extended Attributes On a Single File
Use xattr with the -c flag to "clear" the attributes:
xattr -c yourfile.txt
To Remove All Extended Attributes On Many Files
To recursively remove extended attributes on all files in a directory, combine the -c "clear" flag with the -r recursive flag:
xattr -rc /path/to/directory
Fore more detail, see
How do I remove the "extended attributes" on a file in Mac OS X?
This solution will also help when getting the code signing error: "resource fork, Finder information, or similar detritus not allowed."
Apple documentation: https://developer.apple.com/library/archive/qa/qa1940/_index.html
Fix
Remove extended file attributes in your resource files for good, not in the compiled application bundle:
Open Terminal
Change directory to the root of your source files
$ cd /Users/rjobidon/Documents/My\ Project
List all extended attributes
$ xattr -lr .
Remove all extended attributes
$ xattr -cr .
Xcode errors
"Command CodeSign failed with a nonzero exit code"
"Resource fork, Finder information, or similar detritus not allowed"
Cause
Apple introduced a security hardening change, thus code signing no longer allows any file in an app bundle to have an extended attribute containing a resource fork or Finder info.
Sources
https://developer.apple.com/library/archive/qa/qa1940/_index.html
This happened to me just today, only after I added a .png image with 'hide extension' ticked in the get info. (Right click image) Ths image was added to the file directory of my Xcode project.
When unticked box and re-adding the the .png image to directory of Xcode, I then Cleaned and Built and worked fine after that, a very strange bug if you ask me.
Try cleaning the project:
1. shift + cmd + k
2. shift + cmd + Alt + k
Then try to run your project again. Hope this will fix the problem.
None of the popular solutions worked.
In my case, I resolved the error by going into the
XCode -> Preferences -> Accounts -> Manage Certificates
and added a (+) to iOS development.
This issue happened to me after adding .dae and .png files and converting .dae with XCode Editor to SceneKit scene file format (.scn).
After doing some more research I found the solution here - https://forums.developer.apple.com/thread/109951#336225
Steps to solve the issue:
In XCode go to Preferences
Click on Locations tab
In Command Line Tools select from the drop down XCode 10.1
In Xcode: Go to Preferences Logout of the current user.
Close Xcode
In Keychain: Go to Login and All items
- Sort by kind
- remove "Apple Worldwide Developer Relation Certification Authority"
- remove "Developer ID Certification Authority"
- remove "iPhone Developer ...."
Open Xcode
Go to Preferences and Login to you user apple account
This will reload your developer certificates you previous deleted
Rebuild the project (Should be a successful build)
Run the build on your native device
This is because Code signing no longer allows any file in an app bundle to have an extended attribute containing a resource fork or Finder info.
To see which files are causing this error, go to .app folder, normally is like: /Users/XXXX/Library/Developer/Xcode/DerivedData/MyProject-ckbzynxqjmstxigbdwwkcsozlego/Build/Products/Debug-maccatalyst/ (mine is Catalyst project)
In Terminal,
cd <above path>
xattr -lr .
You will see some files has extended attribute:
./MyProject.app/Contents/Resources/shopping_cart.png: com.apple.lastuseddate#PS:
00000000 BE 31 D5 5E 00 00 00 00 D0 40 FE 39 00 00 00 00 |.1.^.....#.9....|
Then go to your project folder or referenced folder for those files, remove extended attribute:
cd /Users/XXXX/Work/MyProject
xattr -cr .
After clean all referenced folders, go to Xcode and rebuild.
The solution for me was restarting macOS without saving
I'm unsure of what causes this issue but one method I used to resolve the porblem successfully was to run pod update on my cocoa pods.
The error (for me anyway) was showing a problem with one of the pods signing. Updating the pods resolved that signing issue.
pod update [PODNAME] //For an individual pod
or
pod update //For all pods.
Hopefully, this will help someone who is having the same "Command CodeSign failed with a nonzero exit code" error.
In my case was the following errors lines:
Signing Identity: "-"
…..mobile.app: resource fork, Finder information, or similar detritus
not allowed
Command CodeSign failed with a nonzero exit code
the problem was that in the resources folder I had some files with .png extension, which was hidden on the defaults.
Find file in FINDER, mark it -> cmd+i -> unchek Hide extension
after that, return in Xcode -> kmd + shift + K and rebuild.
I hope I've been helpful!
For me the solution was the following, having the "Automatically manage sign" flag on:
in the team drop-down of the target, select "None"
re-select the correct development team
After trying almost every suggestion, I found that this works, I guess because Xcode sets up the signing stuff from scratch.
After trying everything, my solution was removing some PNG files, build and run (ok) and adding again the PNG images. Weird!
I will post my solution. This solution worked for me, since none of the previous worked. The issue first occurred right after last update of XCode cli toolset (not sure if this is the confirmation bias).
I tried some of the instructions (ie. Unlock Keychain Trick).
What worked for me in a case of error:
Command CodeSign failed with a nonzero exit code (Something.framework)
Trash DD Content; rm -rf /Users/dx/Library/Developer/Xcode/DerivedData/*
Restart XCode
Build Phases => Link Binary With Libraries
Something.framework,
Set embed value in General => Something.framework => EMBED
Do not embed
Press Cmd+B (Build Project)
Hopefully Built Successful
In my experience, the reason that caused this problem was I wrongly reset the Keychain Access to default, so I lost my development certificate.
How did I solve this?
I cleaned my Apple Development Certificate from Keychain Access
I cleaned my Apple Development private key from Keychain Access
Then I got the new error : Revoke certificate
Your account already has an Apple Development signing certificate for this machine, but its private key is not installed in your keychain. Xcode can create a new one after revoking your existing certificate.
Go to Xcode Preference -> Accounts Tab -> Fine the team name under the Apple ID -> Double Click it -> Click the + button at the bottom left of box -> Select App Development
In the team drop-down of the target, select "None"
Re-select the correct development team
Clean the project by shift+cmd+k
Rebuild the project cmd+b
I, too, saw this error after adding a mixture of .jpg and .png images to the art.scnassets folder, making code changes, and removing those changes via Xcode's Source Control > Discard All Changes... menu.
I tried the other fixes in this thread but, ultimately, I had to delete the added .jpg/.png files, clean the project, and rebuild the project to eliminate the errors. I then readded the original .jpg/.png files and I'm now rebuilding the code without issue.
For me I had to go to keychain, select the "login" keychain, double click on the iOS Developer:myname key, click the access control tab and switch the radio button to Allow all applications to access this item.
This problem was caused by building my project in the Release schema. It can be caused by other things as well. Try to switch the build schema by going in xCode to
Product > Scheme > Edit Scheme. In the "Run" Section located on the left, switch the "Build Configuration" to "Debug". I hope this will help.
None of the above solutions worked for me. After some guess work, I tried (Xcode v10.2.1 cocoapods v1.7.1)
pod deintegrate
followed by
pod install
Then:
Opened the workspace in Xcode
Cleaned build folder
Build the project
No build errors.
My Problem was solved
Check Automatically manage signing on Target MyProject and Add Team.
Check Automatically manage signing on Target MyProjectTest and Add Team.
Product -> Clean Build Folder -> Build again or try to run on device.
The problem occurs when you have the wrong/different team on MyProject and MyProjectTest.
Reconnecting your phone prior to rebuilding may also assist with fixing this issue.
It works for me by delete all the apple developer Certification in the keychain. and generate it in the Xcode.
I was experiencing this issue due to the misconfiguration of my Apple Worldwide Developer Relations Certification Authority certificate.
I resolved issue by switching from "Alway Trust" to "Use System Defaults"
Step by Step:
Open KeyChain
Click on "login" keychain (make sure it's unlock - if it's locked Right Click on it and choose "Unlock KeyChain")
Click on Certificates and locate Apple Worldwide Developer Relations Certification Authority certificate
Right click on it and choose Get info
Expand Trust section and change settings to Use System Defaults as per below screenshot
This issue can also occur when upgrade from XCODE 11.x to 12.0. After installation of new version of XCODE, restart system to overcome this issue.
I fixed this issue only by renaming Resources folder (not group) to any other names such as Resource, Resources123, etc.
None of other answers worked. This is what I have done:
deleted my certificate from keychain;
opened Xcode it rebuild certificate;
ran app on device successfully.
in my case it was a corrupted storyboard file
After i copied two .aiff files in a .scnassets group, this error
occured. Deletion of the files and a "Clean Build Folder" solves the problem in my case.
Not sure if this will help anyone - but make sure you have Find Implicit Dependencies checked off. Sometimes this can lead to your project "losing track" of where to look for certain things.
Once you do this, I suggest then also cleaning your project and rebuilding.

Xcode 7.3: error: could not read CFBundleIdentifier from Info.plist (null) after pods configuration

I've downloaded Telegram's code and I'm playing around trying to add Auth0 with it, so I tried to used pods, replicating the practice code.
After some pain regarding PODS_ROOT, I finally managed to get it going, only to encounter the above error.
And now I'm not sure what to do. This answer leads me to believe there's an issue with the info.plist file location, but there's too many:
UPDATE:
I saw that the Bundle Identifiers for the Targets were blank, in contrast to the 'base' Telegram app (perhaps something to do with switching from config configuration to Pods-Telegraph?), which had values in it. So I copied over the Bundle Identifiers from the 'base' app like so:
And promptly ended with this new issue:
ld: library not found for -lPods-watchkitapp Extension
clang: error: linker command failed with exit code 1 (use -v to see invocation)
EDIT:
For reference:
Telegram (iOS version is Objective-C)
Auth0
For replication, I:
Downloaded necessary files for each project. Telegram is missing some files scattered around the net, and Auth0 requires a (free) account for configuration.
Created a podfile for Telegram.
Modified it to resemble Auth0 podfile - Target main app only. If done right, this should replicate the error in question.
Filled in Bundle Filters (erased upon pod install), based off original values. If done right, this should replicate the UPDATE error in question.
Close your project . Open Again. Clean your project and try to run.
And if its not works then Search info.plist right click -> Remove reference . And add it again. and try to Build.
EDIT :- After installing pod You need open project from .xcworkspace in place of .xcodeproject .

Resources