5

First time submitting an app to the app store.

As per iTunes Connect:

"A demo account is required to use all the features of the app."

... which is the case for my app.

I want to have this demo account point to the dev api, but everything else point to the prod api.

My app is Cordova based and the api url is injected via a constant into the relevant http services. I am using grunt and have commands like grunt prod / grunt dev etc, which, utilising ngconstant generate a module with the api url for the command that was run i.e. grunt dev for dev api url constant.

I thought about hardcoding a username and overiding/redefining the url constant as it seems somewhat possible albeit not recommended (being a constant and all). - I could not get this to work in any case.

So...

Does anyone know how to get around this?

If the app were initially submitted with the dev api url, reviewed and then accepted then resubmitted with prod api ~ is another full review required?

Community
  • 1
  • 1
Hurricane
  • 1,454
  • 1
  • 13
  • 31

2 Answers2

5

I want to have this demo account point to the dev api, but everything else point to the prod api.

If you want this kind of behaviour you'll have to implement it, i don't think there are other solutions.

Implement on Client side

  • Use a custom property to switch environment. This property is dowloaded from backend on app start and affects all application flow.
  • Implement custom redirect for test user (hardcoded bad solution)

Implement on Server side

  • If user is test user, point to dev environment apis. After Apple validation you can remove this check and remove test user account from database.
  • Redirect all your prod environment to dev environment during validation. Then remove this redirect after Apple validation.

I think Server side solution is the best since you'll be able to make changes whenever you want. Remember to check "Release app manually" flag from Itunes Connect before submission to revert changes you need.

If the app were initially submitted with the dev api url, reviewed and then accepted then resubmitted with prod api ~ is another full review required?

Yes, if you want to upload a new build, a new app review is required. Basically you are at the beginning point.

lubilis
  • 3,942
  • 4
  • 31
  • 54
4

A reviewed app needs to be treated as a production app. The submitted app must point to your production server / URLs because that is the app that will end up in the App Store.

If you want the review process to hit a dev API, your only option is to submit your app and specify that you will release the app manually after it gets approved.

Then you set your production server (the one accessed by the app being reviewed) to use your dev APIs / environment. Once the app is approved (but not yet in the App Store), you update the production server to use the production APIs / environment. Then you release your app to the store.

Keep in mind this only works for the initial release of your app. You can't do this for any app update.

rmaddy
  • 314,917
  • 42
  • 532
  • 579