revert ios bundle detect
This commit is contained in:
parent
7152ef7304
commit
3ba1df2020
@ -53,7 +53,6 @@ typedef NS_ENUM(NSInteger, PushyType) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static BOOL ignoreRollback = false;
|
static BOOL ignoreRollback = false;
|
||||||
static BOOL isUsingBundleUrl = false;
|
|
||||||
|
|
||||||
@implementation RCTPushy {
|
@implementation RCTPushy {
|
||||||
RCTPushyManager *_fileManager;
|
RCTPushyManager *_fileManager;
|
||||||
@ -66,7 +65,6 @@ RCT_EXPORT_MODULE(RCTPushy);
|
|||||||
|
|
||||||
+ (NSURL *)bundleURL
|
+ (NSURL *)bundleURL
|
||||||
{
|
{
|
||||||
isUsingBundleUrl = true;
|
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
|
NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
|
||||||
@ -163,7 +161,6 @@ RCT_EXPORT_MODULE(RCTPushy);
|
|||||||
ret[@"uuid"] = [defaults objectForKey:keyUuid];
|
ret[@"uuid"] = [defaults objectForKey:keyUuid];
|
||||||
NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
|
NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
|
||||||
ret[@"currentVersion"] = [pushyInfo objectForKey:paramCurrentVersion];
|
ret[@"currentVersion"] = [pushyInfo objectForKey:paramCurrentVersion];
|
||||||
ret[@"isUsingBundleUrl"] = @(isUsingBundleUrl);
|
|
||||||
|
|
||||||
// clear isFirstTimemarked
|
// clear isFirstTimemarked
|
||||||
if (ret[@"isFirstTime"]) {
|
if (ret[@"isFirstTime"]) {
|
||||||
|
@ -44,7 +44,7 @@ export const buildTime = PushyConstants.buildTime;
|
|||||||
let blockUpdate = PushyConstants.blockUpdate;
|
let blockUpdate = PushyConstants.blockUpdate;
|
||||||
let uuid = PushyConstants.uuid;
|
let uuid = PushyConstants.uuid;
|
||||||
|
|
||||||
if (!PushyConstants.isUsingBundleUrl) {
|
if (Platform.OS === 'android' && !PushyConstants.isUsingBundleUrl) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
'react-native-update模块无法加载,请对照文档检查Bundle URL的配置',
|
'react-native-update模块无法加载,请对照文档检查Bundle URL的配置',
|
||||||
);
|
);
|
||||||
@ -125,6 +125,7 @@ export const cInfo = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function assertRelease() {
|
function assertRelease() {
|
||||||
|
// @ts-expect-error
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
throw new Error('react-native-update 只能在 RELEASE 版本中运行.');
|
throw new Error('react-native-update 只能在 RELEASE 版本中运行.');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user