Does the provisioning profile itself enough for Code signing the app? - ios

I am trying to prepare an ad-hoc build for an iOS app. I am registered as a team member(TEAM ROLE) in apple development program.
My team admin has already generated distribution certificate and have registered device and also generated distribution provisioning profile.
Now I want to know , If I want to create build from my local system, Does the provisioning profile itself is sufficient to make the build or I need to install distribution certificate as well?
I am curious to know because I think, provisioning profile has all the necessary information like:
Distribution Certificate and device info
Thanks for your help.

No, you will need both the distribution certificate and the matching provisioning profile installed on the machine doing the build.
If the distribution certificate isn't installed you won't be able to select it from the 'Code signing identity' build setting.

Related

How to enable iOS capabilities from xarchive?

So when providing a build to a client we archive it with our key and provisioning profile and they then resign it again with their key. But then how do we enable iOS Push Notifications Capabilities as we can't create the archive for the bundle ID with our keys after enabling the capability.
Thanks
I'm afraid you're out of luck. When you use entitlements in your app you have to use the proper Bundle-Id, Certificate and Provisioning Profile when archiving. We had the same problem and the only solution was to use proper Development Signing.
By that I mean:
Ask your client to give you access to his Developer Portal. They only need to give you the 'Member' Role. With that you can create your own Development Certificate, and you can download existing Provisioning Profiles, but you can't do much more than that.
Create your own Development Certificate.
Ask your client to generate a Development Provisioning Profile for the app in question and have your Development Certificate included. This Provisioning Profile also needs to include the Push Notification Capability.
Install the Certificate and the Provisioning Profile on your machine or CI server and set up the Xcode Project to use these for signing.
Don't forget to use the final Bundle-Id now.
Archive your app. You'll get a development-signed Xcarchive which includes all Entitlements / Capabilities.
Now you can transfer this Xcarchive to your client. They will need to re-sign it with their Distribution Certificate and Provisioning Profile and can then upload to the AppStore.

iPhone has denied the launch request - On provision profile

A company that I am developing a project for, gave me a .mobileprovision file and a .p12 certificate to add APNS to their project. As long as I've added their provision profile to my project in XCode, XCode keeps saying "iPhone has denied the launch request." when I try to build project on my physical device.
I've tried deleting certificate Apple Worldwide Developer Relations Certification Authority, and adding another user account to mac but non of them worked. Only when I disabled Debug executable, the app launched successfully, but it's not a solution because I need to debug the app.
Should I tell them to add my device UDID to their account's devices on developer.apple.com?
You've been given an Adhoc distribution provisioning profile, which don't allow the debugger to attach (they're missing the get-task-allow entitlement), as they're for use when you distribute your app for testing, not local development.
If you need to debug, they'll have to supply you with a development p12 certificate and a matching provisioning profile.
You are trying with Development Profile vs Distribution Profile?
Distribution Profile:
With AdHoc Distribution profile, you can't debug any app it should be used for distribution only.
Development Profile:
If you didn't add your device UDID to the provisioning profile, you can try to do that and re-generate the provisioning profile and download it.
In Keychain Access, you will get to know which profile you received from the team,
gave me a ".mobileprovision" file and a ".p12" certificate
That seems like a red herring. I would suggest ignoring both of those. If they want you to work on their app, they simply make you a team member. Done! Your own dev center membership is then sufficient to debug on device.

Distribution Provision Profile doesn't include signing certificate iPhone Developer xxxx xxxx

I am trying to create a distribution profile. From scratch I deleted every certificate at KeyChain. I removed all provision profile using terminal method. I closed my Xcode. Then I followed this link to create the distribution certificate and profiles. I followed the step correctly and I got the following results. I keep getting "No signing certificate"IOS development found" Please help.
Edited
I then created the Development certificate following this link and now I get different certificates name for Development and Distribution. My error is Distribution Provision Profile doesn't include signing certificate iPhone Developer xxxx xxxx
Please help, thanks.
After creating the development profile
Why is my certificate different name for development and distribution, I followed the steps to create certificate. Why is it different name?
FOR DISTRIBUTION CERTIFICATES
On BuildSettings make sure you pick "IOS Distribution" instead of "IOS DEVELOPER" in the "Code Signing Identity" dropdown:
You have the certificate and provisioning profile for iOS Distribution. You are trying to do a build for development (building to a test device), which will require you to generate a certificate and profile for iOS Development. Follow the steps you did, but when you need to specificy what the certificate is for, choose iOS Development. Also, when you create the provisioning profile, select iOS Development. It is actually the next article on the site you were using: http://lessons.livecode.com/m/4069/l/308242-how-do-i-create-a-development-profile-for-ios
The iOS Distribution certificate / profile will be used when you want to submit to Apple for testing through TestFlight, or for distribution in the App Store, so don't worry about deleting those.
I had the same problem and I solved it just checking the configuration of certificates and provisioning.
Check if they are using correct provisioning profiles
And check if they are using the correct reference in code signing
That's what worked for me...

Do the distribution profiles come from distribution certificate?

The client has given me the distribution profiles, how can i add the profiles in xcode 5?
As far as i know distribution certificates are responsible for distribution profiles. Importing distribution certificate enables and add all the distribution profiles in xcode. Without certificate distribution profiles can't be used.
Please correct me if i am wrong and suggest the work around for importing profiles in xcode 5.
Deployment phase is new for me.
Thanks
Importing the profiles is just double clicking on them. You can't use the profile without the private key for the certificate that was used to generate the profiles. This need to be exported from the keychain (usually as a p12 file) and imported onto your development machine.
It is possible that the client exported a package containing all of this info using Xcode, then double clicking should install everything required.
Importing distribution certificate enables and add all the distribution profiles in xcode
No, importing one doesn't automatically import the other.
There are no workarounds, you need to be supplied with both the certificate (private key) and the profiles.
A distribution profile is basically a way to make a trust relationship between a particular distribution certificate (which identifies your organisation as a registered Apple development organisation), a particular app or group of apps (identified by an AppID like com.foo.bar.myawesomegame), a set of valid devices where the app can be installed (in the case of ad-hoc distribution; in the case of App Store distribution this is not required), and a set of enabled services, like In-App Purchases.
In your particular situation, if the client wants to test your app, and you are provided with a valid distribution provisioning profile (a file with .mobileprovisioning extension), you also need to install a valid distribution certificate on your computer. The client can download this certificate from http://developer.apple.com (Member Center) and send it to you so you can import it on your machine with a double click on the .cer file.
To enable external users test an app, there's a simpler process, providing that your organisation is a registered Apple development organisation: First, you generate a distribution certificate from http://developer.apple.com. Then, you create a distribution (ad-hoc) provisioning profile and add the distribution certificate and the UUIDs of the iPhones the client wants to use for testing. The client can get the UUIDs from the iTunes app, for example. Then, you can download both the certificate and the distribution profile to your computer, double click to import them into Xcode, and finally sign the app (.ipa file) so that the client can test it on their own devices. You can do that by choosing Product, Archive in Xcode and selecting your distribution certificate and provisioning profile.

Ad-Hoc distribution with Team Provisioning profile

According to the Apple docs, one must create and use a distribution certificate and a distribution profile for distributing an app ad-hoc.
"To use ad hoc distribution, create a distribution provisioning profile specifying Ad Hoc as the distribution method and include a list of up to 100 devices authorized to run the app."
http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/DevPortalGuide/CreatingandDownloadingaDistributionProvisioningProfile/CreatingandDownloadingaDistributionProvisioningProfile.html
Well, this is not neccessary i have found out. You could easily distribute an app ad-hoc with just the developer certificate and the team provisioning profile.
Is it a bad idea to use the team prov. profile and just a developer certificate?
Why should i create an ad-hoc dist. profile if it's more easy to just use the team prov. profile?
Distribution builds have the property that cannot be debugged (that's what the get-task-allow property in the entitlements plist is for). This means that others cannot attach a debugger to your code and achieve undesirable results.
Distribution builds are required if you want to allow remote users to download the application via an App Store (Apple's or enterprise).

Resources