You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by mo...@apache.org on 2019/04/28 08:19:18 UTC

[incubator-weex] branch master updated: [iOS] fix crash when platformBridge is nil on eagle

This is an automated email from the ASF dual-hosted git repository.

moshen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new d55f169  [iOS] fix crash when platformBridge is nil on eagle
     new b6f0175  Merge pull request #2375 from jianhan-he/master
d55f169 is described below

commit d55f169ff444ad3060fda87c156cd2d70145371f
Author: linghe.lh <li...@alibaba-inc.com>
AuthorDate: Sun Apr 28 15:48:18 2019 +0800

    [iOS] fix crash when platformBridge is nil on eagle
---
 ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index 096f155..d5be31b 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -238,6 +238,7 @@ typedef enum : NSUInteger {
         WXLogError(@"Url must be passed if you use renderWithURL");
         return;
     }
+    [WXCoreBridge install];
 
     _scriptURL = url;
     [self _checkPageName];
@@ -256,7 +257,8 @@ typedef enum : NSUInteger {
 {
     _options = [options isKindOfClass:[NSDictionary class]] ? options : nil;
     _jsData = data;
-    
+    [WXCoreBridge install];
+
     self.needValidate = [[WXHandlerFactory handlerForProtocol:@protocol(WXValidateProtocol)] needValidate:self.scriptURL];
 
     if ([source isKindOfClass:[NSString class]]) {