expo-updates 0.10.8 → 0.10.12
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 +21 -0
- package/android/build.gradle +2 -2
- package/ios/EXUpdates/AppLauncher/EXUpdatesAppLauncherNoDatabase.m +2 -1
- package/ios/EXUpdates/AppLauncher/EXUpdatesAppLauncherWithDatabase.m +8 -2
- package/ios/EXUpdates/AppLoader/EXUpdatesEmbeddedAppLoader.m +2 -3
- package/ios/EXUpdates/EXUpdatesAppDelegate.m +6 -1
- package/ios/EXUpdates/EXUpdatesUtils.h +3 -0
- package/ios/EXUpdates/EXUpdatesUtils.m +14 -0
- package/package.json +2 -2
- package/scripts/create-manifest-ios.sh +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,11 +10,32 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.10.12 — 2021-11-04
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Workaround for bridge being initialized twice on startup. ([#15019](https://github.com/expo/expo/pull/15019) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
19
|
+
## 0.10.11 — 2021-11-02
|
|
20
|
+
|
|
21
|
+
### 🐛 Bug fixes
|
|
22
|
+
|
|
23
|
+
- Fix handling of unexpectedly missing assets on iOS. ([#15008](https://github.com/expo/expo/pull/15008) by [@esamelson](https://github.com/esamelson))
|
|
24
|
+
|
|
25
|
+
## 0.10.10 — 2021-11-02
|
|
26
|
+
|
|
27
|
+
_This version does not introduce any user-facing changes._
|
|
28
|
+
|
|
29
|
+
## 0.10.9 — 2021-10-29
|
|
30
|
+
|
|
31
|
+
_This version does not introduce any user-facing changes._
|
|
32
|
+
|
|
13
33
|
## 0.10.8 — 2021-10-29
|
|
14
34
|
|
|
15
35
|
### 🐛 Bug fixes
|
|
16
36
|
|
|
17
37
|
- Fix Android app.manifest not generated from [#14938](https://github.com/expo/expo/pull/14938) regression. ([#14953](https://github.com/expo/expo/pull/14953) by [@kudo](https://github.com/kudo))
|
|
38
|
+
- Fix iOS app.manifest generation error in `eas build --local` mode. ([#14956](https://github.com/expo/expo/pull/14956) by [@kudo](https://github.com/kudo))
|
|
18
39
|
|
|
19
40
|
## 0.10.7 — 2021-10-29
|
|
20
41
|
|
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.12'
|
|
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.12'
|
|
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
|
}
|
|
@@ -261,7 +261,13 @@ static NSString * const EXUpdatesAppLauncherErrorDomain = @"AppLauncher";
|
|
|
261
261
|
|
|
262
262
|
if (matchingAsset && matchingAsset.mainBundleFilename) {
|
|
263
263
|
dispatch_async([EXUpdatesFileDownloader assetFilesQueue], ^{
|
|
264
|
-
NSString *bundlePath = [
|
|
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
|
+
}
|
|
265
271
|
NSError *error;
|
|
266
272
|
BOOL success = [NSFileManager.defaultManager copyItemAtPath:bundlePath toPath:[assetLocalUrl path] error:&error];
|
|
267
273
|
dispatch_async(self->_launcherQueue, ^{
|
|
@@ -271,7 +277,7 @@ static NSString * const EXUpdatesAppLauncherErrorDomain = @"AppLauncher";
|
|
|
271
277
|
return;
|
|
272
278
|
}
|
|
273
279
|
}
|
|
274
|
-
|
|
280
|
+
|
|
275
281
|
completion(NO, nil);
|
|
276
282
|
}
|
|
277
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) {
|
|
@@ -53,9 +53,14 @@ EX_REGISTER_SINGLETON_MODULE(EXUpdatesAppDelegate)
|
|
|
53
53
|
// we just skip in this case.
|
|
54
54
|
return NO;
|
|
55
55
|
}
|
|
56
|
+
UIWindow *window = application.delegate.window;
|
|
57
|
+
if ([window.rootViewController.view isKindOfClass:[RCTRootView class]]) {
|
|
58
|
+
RCTRootView *rootView = (RCTRootView *)window.rootViewController.view;
|
|
59
|
+
[rootView.bridge invalidate];
|
|
60
|
+
}
|
|
56
61
|
self.launchOptions = launchOptions;
|
|
57
62
|
controller.delegate = self;
|
|
58
|
-
[controller startAndShowLaunchScreen:
|
|
63
|
+
[controller startAndShowLaunchScreen:window];
|
|
59
64
|
return YES;
|
|
60
65
|
}
|
|
61
66
|
|
|
@@ -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.12",
|
|
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": "41c62d399d0eb8588b8d55919697fdb6760c3eac"
|
|
54
54
|
}
|
|
@@ -37,11 +37,13 @@ if [ "x$PROJECT_DIR_BASENAME" != "xPods" ]; then
|
|
|
37
37
|
fi
|
|
38
38
|
|
|
39
39
|
# ref: https://github.com/facebook/react-native/blob/c974cbff04a8d90ac0f856dbada3fc5a75c75b49/scripts/react-native-xcode.sh#L59-L65
|
|
40
|
-
EXPO_UPDATES_PACKAGE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
40
|
+
EXPO_UPDATES_PACKAGE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
|
41
41
|
# If PROJECT_ROOT is not specified, fallback to use Xcode PROJECT_DIR
|
|
42
42
|
PROJECT_ROOT=${PROJECT_ROOT:-"$PROJECT_DIR/../.."}
|
|
43
43
|
PROJECT_ROOT=${PROJECT_ROOT:-"$EXPO_UPDATES_PACKAGE_DIR/../.."}
|
|
44
44
|
|
|
45
45
|
cd "$PROJECT_ROOT" || exit
|
|
46
|
+
# We should get the physical path (/var/folders -> /private/var/folders) for metro to resolve correct files
|
|
47
|
+
PROJECT_ROOT="$(pwd -P)"
|
|
46
48
|
|
|
47
49
|
"$NODE_BINARY" "${EXPO_UPDATES_PACKAGE_DIR}/scripts/createManifest.js" ios "$PROJECT_ROOT" "$DEST/$RESOURCE_BUNDLE_NAME"
|