@@ -8,7 +8,7 @@ const isAndroid = Platform.OS === 'android';
88
99const VERSION_NAME = RNEasyUpgrade . versionName ;
1010const VERSION_CODE = RNEasyUpgrade . versionCode ;
11- const DEFAULT_DOWNLOAD_APK_NAME = `Temp_App ${ VERSION_NAME } 2 .apk` ;
11+ const DEFAULT_DOWNLOAD_APK_NAME = `newVersion .apk` ;
1212
1313const DocumentDirectoryPath = isAndroid && RNEasyUpgrade . RNDocumentDirectoryPath ;
1414
@@ -17,7 +17,7 @@ const defaults = {
1717 downloadTitle : '下载更新包' ,
1818 downloadDescription : '新版本更新包下载中' ,
1919 downloadDestDirectory : DocumentDirectoryPath ,
20- downloadDestPath : ` ${ DocumentDirectoryPath } / ${ DEFAULT_DOWNLOAD_APK_NAME } ` ,
20+ downloadApkName : DEFAULT_DOWNLOAD_APK_NAME ,
2121 downloadApkEnd : path => RNEasyUpgrade . installApk ( path ) ,
2222 onError : ( ) => { }
2323} ;
@@ -34,7 +34,7 @@ class AppUpgrade {
3434 }
3535
3636 get downloadDestPath ( ) {
37- return this . options . downloadDestPath ;
37+ return this . options . downloadDestDirectory + this . options . downloadApkName ;
3838 }
3939
4040 get downloadDestDirectory ( ) {
@@ -76,7 +76,7 @@ class AppUpgrade {
7676 const downloadConf = {
7777 downloadTitle : this . options . downloadTitle ,
7878 downloadDescription : this . options . downloadDescription ,
79- saveAsName : DEFAULT_DOWNLOAD_APK_NAME ,
79+ saveAsName : this . options . downloadApkName ,
8080 allowedInRoaming : true ,
8181 allowedInMetered : true ,
8282 showInDownloads : true ,
0 commit comments