开发者

Force user to update app

I'm building a multiplayer game app. The user will be have to connect to the intenet to use the app.

I want开发者_开发百科 to force the user to update the app if there is an update avilable on the app store, or he can't log in and play. Is there an API for what user's version? Also, will Apple agree to this like that - you must have an updated app, or you can't log in and play?


I think a better solution would be to just have the app send its version number to the server, and let the server decide whether to let that player play. That way, the server can be configured to allow whatever range of versions is valid, or can let players with matching versions play, even if neither has a completely-up-to-date version.

The app shouldn't have to know whether its own version is valid. It just needs to know how to handle a "Sorry, you can't play with that version" response from the server.


[[NSBundle mainBundle] objectForInfoDictionaryKey:
                       (NSString *)kCFBundleVersionKey]

Will return a NSString containing the current version of the app.


Apple has been reported to reject apps that expire. Furthermore the user of a device may not have continued access to the App store (parental controls, etc.) after your app has been installed, even if they have network access.

You might be able to pop-up a lot of ads for the new version sent from your network server that depend on version number.

You can easily build a version number into your source code, or read it from the app's plist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜