You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by cx...@apache.org on 2017/04/12 02:38:07 UTC

[1/2] incubator-weex git commit: + [doc] Add safety notice to extend-to-iOS documentation.

Repository: incubator-weex
Updated Branches:
  refs/heads/dev 5a15881fd -> d25919fdd


+ [doc] Add safety notice to extend-to-iOS documentation.


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

Branch: refs/heads/dev
Commit: 2ee7a184566b9f24fed5a068c4eed09ee75be544
Parents: 1b9da06
Author: \u9690\u98ce <cx...@apache.org>
Authored: Tue Apr 11 21:35:23 2017 +0800
Committer: \u9690\u98ce <cx...@apache.org>
Committed: Tue Apr 11 21:35:23 2017 +0800

----------------------------------------------------------------------
 doc/source/cn/guide/integrate-to-your-app.md       | 11 ++++++-----
 doc/source/cn/references/advanced/extend-to-ios.md |  6 ++++++
 doc/source/guide/integrate-to-your-app.md          |  5 +++--
 doc/source/references/advanced/extend-to-ios.md    |  6 ++++++
 4 files changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2ee7a184/doc/source/cn/guide/integrate-to-your-app.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/integrate-to-your-app.md b/doc/source/cn/guide/integrate-to-your-app.md
index 573e9cc..fcb6430 100644
--- a/doc/source/cn/guide/integrate-to-your-app.md
+++ b/doc/source/cn/guide/integrate-to-your-app.md
@@ -32,7 +32,7 @@ has_chapter_content: true
 \u6b65\u9aa4\u5982\u4e0b\uff1a  
 1. \u521b\u5efaAndroid\u5de5\u7a0b\uff0c\u6ca1\u6709\u4ec0\u4e48\u8981\u7279\u522b\u8bf4\u660e\u7684\uff0c\u6309\u7167\u4f60\u7684\u4e60\u60ef\u6765\u3002
 2. \u4fee\u6539build.gradle \u52a0\u5165\u5982\u4e0b\u57fa\u7840\u4f9d\u8d56  
-   
+
    ```gradle
    compile 'com.android.support:recyclerview-v7:23.1.1'
    compile 'com.android.support:support-v4:23.1.1'
@@ -40,7 +40,7 @@ has_chapter_content: true
    compile 'com.alibaba:fastjson:1.1.46.android'
    compile 'com.taobao.android:weex_sdk:0.5.1@aar'
    ```
-   
+
    \u6ce8:\u7248\u672c\u53ef\u4ee5\u9ad8\u4e0d\u53ef\u4ee5\u4f4e\u3002  
 
 #### \u4ee3\u7801\u5b9e\u73b0
@@ -229,7 +229,7 @@ WXSample\u5730\u5740
       pod 'WeexSDK', '0.9.5'   ## \u5efa\u8bae\u4f7f\u7528WeexSDK\u65b0\u7248\u672c 
   end
   ```
-    
+
 - \u6e90\u7801\u96c6\u6210
 
   \u9996\u5148 \u62f7\u8d1d `ios/sdk` \u76ee\u5f55\u5230\u4f60\u5df2\u6709\u9879\u76ee\u76ee\u5f55 (\u6b64\u5904\u4ee5\u62f7\u8d1d\u5230\u4f60\u5df2\u6709\u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e3a\u4f8b\u5b50)\uff0c\u7136\u540e\u5728 `Podfile` \u6587\u4ef6\u4e2d\u6dfb\u52a0
@@ -274,7 +274,7 @@ WXSample\u5730\u5740
 
 Weex \u652f\u6301\u6574\u4f53\u9875\u9762\u6e32\u67d3\u548c\u90e8\u5206\u6e32\u67d3\u4e24\u79cd\u6a21\u5f0f\uff0c\u4f60\u9700\u8981\u505a\u7684\u4e8b\u60c5\u662f\u7528\u6307\u5b9a\u7684 URL \u6e32\u67d3 Weex \u7684 view\uff0c\u7136\u540e\u6dfb\u52a0\u5230\u5b83\u7684\u7236\u5bb9\u5668\u4e0a\uff0c\u7236\u5bb9\u5668\u4e00\u822c\u90fd\u662f viewController\u3002
 
-```
+```objective-c
 #import <WeexSDK/WXSDKInstance.h>
 - (void)viewDidLoad 
 {
@@ -297,7 +297,8 @@ Weex \u652f\u6301\u6574\u4f53\u9875\u9762\u6e32\u67d3\u548c\u90e8\u5206\u6e32\u67d3\u4e24\u79cd\u6a21\u5f0f\uff0c\u4f60\u9700\u8981\u505a\u7684\u4e8b\u60c5
     _instance.renderFinish = ^ (UIView *view) {
         //process renderFinish
     };
-    [_instance renderWithURL:self.url options:@{@"bundleUrl":[self.url absoluteString]} data:nil];
+    NSURL *url = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"js"]
+    [_instance renderWithURL:url options:@{@"bundleUrl":[self.url absoluteString]} data:nil];
 }
 ```
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2ee7a184/doc/source/cn/references/advanced/extend-to-ios.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/advanced/extend-to-ios.md b/doc/source/cn/references/advanced/extend-to-ios.md
index c949ed2..5229201 100644
--- a/doc/source/cn/references/advanced/extend-to-ios.md
+++ b/doc/source/cn/references/advanced/extend-to-ios.md
@@ -5,6 +5,12 @@ order: 11.1
 version: 2.1
 ---
 
+## \u6ce8\u610f
+
+**Weex \u6240\u6709\u66b4\u9732\u7ed9  JS \u7684\u5185\u7f6e module \u6216 component API \u90fd\u662f\u5b89\u5168\u548c\u53ef\u63a7\u7684\uff0c \u5b83\u4eec\u4e0d\u4f1a\u53bb\u8bbf\u95ee\u7cfb\u7edf\u7684\u79c1\u6709 API \uff0c\u4e5f\u4e0d\u4f1a\u53bb\u505a\u4efb\u4f55 runtime \u4e0a\u7684 hack \u66f4\u4e0d\u4f1a\u53bb\u6539\u53d8\u5e94\u7528\u539f\u6709\u7684\u529f\u80fd\u5b9a\u4f4d\u3002**
+
+**\u5982\u679c\u9700\u8981\u6269\u5c55\u81ea\u5b9a\u4e49\u7684 module \u6216\u8005 component \uff0c\u4e00\u5b9a\u6ce8\u610f\u4e0d\u8981\u5c06 OC \u7684 runtime \u66b4\u9732\u7ed9 JS \uff0c \u4e0d\u8981\u5c06\u4e00\u4e9b\u8bf8\u5982 `dlopen()`\uff0c `dlsym()`\uff0c `respondsToSelector:`\uff0c`performSelector:`\uff0c`method_exchangeImplementations()` \u7684\u52a8\u6001\u548c\u4e0d\u53ef\u63a7\u7684\u65b9\u6cd5\u66b4\u9732\u7ed9JS\uff0c \u4e5f\u4e0d\u8981\u5c06\u7cfb\u7edf\u7684\u79c1\u6709API\u66b4\u9732\u7ed9JS**
+
 ## Module \u6269\u5c55
 
 [swift](https://github.com/weexteam/article/issues/55) \u6269\u5c55 module 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2ee7a184/doc/source/guide/integrate-to-your-app.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/integrate-to-your-app.md b/doc/source/guide/integrate-to-your-app.md
index dd5d855..55cbc64 100644
--- a/doc/source/guide/integrate-to-your-app.md
+++ b/doc/source/guide/integrate-to-your-app.md
@@ -29,7 +29,7 @@ Make sure the following configuration is complete:
 ### Quick to use
 If you are the first time to try or have a higher demand for stability, you can use the way to dependence on the SDK.      
 The steps are as follows:       
- 
+
 1. Create an Android project. There is nothing to be specified, according to your habits to.
 2. Update build.gradle by adding the following dependencies:
 
@@ -258,7 +258,8 @@ Weex supports both full page rendering and partial rendering. What you need to d
     _instance.renderFinish = ^ (UIView *view) {
         //process renderFinish
     };
-    [_instance renderWithURL:self.url options:@{@"bundleUrl":[self.url absoluteString]} data:nil];
+    NSURL *url = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"js"]
+    [_instance renderWithURL:url options:@{@"bundleUrl":[self.url absoluteString]} data:nil];
 }
 ```
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2ee7a184/doc/source/references/advanced/extend-to-ios.md
----------------------------------------------------------------------
diff --git a/doc/source/references/advanced/extend-to-ios.md b/doc/source/references/advanced/extend-to-ios.md
index 2891a9f..a6646b9 100644
--- a/doc/source/references/advanced/extend-to-ios.md
+++ b/doc/source/references/advanced/extend-to-ios.md
@@ -7,6 +7,12 @@ version: 2.1
 
 # Extend to iOS
 
+#### Notice
+
+**All of the exported APIs in Weex are controllable and safe, they can not access private APIs or do any system hacks at runtime,  neither can they change the primary purpose of the Application**.
+
+**If you are extending your custom modules/components,  be sure NOT to export the ability of Objective-C runtime, be sure NOT to export  dynamic and uncontrolled methods such as `dlopen()`, `dlsym()`, `respondsToSelector:`, `performSelector:`, `method_exchangeImplementations()`, be sure NOT to export any private methods. **
+
 ### Module extend
 
 Weex SDK provides only rendering capabilities, rather than have other capabilities, such as network, picture, and URL redirection. If you want these features, you need to implement it.


[2/2] incubator-weex git commit: Merge branch 'dev' of https://github.com/cxfeng1/incubator-weex into dev

Posted by cx...@apache.org.
Merge branch 'dev' of https://github.com/cxfeng1/incubator-weex into dev


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

Branch: refs/heads/dev
Commit: d25919fdd306f453d8f7914b83814835b0e619e8
Parents: 5a15881 2ee7a18
Author: cxfeng <cx...@apache.org>
Authored: Wed Apr 12 10:37:56 2017 +0800
Committer: cxfeng <cx...@apache.org>
Committed: Wed Apr 12 10:37:56 2017 +0800

----------------------------------------------------------------------
 doc/source/cn/guide/integrate-to-your-app.md       | 11 ++++++-----
 doc/source/cn/references/advanced/extend-to-ios.md |  6 ++++++
 doc/source/guide/integrate-to-your-app.md          |  5 +++--
 doc/source/references/advanced/extend-to-ios.md    |  6 ++++++
 4 files changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------