1

How is that supercell's clash royale update it's app (features, content, etc) inside the app itself without going to the app store?

Is it because they are supercell or is it possible to mere mortals to have an awesome in-app update experience like that? Any clue on how to do it?

UPDATE: I know this can be done for javascript-framework apps (react, cordova, etc) I'm asking for non-javascript ones (xamarin, swift, obj-c, c++, native, whatever)

Bart Calixto
  • 19,210
  • 11
  • 78
  • 114
  • Isn't this a feature of Ionic? https://blog.ionic.io/announcing-ionic-deploy-alpha-update-your-app-without-waiting/ – Quintin Balsdon Jan 06 '17 at 13:57
  • 1
    @QuintinBalsdon that's javascript apps, there are some guides for those. I'll update the question to reflect that I'm talking about non-javascript framework apps. – Bart Calixto Jan 06 '17 at 13:59
  • 3
    Easy, they don't change the app. They load new game data, like levels objectives, etc.. – rckoenes Jan 06 '17 at 14:01
  • And they perhaps use a scripting language for driving some other changes. – CommonsWare Jan 06 '17 at 14:02
  • 1
    @rckoenes That was my first thought but the code binaries are updated. I'm wondering what's up with all the -1 votes. Why isn't a fair question? – Bart Calixto Jan 06 '17 at 14:03
  • As long as those code binaries are not in the main bundle this is perfectly possible. The main bundle is read only. How says that the game data is not binary. – rckoenes Jan 06 '17 at 14:04
  • 1
    @rckoenes so I can have a "shell" that only purpose is to check for updates, download and launch "my app bundle" (not main)? – Bart Calixto Jan 06 '17 at 14:06
  • 1
    No, this is not allowed by Apple, technically you could build it but you could. This is not what supercell is doing. They are downloading new levels, which there game use. This is the same as some app downloading data and playing it back as music. In the review guidelines you can find the following: `Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code, including other iOS, watchOS, macOS, or tvOS apps` – rckoenes Jan 06 '17 at 14:11
  • fair enough! thanks @rckoenes. – Bart Calixto Jan 06 '17 at 14:14

2 Answers2

2

You are allowed to download data, like Clash of the titans does. They download level data but they do not patch or upgrade there main app. Since all data in main bundle is read only you can not just override it.

Also the App Store Review Guidelines restrict this:

Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code, including other iOS, watchOS, macOS, or tvOS apps

rckoenes
  • 69,092
  • 8
  • 134
  • 166
1

one way is(for android):

  1. when you need update app , notify client for new update(with silent push notification or in app start+web api).
  2. next download new apk to specify location on device.
  3. then with this way : Install Application programmatically on Android , install new downloaded apk for user device.

Edit for IOS:

  1. Since for updated and install ios application , you need to AppStore , so via first step in top steps , notify user device then guide user to application AppStore page for update. but its not automatic and need to user to update application
  2. too , i find this link tutorial-how-to-implement-in-app-update-functionality-in-your-iphoneipad-app that writen in ObjectiveC language , but i not test this way and i'm not sure to properly perform
Community
  • 1
  • 1
Saeid
  • 2,261
  • 4
  • 27
  • 59
  • do you know if there's a similar mechanism for iOS ? – Bart Calixto Jan 06 '17 at 14:04
  • actually it's no more time that i start IOS developing but edit my answer for the way I think is right – Saeid Jan 06 '17 at 14:06
  • @Saeid your second iOS link says nothing about updating your app. It just a simple switch to enable features when some purchased the full version via IAP. – rckoenes Jan 06 '17 at 14:19
  • oh sorry i did not care , but as here say : http://stackoverflow.com/questions/2221436/can-i-force-an-iphone-user-to-upgrade-an-application , seem no way update automatically for IOS – Saeid Jan 06 '17 at 14:22