How to generate new ipa file in xcode 8.2.1? - ios

When I make build file that time showing one error. So please help me how to solve this error after make new build file.
I created developer certificate. I used this Automatic select mode on Xcode. I select Generic iOS Device in Build scheme. I try to many time but I show same error.
I attached My screenshot so please check it and give me response.

It appears that the bundle id com.2048light is used in another developer account. You need to change the bundle id in your project to something unique across all iOS applications and try again. A common mechanism to solve this issue is to put a company identifier in your bundle id.
For example:
com.mycompany.2048light
where you replace mycompany with your name or the name of the company you are building the app for.

This error can happen if the computer you are building on does NOT have that certificate and is trying to generate one with a different account (Auto-Provisioning).
For example, you might be using your own personal developers account with bundleID: com.2048light.
Then on your company's build machine, you might be using the company account and the same bundleID. You can't do that.
You can either do one of the following:
Use the company account to run it on your own personal device.
You create a new bundleID for the company and build using that.
You copy your personal certificates to the company computer and build with that.
I would suggest doing #1. My company adds our personal devices to their list and makes us a member so we don't have to keep changing the project settings. If you can't do that, then do option #2.

Related

Xcode Signing - Failed to create provisioning

Here's the story:
I created a free developer account to build an app for a client.
I used this info for the Identity and Signing:
It came time to upload the app to TestFlight and to use the client's developer account.
I created the account in xcode using their apple id and updated the signing like so:
But now I got this error.
It was clear, so I updated the Bundle Identifier to this:
But again, now I am getting a different error, and I don't know what to do.
I do not have an iOS device to register, nor do I care to get one, since I'm not doing the testing - they are.
I did create an app in the App Store Connect, and it is set up like so:
As you can see I created it to match the Bundle ID from before and still no luck.
Any help is greatly appreciated. I just want to be able to get my Xcode project onto TestFlight using someone else's developer account (with their consent of course).
It needs to have at least one iOS device registered in order to create the development profile. Ask your client for the UDID of one of their devices and add that manually to the developer portal. If they don't have one handy, feel free to use: f978c5f2e861f71b340125a4fa8d130a6254a0b3 which will work.
Alternatively, switch to manual signing and do everything manually. That's my preferred method, but some say Xcode is finally good at managing profiles etc for you.
The only way to do this without a device is to turn off "Automatically manage signing" and manage everything at the Member Center.
You will need the distribution identity / certificate first. If the team already has one, you will need them to export it to you; otherwise you cannot upload.
Then register the app.
Then make a development certificate, and a distribution certificate for the app store, and download and install them.
Now you can archive and then export to the app store.

Removing signing information from an iOS app before sharing source?

My employer recently entered into an agreement with another company to share the source code for an iOS app that we developed. We haven't yet published this app in the App Store but plan to do so in the future. During the course of development, we've obviously created an app ID, provisioning profiles, certificates for development and remote notifications, etc. all of which are (obviously) tied to my employer's enrollment in the Apple Developer Program (ADP). The app itself is currently configured to allow Xcode to manage signing automatically.
Before we deliver the source code for this app to the other company, I need to make sure that none of my employer's information is present in the project source (so that the other company has to use their own info). I've looked through all the project-related files I could find and the only thing I really saw was a small section in the project.pbxproj file that looks like it is related to signing.
I would guess that this is something that a lot of people who decide to share their source on Github do but I'm still fairly new to iOS/Xcode app development so I was hoping that someone who has dealt with this before could offer some insight? Thanks very much!
If you just want to make sure they cannot get your company's signing identity, you can just send them the project. Since you are using automatic code signing, they would need to have your company's Apple developer ID credentials to sign in to the developer account in order to have Xcode generate a certificate and profile to sign as your company. None of the critical signing files are included in the Xcode project folder.
When you enable automatic code signing and sign into the Apple ID, Scode will generate a certificate and private key, which go into that Mac's Keychain, and a provisioning profile is generated and downloaded, which goes into a specific directory that is common for all projects (https://stackoverflow.com/a/45642752/3708242) and outside of the project directory.
As #Jack states in his answers, there are other pieces of information in the files you might want to scrub, but there is no risk you would be giving them access to your code signing information by sending them the project as is with automatic code signing turned on.
Long story, short, just send them the project directory.
Just clear the bundle identifier in Project->General->Bundle identifier -> set it empty.
For notification other company/Vendor will use there separate certs with respective Apple account.
In every top lines of .swift files there is commented by default code which includes Mac name, you can remove it.

How to clone a project in xcode and run the app in the ios 7, or 7+, etc

I have cloned a project and tried to run my app on a device(iPhone 7), but it showing the build failure with the below-mentioned error.
Note: If I create a new project in Xcode then, I can able to run the app on my device.
How can I solve this?
Error:
Failed to create provisioning profile.
The app ID "org.reactjs.native.example.app" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
No profiles for 'org.reactjs.native.example.app' were found
Xcode couldn't find any iOS App Development provisioning profiles matching 'org.reactjs.native.example.app'.
Assuming you have a valid iTunes Connect developer account:
App IDs are unique per all App Store accounts. Therefore if someone had registered an appId of org.reactjs.native.example.app as it is in your case, you cannot use it. That was clearly used by react.js guys and is now part of their profile(s). You need to change the appId of the cloned project to something unique. Most common notation used is com.my_organization_name.my_project_name. You can also go for prefixing the original id with lets say com.my_organization.tests.org.reactjs.native.example.app or something similar

Added another developer account to my computer and the old one no longer works

I just added a 2nd developer account to my computer to distribute apps. I wanted to keep everything seperated so I created another account for it.
I can validate and send apps with the new account, but now I get an error when I validate apps under the old account.
the error says my bundle contains a key value that is not allowed, the complete error message is
"Invalid code signing entitlments the entilment in your app bundle signature does not match the one conained in the provision profile. the budle key keu value that is not allowed 73pngm574.abctest
I'm using the xcode wildcard id for my app so abctest is the bundle id and 73pngm574 is my dveloper id
One thing that has worked for me is using Xcode to set things up correctly for you. Xcode --> Preferences --> Accounts. Use the account setup to link to your developer account and Xcode should sync things up for you.
You may need to remove any old keys or profiles you've copied in or tried setting up previously. Not exactly ideal, but "usually" works for me.

Do i need a separate Distribution for each Apple AppStore submission?

I'm so confused -
after an entire day's struggle, i finally figured out how to submit my app to Apple via archiving & distributing from xcode.
... that was my free version
now i made my code changes, and on my pList file, i changed the Bundle Identifier to com.blah.mygame.pro instead of com.blah.mygame.lite
i also changed the Bundle name to be My Game Pro instead of My Game Lite
but now i'm confused - when i click on the project in Xcode, and i hit "Target" instead of "Project", i can't find my release/distribution profile! (my develop/debug profile) is still there.
if i were to click Project instead of Targets then i actually do see my previous distribution profile.
however, in my develloper portal, i had actually set my distribution profile to be linked up with the "com.blah.mygame.lite" identifier. was i not supposed to do this???
weirdly enough, when i made my distrubution profile earlier today, i say something like "mygame * -" or something that i coulda linked it to. but i just chose com.blah.mygame.lite without thinking
are you supposed to have multiple distribution profiles? one for every app? what i just want a lite and pro version?
** edit:
bonus points for this:
if i only needed 1 provisioning profile, (and since i messed up naming my previous provisioning profiles)... how do i rename all my distribution profiles without it interfering/messing up with my apps?? it's already submitted and awaiting approval
* EDIT # 2:
okay, i got both apps submitted with 2 separate distribution profiles.
however, is there any way that i can rename a distribution profiles while the app being submitted is still using it??
i had mistakenly named it "My Company Distribution Profile" when i should have named it "Distribution Profile for My Game Pro Version"
You have two options for fixing it:
Use a AppId like. com.blah.mygame.* . You can replace the * with any number of strings and use it for creating different application.
I won't recommend this approach, because the issue with this is you won’t be able to use push services or in-app purchases. You might not plan to use these services now, but if you change your mind, you won’t be able to change your app ID without creating a new app.
Create different AppId for different Apps. It'll be a good approach
Sounds like you're using a single AppID for both of your apps. You can only use one provisioning profile for multiple apps only if the AppID bound to that profile has a wildcard (e.g. "com.sample.*").
quoted from the iOS Provisioning Portal:
The Bundle Identifier portion of an App ID can be substituted with a
wild-card character (asterisk '*') so that a single App ID may be used
to build and install multiple applications. If the wild-card character
is not used, the Bundle Identifier portion of your App ID must be
input as your CF Bundle ID in Xcode to allow the application to
install on your device. The Bundle Seed ID portion of your App ID does
not need to be input into Xcode. Wild-card App IDs cannot be used with
the Push Notifications or for In-App Purchase.
I hope you have created an AppId with this bundle identifier com.blah.mygame.lite and created a distribution profile linked with this AppId. By doing like that, you can run or archive your apps only if it is having the same AppId like this com.blah.mygame.lite. If you want to create an AppId to run all apps, then you need a Wildcard AppId like this com.* . And If you think you need to run the app with AppId com.blah.mygame.pro then you need to create another appId like that and associate that appId with another distribution profile or modify the old one and download and install it and use.
There is no need of distribution profile for every app....one is enough for every time but
your bundle identifier is same as you given in your distribution provisioning profile when
you create it first time....

Resources