how and what is XCODE's Bundle ID, signing? - ios

sorry new to IOS programming. must i enroll to apple developer program to obtain a bundle id ?
apparently i am trying to start my first project, but it seems like i need to choose a bundle idnentifier so that the signing tab would have no errors.
is the signing tab required for me to make a development environment on my device ?

Bundle identifier is on which uniquely identifies your app on app store, it is unique & hence 2 apps can't have the same bundle identifier's.
Example of a bundle id
com.azhar.calulator seems like this.
Signing of a code is required for running, testing & debugging of the app.It requires provisioning profiles and its certificates.
Procedure for getting them:
1.Run Google Chrome, Mozilla Firefox, or Safari.
2.In the iOS Dev Center, click Certificates, Identifiers & Profiles.
3.In the drop-down menu in the top left corner, verify that iOS, tvOS, watchOS is selected.
4.In the left-hand sidebar, select Provisioning Profiles → Development.
Click +.
5.Select iOS App Development and click Continue.
6.Select an App ID to associate with the provisioning profile and click Continue.
7.To be able to use one development provisioning profile across multiple apps, select a wildcard App ID, if available.
8.Select one or more certificates for development to include in the provisioning profile and click Continue.
9.Only certificates for development are listed.
10.Select one or more devices to include in the provisioning profile and click Continue.
11.Provide a name for the profile and click Continue.
12.(Optional) Click Download to download the provisioning profile.
13.Click Done.

The bundle ID is your application ID. It is the one you set when creating the project, and should look something like: com.darkArtistry.appName
What you need from the Apple Developer Program is :
1 - A valid developer to certificate to sign your application
2 - A valid provisioning profile, that matches your appID.
Provisioning profiles allow wildcards in some cases like com.darkArtistry.* so they can match more than one bundle ID.
I would recommend you to first get your certificate from the developer program, and then xCode will help you creating a provisioning profile for you.
There are a lot of guides out there, let us know when you are exactly stuck.

Related

Manually create provisioning profile in Xcode

I have a simple goal I would like to achieve, manually create a provisioning profile in Xcode.
So, I was trying to use the Pythonista Template in Xcode, and I wanted to flash it to one of my devices so that I could test it on a real device and not just the iOS simulator.
So I enter in what I want the app ID to be, and it says, No profiles for 'com.cartercoding.getnpostserver' were found. So I need to manually create a provisioning profile for it, which I have looked up, but the answers I have found are not relevant.
I am using Xcode 11, stable release.
I don't really know what a provisioning profile does...
A provisioning profile grants permission for one or more iOS devices to run an app signed with a specific certificate. Normally, an iOS device will only run apps that are signed by Apple; a provisioning profile tells the device that it may also run apps signed with a key corresponding to the certificate specified in the profile.
I am trying to put an app that I downloaded from the internet on my phone, so I can't do it the usual way.
The whole iOS code signing infrastructure is designed to prevent you from doing that. Short of jailbreaking your device (which is a whole other conversation) you can't just install an app that you've downloaded onto your phone.
I have a simple goal I would like to achieve, manually create a provisioning profile in Xcode.
You can't create a provisioning profile "manually," if by that you mean to construct one on your own; you have to get one from Apple (whether that's automatically through Xcode or via the developer portal).
For users who need to manually create a provisioning profile (in some companies every app has to have its own provisioning profile)
Sign in to your Apple Developer account and navigate to Certificates, IDs & Profiles > Identifiers > Provisioning Profiles.
https://developer.apple.com/account/ios/profile/production
Add a new provisioning profile.
Activate App Store.
Click Continue.
From the dropdown menu, select the app ID you just created.
Click Continue.
Select the certificate you just created.
Click Continue.
Fill in a name of your choice. The name is not visible to end users.
Click Generate.
Download the provisioning profile.
Click Done.
The provisioning profiles overview with your new provisioning profile is displayed.
If you need a Provisioning Profile of Type Ad Hoc
Is everything the same except point 3
These instructions were copied from this page
https://support.staffbase.com/hc/en-us/articles/115003598691-Creating-the-iOS-Provisioning-Profiles

iOS Native Application - Requires a provisioning profile with the Push Notifications feature

I am supporting for one existing native iOS application. For this am able to generate IPA successfully from Xcode but while generating build from devops am facing the issue:
Requires a provisioning profile with the Push Notifications feature
How can I get past this error and build for my device?
A Provisioning Profile must be installed on each device your application code should run on. Each Development Provisioning Profile will contain a set of iPhone Development Certificates, Unique Device Identifiers and an App ID.
Devices specified in the Development Provisioning Profile can be used for testing only by those individuals whose Development Certificates are included in the profile. To create :
Login to the developer account connected to your project, and under Certificates, Identifiers & Profiles -> Profiles -> Register a New Provisioning Profile by clicking the add new button.
Choose for which purpose provisional profile is required.
a. For developement purpose. (the app can be downloaded only in registered devices if the application is in development stage. For this, The device UDID is required to be added in device list).
b. For distribution purpose ( The provisonal file required for uploading app in the app store)
After Selecting above, click continue.
Choose your Appid (i.e. Bundle id) from the list and click continue.
After registering, download the provisional profile (File with extension name.mobileprovision will get downloaded) and double click the file to the Xcode project to include the provisional certificate to be added.
you need to follow below steps
go to developer account
make provisioning profile for bundle identifier that you are using
Adhoc(test) or Distribution(production)
enable push notification
download the certificate
click on the certificate

Signing iOS App: App ID Cannot be Registered to Your Development Team

I need to replace a deployed iOS native app with a new Ionic3 / Cordova hybrid app. The new hybrid app builds successfully (on macOS Sierra 10.12.6) but I can't sign the app (so that it can be uploaded to the app store).
As a first step, I'm focused on getting the new app on the app store (as alpha to test with TestFlight). I've removed all "development" certificates/profiles from developer.apple.com.
There's a lot of information/questions/answers on the web about signing apps. I've spent a couple of days on this issue and cannot get it to work no matter what I read or what I try.
The current iOS app code (deployed)
In Info.plist, $(PRODUCT_BUNDLE_IDENTIFIER)
In /bbh.xcodeproj/project.pbxproj, PRODUCT_BUNDLE_IDENTIFIER = "NSP.BBH-Mobile";
Re-create development provision
Open Keychain. Delete all developer/iPhone certificates. Delete all keys.
On developer.apple.com, delete development certificate and development provisioning profiles.
Confirm my iPhone device is registered with the correct UDID.
In Keychain, generate a certificate signing request file.
In developer.apple.com, create a development certificate, upload the certificate signing request generated in the previous step, download the certificate .cer file.
Double click on the .cer file. Keychain opens. Choose to add to "log in".
In Keychain > certificates, choose export, specify the strong password. Certificates.p12 file will be generated.
In developer.apple.com, create a development provisioning profile. Choose "iOS App Development". Choose an App ID ... but which one?
App IDs in developer.apple.com
BBH Mobile = com.bbh.*
BBH Mobile = NSP.BBH-Mobile
Xcode iOS Wildcard App ID = *
Notice on-screen reads:
"If you plan to use services such as Game Center, In-App Purchase, and Push Notifications, or want a Bundle ID unique to a single app, use an explicit App ID.
If you want to create one provisioning profile for multiple apps or don't need a specific Bundle ID, select a wildcard App ID. Wildcard App IDs use an asterisk (*) as the last digit in the Bundle ID field.
Please note that iOS App IDs and Mac App IDs cannot be used interchangeably."
We need push notifications so choose an explicit App ID = AYW4J8P7X3.NSP.BBH-Mobile
app id = team id (generated by apple) + bundle id (supplied by the user)
It makes sense to choose this App ID which includes the bundle id of the iOS currently deployed.
https://www.screencast.com/t/C0QdPdxwh09t
Choose a development certificate (just created), choose all devices.
Download the development profile and double click to install (in Xcode).
Double-clicking doesn't seem to do anything? How do I know it's installed in Xcode correctly?
Do I need the .mobileprovision file on my iPhone? The mac server is in the cloud so I don't have my iPhone connected via USB to the mac.
Open Xcode. Confirm my apple account added in Xcode > Preferences > Accounts. In the project, targets, signing, click "Automatically manage to sign".
Choose my personal team. The following errors are displayed:
Error 1: The app ID "NSP.BBH-Mobile" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
Why does it prompt to change bundle id? Isn't it standard to have one app id and to generate both a debug/development and release?
Error 2: No profiles for 'NSP.BBH-Mobile' were found Xcode couldn't find any iOS App Development provisioning profiles matching 'NSP.BBH-Mobile'.
But we just created a new development provision and selected App ID = NSP.BBH-Mobile. Why doesn't Xcode recognize this?
you may try unselect Automatically manage signing and import provisioning profile manually.
These are the steps I took to finally resolve this issue. It may not be optimal but it at least worked.
1. In Xcode, turn off automatically manage signing.
2. For signing (debug), select my development provision profile.
3. For signing (release), create a production provision profile, then select the new production profile.
Notes/Observations:
Even though I only wanted to create a signed debug for testing it seems I still had to provide valid signed release provision too.
Even after deleting all keys/certificates etc. and starting from scratch it seems Xcode has created a certificate too. Annoying - it's difficult to tell who created what now.
There was no need to change the bundle ID from the original iOS native app being replaced.
Creating a new production provision did not affect the existing production provision (which I could not use because I don't have the key).

How do I create a new provisioning profile with entitlements?

I'm working on an app: com.myco.foo
It uses "Associated Domains"
I can't run the app on a physical iPhone due to this error:
Failed to code sign "my app". None of the valid provisioning profiles allowed the specified entitlements: com.apple.developer.associated-domains.
How do I create a new provisioning profile to sign this?
When I try to create my own by doing the following:
App ID's -> new (https://developer.apple.com/account/ios/identifier/bundle)
id: 'com.myco.foo'
enable associated domains
Provisioning Profiles -> new (https://developer.apple.com/account/ios/profile/)
type: development
select app id created above
select my device
finish creation
download
open (which opens Xcode but Xcode doesn't say anything about the profile that i opened)
I try to run on device, I get the error:
An App ID with Identifier 'com.myco.foo' is not available.
When I change the project app id to com.myco.foo2, I get the original error.
First I would say regenerate all Development (or Distribution if you are trying to archive) provisioning profiles for your application.
Then, add the associated domain capability.
From the Adding Capabilities section of Apple's App Distribution Guide:
To enable associated domains
In the Capabilities pane, if Associated Domains isn’t enabled, click the switch in the Associated Domains section.
Click the Add button (+) at the bottom of the Domains table.
Double-click the placeholder text in the table, and enter the domain name you want to add.
1) First of all make sure you have added your device udid in provisioning profile you are using. If not added, add it from developer.apple.com and download latest provisioning profile, it resolves your issue.
2) If you have not created Development and Distribution code signing certificates on developer.apple.com then ask relevant person for .p12 certificates.
Looks like it needs to be a distribution type profile in order to run on a physical device: when creating the provisioning profile, you have to choose "Distribution: App Store". You don't select any devices during creation.

Can't install Distribution provisioning profile

I'd like to submit an app to the AppStore (my first app !).
I've already tested the application in my device (so I already have a development provisioning profile) but I'm not able to install a Distribution provisioning profile in Xcode.
I've followed the procedure (I don't know how many times) but when I try to add the provisioning profile through the Organizer I have following problems:
if I double click on the file nothing happens
if I click Add, the file is not selectable (grey)
if I drag and drop from Finder I see the following message: 1 profile
cannot be installed on "iPhone of Corrado". "iPhone of Corrado" is not included in this profile.
What does it means ?
If I go in the Development Center\Certificates, Identifiers & Profiles\Provisioning Profiles\Distribution and edit the profile, there is no devices and there is no way to add any (while in the Development provisioning profile I see all my devices).
What I'm doing wrong ?
Thanks, Corrado
I don't know which Xcode you are using, but supposing you are using Xcode-5, i suggest you use the automatic provisioning profile sync feature.
Just go to Xcode>Preferences and select the Accounts tab.
If you don't have any Apple IDs account signed just click on the '+' button on the bottom left and select 'Add Apple ID...', put the id and password that you use to log on the apple developer.
After that just click on the 'View Details...' button on the bottom right, and your signing identities and provisioning profiles should appear there. If they don't, just click on the bottom left refresh button.
I've just spent the last 12 hours trying to figure out why my OSX App wasn't code signing and the error was related to the provisioning profile containing 0 devices for my Mac. After following the advice above, much head scratching, deleting and re-creating certificates, the following link provides the correct approach for Distribution provisioning
https://developer.apple.com/library/ios/qa/qa1814/_index.html
Moving forward it seems that for Mac App Store Submission on OSX the correct code signing identity to use is Mac Developer and set the Provisioning Profile to Automatic.
You do need to restart Xcode during the Code Signing and Provisioning reset, but it does work.

Resources