New Target and App for AppStore - ios

I am so confused about the how to configure my second App for the App store. I have a one App which I am basing my second app on, I duplicated the target and some classes, modified it and checked it all the time in the simulator. Now I need to test it on my iPhone and then submit to the app store but I don't understand what I need to do about the following:
1) When I duplicated the Target for "myApp" I got a new file under the Products group in Xcode called "myApp copy.app", "copy-myApp-info.plist" and new scheme called "myApp copy". I was able to change the name of the info.plist.
If I then select my target and go to "Info"
2) The Bundle Identifier is exactly the same as my original.
3) The Executable file still says "${EXECUTABLE_NAME}" (without the quotes)
4) The Bundle display name still says "${PRODUCT_NAME}"
5) The Bundle name still says "${PRODUCT_NAME}"
What do I need to change above in order to release my new target as a new app in the AppStore? Also, will I need new provisioning profiles and certificates for this second target/app?

You need to follow below steps in order to test the application in device.
Duplicate the target and change the name as well.
Change the app name in schema by clicking manage schema button.
Change the product name and version whichever you want.
Create the new appID in developer portal.
Create the provisioning profiles based on the identifier.
Change the bundle identifier name in the new target.
Change the code signing profiles in build setting tab.
Note: If you run the app in simulator that doesn't care about the profiles. If you run the app in device you defiantly take care about the profiles.

You need to set new bundle identifier for your new app, then create new project on iTunes connect. You can change all parameter of new target relevant to your new app. After that your are ready to build new app with changes.

Related

Xcode: Archive Has Incorrect Bundle Id and Provisioning Profile During Validation

I have one Xcode project that has 3 different configurations spread across 6 schemes as follows:
Debug
Config1Debug
Config2Debug
Release
Config1Release
Config2Release
Each Scheme:
Has its own Display Name and Bundle Identifier.
Has the proper Development/Distribution provisioning profiles generated from iTunes Connect assigned to them.
I would like to put the 3 release configurations onto the TestFlight/App Store as separate applications.
When running on a simulator or local iPhone using the Debug Schemes, everything works properly and 3 different applications run.
My problem is that when I archive the release schemes and then try to validate, the Bundle ID and the provisioning profile defaults to the "Release" scheme regardless of which scheme I am archiving. But the display name updates to the proper display name of the scheme.
My question is why is the display name properly updating while the Bundle ID and the provision profile defaulting to the "Release" scheme and how can I get the proper Bundle Id and Provisioning Profile to appear when doing validation?
Things I Have Tried
Deleting then re-downloading all the provisioning profiles on my machine
Restarting Xcode
Uploading the application anyways. I get an error saying the build number conflicts with the already uploaded Release app. I want to upload to the Config1 or Config2 app I have made on iTunesConnect, not the Release one.
Uploading the application anyways with a new build number. This will register as a new build on the Release app.
Found the solution here. Super simple can't believe I overlooked it. My schemes were only set to use the various configurations on Run. Once I edited the schemes and set Archive to use the proper config instead of Release, it worked fine.

Why does Xcode create non-wildcard app IDs called "XC Wildcard"?

I removed all my app IDs and provisioning profiles from Apple's Developer site. Then I created a new Xcode 7.3.1 project, and clicked "Fix Issue" next to the "no matching provisioning profiles found" message.
The app ID it created is called "XC Wildcard", but it's not a wildcard ID; it's set to the bundle identifier of the Xcode project. And the development profile it created is assigned to that app ID.
If I change the bundle identifier and click "Fix Issue", it creates a second app ID called "XC Wildcard", with the new bundle identifier, and another development profile for it.
This works, but seems wrong. Shouldn't it be creating an actual wildcard app ID, unless I turn on specific capabilities like Push Notifications?
Xcode create "XC Wildcard" to be used for debugging so it matches all app id's
change deployment configuration from debug to release and Xcode will create a provisioning profile with your app id.

Watchkit Extension - No matching provisioning profiles found

I have created an iPhone app that also includes a WatchKit extension, I can run this fine in the simulator but when trying to deploy to an iPhone I get a provisioning issue for the WatchKit Extention target:
"The provisioning profile specified in your build settings (“XXXX”) has an AppID of “XXXX” which does not match your bundle identifier “XXXX.watchkitextension”. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center."
Xcode automatically created the WatchKit targets with the suffix .watchkitextension and .watchkitapp but this seems to cause the issues when using a provisioning profile and deploying to an iPhone.
If I remove the watchkit targets it runs fine, but this is obviously not a solution.
Thanks for your help
You need to create two new AppIDs in the Developer Portal with the correct bundle identifier for your Watchkit app and Watchkit extension. The bundle identifier has to extend the main apps identifier, so if your app is com.myapp it should be com.myapp.watchkitextension and com.myapp.watchkitapp
You also need to create the related Provisioning Profiles for the AppIDs, one for the extension and one for the app.
Add required add ons (like Keychain) if you are using them in your Watch app.
All in all you will need six PPs, 3 for development, 3 for archiving/store. With Xcode 6.3 team provisioning for development stopped working (for me)
Next goto Xcode > Preferences > Accounts > YOUR_ACCOUNT > View Details ..., CTRL+Click one of the Profiles and open in Finder. Move all Profiles to Trash, then refresh the Profiles.
In your targets make sure you have the correct Team set for your main App target, the Watchkit extension target and the Watchkit App target, also make sure you have the right Provisioning Profiles assigned to main App target and the Watchkit extension target (Watchkit app Provisioning Profile can not be set but will be assigned automatically Edit: With Xcode 6.3 it can has to be set).
To be sure all is fine clean build folder: In Xcode hold command and do Product > Clean build folders ...
Now you are ready to archive.
Im my case I've clean all my provisioning profile as suggested by other users, then I had to delete "code signing entitlements" from "Build Settings" in both App parent and extention target and after rebuild and archive, all work fine.
I made 3 App IDs (for container app, watchkit extension, and watchkit app) belong with 3 provisioning profiles. (I was going to use AppGroup, so my app cannot share single App ID.)
Setting 2 provisioning profiles for container app and watchkit extension, the archive of the my app could not pass the Xcode's validation process.
In my case, the critical point is to set the provisioning profile of the WATCHKIT APP. Setting it, it pass the validation process, and succeed to submit the app.
My procedure of the setting is the following:
In Xcode, open "TARGET" of WatchKit App.
Select the "Build Settings" tab.
In the next line of the tab, choose "All" not "Basic."
The you can find "Provisioning Profile" line in "Code Signing" section.
Set the appropriate provisioning profile of yours.
For a while, I have believed 3rd party app developer cannot set provisioning profiles of WatchKit Apps in Xcode.
Noticing that we can set it, the answer is now clear...
I followed the Technical Q&A QA1814 and that solved it all for me. Basically you set everything to Automatic and iOS Developer. Very important to set the Team: None first, do the changes and then change back to your Team, then restart Xcode.
My situation was that I already had the provisioning profiles and certificates set up for a "normal" iOS app. I had successfully published apps with that. Now I needed to get it to work after I added a new WatchKit target to my existing app. I got many error like "No matching provisioning profiles" etc. After many hours of trouble I followed the routes in the QA1814 article and voila! - Xcode solved everything for me. Didn't need to change/resolve/update anything in Member Center etc.
Also important to use the Bundle ID's correctly. The WatchKit app and WatchKit Extension must use the same bundle ID prefix as the iOS App target.
If the iOS app has bundle ID: [Bundle ID], the WatchKit targets needs to be:
WatchKit App: [Bundle ID].watchkit
WatchKit Extension: [Bundle ID].watchkit.extension
usually when you get that error its because your bundle id doesn't match the app id that is on the provision.
In the case of the watch extension, you need to add the application service App Group to your app id identifier that is associated with your provision, on the developer.apple.com portal if you are sharing data or files between the extension and your app
https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/DesigningaWatchKitApp.html
In my case problem was different than others. I try everything but didn't solve my problem.
Let me explain my situation before explain how I solve it.
First it starts with adding Today Extension to my project. I created different bundle ID for my App Extension. For example if my application's bundle ID com.company.appname, I created for my Extension something like this "com.company.appname.TodayExtension". I'm using XCode Version 6.3.2 (6D2105), and XCode automatically (The provisioning profile specified in your build settings (“AppName”) has an AppID of “BundleID” which does not match your bundle identifier “BundleID2”. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center...Of course I click the 'Fix Issue' button) create an provision profile for Today Extension.
And just after that I added "app group" to my application and go on coding for a while. But when I try to send my application to the AppStore (Product/Archive/Submit to AppStore), I get this error that says "None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups".
You must know that "app group" could be the key point for you too...
Please go to member center/Certificates, Identifiers & Profiles/Provisioning Profiles/Distribution section. Find your application's Distribution profile and select it. As you can see that status for your profile is "Invalid (like in my case). Then here's the solution, click Edit button, after that Generate button. Now please repeat this action for all "Invalid" profiles. After all your profiles are re validated, now you can go back to your XCode project and update local provisions in your Mac. Go to : Xcode > Preferences > Accounts > YOUR_ACCOUNT > View Details ..., CTRL+Click one of the Profiles and open in Finder. Move all Profiles to Trash, then refresh the Profiles".
Now Product/Clean and (hopefully for the last time) Product/Archive and Submit to AppStore.
Generally speaking, it's happen because you add app group to your application, but you didn't validate all of your profiles after that.
Maybe this will helps someone.
When you are in the Xcode update Your certificate and compile Your program again, real machine commissioning will be "Your build Settings specify a provisioning profile have the UUID 'XXX', clear, no to provisioning profile was found. The Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.".
Close the project, find project file XXXX. Xcodeproj, right-click on the file, select "Show Package Contents" (Show Package Contents).Will open a new Finder.
Find the project in the newly opened Finder. Pbxproj, and open, find the UUID you all contain an error 'XXX' line, delete.
Save, restart the project, then build, with respect to OK.

How should I ensure the correct info.plist is used when building app with multiple targets

I've got a common codebase from which I want to build multiple applications. Currently I've gotten the test app to build and I can successfully test push notifications.
Having confirmed the initial push notifications work, I've duplicated the target. In the new (duplicate) target's info tab I've modified the bundle identifier, and in the duplicate's info.plist file I've updated the bundle identifier to be the second app which I've authorized for push notifications.
Under Build Settings for the duplicate, under the Packaging section I can see the Info.plist value is set to the duplicate's filename. However when I attempt to build the second target I get the following Xcode error:
Code Sign error: Provisioning profile does not match bundle identifier: The provisioning profile specified in your build settings (“iOS Team Provisioning Profile: app.mine.PushNotificationTest”) has an AppID of “app.mine.PushNotificationTest” which does not match your bundle identifier “app.mine.PushNotificationTest2”.
Is there a method to make sure that the correct app name and info.plist file is used when the app is built?
The problem is not that it is not correctly pulling the Info-plist for the second target - the problem is that it IS pulling the new info.plist. In your second target info.plist, you have changed the bundle identifier. Your provisioning profile, however, is tied to a specific bundle ID, in this case "app.mine.PushNotificationTest". However, for target 2, you are trying to build using bundle ID "app.mine.PushNotificationTest2" using a provisioning profile that's only set up to build to "app.mine.PushNotificationTest". That is why you are getting the error.
What you will need to do is go into the developer center and create a new provisioning profile for the second bundle id. Then, in your second target settings in Xcode, change target 2 to use the new provisioning profile that has been set up to build for bundle ID app.mine.PushNotificationTest2.
Note that when you are using special entitlements, like push notifications or iCloud, you cannot use wildcards in you provisioning profiles (e.g. app.mine.*). That is why you will need a different provisioning profile for each bundle ID you plan to use with push notifications.

How to get my phonegap ipa file uploaded to the apple app store

I have successfully built and tested an app using phonegap. Now I want to upload it to the apple store, but when I run the IPA file through application loader it warns me the bundle id doesnt match what I put into the itunes connect. Can I configure the bundle id through phonegap or do I have to pull it into xcode and configure it through the info.plist?
What is the easiest way to get my app uploaded to the store with matching information?
In order to get your app into App Store, you will need to create an application (in App IDs) with the same Bundle Identifier as you presently use in your application..
Also, you will need valid provisioning profile set up for use on the App Store. You'll find this in Provisioning Portal under Members Center. Don't forget to create this profile in the Distribution tab and choose the appropriate App ID (the new one you have created).
Then, you will need to download that provisioning profile, drag it into your XCode to install it and use it in Code Signing part under Build Settings.
At last, you will need to visit iTunes Connect, where you'd create a new application request (under Manager Your Applications). Be sure to use the same App ID that you use in your application.
After this, archive your application in XCode (using Project - Archive menu item). Make sure your current scheme (top left dropdown) is set for production use, not debug. You can edit your schemes to verify (not sure under which menu it is now).
Last step is to click the archived application and select Distribute (or Share in older XCode) and choose to export into App Store.
I hope this helps you a bit :)

Resources