From 2d603c64bfc99767a20e685a1d7583daa283f615 Mon Sep 17 00:00:00 2001 From: Heo Sangmin Date: Fri, 5 Feb 2021 03:27:53 +0900 Subject: [PATCH] fix: use NSDocumentDirectory to find start page --- ios/Plugin/CodePush.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Plugin/CodePush.m b/ios/Plugin/CodePush.m index 9461803e..f923d7c9 100644 --- a/ios/Plugin/CodePush.m +++ b/ios/Plugin/CodePush.m @@ -420,8 +420,8 @@ - (NSString*)getConfigLaunchUrl - (NSURL *)getStartPageURLForLocalPackage:(NSString*)packageLocation { if (packageLocation) { NSString* startPage = [self getConfigLaunchUrl]; - NSString* libraryLocation = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; - NSArray* realLocationArray = @[libraryLocation, @"NoCloud", packageLocation, @"www", startPage]; + NSString* libraryLocation = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; + NSArray* realLocationArray = @[libraryLocation, packageLocation, @"www", startPage]; NSString* realStartPageLocation = [NSString pathWithComponents:realLocationArray]; if ([[NSFileManager defaultManager] fileExistsAtPath:realStartPageLocation]) { // Fixes WKWebView unable to load start page from CodePush update directory