Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App review - point to dev api instead of prod

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?

like image 907
Hurricane Avatar asked Feb 07 '23 00:02

Hurricane


1 Answers

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.

like image 126
lubilis Avatar answered Feb 13 '23 05:02

lubilis