How to change provisioning profile for existing ap

2019-07-17 06:40发布

问题:

I have never developed apps for iPhone, but our client has an app, which was developed by his previous vendor, now that vendor has wrapped up his operation from our country, So now we have that source code for that app for further development. The immediate action we need to take is that the app is not running on iOS 11.0 and we need to provide build for 11.0.

So I opened the app in Xcode and set deployment target to iOS 11, the app build was successful and it is running on the simulator, So I thought lets check it on real device, but when I connected a device and asked Xcode to build and deploy on my device I received the error.

No profile for team '***********' matching 'PROTEST' found: Xcode couldn't find any provisioning profiles matching '***********/PROTEST'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.

Code signing is required for product type 'Application' in SDK 'iOS 11.1'

So as I have understood I need to create provisioning profile for app development for iOS.

Can someone please guide me, I need to know, how to create a provisioning profile and how should I use for existing project which was developed by someone else before.

NOTE: the *********** represent the key or provisioning profile ID, I am not really sure but I thought I should censor it.

回答1:

If you have credential for apple developer account, and app is signed from that account's certificate and profile then, you can easily generate new certificate with private key from you mac and edit provisional profile. All you need to do is add client's account in xcode's accounts section. In-case, you don't have access to the developer account, which is used to make app live, you can't upload or update that app with same APP-ID using other apple developer account. You need to change APP-ID at least.



回答2:

Follow these steps :

  1. Login to the developer.apple.com/membercenter and generate the Certificate, APP ID, Provisioning profile (Developer, Distribution) as your needs. Refer Apple development doc for details: https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingProfiles/MaintainingProfiles.html
  2. In that dev-account register your device UUID and add that when you are creating a developer profile, distribution may not require though(if its enterprise account and you creating Universal distribution profile).

  3. Do this in your project now

    • Go to your App --> Click project on left project navigator window
    • Check on the right side you will see project settings
    • Click general tab and enter the bundle identifier as the APP ID you just created in step 1 above from dev account.
    • Now select the checkbox "Automatic provisioning" this is an easy way to automatically pick the profile from the developer account that you have used for appID creation. (note go to your Xcode preference and Accounts tab to enter the same dev-account credentials so XCode can automatically download and create profiles for you)
    • Now connect your device and you should see the device reflected to the top left corner.
    • Run the project and you will see the app is getting installed on the device.

Code signing is required for product type 'Application' in SDK 'iOS 11.1' -- For this you just make sure all the Pods and libraries are having to Do not Code sign set to the build settings area and only the App and extensions if any are signed with the right certificate you created from apple.

Also, note on this: If the previous vendor has released the binary from his apple account, you cannot create the same bundle ID with your apple account. Hence you end up having this as a new app on AppStore unless the vendor revokes/delete the bundle Id from this account.

Hope this helps.