Giter Site home page Giter Site logo

checkupdateios's Introduction

CheckUpdateiOS

时间比较紧急写的,欢迎大家来完善。

使用iOS自动更新检测

在App提交到appStore后,通过app store上查询,可以获取到app的作者,连接,版本等。 点击查看官方文档

可以通过如下请求得到App的详细信息: http://itunes.apple.com/lookup?id=应用程序的ID 具体就不再细说了。


在Xcode工程中导入相关代码

1.加载头文件#import "UMCheckUpdate.h"

2.然后在–application:didFinishLaunchingWithOptions:中添加

[UMCheckUpdate checkUpdateWithAppID:(NSString *)appId];

appId 是app在appstore的ID

3.部分情况下,检测更新的地址和App的主页地址和默认的可能有点不一样。

这个时候就需要用

+ (void)checkUpdateWithAppID:(NSString *)appId
              checkUpdateUrl:(NSString *)checkUrl
                     homeUrl:(NSString *)homeUrl;

checkUrl 是上面提到的检测更新的地址 homeUrl 是app在appstore主页的地址

4.如果想对UIAlertView的标题和按钮文字做多国语言支持,则需要对下面三个词组做翻译。

umUpdateTitle :标题

umUpdateCancel : 放弃按钮

umUpdateOK : 确定按钮

当然您可以更简单的自定义标题和按钮的文字

+ (void)checkUpdateWithAppID:(NSString *)appId
              checkUpdateUrl:(NSString *)checkUrl
                     homeUrl:(NSString *)homeUrl
                       title:(NSString *)title
           cancelButtonTitle:(NSString *)cancelTitle
           otherButtonTitles:(NSString *)otherTitle;

5.App有两个版本号,一个是Version,另一个是Build,对应于Info.plist的字段名分别为CFBundleShortVersionString,CFBundleVersion。 AppSotre默认取的是Version号。

checkupdateios's People

Contributors

kkme avatar

Watchers

YoungDone avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.