Uploading Trigger.IO package fails with ERROR ITMS-9000: "Invalid Code Signing..." for Forge app - trigger.io

Toolkit/Forge 2.1.0. Packaging with App store provisioning profile. forge package ios --profile DISTRIBUTION
config.json contains:
"DISTRIBUTION": {
"provisioning_profile": "/Users/marty/divination/Breath_of_the_Horse_Store.mobileprovision",
"developer_certificate_path": "/Users/marty/divination/ios_distribution.cer"
}
Fails with:
ERROR ITMS-9000: "Invalid Code Signing. The executable 'Payload/device-ios.app/Forge' must be signed with the certificate that is contained in the provisioning profile." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)
I notice sometimes forge retains old config.json info. We did changed to different apple account to generate new provisioning profile and certificates. Is there a forge clean?

The problem resided in switching to provisioning profile and certificate from a different Apple developer account. The new certificate was not originated on my machine and thus no key was available.
The real solution is to be setup part of the team for that apple account, but for a shorter term fix, I generated a new CSR from my machine that was used to create the certificate on the other Apple account.

Related

ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle xx.xx.xx [Payload/xx.xx.xx] is invalid

I am building a final release build for my Angular NativeScript app. I followed all the necessary steps to build an .ipa file and then have used the Apple Transporter app to upload the .ipa but I receive the following error on the transporter app. I have tried few steps to fix the issue, but the error does not go away. I think I am not following the correct steps.
ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle com.xxx.xxx [Payload/xxx.app] is invalid. [Missing code-signing certificate]. A Distribution Provisioning profile should be used when submitting apps to the App Store. For more information, visit the iOS Developer Portal."
Are there any steps I could follow to resolve this error? Thanks in advance!
PS: I do have an Apple Dev account. I have the Apple iOS Distribution certificate, Apple Dev certificate, AppBundle ID ready.

Expo build fails because profile is not associated with distribution certificate

I have an ios app that I transferred from my Apple developer account to my client’s account (of which I am a team member).
Using the client’s expo account I am trying to build the latest release of the app. Using “expo fetch:ios:certs”, I retrieved the .p8, .p12, .mobileprovision, and .key files along with the related passwords.
However, when running “expo build:ios --clear-credentials” and choosing to provide my own certificates, I ran into an issue where the .mobileprovision file was linked to the wrong developer account.
So I created a certificate and profile on the client’s Apple developer account and ensured that the provisioning profile had certificate attached. I then downloaded it and ran “expo build:ios --clear-credentials” again. I used the same .p8 and .p12 files that the app originally used but uploaded the new .mobileprovision file.
The build still fails with error: “validateProvisioningProfile: provisioning profile is not associated with uploaded distribution certificate”
Any insight would be greatly appreciated.

Xcode When validation app i have one error how to fix it?

Failed to locate or generate matching signing assets: xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues. A
!Your account already has a valid ios Distribution certificate not installed You have a valid iOS Distribution certificate in the Member Center, but it is developer locally. If your signing identity is installed on another Mac, you can export a certificate. profile on that Mac and import it on this Mac. You can also reset your current Reset or Import Developer
It says that the distribution certificate you are using i.e which is there in your key chain is not the correct one, either download the correct one from developer account and installed it to your Mac or export it from another machine where you have the valid one.

Invalid provisional profile error after using `ipa build` and `deliver` tool (automating app submission)

I've been using the fastlane tool provided at: https://fastlane.tools to generate provisional profiles and submit apps to iTunes connect.
Sequence of commands:
$fastlane init
$cert
$produce
$sigh
Following this the provisional profile corresponding to distribution on App store is automatically downloaded. After which the deliver command is executed and as per the guide this statement was added in the deliverfile -
ipa do
system("ipa build --verbose")
"./AppName.ipa"
end
It successfully generates the .ipa file but fails to submit the app to iTunes connect. The following error is generated -
[15:57:54]: [Transporter Error Output]: ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle com.razeware.ScaryBugsZo [Payload/ScaryBugsZo.app] is invalid. [Missing code-signing certificate]. A Distribution Provisioning profile should be used when submitting apps to the App Store. For more information, visit the iOS Developer Portal."
Although on using the same provisional profile generate by fastlane I'm able to upload the build using xCode. My final goal is to automate submission of multiple apps on iTunes connect from a single apple ID. For this, sigh is successfully generating provisional profiles. I need to a way to automate uploading the build either by using deliver or some other method.
I can recommend checking out the official fastlane code signing guide that shows you the various ways to do code signing.

iOS Enterprise provisioning profile distribution

I am signing a dylib in my application with an Enterprise certificate and noticed that on some devices I get the following error:
0xe8008015: A valid provisioning profile for this executable was not found.
The strange thing is on the devices where this works I never manually installed a provisioning profile. I think when I used XCode it got automated installed somehow.
Manually installing the 'Distribution in house' profile associated with the cert on these devices fixed the problem, but I'm trying to understand how to deploy my software without requiring this extra step.
What is the standard way of pushing out the enterprise provisioning profile?
Does the mentioned Enterprise certificate appear under Settings ➞ Profiles on the iOS devices that experience the problem?
Is said Enterprise certificate available as a valid (signable) certificate on the Xcode installation where you package the final .ipa?
Do you use the same certificate for signing the dylibs and the app?
The standard way of pushing an Enterprise certificate to devices is to include it when packaging/archiving an app. Xcode should do this automatically - at least for the certificate used to sign the app itself.
You can extract an .ipa (rename to .zip) and look for a file called "embedded.mobileprovision" in the .app package.

Resources