Giter VIP home page Giter VIP logo

xhversion's Introduction

#XHVersion

###一行代码检测App更新,无需添加AppId等任何信息

AppVeyor Carthage compatible Version Status Support Pod Platform Pod License

==============

###特性:

  • 1.一行代码检测App更新
  • 2.无需添加AppId等任何信息.
  • 3.支持自定义新版本提示框

###技术交流群(群号:537476189).

更新记录:

  • 2016.11.22 -- v1.0.0

###效果:

##API

  • 一共提供两个API
/**
 *  检测新版本(使用默认提示框)
 */
+(void)checkNewVersion;

/**
 *  检测新版本(自定义提示框)
 *
 *  @param newVersion 新版本信息回调
 */
+(void)checkNewVersionAndCustomAlert:(NewVersionBlock)newVersion;

使用方法

导入头文件 #import "XHVersion.h" ,在需要检测新版本的地方调用下面代码

    
     //1.新版本检测(使用默认提示框)
     [XHVersion checkNewVersion];
    

     //2.如果你需要自定义提示框,请使用下面方法
     [XHVersion checkNewVersionAndCustomAlert:^(XHAppInfo *appInfo) {
        
        //appInfo为新版本在AppStore相关信息
        //请在此处自定义您的提示框
        //......
        
    }];

安装

1.手动添加:

  • 1.将 XHVersion 文件夹添加到工程目录中
  • 2.导入 XHVersion.h

2.CocoaPods:

  • 1.在 Podfile 中添加 pod 'XHVersion'
  • 2.执行 pod install 或 pod update
  • 3.导入 XHVersion.h

Tips

  • 1.如果发现pod search XHVersion 搜索出来的不是最新版本,需要在终端执行cd ~/desktop退回到desktop,然后执行pod setup命令更新本地spec缓存(需要几分钟),然后再搜索就可以了
  • 2.如果你发现你执行pod install后,导入的不是最新版本,请删除Podfile.lock文件,在执行一次 pod install
  • 3.如果在使用过程中遇到BUG,希望你能Issues我,谢谢(或者尝试下载最新的代码看看BUG修复没有)

系统要求

  • 该项目最低支持 iOS 7.0 和 Xcode 7.0

许可证

XHVersion 使用 MIT 许可证,详情见 LICENSE 文件

xhversion's People

Contributors

coderzhuxh avatar

Watchers

James Cloos avatar ZeroJ 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.