I am trying to build my IOS app (developed using capacitor and ionic frameworks).
Just after integrating Google Firebase and adding Resources/GoogleService-Info.plist file I am having followng error while building my app in XCode.
Command CodeSign failed with a nonzero exit code
CodeSign /Users/piyush/Library/Developer/Xcode/DerivedData/App-cfgpruswvcmgvpcxuzeyccwfgdyx/Build/Products/Debug-iphonesimulator/App.app (in target 'App' from project 'App')
cd /Users/piyush/Downloads/ncsmobileapp/ios/App
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "-"
/usr/bin/codesign --force --sign - --entitlements /Users/piyush/Library/Developer/Xcode/DerivedData/App-cfgpruswvcmgvpcxuzeyccwfgdyx/Build/Intermediates.noindex/App.build/Debug-iphonesimulator/App.build/App.app.xcent --timestamp=none --generate-entitlement-der /Users/piyush/Library/Developer/Xcode/DerivedData/App-cfgpruswvcmgvpcxuzeyccwfgdyx/Build/Products/Debug-iphonesimulator/App.app
/Users/piyush/Library/Developer/Xcode/DerivedData/App-cfgpruswvcmgvpcxuzeyccwfgdyx/Build/Products/Debug-iphonesimulator/App.app: code object is not signed at all
In subcomponent: /Users/piyush/Library/Developer/Xcode/DerivedData/App-cfgpruswvcmgvpcxuzeyccwfgdyx/Build/Products/Debug-iphonesimulator/App.app/[email protected]
Command CodeSign failed with a nonzero exit code
I tried cleaning the build cahce, restarting the xcode.
re-building the app through capacitor, but nothig solved this issue yet.
Can anyone help in solving this issue?
Update
While archiving the app following error occurs:
CodeSign /Users/piyush/Library/Developer/Xcode/DerivedData/App-cfgpruswvcmgvpcxuzeyccwfgdyx/Build/Intermediates.noindex/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App.app (in target 'App' from project 'App')
cd /Users/piyush/Downloads/ncsmobileapp/ios/App
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "Apple Development: Piyush Aggarwal (ZWHGYV6A62)"
Provisioning Profile: "iOS Team Provisioning Profile: app.neo.school"
(d2353688-03d7-47ff-942f-4f34fd4c6a93)
/usr/bin/codesign --force --sign 5FE6CDFE4B615D56B70C5DAEB7A151005A1122AE --entitlements /Users/piyush/Library/Developer/Xcode/DerivedData/App-cfgpruswvcmgvpcxuzeyccwfgdyx/Build/Intermediates.noindex/ArchiveIntermediates/App/IntermediateBuildFilesPath/App.build/Release-iphoneos/App.build/App.app.xcent --generate-entitlement-der /Users/piyush/Library/Developer/Xcode/DerivedData/App-cfgpruswvcmgvpcxuzeyccwfgdyx/Build/Intermediates.noindex/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App.app
/Users/piyush/Library/Developer/Xcode/DerivedData/App-cfgpruswvcmgvpcxuzeyccwfgdyx/Build/Intermediates.noindex/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App.app: code object is not signed at all
In subcomponent: /Users/piyush/Library/Developer/Xcode/DerivedData/App-cfgpruswvcmgvpcxuzeyccwfgdyx/Build/Intermediates.noindex/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App.app/[email protected]
Command CodeSign failed with a nonzero exit code
3
Answers
The issue was due to resources folder. I created that folder to add my GoogleServices-Info.plist file.
I renamed my resources folder and changaed the path to my GoogleServices-Info.pllist file by following code in build phrases of the app in xcode:
Please try to delete the derived data and clean the build.
Steps to delete derived data:-
1.Open your project,Go to files -> Workspace Settings
Then you will find a derived data location with an arrow:-
Just click on that arrow,after that you will find a folder named derived data,
delete all the files inside derived data folder.
Then it will working fine.
I have the same (random) issue when Archiving project where OneSignal (specifically
OneSignalNotificationServiceExtension
) framework is included. What I have to do to make it work (w00t) is to changeKeyChain
Trust
setting onApple Worldwide Developer Relations Certification Authority
(Expires: Tuesday, 7 February 2023 at 22:48:47 Central European ) certificate back toUse System Defaults
and then again back toAlways Trust
. I have no idea why this works, but it works.