How can i retrieve an unpublished ios app id based on a known app identifier? - fastlane

Is there a way in fastlane to discover the app id (1234567890) of my unpublished app based on a known app identifier (com.whatever.whatever)? The app has already been created and is in iTunes connect. I just need to be able to echo it out programatically it based on the known identifier.
The http://itunes.apple.com/lookup feature does not work if the app isn't in the store yet, so that won't work.
I tried making a lane piecing together some things I found, but it doesn't work:
lane :info do
UI.success("App ID is #{ENV['PRODUCE_APPLE_ID']}")
end

If you just need it visually, you can run bundle exec fastlane produce and you'll get a warning output showing your app id, e.g.:
[16:51:18]: [iTC] App 'com.company.appname' already exists (1234567890), nothing to do on iTunes Connect`
If you need it programmatically you can use your current approach of inspecting ENV['PRODUCE_APPLE_ID'], however note that this environment variable will only be populated after running the create_app_online action:
lane :info do
create_app_online
UI.success("App ID is #{ENV['PRODUCE_APPLE_ID']}")
end

Related

Apple iphone app transfer or app replacement

We have built an inhouse version of an iPhone application that is to replace another that is already available from another developer.
I was wondering if you think we can use "app transfer" from the previous developer and in turn replace it with our own app. Previous developer has agreed for the transfer (ofcouse excluding his code). Therefore our question is if we can transfer his app to our development name and then replace the app with our own. Our goal is that the current users of this app will receive ours as an update to what they already have and not as a different app.
In short, transfer and replace so users get our app as an update.
Note:
Please note that as we were unaware of this "transfer" we submitted yesterday our version of the app with a slightly different name. Should we cancel submition (as it is still pending for validation) and follow some route you may suggest in your replies, or stay as it is now?
If you keep the Appidentifier the same between the original version and the new version you will submit, this should work as expected. (But nobody has much know-ho of the new "transfer" option yet)
So, you process would be as follows:
Hand the old developer your TeamID and your Apple ID
The old developer transfers the current App over to your team
Once done (no clue how long that takes), you have the app in your itunes connect
Now you add a new version of the App to itunes connect and mark it as ready to upload
You upload your newly coded app that meets these criteria:
Application Bundle Identifier is the same as with the App you're updating
Your new App is signed with a correct certifcate/provisioning profile (just correct for the appid, doesn't have to be the same one)
The BundelVersion and BundleShortVersionString are at higher than those of the already submitted applications.
So basically, it will work just like a regular update.

Bundle Identifier differs from prior bundle identifier

So this really put headache on my head and I finally gave up and posted question here. I am trying to update one of my client Application in iTune store and we are facing below error while uploading to App store.
So, I already tried couple of solution by creating new app id with the bundle sid id twice. Also delete all old profile etc. But nothing worked yet.
1). iTunes Connect App Bundle ID = 8X8ZP823D6.com.pregnancytoolspro.55freebabysamples
2). Info.plist Bundle ID = com.pregnancytoolspro.55freebabysamples
3). Provision profile ID = 8X8ZP823D6.com.pregnancytoolspro.55freebabysamples
When I Changed Info.plist App ID to com.pregnancytoolspro.55freebabysamples then it show me provision profile active in the list.
If I changed Info.plist App ID to 8X8ZP823D6.com.pregnancytoolspro.55freebabysamples then it doesn't show me provision profile active in the list.
When I build app and upload to App store it pop up this message and I can't understand how it should be in info.plist and in provision profile so that it can match iTunes Bundle ID.
Is anyone faced this problem before ? Please help me out.
We contacted Apple support and they said they will have to change Bundle Identifier in the App we have added in our account. So probably Apple will solve this critical issue.
I've had this issue before. It has to do with the different versions saved in the info.plist.
There is a version and build identifier.
Apple doesn't really care about the version as much as the build number. If you have submitted your app with a build number, the update must be 1 greater for the update to work. It isn't all that clear how that works, but that is how I got my update to go through. You should be able to find out what these were in iTunesConnect so you can increment them correctly.

Building and testing multiple apps - trying to understand appID's and profiles

I'm trying to understand app ID's and provisioning profiles here, I'm quite lost.
I am a registered Apple Developer as an individual under my full name, and I have 2 applications currently in the works, and 2 device UDID's ready for testing.
I'd like to be able to build IPA's for these two apps, upload them to TestFlight, and use them on either of the UDIDs I have on me.
I have several questions (if I should ask separate questions, I'd be happy to unless someone happens to be willing to answer them, I'd appreciate it):
1) Because I have 2 (or more in the future) applications, do I need a wildcard app ID?
2) If I have the app ID ET9WC78H9Q.com.mydevname.* listed in the portal - WHAT is the actual appID - ET9WC78H9Q.com.mydevname.*, ET9WC78H9Q.com.mydevname, or *?
3) Why can't you delete an AppID in the portal?
4) I've read that this must match the name Bundle Identifier. Currently it sits at ${PRODUCT_NAME:rfc1034identifier}. What specifically needs to go here to 'match'?
5) Do I need to create separate distribution profiles for each app, or can I tell each new app to use the wildcard identifier?
6) How do I tie a specific target to a specific provisioning profile in XCode 4? (TestFlight suggests to use the distribution profile)
Thank you,
You have to either have a wildcard app id, or 2 separate (specific, non-wildcard) app ids, one each.
That is a wildcard app id, so the app id is *
No idea.
Your PRODUCT_ NAME, which you specify in the Packaging section of the Build Settings screen.
A single distribution profile will work with multiple apps if the app ID for that profile is a wild-card app id. If they are specific app IDs, yes, you need a profile for each app.
You specify the provisioning profile in the Code Signing section of Settings, under CODE_SIGN_IDENTITY.
Because I have 2 (or more in the future) applications, do I need a wildcard app ID?
You don't. In fact, I recommend against it, since it's probably only going to give you problems with the App Store in the future.
If I have the app ID ET9WC78H9Q.com.mydevname.* listed in the portal - WHAT is the actual appID - ET9WC78H9Q.com.mydevname.*, ET9WC78H9Q.com.mydevname, or *?
That depends on the application. The first part is the Keychain space, which determines which applications can access the things you put in the Keychain. Then comes the actual application identifier, which is generally company.projectname. It would probably be ET9WC78H9Q.com.mydevname.myapplication in your case.
Why can't you delete an AppID in the portal?
On Mac and iOS, the AppID is very important for applications like the App Store. They have to be unique, since having two of them could mean that applications get installed in the wrong place. This means that even if you could remove them you couldn't ever add them again, which means there's no point in deleting them.
I've read that this must match the name Bundle Identifier. Currently it sits at ${PRODUCT_NAME:rfc1034identifier}. What specifically needs to go here to 'match'?
Wouldn't worry too much about that - simply look at the target summary page (click the solution then click the target and finally go to the summary tab) and it'll tell you the name it automatically picked for you.
Do I need to create separate distribution profiles for each app, or can I tell each new app to use the wildcard identifier?
You can definitely use the wildcard identifier, but the App Store will not necessarily like that.
How do I tie a specific target to a specific provisioning profile in XCode 4? (TestFlight suggests to use the distribution profile)
Wouldn't worry too much about that. If you got the code signing set up correctly (look at the build settings, then pick the development and deployment certificates) then you have nothing to worry about.
Can't say much more in here since most App Store things are guarded by an NDA. Consider asking this on https://devforums.apple.com instead.

Updated app with new explicit app id, in-app purchase. SKProductsRequest returns empty list of products

Background:
The current for-sale version of my app uses a wildcard app ID, and the bundle ID is simple and doesn't conform to the com.companyname.appname convention (it's just 'appname'). The App ID it uses is simply of the form 'bundleseed.*', resulting in, I believe, 'bundleseed.appname' when signed with the provisioning profile. (Why? Because this app has been around since the early 2.x days before Apple recommended explicit App IDs, and before XCode introduced the com.companyname convention.)
I'm adding In-App purchase to the app, which requires an Explicit App ID. I've followed the instructions in Technical Q&A QA1680 Updating from a wildcard App ID to an explicit App ID. The result is that I have a new explicit app ID of the form 'newbundleseed.appname', and the new provisioning profile used to sign the app specifies this. The bundle ID in the info.plist remained the same 'appname'.
Problem:
When I deploy the new app from XCode over the top of the old version it appears to work fine. The old-version app instance is replaced with the new app and all of the new features are in place. However, when the app submits a SKProductsRequest it results in an empty list of products. If I deploy the new app as a fresh install (not copying over an old version) then everything works as expected - SKProductsRequest results in a full list of my available products.
I also noticed that the upgraded build carries forward some aspects of the old version, which is strange to me. Specifically, the old version of the app had a default.png which the new app doesn't yet have as part of the build, yet the upgraded app displays the old default.png while it is loading. It's as if the upgraded app is a merge of the old and new.
My primary concern is that In-App purchase will work for my upgrade users. Am I doing something wrong with the Explicit App ID, or is this just an issue with the fact that I'm using the In App Purchase sandbox? In which case, ow can I be confident it will work when released?
Also, any insight on why/how the new app doesn't seemingly replace the old app bundle in-full?
The only thing I can think of is that instead of generating a new bundle seed (as detailed in QA1680), I should have used the old bundle seed when creating the new App ID. i.e. the old App id is 'oldbundleseed.*' and my current new one is 'newbundleseed.appname', and perhaps it should be 'oldbundleseed.appname'. But I cannot do this because the provisioning portal wont let me create an app ID that differs only by bundle seed. If this is my issue, what to do? Contact Apple?
TL/DR: an existing app, updated with a new explicit app ID as to support IAP, works fine except that SKProductRequests result in empty product lists when the app was updgraded vs. a clean install where they result in a populated product list.
How are you doing the upgrade? If you are do a build and run, you will end up with this problem where app is not completely re-written.
Xcode makes some "optimization" decision and copies only files that are really changed and it messes things up.
Create an adhoc distribution and download it to the device that has the older version of the app. Check if that adhoc build enumerates it properly.
Do you implement the request:didFailWithError: delegate method? It is part of the SKRequestDelegate protocol to which the SKProductsRequestDelegate protocol conforms.
I have to agree that StoreKit is not adequately documented. It has been my experience that if iOS sees the same app with different appIDs, it behaves as though they are two different apps rather than overwriting (or partially overwriting) an app with the same title. Still, if your development device is jailbroken: launch the app (in its problematic state), ssh into your device, run launchctl list and see how iOS IDs your app in the resulting list.

Unable to have two versions of the same app on the one iphone

I have two versions of my app. I'm trying to keep a copy of each on my iPhone for testing purposes.
In my build settings, my bundle display name is ${PRODUCT_NAME} and I've given each version of my app a different product name (eg "v92" and "v10"). When I install each version to my iPhone, they both appear side by side with different names, however one will work normally, and the other will immediately close the moment it's opened. If I delete the version that works normally, the other will start working.
Does anyone know what's going on?
I think the apps are distinguished on the device by the App Id and not the product name. I dont know how you were able to install two apps only by changing the product name. When i mistakenly installed a different app with same app id but different product name the original app was overwritten.
Try creating a separate app id for the new version only for testing. That might solve your problem but make sure you use the correct app id when you submit your app.
EDIT: It might not be the right solution if you are doing some app id specific stuff (like APNS) in you app.
I ran into this one too and eventually solved it. I know the solution had to do with changing something in the information property list, but I'm not sure exactly what. I would suggest making sure that all of the following are different for your two versions:
bundle display name
executable file
bundle identifier
bundle name
At least you can create two app id's and two provisioning profiles in your developers account. Then you'll be able to install your 2 versions like a two different apps. It's an ugly solution, but it definitely works.