What are the implications of reseting an iOS distribution certificate in Xcode 8? - ios

I have inherited an iOS project that has an app currently submitted to the App Store. I want to release a new beta version of an app. After I Archive the app in the Xcode and try to Validate it, it shows the following message shown on the screenshot:
Failed to locate or generate matching signing assets. Your account already has a valid iOS Distribution certificate.
I don't have the distribution certificate locally and don't have access to the computer that had it. As far as I understood form other questions, one option is to click the "Reset" button. What are the implications of reseting the distribution certificate? Will it affect the current app in the App Store? Will other services like Push notifications and in-app purchases continue to work in the current app?

I have reseted the distribution certificate and it did not affect the published version of the app. Push notifications continue to work.

Resetting Certificates Using Xcode
If Xcode detects an issue with a signing identity, it displays an appropriate action in Accounts preferences. If Xcode displays a Create button, the signing identity doesn’t exist in your developer account or on your Mac. If Xcode displays a Reset button, the signing identity is not usable on your Mac—for example, it is missing the private key. If you click the Reset button, Xcode revokes and re-creates the corresponding certificate.
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
As per my experience, according to Apple support revoking certificate will not have any effect on the uploaded build on iTunes or on live.
https://developer.apple.com/support/certificates/
iOS Distribution Certificate (App Store)
If your Apple Developer Program membership is valid, your existing apps on the App Store will not be affected. However, you will no longer be able to submit new apps or updates to the App Store.

Related

In an Enterprise iOS app, how to replace the *.mobileprovision file on device after existing profile expired, but without re-signing the IPA?

We have a series of iOS Enterprise applications that were built with Telerik Cordova (discontinued in May 2018). Those apps are in the process of being converted to a new platform, but in the mean time they must continue to service client needs.
The distribution certificate the apps were built with is valid for another 14 months or so, but the provisioning profiles expire in a few days. Since these are Enterprise apps they will expire with the profiles.
Unfortunately, Telerik can no longer rebuild the apps using an updated profile for us. We have re-signed the apps using new provisioning profiles (using both iReSign and Terminal). When we try to side-load the resulting IPAs through the XCode Devices panel, we get an error stating that the entitlements do not match and the apps are not installed.
The question was raised as to whether or not we not need to re-sign the apps since the certificates are still valid. Perhaps it would be possible to just replace the .mobileprovision file on the device somehow? I gave it a try using iTunes Sync but I cannot confirm whether the file actually went to the device or not.
Question: Is it possible to just update the *.mobileprovision on the device without re-signing the app? If so, could someone please give me the steps or direct me to a link to perform the steps?
Alternate Question: Otherwise, any thoughts on how to resolve my Entitlements issue? The app only needs Push Notifications, but Game Center and In-App Purchases are also enabled. These are reflected in the App ID and provisioning profile, and the distribution certificate is of type Apple Push Services.
I should point out that I am not an admin on the Apple Developer portal for the project as I am an outside consultant, so my portal access is strictly read-only.
Thanks in advance for any direction provided!
If the applications were distributed to the devices by an MDM, then you can push a new provisioning profile to them using the MDM.
If the applications were installed over the air from a web server or directly using iTunes or Apple Configurator, then you need to replace the entire application package on the device. This requires the app to be re-signed, since the changed .mobileprovision file will change the package signature.
If you don't have the original, app ID with matching entitlements in the developer portal, then you will need to delete the existing application from the device before installing the new, re-signed application. You won't be able to do an in-place upgrade.

iOS code sign error

Apologies if this has been asked before. I am new to iOS mobile app development. I am further developing an iOS app that has been developed by another person. They sent me the source code and told me that all the signing keys/certificates/provisioning profiles are stored against the Apple Developer's Account (which I have access to). When I try to build/run the app through XCode it complains about Code Sign error (not having a matching certificate in my keychain) . How can I fix this error please? is the a way to download the.p12 file from the app's Apple Developer Account? Since the app provisioning profile and signing identity is only needed for running the app on actual devices (at least in my understanding), is there away of getting xcode to ignore about it just for the purpose of running the app on the simulator?
If you have a developer account add it to Xcode Preferences -> Accounts , then click Automatically manage signing
If you want to distribute the app, make sure you have a distribution private key in your keychain, from the old mac or create the new one

Apple Push Certificates

My app has 3 provisioning profiles:
Ios development
Beta
Release
First one is used for development, second for test flight and third for the app store.
Also there are 2 App IDs
com.sansasystem.dribble
com.sansasystem.dribble-dev
Ios development and Beta profiles both use com.sansasystem.dribble-dev.
I enabled push notifications capability and generated sandbox APNS certificate.
However, pushes do come when I sign the app with Ios Development profile, but don't when signed with Beta.
Is it something I did wrong?
You need to compile the app and also use the same cert & prov-profile to sign with "com.sansasystem.dribble-dev" for the beta app.
The push notification and cert is tied to the single bundle ID and the app compiled and bundled profile. If you are looking in bundle settings for XCode project, do check that the Automatic provisioning is not selected. Mostly due to this the profile may get auto-generated and not with APNS.
Also, check the Beta Target "Capabilities" tab is enabled for Push notification button turned on.
Lastly, check the Profile used by the actual beta target. Go to Project Build Settings --> General tab --> in that there is a profile drop down and next to that the (i) button, click that and you will be able to read the profile details and info related to the prov-file used.
If that is not same as the one you have created then I suggest use the Manual signing way and untick the automatic provisioning profile check box to make life more specific to get the error.

Uploading app to client account in app store

This is my first time trying to upload app to app store, so I am completely lost. I have searched all over the web about the issue I am having, but could not find how to fix the issue.
Here is the problem:
I have developed an updated version for the existing iPhone app for client. Original version of app is already in app store for long time. Client wants me to upload new version of the app to their account in app store as "prerelease" for testing. They gave me their store account (admin role) username and password to log in. I added the account in Xcode and configured build settings to their team. But, after building the archive, when I click the "Validate" button and select their team, I am getting an error popup with the message "Your account already has a valid iOS Distribution certificate". I can't post images here, so here is snapshot image of the popup):
http://imgur.com/yLL5K1k
Apple troubleshooting documentation (documentation link here) shows that they should export developer profile and give me to import on my Mac. However, client say they don't have Mac and no Xcode, so they can't do it themselves. Apple documentation is mentioning another option - “Revoke and Request”, but I can't see that option. Also, if "revoke" is performed, will that affect client's application (more than 20 apps in app store)?
I have downloaded all of their certificates and profiles from Member center, imported to keychain, added account to Xcode, configured Xcode, but nothing helped.
Does anyone know what can I do, or ask to client, so that I can upload app to their app store account?
Thank you!
You must have downloaded the Distribution certificate from the account. That alone is not sufficient. You must get the private key from the client or developer who has created the certificate first or uploaded the application.
Log in to developer.apple.com portal, using the required credentials.
Click on "Manage your certificates, App IDs, devices, and provisioning profiles." under Certificates, Identifiers & Profiles
Then click on "Certificates"
On the new page Click on "+" button at right upper corner.
Now on this page select "App Store and Ad Hoc" under Production.
Then follow the instructions related to CSR file given on new page.
Note: Create new certificates with unique names so that you won't download old certificates to your mac, mistakenly.
For more info Distributing iOS Apps With iTunes Connect

iOS app updated with iCloud passes validation during distribution, but the distribution profile is invalid in the developer portal

I have a strange issue.
I have a distribution certificate for my app in my developer portal with two App IDs (one wildcard and one explicit) and I've had to adjust the app ID to include the iCloud entitlements because I'm working on an update (iOS 7 only) with iCloud support.
I'm now ready to distribute and so I created a new provisioning profile in the developer portal with that certificate. As soon as it's added to Xcode, it shows up as "invalid" in the Developer Portal.
If I archive and validate my app before the app distribution in Xcode, and use my Apple ID and this provisioning profile, it says "it passed without any errors".
I'm extremely nervous about uploading this to Apple because it doesn't make sense to me.
The other provisioning profiles I have in the developer portal are the iOS Team Provisioning Profile (managed by Xcode).
I've got the entitlements in Xcode and my app works in development with iCloud, but I really want to distribute this.
If I add in more distribution profiles, as soon as it's added to Xcode, it shows up as invalid in the developer portal member centre. That's with using the explicit App ID. If I create one using the wildcard ID, it remains active, but I've read on the Apple documentation that for iCloud, you have to use an explicit App ID.
I have managed to solve this, thankfully.
I contacted the Apple Developer Support team by phone with this (without having to create a new support request and have that take a while) and was sent the following link:
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW34
The specific header is "Re-Creating Certificates and Updating Related Provisioning Profiles”,
basically went through and revoked all of my certificates in the portal and removed the certificate and private key in the keychain access. From there, I removed all of my provisioning profiles as well.
Within Xcode on the accounts section, I got a popup asking if the development and distribution certificates should be generated. I said YES and it did it. In the developer portal, I now had two certificates. I created a developer profile and tested my app; it worked. I then created a distribution certificate and added it to Xcode. After refreshing the portal, it still showed active. I archived and validated my app, with no issues and then uploaded. The new distribution profile is still active.
This was great and I'm happy to have this resolved.

Resources