greedpatch-ios 0.1.3

greedpatch-ios 0.1.3

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Mar 2017

Maintained by Bell.



 
Depends on:
AFNetworking>= 0
ZipArchive>= 0
FileMD5Hash>= 0
JSPatch>= 0
JSPatch/Extensions>= 0
JSPatch/JPCFunction>= 0
JSPatch/JPBlock>= 0
JSPatch/JPCFunctionBinder>= 0
 

  • By
  • Bell

iOS SDK for greedpatch

English | 中文

Installation

greedpatch-ios is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "greedpatch-ios"

Usage

Write patch files

Write js files with JSPatch in your project.

Config greedpatch

config greedpatch like

[[GRPPatchManager sharedInstance] setProjectId:@"57d61489f0068561dce9baee"];
[[GRPPatchManager sharedInstance] setToken:@"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0NzM2NDg2MzA0ODgsImlkIjoiNTdkM2JmMmY5MDE1ZWU0N2ZjYzNjYWJhIiwic2NvcGUiOiJwYXRjaDpjaGVjayJ9.YPedieEibUgLecWDmuIVIdkY_Ra-4Qa2HeIQpE7Z_k8"];
[[GRPPatchManager sharedInstance] setCompressPassword:@"compress_password"];

ProjectId

greedpatch > Create project > Project Detail. And then you can see Project ID

Token

visit Generate new token to generate it.

compressPassword

Used to encrypt you patch file.

Test patch

[[GRPPatchManager sharedInstance] testPatch];

test js files in your project

Compress patch

[[GRPPatchManager sharedInstance] compressPatch];

Compress js files in your project to a zip file, and generate the hash code for the zip file. You can see them in Xcode's console.

upload patch

greedpatch > select the project > click Create patch > upload zip file from the last step, click Upload > select the project version , input the hash from the last step > Create

Patch

[[GRPPatchManager sharedInstance] patch];

If there are patch available for current project version,the patch will come into effect

Check need patch

[[GRPPatchManager sharedInstance] requestPatch];

request remote server whether there a new patch for current project version.

Demo

Example

Thanks

JSPatch

License

greedpatch-ios is available under the MIT license. See the LICENSE file for more info.