I've created an ad hoc distribution build for my iPhone app using Xcode 4.1. The target successfully builds and produces an archive file that I can see in Organizer. I then click 'Share' which allows me to select .ipa and my distribution profile. However, after i hit 'Next' the Organizer crashes with the error below. The error log appears to suggest that the error is related to the 'ResourceRules.plist'? I'm using CorePlot for graphing, might it be related to that?
For info, I have a valid distribution certificate and imported a distribution provisioning profile. Entitlements file is not needed anymore for ad hoc distribution apparently so I don't have one in the project. All of my other apps don't crash at the 'sharing' stage, so it doesn't appear to be a problem with Xcode, just this particular app.
Any help much appreciated.
Grant.
PackageApplication failed with exit code 1.
Packaging application: '/Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app'
Arguments: embed=/Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision verbose=1 output=/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/670E174E-0BCA-4F18-AB8D-5ACF3D7E569A-8458-000005FCA81C6AE5/app.ipa sign=iPhone Distribution: Grant Abt
Environment variables:
HOME = /Users/gabt
LOGNAME = gabt
__CF_USER_TEXT_ENCODING = 0x1F5:0:0
DISPLAY = /tmp/launch-WoNf6c/org.x:0
COMMAND_MODE = unix2003
VERSIONER_PERL_PREFER_32_BIT = no
PATH = /Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHELL = /bin/bash
SSH_AUTH_SOCK = /tmp/launch-hHkBrJ/Listeners
Apple_PubSub_Socket_Render = /tmp/launch-P0dtgN/Render
TMPDIR = /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/
USER = gabt
VERSIONER_PERL_VERSION = 5.12
Output directory: '/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/670E174E-0BCA-4F18-AB8D-5ACF3D7E569A-8458-000005FCA81C6AE5/app.ipa'
Temporary Directory: '/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS' (will NOT be deleted on exit when verbose set)
+ /bin/cp -Rp /Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload
Program /bin/cp returned 0 : []
### Checking original app
+ /usr/bin/codesign --verify -vvvv /Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app
Program /usr/bin/codesign returned 0 : [/Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app: valid on disk
/Users/gabt/Library/Developer/Xcode/Archives/2011-08-20/myApp 20-08-2011 14.11.xcarchive/Products/Applications/myApp.app: satisfies its Designated Requirement
]
Done checking the original app
### Embedding '/Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision'
+ /bin/rm -rf /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/embedded.mobileprovision
Program /bin/rm returned 0 : []
+ /bin/cp -rp /Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/embedded.mobileprovision
Program /bin/cp returned 0 : []
+ /usr/bin/codesign -d --entitlements /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_rawMkZVbU5I /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app
Program /usr/bin/codesign returned 0 : [Executable=/private/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/myApp
]
+ /usr/libexec/PlistBuddy -c Set :get-task-allow NO /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_
Program /usr/libexec/PlistBuddy returned 0 : []
+ /usr/bin/plutil -lint /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_
Program /usr/bin/plutil returned 0 : [/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_: OK
]
### Codesigning '/Users/gabt/Library/MobileDevice/Provisioning Profiles/FA16C6A9-603C-46A6-8B98-F367A6B056CD.mobileprovision' with 'iPhone Distribution: Grant Abt'
+ /usr/bin/codesign --force --preserve-metadata --sign iPhone Distribution: Grant Abt --resource-rules=/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/ResourceRules.plist --entitlements /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/entitlements_plistt2Evi2T_ /var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app
Program /usr/bin/codesign returned 1 : [/var/folders/jw/s5ky0r1n34322jt4pw3047m00000gn/T/y30BrfbtxS/Payload/myApp.app/ResourceRules.plist: cannot read resources
]
error: codesign failed with error 1
Had the same problem today..
The "Code Signing Resource Rules Path" was missing in the PROJECT - Build Settings
...
Opened the "Build Settings" tab of your project.
Searched "Code Signing Resource Rules Path", it was empty for me
and added
$(SDKROOT)/ResourceRules.plist
credits goes to Adams Blair who described this problem with SDK2.2
yeah, i think it's xcode6.1 problem (or bug?)
you can
1.add $(SDKROOT)/ResourceRules.plist to "Code Signing Resource Rules Path"
or
2.use xcode-select back to 6.01 build
or
3.sign argument without "sign=iPhone Distribution: Grant Abt"
to work
Check your code signing profiles again. Your developer profile should be set to the debug and for the release you must set your distribution profile. Make sure you select any iOS SDK under each category and set the respective profiles for them as well.
Encounter this issue when testing with Xcode 6.1 beta version. Back to Xcode 6.0.1 works.
Related
I am trying to repack an iOS Application; IPA file with the frida gadget dynamic library according to the following link. However, i am running into a console log error when launching the application:
<Warning>: Unable to obtain a task name port right for pid 610: (os/kern) failure (5)
Thus, googling a bit, I found that a possible fix(second link to related fix) might be to add a task_for_pid-allow key-value pair to the entitlements file.
Editing the entitlements file by adding the key using a text-editor before re-sigining the application with the following code snippet:
codesign --force --sign "iPhone Developer: m*****************" --entitlements entitlements.plist Payload/Plain\ Notes.app/Plain\ Notes
Resulted in a verification error when running ios-deploy as shown below:
Error 0xe800003a: The application could not be verified. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Is there a specific way to add key-value pairs to the entitlements file when repacking applications on iOS which would solve the verification error that I am getting?
I found out how to add values to the entitlements file, use PlistBuddy.
In my case, the below snippet should add the task_for_pid-allow key into my entitlements:
/usr/libexec/PlistBuddy -c "Add :Entitlements:task_for_pid-allow bool True" profile.plist
To check that it has been successfully added:
/usr/libexec/PlistBuddy -c "Print :Entitlements" profile.plist
I've recently upgraded to Xcode 10.2.1 - clients have updated their devices to iOS 12.2 which caused features of mobile app to stop working (camera / qr scanner). So rebuilt my app in new Xcode (it's an ionic app). I can build and run in the simulator via Xcode but can't archive for distribution. Looks like a code signing error which I can't get around.
Have already tried re-assigning profiles, cleaning build, deleting derived data.
Log output
probing signature of /Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib
/usr/bin/codesign -r- --display /Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib
/Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib: code object is not signed at all
Codesigning /Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib
/usr/bin/codesign --force --sign E53B3573B6BABE35C4A71D789E5E5058D1895105 --verbose /Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib
/Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib: errSecInternalComponent
error: Failed with exit code 1
In Xcode Menu - File -> Project Settings
Change Build System - to Legacy Build System and try
Let me know if it works
I'm requesting your help to solve an archive issue for Apple iOS.
When I'm running the app with a local certificate everything is fine, but when I switch to archive (in order to publish it) I have an error.
Error is related with Alamofire and from what I consider with codesign
> Stripped
> /Users/..myuser../Library/Developer/Xcode/DerivedData/..myappname..-brxmobbquzmuhnbmcgzieifhgvjk/Build/Intermediates.noindex/ArchiveIntermediates/...myprojectname.../InstallationBuildProductsLocation/Applications//....app/Frameworks/Alamofire.framework/Alamofire
> of architectures: armv7 Code Signing
> /Users/...../Library/Developer/Xcode/DerivedData/......-brxmobbquzmuhnbmcgzieifhgvjk/Build/Intermediates.noindex/ArchiveIntermediates/..../InstallationBuildProductsLocation/Applications//.....app/Frameworks/Alamofire.framework
> with Identity iPhone Developer: name (code) /usr/bin/codesign --force
> --sign 7FEA49779804D0F60707E9954A90FE65C --preserve-metadata=identifier,entitlements '/Users/...../Library/Developer/Xcode/DerivedData/.....-brxmobbquzmuhnbmcgzieifhgvjk/Build/Intermediates.noindex/ArchiveIntermediates/...../InstallationBuildProductsLocation/Applications//.....app/Frameworks/Alamofire.framework'
> /Users/...../Library/Developer/Xcode/DerivedData/....-brxmobbquzmuhnbmcgzieifhgvjk/Build/Intermediates.noindex/ArchiveIntermediates/....../InstallationBuildProductsLocation/Applications//......app/Frameworks/Alamofire.framework:
> unknown error -1=ffffffffffffffff Command /bin/sh failed with exit
> code 1
Many thanks for your help
Solved.
Somehow the keychain password "login" was my problem. Changing it solved the signed issue. It was not related with Alamofire package.
While using the build system instruction from https://webrtc.org/native-code/ios/ all went fine except following error
Error: no mobile provisioning profile found for
When i do xcrun security find-identity -v -p codesigning i do see my certificates, Is there anyway to fix it?
$ gn gen out/ios_64 --args='target_os="ios" target_cpu="arm64"'
Done. Made 719 targets from 110 files in 2444ms
$ ninja -C out/ios_64 AppRTCMobile
ninja: Entering directory `out/ios_64'
[2086/2100] CODE SIGNING //webrtc/sdk:r...(//build/toolchain/mac:ios_clang_arm64)
FAILED: WebRTC.framework/WebRTC WebRTC.framework/_CodeSignature/CodeResources WebRTC.framework/embedded.mobileprovision
python ../../build/config/ios/codesign.py code-sign-bundle -t=iphoneos -i=3F06B010E7BE32A3D212219D02DF440B0F20D6A3 -e=../../build/config/ios/entitlements.plist -b=obj/webrtc/sdk/WebRTC WebRTC.framework
Error: no mobile provisioning profile found for "org.webrtc.WebRTC".
ninja: build stopped: subcommand failed.
Let me tell the steps that works for me
Edit the file src/examples/objc/AppRTCMobile/ios/Info.plist and change the value com.google.AppRTCMobile with your own bundle identifier.
Edit the file src/sdk/objc/Framework/Info.plist and change the value org.webrtc.WebRTC with your own bundle identifier
I have created bundle identifiers on Xcode and after that build is successful
I am configuring CI for my IOS project on MAC yosemite-OS and got on problem:
error: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign /Users/mitul/Desktop/jenkins_ios_profile/PCertificates.p12 --resource-rules=/var/folders/rj/cc6d38nn53v6tk8y4jn7ghkr0000gp/T/42RbMszHQX/Payload/XXX.app/ResourceRules.plist /var/folders/rj/cc6d38nn53v6tk8y4jn7ghkr0000gp/T/42RbMszHQX/Payload/XXX.app failed with error 1
even my build and archive are getting success but not able to make .ipa file
even tried all possibilities from this
/usr/bin/codesign failed with exit code 1 but no luck
Please help me what I am missing to do
My Xcode configuration is as follows:
Custom xcodebuild arguments:
CODE_SIGN_RESOURCE_RULES_PATH=/Users/mitul/Public/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/ResourceRules.plist
rest are all with default setting
I unchecked the code signing checkbox in jenkins project configuration and it started building, hope it can help some else too!