Git Product home page Git Product logo

incubator-weex's Introduction

Weex

A framework for building Mobile cross-platform UI.

Build Status

Join Us

Join us through mailing list.

Convenience Distribution

Since 0.28.0, Weex would publish two convince binary in each release for Android, please read the documentation about the detail.

Please take the above link seriously, otherwise you would be able to use the latest version of Weex.

platform status
Android sdk Download Or sdk_legacy Download
iOS Pod version Carthage compatible
Mobile Web npm version

Support Android 4.1 (API 16), iOS 9.0+ and WebKit 534.30+.

FYI: The mobile web render is not supported by Apache Weex officially

For Windows

First of all, compiling or building Weex from Windows is not supported officially.

You could install Git for Windows and run all the following commands in git-bash.

Good Luck.

Meet Weex

  • Install Weex Playground to see examples we already written.
  • If you want to write a demo, install weex-cli in Node.js 8.0+ and
  • Run weex init to generate & start a simple project in an empty folder.
  • Follow the instructions in the project README.
  • Enjoy it.

Use Weex

Android

You should install android environment before building.

You can either build Weex from IDE (Android Studio) or command line.

Build From Android Studio

  1. Open android directory in Android Studio.
  2. Run git submodule update --init --remote in android directory if this is the first time you try to run Weex.

Build From Command Line

Please read How To Build for detail.

iOS

You should install iOS environment before building.

You can either build Weex from IDE (XCode) or command line.

Build From XCode

  • Run playground

    • cd ios/playground
    • pod install
    • Open WeexDemo.xcworkspace in Xcode
    • Click (Run button) or use default shortcut cmd + r in Xcode
    • If you want to run the demo on your device, don't need to modify CURRENT_IP manually. In DemoDefine.h(you can search this file by Xcode default shortcut cmd + shift + o), modify CURRENT_IP to your local IP
  • integrate to your application

    • CocoaPods

      Add the following line to your Podfile:

      pod 'WeexSDK'
    

    run pod install

    • Carthage

      Add the following line to your Cartfile:

      github "apache/incubator-weex"
    

    Run carthage update, and you should now have the latest version of WeexSDK in your Carthage folder.

Build From Command Line

Please read How To Build for detail.

Mobile Web

Vue Render for Apache Weex is a third party plugin, and not developed nor maintained by Apache Weex.

see Vue Render for Apache Weex.

Third part plugin

There is a third party plugin provides for debugging purpose.

You can also view this page for all third party plugin.

Weex Community

Contributing

See Weex Contributing Guide for more information.

incubator-weex's People

Contributors

acton393 avatar atomtong avatar bluebird78999 avatar boboning avatar cxfeng1 avatar cxfeng1-zz avatar darin726 avatar doumafang avatar erha19 avatar fkysly avatar gurisxie avatar hanks10100 avatar jianhan-he avatar jinjiang avatar kfeagle avatar lucky-chen avatar luics avatar lvscar avatar miomin avatar misakuo avatar mrraindrop avatar sospartan avatar tancy avatar terrykingcha avatar wqyfavor avatar wrmswindmill avatar xkli avatar yangshengtao avatar yorkshen avatar zshshr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

incubator-weex's Issues

new Date().toLocaleDateString() bug?

for example: today is 08/03/2018;
in a IOS weex-platform: new Date().toLocaleDateString() > 2018/8/3
but in a android weex-platform: new Date().toLocaleDateString() > 2018/8/2
in a h5-platform, no matter in a IOS or Android platform: new Date().toLocaleDateString() > 2018/8/3

异常如下:java.lang.UnsatisfiedLinkError: No implementation found for boolean

Uploading WechatIMG17959.jpeg…
weex版本:Android:0.18.7-beta-1
项目ndk配置如下:
ndk {
abiFilters "armeabi", "x86"
}
这些机型运行报错,不知道是什么问题,错误信息如下:
java.lang.UnsatisfiedLinkError: No implementation found for boolean com.taobao.weex.bridge.WXBridge.nativeNotifyLayout(java.lang.String) (tried Java_com_taobao_weex_bridge_WXBridge_nativeNotifyLayout and Java_com_taobao_weex_bridge_WXBridge_nativeNotifyLayout__Ljava_lang_String_2)
at com.taobao.weex.bridge.WXBridge.nativeNotifyLayout(Native Method)
at com.taobao.weex.bridge.WXBridge.notifyLayout(WXBridge.java:534)
at com.taobao.weex.bridge.WXBridgeManager.notifyLayout(WXBridgeManager.java:2546)
at com.taobao.weex.WXSDKInstance.OnVSync(WXSDKInstance.java:1959)
at com.taobao.weex.RenderContainer.OnVSync(RenderContainer.java:110)
at com.taobao.weex.WeexFrameRateControl$1.doFrame(WeexFrameRateControl.java:51)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:765)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:549)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5258)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

picker is undefined !

Description

I try to import the picker module like this :
const picker = weex.requireModule('picker')
But when I tried to call it, like in the exemple
https://weex.apache.org/references/modules/picker.html

Nothing happend. So I put a console.log(picker) to see what inside.
But it return undefined
Then I tries to search in the source code.
I found this :

requireModule (moduleName) {
const metaMod = weex._meta.requiredModules
if (!metaMod[moduleName]) {
metaMod[moduleName] = 0
}
metaMod[moduleName]++
return weexModules[moduleName]
},

weexModules['picker'] is undefined and weexModules list havent 'picker'.

Can you help me ?

Environment

"dependencies": {
"phantom-limb": "0.0.1",
"vue": "^2.5.11",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"weex-vue-render": "^1.0.17",
"weex-vuex-loader": "^1.0.0"
},

I run on the web weex playground in chrome

三星手机Fatal Exception: java.lang.NullPointerException Attempt to invoke virtual method 'boolean android.widget.Editor$SelectionModifierCursorController.isDragAcceleratorActive()' on a null object reference

Description

安卓weex平台线上监测到crash,98%都是来自三星手机,具体的错误描述如下文件

com.fanli.android.apps_issue_13522_crash_5BA9D0E90351000171D764E73D482138_DNE_0_v2.txt

Environment

Android平台,绝大部分来自三星手机,可能是三星手机改过sdk源码,没有catch住该错误。而且我们在6月份拉取的weex sdk都没有该错误,但是8月份重新拉取了一次,就报错了,希望帮忙看下

Broken Example

从fabric报错日志中看出,应该是和edittext有关的错误

Steps to Reproduce

目前没找到解决方案,希望官方帮忙看下,提出一些修改建议

ios ModalUI显示相关问题

Description

使用weex sdk 0.18.0发现 ‘modal.toast({ message: '123'})'显示不了
查看modalUIModule源码,发现model父view使用的不是keyWindow:

    UIView *superView =  [[[UIApplication sharedApplication] windows] objectAtIndex:0];

正好我的App有多个window,第一个window为hidden,故显示不了。

weex sdk更新到最新版本发现此处已经修改,并能正确显示’modal.toast‘窗口了。

    UIView *superView = self.weexInstance.rootView.window;
    if (!superView) {
        superView =  self.weexInstance.rootView;
    }

但是在 - (UIView *)toastViewForMessage:(NSString *)message superView:(UIView *)superView 中,
仍然又出现了:UIWindow *window = [[[UIApplication sharedApplication] windows] objectAtIndex:0];
既然有superView了,就可以用superView了,这里应该去掉!!!

另:
又往下面看了几行,发现switch中,每个分支都有:

    point = CGPointMake(window.frame.size.width/2, window.frame.size.height/2);

这也太不走心了,明显应该提出去的代码写进switch。。。。。。

还有weex sdk中 ’WXModuleCallback‘既然已经标识为deprecated,推荐使用’WXModuleKeepAliveCallback‘,为什么还不将所有WXModuleCallback替换掉?
搞得一堆warnning~~~用起来不爽啊~~~

Environment

ios weex sdk 0.18.0

iOS源码集成问题

Description

源码集成iOS WeexSDK 0.18.0后,在代码编译时WXJSASTParser.h文件报 'string' file not found 的错误请问是什么原因?还请答疑 十分感谢

Routing example

Please provide an example of including vue-router in an app.

input type为date的时候选择时间问题

最近在使用的时候使用了input并设置type为date类型选择时间,发现在iPhone7 plus上面 点击done和cancel大部分不会触发事件, 后来看源码发现WXDatePickerManager类中使用了UIToolbar的方式去设置done和cancel按钮,目前我修改成view加两个UIButton的形式,未发现上述问题

weex create 无响应

完全按照官网流程操作,在执行 weex create 后。如下图,长时间(几十分钟)无响应
snip20180828_1

v1.3.11

  • weexpack : v1.0.15
  • weex-builder : v0.4.1
  • weex-previewer : v1.5.1
  • node v8.9.4
  • npm v6.0.1

render error:-2013

Hi,

I just created a new project on weex through the cli.

When running npm run serve it runs fine but on ios (physical device through weex playground) or android (emulator) it doesn't render.

I tried finding answers through google translate but nothing that could help me.

hello-world

Crash in Layout.c

Description

IOS Weex SDK Crash

Our application is crashing in production because of the below bug.
we are using 0.18.0 version of weex ios SDK. Please see the stack below.

Crashed: com.taobao.weex.component
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000018

Crashed: com.taobao.weex.component
0 Paytm 0x1039253f4 wx_layoutNode (Layout.c:990)
1 Paytm 0x1039253f4 wx_layoutNode (Layout.c:990)
2 Paytm 0x103942db8 -[WXComponentManager _layout] (WXComponentManager.m:820)
3 Paytm 0x103942c78 -[WXComponentManager _layoutAndSyncUI] (WXComponentManager.m:789)
4 Paytm 0x10393f33c -[WXComponentManager _recursivelyAddComponent:toSupercomponent:atIndex:appendingInTree:] (WXComponentManager.m:310)
5 Paytm 0x10393efc0 -[WXComponentManager addComponent:toSupercomponent:atIndex:appendingInTree:] (WXComponentManager.m:269)
6 Paytm 0x103939110 __42-[WXBridgeContext registerGlobalFunctions]_block_invoke_2 (WXBridgeContext.m:139)
7 Paytm 0x10393dec8 +[WXComponentManager _performBlockOnComponentThread:] (WXComponentManager.m:130)
8 Foundation 0x185a4e0ec __NSThreadPerformPerform + 340
9 CoreFoundation 0x184fab404 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
10 CoreFoundation 0x184faac2c __CFRunLoopDoSources0 + 276
11 CoreFoundation 0x184fa879c __CFRunLoopRun + 1204
12 CoreFoundation 0x184ec8da8 CFRunLoopRunSpecific + 552
13 Foundation 0x18593d674 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
14 Paytm 0x10393ddac -[WXComponentManager _runLoopThread] (WXComponentManager.m:122)
15 Foundation 0x185a4defc NSThread__start + 1040
16 libsystem_pthread.dylib 0x184c29220 _pthread_body + 272
17 libsystem_pthread.dylib 0x184c29110 _pthread_body + 290
18 libsystem_pthread.dylib 0x184c27b10 thread_start + 4

Environment

iPhone, OS : 11.4.1

Broken Example

Steps to Reproduce

Its not happening for our normal testing. But getting reported in Fabric crash reporting tools.
Please help us to get this fixed.

android weex-sdk0.18.0 input输入框无法清空

android手机 使用weex-sdk0.18.0 库 input无法达到清空的效果 例子如下:
<input class="password_ip" ref="input1" :value="textinput" @input="getConfrimPassword" />
getConfrimPassword(event)
{ this.textinput = event.value;
},
login() {
this.textinput = "";
}
每次执行login方法 只有第一次能清成功,其他时候都无法清除。 但是android playground每次都能成功

using unregistered weex module "swipeBack"

Description

页面能够正常显示,但日志中说使用了没注册的module,工程中没有出现任何包含"swipeBack"的内容

日志:

<Weex>[warn]WXJSCoreBridge.m:146, jsLog: [JS Framework] using unregistered weex module "swipeBack"

不知道是什么原因造成的?
怎么解决?

Environment

ios weex sdk 0.18.0.3

What time can webview listen message event?

Description

Now, webview can use postMessage, we can post message to current web page, but, web page can't post message to weex webview

Environment

Weex Version: 0.18

Broken Example

Steps to Reproduce

Xcode10 不再默认支持stdc++

Xcode 10 不在默认支持stdc++, 在WeexSDK.podspec中对stdc++ 改为 c++吧,不然编译会失败

s.libraries = "stdc++"

to

s.libraries = "c++"

Weex flavors 控制

weex 如何能实现flavor 控制, 类似Android prodcutFlavors 控制, 可以维护细微的差异。 Phone 和Pad 共同开发过程中会遇到绝大部分的相同和细微的差异。 如果有 productFlavors 我们提高代码复用率。

android接入weex,在二级页面无法从js端调用native方法

Description

前置条件:

  • Application中执行了WXSDKEngine.initialize的初始化调用,并且注册了自定义的Module类
  • js端通过let module_xx = weex.requireModule('module-name')引入模块
  • js端通过module_xx调用由@JSMethod注解的方法

现在的问题是:

  • 如果渲染的是一级页面,module能正常调用到native方法;如果是二级页面, module_xx在前端打印的是undefined
  • 场景Page1 通过navigator.push启动到Page2. Page2 调用不到native方法,Page1 中是正常的
  • 但在Page2中,引入内置模块,调用正常.如modal可以正常toast,navigator可以正常切换页面
  • Page2中在 js端,取到的module_xx对象是undefined

Environment

gradle的依赖配置如下

//weex相关的版本,已经修改到较新的版本,老版本同样存在上面描述的问题
compile 'com.taobao.android:weex_sdk:0.18.0'
compile 'com.taobao.android:weex_inspector:0.16.20'
provided 'org.weex.plugin:processor:1.0.2'

Broken Example

Steps to Reproduce

[devtool] Automate the beta version sign-off and publish process

According to the branch management principles, we are trying to establish a beta branch to track the weekly release of the project. So we need to automate the branch-off and publish procedures to manage the branches, tags and release automatically.

A script for sign-off and publish beta release is needed, which provides automated version number detection, auto merge beta release branch into the beta branch and sign-off, and rebase the beta changes back to the master branch.

weex android推送

请问想在澳大利亚发布,用哪个推送比较好,方便集成,谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.