How to determine at run-time if app is distributed for internal or external tester? - ios

I know that it is possible to determine if an app is installed through TestFlight or AppStore. But for those app installed through TestFlight, is it possible to know if they are distributed for internal or external tester?
Thanks.

The app does not know where it comes from. You have to handle this information by yourself.
1) Identify your users one by one and decide whether they are internal or external testers
2) Make a custom build for internal/external testers. In this case you can add new a new target for your project and only change one variable in the build settings to differentiate internal/external build.
Here you can find an example of use of multi target project :
http://www.raywenderlich.com/68613/create-paid-lite-version-iphone-app

Related

Flutter. Applying a different configuration for Testflight and the App Store

The task is to use different API URLs inside the Flutter application for the app installed through the Testflight and for the app installed through the App Store.
Libraries like: store_checker and detect_testflight
do not give 100% results, and I cannot be sure that they will not stop correctly detecting the installation source after the next update.
I also cannot rely on the kReleaseMode constant, since there is no way to create a build that compiled in debug mode and uploads it on a Testflight. This can only be done in release mode.
Using custom configuration files and setting up the .gitattributes file also seems like a perversion, and is not suitable because, besides the local repositories of many developers, bitbucket is used, in which I cannot add my merge driver. Also, there is no guarantee that other developers will use this driver.
Tell me a simple and concise way to implement this? Didn't Apple come up with the idea that developers would need to use different settings for builds in Testflight and in App Store?

Application Loader - build pushed on wrong app builds

i explain my problem.
We are two applications with the same name "MyApp" currently created on the itunes connect dashboard.
We did able to create two application with the same name using a different language localization (one in english and the other in native italian). Over this, applications are distributed to different countries (so the swiss - aka ch - version won't be visible to the italian - aka it - users).
Problem Context
The problem is related to the application upload: i'm using the Application Loader software to upload the respective ipa (myapp.1.0.9.prod.it.ipa and myapp.1.0.9.prod.it.ipa) to their remote application project dashboards.
What's wrong?
When i'm publishing the app for ch (myapp.1.0.9.prod.ch.ipa) and the process end correctly, if i open the TestFlight tab for the ch app, i'm not able to see my build but instead, it's result available for the it version.
How we distinguish apps in the project
To distinguish rightly the application, we performing a general renaming of the package name inside all project files to aim this situation:
myapp.1.0.9.prod.ch.ipa with package name "com.myapp.domain.ch"
myapp.1.0.9.prod.it.ipa with package name "com.myapp.domain" (considered as default)
Goals
Publish current ipad downloaded to its app project.
Limits
Please don't provide me solution that include itunes with the Archive menu, we cannot do it manually due to a builder dependencies that will be very pedantic without builder's feature.
Thanks in advance for your help!!!
Simon
You mention that you are changing the package name. I'm not exactly sure what you mean by that but you have to be sure you are setting the correct Bundle Identifier, or CFBundleIdentifier in your Info.plist to make your ipa upload to the correct iTunes Connect application.
Can you take a peek inside your generated .ipa and make sure you have the Bundle Identifier set as you expect?

Which configuration mode does TestFlight use?

I am setting up the production, staging and development stacks/configurations modes for my iOS and API (backend).
I figure the "RELEASE" mode definitely be when the application is public on the app store. I would like to know which configuration mode is used when the iOS application is distributed on TestFlight ?
I understood that the scheme is what determines which configuration mode is used. While I upload the .ipa to TestFlight the Archive scheme is used.
Therefore, now I would like to know if there is a way to have a different configuration for what is on TestFlight and what is released.
What I am trying to solve
We use TestFight to distribute the application to our external testers and stake holders. Therefore would like that application to have a different configuration (e.g. SERVER_ENDPOINT_URL)
Thanks!
Well, I found out that I what I want to accomplish is not possible. Nor was the system built in a way to address my issue.
So what I am doing now is.
Archiving a build with "debug" configuration
Uploading to TestFlight and distributing the executable
After testing is complete
Recompile / re archive the build with "release" configuration
Upload to iTunesConnect and publish the application
Thanks!
Apps are distributed to TestFlight in release mode. If I understand your question right, which I'm not sure I do, at the basic level you want to use a different endpoint URL in your release version. You can differentiate between debug and release using the following
#if DEBUG
static let baseURLString = "https://mydebugurl.com"
#else
static let baseURLString = "https://myreleaseurl.com/"
#endif
However for that to work you need to add custom flags to your build settings, see this question for more info
I hope that answers your question
As far as I know, you won't be able to provide "a different set of variables" for builds pushed to testFlight and app release. That is what it is there for, to test the same byte code that will be published to the public.
With that said, what you could do: Create a "version" endpoint. So if you know that when you first push build 1.2, you will want stakeholders/external testers to see it first. Send a request to your prod server, passing along the build version that is being used, if version == 1.2, point all endpoint traffic to your special "development" endpoints(creating a hostName variable in your SessionManager device side, and setting that accordingly will make that really simple), else push the user on to use prod data.

Can I submit same app with different name on iOS App Store?

I have developed one iOS app but I have about 10-13 clients whom I will be selling this app. So, the app is one and I will just change the name on all apps and publish it from same account. Is it allowed by Apple? The source code will be same and the name will be different on apps. The app is built to sale copies to client so it is allowed?
It is possible, but Apple won't be happy about it, the proposed way to do this is to license your apps to the clients instead of placing them on the public app store.
Source: https://forums.developer.apple.com/thread/7825
Apple does allow one App with different names for different languages.
https://developer.apple.com/internationalization/
So you might use a little trick, where you only "translate" the name of the app and leave everything else as it is.
Yes you can submit the same app with different name.
You just need to create the different targets of the same app. Bundle identifier will be different but the source code will be same.
Here is the link for guiding of target creation-
Multiple target creation

How deploy two different apps in ios without having them overwritten

I want to have two version of the same IOS app to stay in the same time in the same device, one for testing and the other for production.
The app is built using phonegap build, so what I have done is
using two different bundle id specified in build.xml (edit: config.xml), so that one is dk.xxxDev.mobile, and the other one is dk.xxx.mobile
having two different apps in the apple developer page, so now I still have the previous one for dk.xxx.mobile and the new one dk.xxxDev.mobile
building using two different provisioning file, one for each app (one is using a developer profile, while the other is using an ad hoc certificate, but i guess we don't care about it)
Still, every time I deploy using itunes or testflightapp, one app overwrites the other one! What am I doing wrong?
edit: I Also changed
- the tag "name" in the build.xml (so that testflightapp can distinguish them )
- I'm using different filnames when I add the app to iTunes
Can you check if the 2 versions of the app generate are using the same IPA file name?
The file naming convention for the Mpbile Apps is as follows:
app_name.version.IPA file
iTunes in the Mac or in the PC store the mobile apps in IPA format and if they are using the same name, installing one will override the other. This is a valid question for Apple Support and this is something that a future version of iTunes may fix.
I was doing something different from what I wrote, I was probably using the same certificate for both versions.
So doing exactly what I wrote, it is supposed to work.
You need to change bundle identifier of one of the apps
Select Project in Xcode, then select target and in general tab you will see bundle identifier string.
e.g. com.YourCompane.AppName change "AppName"

Resources