1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-11-02 22:33:11 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

bug fixed

This commit is contained in:
lvbingru
2016-04-06 10:34:11 +08:00
parent af189f8a1a
commit 11ef71b978

View File

@@ -322,7 +322,7 @@ RCT_EXPORT_METHOD(markSuccess)
{ {
NSString *sourceOrigin = [[NSBundle mainBundle] resourcePath]; NSString *sourceOrigin = [[NSBundle mainBundle] resourcePath];
NSString *bundleOrigin = [[RCTHotUpdate binaryBundleURL] path]; NSString *bundleOrigin = [[RCTHotUpdate binaryBundleURL] path];
[self patch:hashName romBundle:bundleOrigin source:sourceOrigin callback:callback]; [self patch:hashName fromBundle:bundleOrigin source:sourceOrigin callback:callback];
} }
break; break;
case HotUpdateTypePatchFromPpk: case HotUpdateTypePatchFromPpk:
@@ -331,7 +331,7 @@ RCT_EXPORT_METHOD(markSuccess)
NSString *sourceOrigin = lastVertionDir; NSString *sourceOrigin = lastVertionDir;
NSString *bundleOrigin = [lastVertionDir stringByAppendingPathComponent:BUNDLE_FILE_NAME]; NSString *bundleOrigin = [lastVertionDir stringByAppendingPathComponent:BUNDLE_FILE_NAME];
[self patch:hashName romBundle:bundleOrigin source:sourceOrigin callback:callback]; [self patch:hashName fromBundle:bundleOrigin source:sourceOrigin callback:callback];
} }
break; break;
default: default:
@@ -345,7 +345,7 @@ RCT_EXPORT_METHOD(markSuccess)
}]; }];
} }
- (void)patch:(NSString *)hashName romBundle:(NSString *)bundleOrigin source:(NSString *)sourceOrigin callback:(void (^)(NSError *error))callback - (void)patch:(NSString *)hashName fromBundle:(NSString *)bundleOrigin source:(NSString *)sourceOrigin callback:(void (^)(NSError *error))callback
{ {
NSString *unzipDir = [[RCTHotUpdate downloadDir] stringByAppendingPathComponent:hashName]; NSString *unzipDir = [[RCTHotUpdate downloadDir] stringByAppendingPathComponent:hashName];
NSString *sourcePatch = [unzipDir stringByAppendingPathComponent:SOURCE_PATCH_NAME]; NSString *sourcePatch = [unzipDir stringByAppendingPathComponent:SOURCE_PATCH_NAME];