You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by kfeagle <gi...@git.apache.org> on 2017/08/10 06:26:56 UTC

[GitHub] incubator-weex pull request #585: + [ios] support call native directly

GitHub user kfeagle opened a pull request:

    https://github.com/apache/incubator-weex/pull/585

    + [ios] support call native directly

    
    user can call native function if user  realize the function WXExtendCallNativeProtocol
    demo
    ```
    
    <template>
      <div class="wrapper" @click="update">
        <image :src="logoUrl" class="logo"></image>
        <text class="title">Hello {{target}}</text>
      </div>
    </template>
    
    <style scoped>
      .wrapper {align-items: center; margin-top: 120px;}
      .title {font-size: 48px;}
      .logo {width: 360px; height: 82px;}
    </style>
    
    <script>
      var modal = weex.requireModule('modal')
      module.exports = {
        data: {
          logoUrl: 'https://alibaba.github.io/weex/img/weex_logo_blue@3x.png',
          target: 'World'
        },
        methods: {
          update: function (e) {
            this.target = 'Weex'
            console.log('target:', this.target)
            var dict = extendCallNative({
              'className':'test'
            })
            modal.toast({
              'message': dict['value'],
              'duration': 1000
            })
          }
        }
      }
    </script>
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kfeagle/incubator-weex ios-native-0.16-dev

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-weex/pull/585.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #585
    
----
commit b3e404937bafa77cee4544c97598c1c4ec6ef2ed
Author: 齐山 <su...@163.com>
Date:   2017-07-23T13:30:45Z

    + [ios] support extend call native for third part

commit 6225ed13d9ae3dda08c848abe3ba8f669037b296
Author: 齐山 <su...@163.com>
Date:   2017-07-27T04:16:51Z

    + [ios] add extend call native

commit 51009919269b7fecbe0da5adc832efbdcc1f5603
Author: 齐山 <su...@163.com>
Date:   2017-07-27T04:21:01Z

    Merge branch '0.16-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into ios-native-0.16-dev
    
    # Conflicts:
    #	ios/playground/WeexDemo.xcodeproj/project.pbxproj
    #	ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m

commit 4d78365d0099bebd598351959ac0c4a0e0a30dc0
Author: 齐山 <su...@163.com>
Date:   2017-08-08T08:38:23Z

    + [ios] update native logic

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex issue #585: + [ios] support call native directly

Posted by weex-bot <gi...@git.apache.org>.
Github user weex-bot commented on the issue:

    https://github.com/apache/incubator-weex/pull/585
  
    
    <!--
      5 failure:  This PR modify SD..., Code file ios/pla..., Code file ios/pla..., Code file ios/sdk..., Code file ios/sdk...
      2 warning:  No Changelog chan..., This PR should up...
      1 messages
      
    -->
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Fails</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:no_entry_sign:</td>
          <td>This PR modify SDK code. Please add/modify corresponding testcases. If it is ok, please comment about it. Or put '@notdanger' in you commit message.</td>
        </tr>
      
    <tr>
          <td>:no_entry_sign:</td>
          <td>Code file ios/playground/WeexDemo/WXExtendCallNativeTest.h does not have the copyright header.</td>
        </tr>
      
    <tr>
          <td>:no_entry_sign:</td>
          <td>Code file ios/playground/WeexDemo/WXExtendCallNativeTest.m does not have the copyright header.</td>
        </tr>
      
    <tr>
          <td>:no_entry_sign:</td>
          <td>Code file ios/sdk/WeexSDK/Sources/Manager/WXExtendCallNativeManager.h does not have the copyright header.</td>
        </tr>
      
    <tr>
          <td>:no_entry_sign:</td>
          <td>Code file ios/sdk/WeexSDK/Sources/Manager/WXExtendCallNativeManager.m does not have the copyright header.</td>
        </tr>
      </tbody>
    </table>
    
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Warnings</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:warning:</td>
          <td>No Changelog changes!</td>
        </tr>
      
    <tr>
          <td>:warning:</td>
          <td>This PR should update related documents as well. </td>
        </tr>
      </tbody>
    </table>
    
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Messages</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:book:</td>
          <td>According to the blame info, we recommended @boboning , @acton393 to be the reviewers.</td>
        </tr>
      </tbody>
    </table>
    
    
    <p align="right">
      Generated by :no_entry_sign: <a href="http://github.com/danger/danger-js/">dangerJS</a>
    </p>



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex pull request #585: + [ios] support call native directly

Posted by acton393 <gi...@git.apache.org>.
Github user acton393 commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/585#discussion_r132384096
  
    --- Diff: ios/playground/WeexDemo/WXExtendCallNativeTest.h ---
    @@ -0,0 +1,14 @@
    +//
    +//  WXExtendCallNativeTest.h
    +//  WeexDemo
    +//
    +//  Created by 齐山 on 2017/7/27.
    +//  Copyright © 2017年 taobao. All rights reserved.
    +//
    +
    +#import <Foundation/Foundation.h>
    --- End diff --
    
    the file header may change to the template 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex pull request #585: + [ios] support call native directly

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-weex/pull/585


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex pull request #585: + [ios] support call native directly

Posted by kfeagle <gi...@git.apache.org>.
Github user kfeagle commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/585#discussion_r132398202
  
    --- Diff: ios/playground/WeexDemo/WXExtendCallNativeTest.h ---
    @@ -0,0 +1,14 @@
    +//
    +//  WXExtendCallNativeTest.h
    +//  WeexDemo
    +//
    +//  Created by 齐山 on 2017/7/27.
    +//  Copyright © 2017年 taobao. All rights reserved.
    +//
    +
    +#import <Foundation/Foundation.h>
    --- End diff --
    
    added it:-)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---