how to resolve CodeSign error in appcelerator 4.x - ios

I am getting the following error when I try to package my application for adhoc distribution. I am building fine - but not able to package. I have a indie seat license.
[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : CodeSign build/Products/Release-iphoneos/xyz.app
[ERROR] : (1 failure)
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess.<anonymous> (/Users/User/.appcelerator/install/5.0.3/package/node_modules/appc-cli-titanium/plugins/run.js:89:66)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:789:12)
My system -
OS - Mac OSX El-Capitan
Appcelerator - 4.x
Appcelerator - Indie license
What I have done to debug this issue ? after spending a lot of time researching this - I have
rebooted the system several times
appc logout / appc login several times
appc setup to ensure that I have the latest files (I only work on iOS)
revoked all my certificates on developer.
deleted my login-keychain - and rebooted my mac book pro and re-logged in.
deleted all certificated in ~/Library/MobileDevice//
recreated all certifcates on https://developer.apple.com/
ios developer certificates
ios distribution certificates
ios developer provisioning certificates
ios distribution provisioning certificates
for the app ID that is described in tiapp.xml
downloaded all of these - and installed them by clicking on them
I created the csr on my machine new - so I have that also. I also imported that certificates as a private certificates
checked in the "package configuration - manage section" that all of the certificates are accurate - atleast they show up as a the same name.
my App is registered in Appcelerator portal
PLEASE HELP - there is no clear description on what the problem is and how to resolve it.

I know it has been a while for this question but this might help
someone.
I’ve been facing this problem for 2 days now:
[ERROR] : BUILD FAILED
[ERROR] : The following build commands failed:
[ERROR] : CodeSign build/Products/Debug-iphoneos/WYN.
[ERROR] : (1 failure)
What I did to solve it was:
Remove all my certificates from keychain (login and system) and
revoking them from Apple member center.
Remove the provisioning profile associated to my app (Apple member
center).
Create a new certificate.
By default it was put in the system area of key chain (That might be
the problem).
Copy it to the login area of keychain and remove the old one.
Associate the provisioning profile to your app.
Test the app on a device.
It should be fixed!

I just came across this issue and found a simple solution that doesn't involve wiping out everything and starting fresh:
Browse to the Appcelerator project's build/iphone folder.
Open XCode from the *.xcodeproj file
Inside XCode, click on the "General" settings of the app, from the icon at the top of the file hierarchy.
Under "Signing", checkmark the box to allow XCode to "Automatically manage signing".
Build the app once to your test device from within XCode, then exit.
Go back to Appcelerator and do Clean then Build to resolve the issue.

Related

I think I have done necessary code signing work but build still failing in Ionic

Building an Ionic app to try and test on my iPhone. I downloaded XCode last night and went in and created a profile with my Apple ID, as well as changing the bundle identified in the "General" and "Signing & Capabilities" tab. However when I run "ionic cordova build ios --prod" I get the error:
error: No profiles for 'io.ionic.starter' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'io.ionic.starter'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'MyApp' from project 'MyApp')
** ARCHIVE FAILED **
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.
cordova build ios exited with exit code 65.
Re-running this command with the --verbose flag may provide more information.
It seems to me as though I have done the necessary code signing procedures that I read from Ionic's website, so I am unsure why it still isn't working.
To run the app in your iPhone there are several steps, check these:
You have created your app ID in the website.
You have created your provisioning profile in the website, and downloaded to your computer and added to your Mac (web -> download profile -> double-click)
You have created a development certificate (search how to create a certificate using a Certificate Signing Request generated in your Mac ) and then downloaded that certificate and added to your Mac.
There are two certificates. Distribution certificate is used to publish the app, but development certificate is used simply to run the project in your iPhone, you need that.
But honestly, it's all much easier if you use XCode instead of the console. In the console run the command without --prod, to apply ionic changes to the iOS project. Then if you want to run the app, it's easier if you open XCode and just click play.
With XCode there's the option "Automatically manage signing" that will handle most of this for you automatically. You just have to login to your account using XCode (it will prompt you) and let it do it for you.

How to resolve error of "errSecInternalComponent" while building archive for appstore?

I am trying to submit flutter app to Appstore. Here are the steps I followed:
Deleted all certificates and provisioning profiles
Create/Add IOS Distribution Certificate
Create IOS Provisioning Profile
Add IOS Provisioning Profile
Clean App
Build Then Run App
Set Codesigning and Provisioning Profile In Build Settings
Lots of Googling > to no successes
Basically, facing the error of "errSecInternalComponent"
Here is the error I get:
Warning: unable to build chain to self-signed root for signer "iPhone Distribution: Johnny (**********)"
/Users/johnny/Downloads/chat_app-master 2/build/ios/Release-iphoneos/Runner.app/Frameworks/App.framework/App: errSecInternalComponent
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
You are having an issue with a certificate, that's why you get this warning. You need to generate a new one.
Try this:
xcode -> preferences -> accounts -> select the account -> manage certificate -> click on the (+) icon in the bottom left side of the popup window -> ios development
Build the first time with Xcode, Xcode will ask you to update the keychain, click on always allow.
After that, your command line build will work.
For me the following worked - even from a ssh session:
security unlock-keychain -p "<my password>"
Since the issue is already resolved, this might not be the answer to you.
However, I would like to share this with the community as I stumbled upon the same error message with another setup.
I have been building an iOS App with Xcode on a MacMini used as gitlab runner.
Building the app manually worked, but whenever I pushed to the repository and the automated build started, this error appeared.
Updating the ruby version to a higher version than BigSur's shipped one and reinstalling the gitlab-runner resolved my issue.

Error Signing Xamarin.iOs Application { codesign exited with code 3. }

I'm trying to Build a xamarin.ios app with VS2019 installed in windows, connected to macOs added as a remote build server. Everything is ok, but when is trying to verify the signature fails showing this:
error : codesign exited with code 3
After some debugging we found out that the VS is loging of the dev's portal for some reason.
I'll appreciate your help.
Thanks!
CodeSign encounters issues to verify the signature of your signing certificate, provisioning profile and App. I first ran into this issue when building on MS AppCenter, but was able to reproduce after running the Archive for Publishing command from Visual Studio
Use Terminal to execute codesign with detailed logging on your App by using the following statement:
codesign -dv MyApp.app
Note: You can drag and drop your MyApp.app from your Finder window into the Terminal app.
Details about your signature will be displayed. In my case "TeamIdentifier=not set" and the "Signature=adhoc" were shown, while I was developing an InHouse app, meaning that the provided Provisioning Profile was generated as Ad Hoc instead of InHouse.

swift-stdlib-tool failed with exit code 1

I have a problem with XCode since 2 days.
I upgraded my iOS Developer Account, and now I can't build on my iphone.
I have this when I try to build.
/Users/RpX/Library/Developer/Xcode/DerivedData/Moukat-amxiyucfcmxblndkiauwhwnscwhx/Build/Products/Debug-iphoneos/Moukat.app/Frameworks/libswiftCore.dylib: the codesign_allocate helper tool cannot be found or used
*** error: Couldn't codesign /Users/RpX/Library/Developer/Xcode/DerivedData/Moukat-amxiyucfcmxblndkiauwhwnscwhx/Build/Products/Debug-iphoneos/Moukat.app/Frameworks/libswiftCore.dylib: codesign failed with exit code 1
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-stdlib-tool failed with exit code 1
I tried all solutions on Stackoverflow about certificats, build settings, etc ..., it doesn't work.
If someone know something about it =).
Thank you.
My advice would be to delete everything related to development and distribution certification - all relevant certificates in the keychain, all mobile provisions on disk, and everything at the Member Center - and start the entire process of generating new identities and profiles from scratch.
I upgraded also my iOS Developer Account, and I got the same error in all my Apps when I tried to run them on my Ipad (IOS 11)
This works for me ( I did the samme in all the programs)
choose TARGET
General/Signing : Automatically manage signing
General/Deployment info/Deployment target: change to a lower IOS (I chose 10.0)
General/Deployment info/Deployment info/Devices : Universal
Build cmd B and Run cmd R with destination (your device)
After the error is disappeared: change the Deployment target to IOS 11 and the Device to iPhone/iPad

Do I need iPhone Developer license to run cordova/phonegap in ios simulator?

I don't have an iPhone developer license.
It was working fine when I execute "cordova run ios"
Then I created a new project using "cordova create test_app"
When I run "cordova run ios", it throws this error.
Then the project that used to work is also failing with the same error?
Check dependencies
Code Sign error: No matching codesigning identity found: No codesigning identities (i.e. certificate and private key pairs) matching “iPhone Developer” were found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: /Users/Anthony/dev/test_app/platforms/ios/cordova/run: Command failed with exit code 65
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/src/superspawn.js:126:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProcess._handle.onexit (child_process.js:820:5)
Be sure to have no device connected to the Mac else phonegap will try to build and deploy your app on it. I had the issue with my iPhone plugged in.
Also in Xcode be sure that you build the debug release with command line tools (in the info tab of project properties)
I would suggest you to go over the solution in this thread - which tells you how to disabling Code Signing. Anyway, no harm in checking this -
Verify that the Code Signing section's Code Signing Identity within the project settings is set to None -
Search for Code Signing in Target of your app, and check if Don't Code Sign is chosen.
Ey
One thing is to play with XCode and Cordova to make a new project and learn how phonegap or another wrapper works and a different thing is to publish an application. Following the apple specifications, you can always create a new application and test it in the simulator. The benefits of becoming an apple developer are you can try your applications in a physical device but it doesnt mean you cant create an application and try it in the simulator.
If you have tried to run the application in a real device, XCode will complain about the required credentials because you are not an apple developer and you dont have your certificate installed in the keychain so the application cant be signed for deployment on a real device.
If you want to test the application in a device "Yes" you need to become an apple developer and pay the fee, if not, dont worry you can run as many applications as you want in the simulator.
Check the settings of your project as well to see if there is something wrong.

Resources