You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2017/08/17 03:39:00 UTC

incubator-weex git commit: Revert "* [ios] use viewController as pageName"

Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev 63dc11407 -> 36352f2d9


Revert "* [ios] use viewController as pageName"

This reverts commit 63dc11407aa6d1f2e766d14e1f1ffe6c008c33a6.


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/36352f2d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/36352f2d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/36352f2d

Branch: refs/heads/0.16-dev
Commit: 36352f2d9ab0b1121d2ade48bbda840042367383
Parents: 63dc114
Author: acton393 <zh...@gmail.com>
Authored: Thu Aug 17 11:39:08 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Aug 17 11:39:08 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/36352f2d/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index 226b808..b593621 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -175,16 +175,12 @@ typedef enum : NSUInteger {
     if (![WXUtility isBlankString:self.pageName]) {
         WXLog(@"Start rendering page:%@", self.pageName);
     } else {
-        if (self.viewController) {
-            self.pageName = NSStringFromClass([self.viewController class]);
-        } else {
-            WXLogWarning(@"WXSDKInstance's pageName should be specified.");
-            id<WXJSExceptionProtocol> jsExceptionHandler = [WXHandlerFactory handlerForProtocol:@protocol(WXJSExceptionProtocol)];
-            if ([jsExceptionHandler respondsToSelector:@selector(onRuntimeCheckException:)]) {
-                WXRuntimeCheckException * runtimeCheckException = [WXRuntimeCheckException new];
-                runtimeCheckException.exception = @"We highly recommend you to set pageName.\n Using WXSDKInstance * instance = [WXSDKInstance new]; instance.pageName = @\"your page name\" to fix it";
-                [jsExceptionHandler onRuntimeCheckException:runtimeCheckException];
-            }
+        WXLogWarning(@"WXSDKInstance's pageName should be specified.");
+        id<WXJSExceptionProtocol> jsExceptionHandler = [WXHandlerFactory handlerForProtocol:@protocol(WXJSExceptionProtocol)];
+        if ([jsExceptionHandler respondsToSelector:@selector(onRuntimeCheckException:)]) {
+            WXRuntimeCheckException * runtimeCheckException = [WXRuntimeCheckException new];
+            runtimeCheckException.exception = @"We highly recommend you to set pageName.\n Using WXSDKInstance * instance = [WXSDKInstance new]; instance.pageName = @\"your page name\" to fix it";
+            [jsExceptionHandler onRuntimeCheckException:runtimeCheckException];
         }
     }