expo-updates 0.10.10 → 0.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/android/build.gradle +2 -2
- package/ios/EXUpdates/AppLauncher/EXUpdatesAppLauncherNoDatabase.m +2 -1
- package/ios/EXUpdates/AppLauncher/EXUpdatesAppLauncherWithDatabase.m +8 -6
- package/ios/EXUpdates/AppLoader/EXUpdatesEmbeddedAppLoader.m +2 -3
- package/ios/EXUpdates/EXUpdatesUtils.h +3 -0
- package/ios/EXUpdates/EXUpdatesUtils.m +14 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.10.11 — 2021-11-02
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fix handling of unexpectedly missing assets on iOS. ([#15008](https://github.com/expo/expo/pull/15008) by [@esamelson](https://github.com/esamelson))
|
|
18
|
+
|
|
13
19
|
## 0.10.10 — 2021-11-02
|
|
14
20
|
|
|
15
21
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '0.10.
|
|
6
|
+
version = '0.10.11'
|
|
7
7
|
|
|
8
8
|
apply from: "../scripts/create-manifest-android.gradle"
|
|
9
9
|
|
|
@@ -59,7 +59,7 @@ android {
|
|
|
59
59
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
60
60
|
targetSdkVersion safeExtGet("targetSdkVersion", 30)
|
|
61
61
|
versionCode 31
|
|
62
|
-
versionName '0.10.
|
|
62
|
+
versionName '0.10.11'
|
|
63
63
|
consumerProguardFiles("proguard-rules.pro")
|
|
64
64
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
65
65
|
// uncomment below to export the database schema when making changes
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
#import <EXUpdates/EXUpdatesAsset.h>
|
|
4
4
|
#import <EXUpdates/EXUpdatesAppLauncherNoDatabase.h>
|
|
5
5
|
#import <EXUpdates/EXUpdatesEmbeddedAppLoader.h>
|
|
6
|
+
#import <EXUpdates/EXUpdatesUtils.h>
|
|
6
7
|
|
|
7
8
|
NS_ASSUME_NONNULL_BEGIN
|
|
8
9
|
|
|
@@ -30,7 +31,7 @@ static NSString * const EXUpdatesErrorLogFile = @"expo-error.log";
|
|
|
30
31
|
|
|
31
32
|
NSMutableDictionary *assetFilesMap = [NSMutableDictionary new];
|
|
32
33
|
for (EXUpdatesAsset *asset in _launchedUpdate.assets) {
|
|
33
|
-
NSURL *localUrl = [
|
|
34
|
+
NSURL *localUrl = [EXUpdatesUtils urlForBundledAsset:asset];
|
|
34
35
|
if (localUrl && asset.key) {
|
|
35
36
|
assetFilesMap[asset.key] = localUrl.absoluteString;
|
|
36
37
|
}
|
|
@@ -260,12 +260,14 @@ static NSString * const EXUpdatesAppLauncherErrorDomain = @"AppLauncher";
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
if (matchingAsset && matchingAsset.mainBundleFilename) {
|
|
263
|
-
NSString *bundlePath = [[NSBundle mainBundle] pathForResource:matchingAsset.mainBundleFilename ofType:matchingAsset.type];
|
|
264
|
-
if (bundlePath == nil) {
|
|
265
|
-
completion(NO, nil);
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
263
|
dispatch_async([EXUpdatesFileDownloader assetFilesQueue], ^{
|
|
264
|
+
NSString *bundlePath = [EXUpdatesUtils pathForBundledAsset:matchingAsset];
|
|
265
|
+
if (bundlePath == nil) {
|
|
266
|
+
dispatch_async(self->_launcherQueue, ^{
|
|
267
|
+
completion(NO, [NSError errorWithDomain:EXUpdatesAppLauncherErrorDomain code:1013 userInfo:@{NSLocalizedDescriptionKey: @"Asset bundlePath was unexpectedly nil"}]);
|
|
268
|
+
});
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
269
271
|
NSError *error;
|
|
270
272
|
BOOL success = [NSFileManager.defaultManager copyItemAtPath:bundlePath toPath:[assetLocalUrl path] error:&error];
|
|
271
273
|
dispatch_async(self->_launcherQueue, ^{
|
|
@@ -275,7 +277,7 @@ static NSString * const EXUpdatesAppLauncherErrorDomain = @"AppLauncher";
|
|
|
275
277
|
return;
|
|
276
278
|
}
|
|
277
279
|
}
|
|
278
|
-
|
|
280
|
+
|
|
279
281
|
completion(NO, nil);
|
|
280
282
|
}
|
|
281
283
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#import <EXUpdates/EXUpdatesFileDownloader.h>
|
|
4
4
|
#import <EXUpdates/EXUpdatesEmbeddedAppLoader.h>
|
|
5
|
+
#import <EXUpdates/EXUpdatesUtils.h>
|
|
5
6
|
|
|
6
7
|
NS_ASSUME_NONNULL_BEGIN
|
|
7
8
|
|
|
@@ -101,9 +102,7 @@ static NSString * const EXUpdatesEmbeddedAppLoaderErrorDomain = @"EXUpdatesEmbed
|
|
|
101
102
|
});
|
|
102
103
|
} else {
|
|
103
104
|
NSAssert(asset.mainBundleFilename, @"embedded asset mainBundleFilename must be nonnull");
|
|
104
|
-
NSString *bundlePath = asset
|
|
105
|
-
? [[NSBundle mainBundle] pathForResource:asset.mainBundleFilename ofType:asset.type inDirectory:asset.mainBundleDir]
|
|
106
|
-
: [[NSBundle mainBundle] pathForResource:asset.mainBundleFilename ofType:asset.type];
|
|
105
|
+
NSString *bundlePath = [EXUpdatesUtils pathForBundledAsset:asset];
|
|
107
106
|
NSAssert(bundlePath, @"NSBundle must contain the expected assets");
|
|
108
107
|
|
|
109
108
|
if (!bundlePath) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#import <React/RCTBridge.h>
|
|
4
4
|
|
|
5
|
+
#import <EXUpdates/EXUpdatesAsset.h>
|
|
5
6
|
#import <EXUpdates/EXUpdatesConfig.h>
|
|
6
7
|
|
|
7
8
|
NS_ASSUME_NONNULL_BEGIN
|
|
@@ -14,6 +15,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
14
15
|
+ (void)sendEventToBridge:(nullable RCTBridge *)bridge withType:(NSString *)eventType body:(NSDictionary *)body;
|
|
15
16
|
+ (BOOL)shouldCheckForUpdateWithConfig:(EXUpdatesConfig *)config;
|
|
16
17
|
+ (NSString *)getRuntimeVersionWithConfig:(EXUpdatesConfig *)config;
|
|
18
|
+
+ (NSURL *)urlForBundledAsset:(EXUpdatesAsset *)asset;
|
|
19
|
+
+ (NSString *)pathForBundledAsset:(EXUpdatesAsset *)asset;
|
|
17
20
|
|
|
18
21
|
@end
|
|
19
22
|
|
|
@@ -104,6 +104,20 @@ static NSString * const EXUpdatesUtilsErrorDomain = @"EXUpdatesUtils";
|
|
|
104
104
|
return config.runtimeVersion ?: config.sdkVersion ?: @"1";
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
+ (NSURL *)urlForBundledAsset:(EXUpdatesAsset *)asset
|
|
108
|
+
{
|
|
109
|
+
return asset.mainBundleDir
|
|
110
|
+
? [[NSBundle mainBundle] URLForResource:asset.mainBundleFilename withExtension:asset.type subdirectory:asset.mainBundleDir]
|
|
111
|
+
: [[NSBundle mainBundle] URLForResource:asset.mainBundleFilename withExtension:asset.type];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
+ (NSString *)pathForBundledAsset:(EXUpdatesAsset *)asset
|
|
115
|
+
{
|
|
116
|
+
return asset.mainBundleDir
|
|
117
|
+
? [[NSBundle mainBundle] pathForResource:asset.mainBundleFilename ofType:asset.type inDirectory:asset.mainBundleDir]
|
|
118
|
+
: [[NSBundle mainBundle] pathForResource:asset.mainBundleFilename ofType:asset.type];
|
|
119
|
+
}
|
|
120
|
+
|
|
107
121
|
@end
|
|
108
122
|
|
|
109
123
|
NS_ASSUME_NONNULL_END
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-updates",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.11",
|
|
4
4
|
"description": "Fetches and manages remotely-hosted assets and updates to your app's JS bundle.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"fs-extra": "^9.1.0",
|
|
51
51
|
"memfs": "^3.2.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "0803ed01bfe56c3911db024457bcbcec79899706"
|
|
54
54
|
}
|