iOS SDK for greedpatch
English | 中文
greedpatch-ios is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "greedpatch-ios"
Write js files with JSPatch in your project.
config greedpatch like
[[GRPPatchManager sharedInstance] setProjectId:@"57d61489f0068561dce9baee"];
[[GRPPatchManager sharedInstance] setToken:@"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0NzM2NDg2MzA0ODgsImlkIjoiNTdkM2JmMmY5MDE1ZWU0N2ZjYzNjYWJhIiwic2NvcGUiOiJwYXRjaDpjaGVjayJ9.YPedieEibUgLecWDmuIVIdkY_Ra-4Qa2HeIQpE7Z_k8"];
[[GRPPatchManager sharedInstance] setCompressPassword:@"compress_password"];
greedpatch > Create project
> Project Detail
. And then you can see Project ID
visit Generate new token to generate it.
Used to encrypt you patch file.
[[GRPPatchManager sharedInstance] testPatch];
test js files in your project
[[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.
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
[[GRPPatchManager sharedInstance] patch];
If there are patch available for current project version,the patch will come into effect
[[GRPPatchManager sharedInstance] requestPatch];
request remote server whether there a new patch for current project version.
greedpatch-ios is available under the MIT license. See the LICENSE file for more info.