Xcode 9 - Alamofire Pods. Command /bin/sh failed with exit code 1 - ios

/Users/Alex/Library/Developer/Xcode/DerivedData/MyProject-ehabmnclpzlywhabrefntacibonm/Build/Intermediates.noindex/ArchiveIntermediates/Fuego/InstallationBuildProductsLocation/Applications//MyProject.app/Frameworks/Alamofire.framework: unknown error -1=ffffffffffffffff
Command /bin/sh failed with exit code 1
I got this issue when I Archive my project. When I run app on simulator it works ok without such issue above.
Also it works ok with Xcode 8, but now when I try to Archive it on Xcode 9 I have this issue. But maybe this is not the case as I reinstall Mac OS from scratch, so it maybe cocopods version issue I am not sure.
Also two // here in the example above is also strange for me /Applications//MyProject.app

I believe it's a Xcode's bug. Restart your Mac and try to build again. Xcode would ask permission to access your Keychain before build Alamofire, then just allow it.

Hm it's very strange after some search on the Web I found that this is actually signing issue.
I used Xcode to generate new distribution certificate and maybe this leads some problems for me.
What I did to solve my issue.
I removed all certificates on my Mac and in my apple account.
I removed all prov profiles as well on my Mac and in my apple account.
I requested certificate and save it on the disc manually (not via Xcode )
I recreated certificate and profile. Downloaded it manually and double click on it.
After that I faced with keychain issue when I can not enter password to allow signing my certificate. I use this link to move certificate form login to system section.
Finally I get it work.

Related

Since updating to Xcode 13 I get a codsign error

After updating to Xcode 13.x on Monterey, I've started getting numerous Code sign error(s): Command usr/bin/codesign failed with a nonzero exit code when building my project.
Cleaning Build Folder and deleting derived data are NOT working as a fix. Any suggestions?
I found a solution to delete the Apple Worldwide Certificate in my Keychain Access. It seems to recreate when building and fixes the codesign error. Sometimes there are 2 certificates and I just delete the older one:
For me, xcode13.4 / monterey osx, iOS 15.0 device. I recently upgraded to monterey and for some reason was the certificate not trusted in the keychain. I had to manually trust the keychain and then it worked. See this also. https://support.apple.com/guide/keychain-access/change-the-trust-settings-of-a-certificate-kyca11871/mac

Xcode - Can run app on simulator but not on device - error: Failed with exit code 1

I am trying to install my AR app onto my device. If I build it onto the simulator it installs but obviously I can't test it as its not possible to run AR on simulator.
The problem is that when I try to run it on my device I get this error
error: Failed with exit code 1
The error above this is
Codesigning /Users/myName/Library/Developer/Xcode/DerivedData/ARanalytix-efmsytiskdgeajgnizwosccslwsj/Build/Products/Debug-iphoneos/ARanalytix.app/Frameworks/libswiftQuartzCore.dylib
/usr/bin/codesign --force --sign 239D4B0E67A04154536E45B1893911C2673A85F5 --verbose /Users/samosborne/Library/Developer/Xcode/DerivedData/ARanalytix-efmsytiskdgeajgnizwosccslwsj/Build/Products/Debug-iphoneos/ARanalytix.app/Frameworks/libswiftQuartzCore.dylib
/Users/samosborne/Library/Developer/Xcode/DerivedData/ARanalytix-efmsytiskdgeajgnizwosccslwsj/Build/Products/Debug-iphoneos/ARanalytix.app/Frameworks/libswiftQuartzCore.dylib: errSecInternalComponent
I have tried cleaning my project, downloading certificates again, and also followed the steps from here but cant get it to work.
Any help would be great as I am out of ideas. Thank you in advance.
I tried restarting my Mac and also deleted the certificates from my keychain. I then changed my bundle identifier name and it all seemed to work. Thank you for your help!
There are couple of reasons why it doesn't run.
1) You need a download a develop provisioning profile, if you are using a production certificate it will not run.
2) Be sure from Apple portal to include you device UDID and download a new development provisioning profile including your device.
3) From the project plist be sure to select the correct provisioning profile.
Did you Restart Mac and iOS Device. Hope this will work

"No code signing identities found" error building cordova app for iOS device

I am trying to build a cordova app for iOS here on my Mac, and I am plagued by the "No codesigning identities found" error. Based on other posts, the frequent resolutions include stopping and restarting Xcode and rebooting, and redownloading the provisioning profile. None of that has worked for me.
It is odd because I reference the provisioning profile by GUID in my build.json, but the error mentions the profile by name. This indicates to me that something somewhere is successfully locating the profile. So I am not sure why it isn't able to use it.
I get the error when I build at the command line using:
cordova build ios --device --buildConfig="build.json"
I would think I should be able to reproduce the issue by building in Xcode, but when I load the cordova project in Xcode and build it, it seems to be fine. But perhaps I am not doing the equivalent step in Xcode. I am just choosing to "Build" in Xcode. Perhaps there is another way to do the equivalent in Xcode?
This same codebase does build successfully on our build box, so this is undoubtedly a config issue here on my Mac. What do I need to do besides download and install the provisioning profile? I have done this both by downloading from Apple Developer and by directly installing through the Xcode preferences.
Below is the exact error I am getting:
Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings (“[the name of our profile]”) were found.
I am a relative novice building an app developed by someone else. I have tried everything near the top of the Google search results for this error, but not much else. I am likely missing something obvious. Pointers and help would be greatly appreciated.
I had not installed the Enterprise distribution certificate with the private key here on my Mac. Once I did that it worked.

Xcode's Bot always returns error

I got an issue with Xcode's Bot. It always returns the "User canceled the operation. Command /usr/bin/codesign failed with exit code 1" error string after running the command below:
/usr/bin/codesign --force --sign <MY_PRIVATE_KEY> --entitlements /Library/Developer/XcodeServer/Integrations/Caches/2cdd321641e8c114e4eba9819b017479/DerivedData/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/MyApp.app.xcent /Library/Developer/XcodeServer/Integrations/Caches/2cdd321641e8c114e4eba9819b017479/DerivedData/Build/Products/Debug-iphoneos/MyApp.app
I can run this command in Terminal with sudo. I'm using Xcode 6.3.1 and OS X Server 4.1.53 in my Mac 10.10.4.
Thank for your help.
This looks like a code signing error. There are a few different reasons for this to happen so you will need to do some troubleshooting. Can other bots build on your server? If so then its probably a build settings issue in this specific project.
In the Xcode Project go to the Project Target that your trying to build, and then Build Settings, and Code Signing. Under the Provisioning Profile you can either choose Automatic or explicitly choose the correct provision, and then under the Code Signing Identity choose iOS Developer. This is probably where your issue is if its related to the project. Do you have a proper provision setup for the project on the Apple Developer Portal?
If you can't get any bots to run on your server then the issue could be with how you set up Xcode Server. Have you added the server to your team? Here is the blog post that I used to get mine up and running, although you don't need to do all of those steps in the post. Focus specifically on the Setup Certificates section and Setup Provisioning Profiles section.
I fixed the issue by copying the missing provisioning file from my local directory "/Users/phuongle/Library/MobileDevice/Provisioning Profiles" to "/Library/Developer/XcodeServer/ProvisioningProfiles". Do not use the downloaded provisioning file from developer.apple.com directly.
I just want to note here for everyone having the same issue with me.

Xcode Build Error - CodeSign

I am trying to test my iOS application on my iPhone. I keep getting the same error.
/Users/usrname/Library/Developer/Xcode/DerivedData/Navigation-abxszioyejjvsqfxzhvoyunubgef/Build/Products/Debug-iphoneos/AppName.app: replacing invalid existing signature
/Users/usrname/Library/Developer/Xcode/DerivedData/Navigation-abxszioyejjvsqfxzhvoyunubgef/Build/Products/Debug-iphoneos/AppName.app: CSSMERR_TP_NOT_TRUSTED
Command /usr/bin/codesign failed with exit code 1
-My provisioning profile and signing requests are good and valid.
-All certs/profiles/devices/App IDs are good and valid.
-I have tried deleting and re-creating the certs several times with no luck.
-The certs are set to use System Defaults instead of Always Trust
-My App ID is set to a xCode wildcard 123456.*
-I have set my Bundle Indentifer to justsometext, as from what I read in the docs, this doesnt matter because of the wildcard.
Can somebody please help me before I rip my hair out. Thanks!
I am using the latest version of Xcode and latest iOS on iPhone.
Have you correctly set the "Trust" section of Apple's WDRC certificate?
http://natelyman.com/index.php?option=com_content&view=article&id=105:what-is-cssmerrtpnottrusted&catid=39:iphone-sdk

Resources