Distribution app phenomen - ios

I'm making a .app with Distribution provisions and after ziping i uploading him to iTunes with "Application Loader".
All is fine, and .app is submitting at successfully.
But in some case, i see error
Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate.
And i solving him just:
1) Copy, paste folder with content, source, xcode project files to another folder
2) Rebuild app from new folder
3) Trying again to submit, and all is fine.
What's going up ?
UPDATED
Solved! In my mac this command is not working at perfectly
codesign --verify -vvv My.app
When error is exist, him told me
Valid on disk
But when i tryed this command at another Mac, then told a true error, and we solved this error.
Mac OS version: 10.8.3, Xcode version: 4.6, Application Loader version: 2.8

Related

iOS IPA file could not be installed because it's integrity could not be verified

After installing ipa file on my iPad 14.2 version this error prompt.
" this app cannot be installed because its integrity could not be
verified"
what should i do?
iOS version: 14.2
Certificate: Enterprise provisioning certificate.
N.B: In other version like 10.3.3 it's working fine.
I have resolved the issue after trying many times. Actually my app was built in Enterprise certificate. But I am trying to generate IPA using Development option that's why it is not recognised by new devices. So how i fix the issue??
Ans: I generate IPA file using Enterprise build option and using
enterprise distribution certificate and it's working perfectly for new
devices also and the error pop-up gone.

"No valid iOS code signing keys found in keychain"

I want to test an iOS application using Xamarin Test Recorder using iOS simulator. To do that I want to publish the project. When trying to publish it for archive, I got this error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: No valid iOS code signing keys found in keychain. You need to request a codesigning certificate from https://developer.apple.com. (MobileApp1.iOS)
Do we need a certificate to publish the project?
When I drag and drop the .app to simulator it doesn't get installed. When I tried to install debug version it gives below error. Failed to chmod /Users/../Library/Developer/CoreSimulator/Devices/8A0508B3-0‌​2E8-4601-A239-B6712F‌​67FF4D/data/Library/‌​Caches/com.apple.con‌​tainermanagerd/Bundl‌​e/Application/1B8A7B‌​17-D9D0-44A6-8584-65‌​7FF1AB5815/MobileApp‌​1.app/MobileApp1 : No such file or directory" Release app also not get installed(No error or warning). Note that this is a xamarin project.What shall I do now?
First of all you do not need to sign/publish your app to use it with Test Recorder.
You can start recording tests from .app located on bin/iPhoneSimulator/Debug/ folder.
The “No valid iOS code signing keys found in keychain” happens when there are no provisioning profiles on your machine. The easiest fix is to create a new app from XCode and deploy it on the device, XCode will automatically downloads the required profiles and certificates

How to signig existing .ipa or app. with provisioning profile

I'm writing mobile autotests using C#, Xamarin 6.1.3., iOS 10.2, iPhone 6s Plus, Xcode 8.2, OS X El Capitan 10.11.6.
I'm trying to launch tests on simulator using the following command:
IApp iApp = ConfigureApp.iOS.AppBundle(path_to_app/Application.app).StartApp();
I've got the following error:
Calabash.XDB.Core.Exceptions.DeviceAgentException : Failed to install app /Volumes/Win7 Ultim/Framework/Atom.app
ExitCode: 1
app: /Volumes/Win7 Ultim/Framework/Atom.app/PlugIns/AtomTests.xctest
identity: #<CodesignIdentity: - : AdHoc>
/usr/bin/xcrun codesign -d --entitlements :- /Volumes/Win7 Ultim/Framework/Atom.app/PlugIns/AtomTests.xctest
/usr/bin/xcrun codesign --verbose=4 --verify /Volumes/Win7 Ultim/Framework/Atom.app/Atom
/Volumes/Win7 Ultim/Framework/Atom.app
/Volumes/Win7 Ultim/Framework/Atom.app/PlugIns/AtomTests.xctest
device UDID: 9E44D0FE-A3F9-4FC1-8635-20FB8AD20BA4
Device UDID: 9E44D0FE-A3F9-4FC1-8635-20FB8AD20BA4
ERROR: Error Domain=sh.calaba.iOSDeviceManger Code=5 "Code signing failed" UserInfo={NSLocalizedDescription=Code signing failed, NSLocalizedFailureReason=There was a problem code signing. Please check the logs.}
Path to bundle: /Volumes/Win7 Ultim/Framework/Atom.app
Could not extract entitlements from app:
with command:
-a,--app-bundle <path/to/app-bundle.app> Path .app bundle (for .ipas, unzip and look inside of 'Payload')
-c,--codesign-identity <codesign-identity> [OPTIONAL] Identity used to codesign app bundle [device only] DEFAULT=
-d,--device-id <device-identifier> iOS Simulator GUIDs
-u,--update-app <true-or-false> [OPTIONAL] When true, will reinstall the app if the device contains an older version than the bundle specified DEFAULT=1
install
/Volumes/Win7 Ultim/Framework/Atom.app/Atom: code object is not signed at all
/Volumes/Win7 Ultim/Framework/Atom.app/PlugIns/AtomTests.xctest: code object is not signed at all
=== STDERR ===
=== STDERR ===
Could not find any Provisioning Profiles suitable for resigning
Could not resign app bundle at path:
Error resigning sim bundle
In architecture: x86_64
with command:
So i don't have application source code, but i need to sign in .app or .ipa file that i have, to make it possible to run tests on the application. Is it possible?
#Kent.Green's solution to this answer also works to solve your problem:
Re-signing an IPA using Xamarin Test Recorder
One option you can use is using the Xamarin Test Recorder to inject Calabash and re-sign your IPA: https://developer.xamarin.com/guides/testcloud/testrecorder/
After you load the IPA into the test recorder, it will create a new, re-signed IPA it in the same location as the original IPA, with the name prepended with "xtr-" like so:
myAwesomeApp.ipa (original IPA)
xtr-myAwesomeApp.ipa (IPA, Re-signed, injected with Calabash)
Things to watch out for
IPA Re-Signing - The mac doing the resigning needs to have a valid signing identity and provisioning profile installed in its Keychain, including any entitlements the app uses.
Any IPA containing Calabash will be rejected by the iOS app store - This is true no matter what method is used to add Calabash to the IPA, but it's important to remember. In the example above, you would test with xtr-myAwesomeApp.ipa and submit myAwesomeApp.ipa itself to the app store.

Crashlytics: Unable to package source due to error

I am setting up an Xcode Bot to automatically upload and distribute my beta app.
I have setup a mac with macOS Server and Xcode activated and am able to build and export an IPA manually just fine.
The Xcode Bot I created also archives and exports an IPA with no problem.
However, when I try to run the Crashlytics submit script in the Xcode Bot's post triggers, the uploading fails. But if I save the bot generated IPA and manually call the Crashlytics script via Terminal, it uploads just fine. It seems that only the Xcode Bot fails to submit to Crashlytics.
I have all the correct certificates installed on the server Keychain and everything works fine for manual archive/export both in Xcode and using the Xcode Bot's generated IPA.
Here is the log from Xcode Bot:
2016-11-22 17:15:53.942 submit Crashlytics: Crashlytics.framework/submit 1.3.5 (18)
2016-11-22 17:16:03.125 submit Crashlytics: Unable to package source due to error: Error Domain=CLSIPABuilderErrorDomain Code=-6 "(null)" UserInfo={UnderlyingError=Error Domain=CLSCodeSignerErrorDomain Code=-2 "(null)" UserInfo={arguments=(
"--sign",
ACFE8B8E177196BFF1974841752020FE96687508,
"--all-architectures",
"--force",
"--entitlements",
"/var/folders/81/5t89fdcn3h3680gh99mgvl7934dkfg/T/com.crashlytics.ipas/E357A31C-B1A2-424B-8A5A-E7D499A92C73/Payload/entitlements.xml",
"/var/folders/81/5t89fdcn3h3680gh99mgvl7934dkfg/T/com.crashlytics.ipas/E357A31C-B1A2-424B-8A5A-E7D499A92C73/Payload/Ebates Beta.app"
), environment={
"CODESIGN_ALLOCATE" = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate";
}, status=1, stderr=ACFE8B8E177196BFF1974841752020FE96687508: no identity found
, command=/usr/bin/codesign, stdout=}, SourcePath=/var/folders/81/5t89fdcn3h3680gh99mgvl7934dkfg/T/com.crashlytics.ipas/E357A31C-B1A2-424B-8A5A-E7D499A92C73}
2016-11-22 17:16:03.187 submit Crashlytics: Failed to prepare the binary for release
Been pulling my hair out over this all day, hoping someone can shed some light on this problem.
Ok so turns out you need to run the app on a device directly from Xcode on the server machine so that Xcode will automatically generate all the appropriate XC iOS provisioning profiles. Apparently the Crashlytics script will re-package the IPA and need valid provisioning profiles in order to do so. I think the Xcode Bot generates an IPA but it is not fully code signed until you save from the bot results, instead of just running from a bot post-trigger.
If you go to the developer.apple.com portal and look under Provisioning Profiles you should see something like this:

Developer ID Code Signing working on one machine but not another

I have a Mac Pro that I usually build and sign my apps on for distribution outside of the Mac App Store (signing is required for Mountain Lion machines that have Gatekeeper even if it isn't an app store app).
I sign the applications in Terminal, and it works fine on the Mac Pro, so I went to create another Developer ID Application certificate for a Mac Book Air, successfully created an installed the certificate, but I'm completely unable to sign any apps on the air still. I keep getting the error:
object file format unrecognized, invalid, or unsuitable
The problem is that I can take the built .app file that was built on either machine and successfully sign it on the Mac Pro. If I take a .app file built from either machine and try to build in on the Mac Book Air I receive this error. I'm not getting any errors about the certificate.
Just so it's here, I use the following two lines to sign the app (which I copy to an "App" folder on my desktop):
cd ~/Desktop/App
codesign -f -v -s 'Developer ID Application: [company name]' '[appname].app'
I've checked in Keychain access and the certificates show up nearly identically on both machines. Both computers are running 10.8.3. I can't really see what the difference is that is preventing the MBA from signing the app.
Thanks for any help!
The Mac Book Air did not have extra Command Line Tools installed, which is what caused the problem. I needed to have Xcode 4.4 (or newer) and go to the Preferences Window > Downloads section and install the Command Line Tools from there for the code signing to work properly.

Resources