weexteam / devtool-ios-for-apache-weex Goto Github PK
View Code? Open in Web Editor NEWRemote debug for your native iOS app using Chrome Developer Tools
License: Apache License 2.0
Remote debug for your native iOS app using Chrome Developer Tools
License: Apache License 2.0
WXImgLoaderProtocol.h isn't part of any pots nor can I find it anywhere else.
开启debug后发现原生端通过 registerService 注入的脚本失效,请问大佬怎么解决这个问题?
Hi,大家好:
我们在接入weex项目后,总出现一些涉及WeexSDK框架里面的崩溃。下面是两个最常见的崩溃记录,烦请朋友帮忙看看.
(一)
1libsystem_kernel.dylib0x18097c2e8___pthread_kill + 8
2libsystem_pthread.dylib0x180a95748_pthread_kill$VARIANT$armv81 + 360
3libsystem_c.dylib0x1808eafbc_abort + 140
4libsystem_malloc.dylib0x1809b3ce4_szone_size + 0
5CoreFoundation0x180d35cd8-[__NSArrayM insertObject:atIndex:] + 376
6SecooDistributionSeller0x100123f00-[WXBridgeManager createInstance:template:options:data:] (WXBridgeManager.m:0)
7SecooDistributionSeller0x1001a45d4-[WXSDKInstance _renderWithMainBundleString:] (WXSDKInstance.m:220)
8SecooDistributionSeller0x1001a52cc___49-[WXSDKInstance _renderWithRequest:options:data:]_block_invoke (WXSDKInstance.m:313)
9SecooDistributionSeller0x100199704___35-[WXResourceLoader _handleFileURL:]_block_invoke (WXResourceLoader.m:92)
10SecooDistributionSeller0x100281e4c___eventNewDispatchAsync_block_invoke + 64
11libdispatch.dylib0x1807e6a54__dispatch_call_block_and_release + 24
12libdispatch.dylib0x1807e6a14__dispatch_client_callout + 16
13libdispatch.dylib0x180822394__dispatch_queue_override_invoke$VARIANT$armv81 + 700
14libdispatch.dylib0x1808282a4__dispatch_root_queue_drain + 568
15libdispatch.dylib0x180828008__dispatch_worker_thread3 + 112
16libsystem_pthread.dylib0x180a8f06c__pthread_wqthread + 1268
17libsystem_pthread.dylib0x180a8eb6c_start_wqthread + 4
(二)
1CoreFoundation0x180f330d8-[__NSDictionaryM setObject:forKeyedSubscript:] + 420
2CoreFoundation0x180f330b8-[__NSDictionaryM setObject:forKeyedSubscript:] + 388
3SecooDistributionSeller0x1001a51e8___49-[WXSDKInstance _renderWithRequest:options:data:]_block_invoke (WXSDKInstance.m:306)
4SecooDistributionSeller0x100199704___35-[WXResourceLoader _handleFileURL:]_block_invoke (WXResourceLoader.m:92)
5SecooDistributionSeller0x100281e4c___eventNewDispatchAsync_block_invoke + 64
6libdispatch.dylib0x1807e8b24__dispatch_call_block_and_release + 24
7libdispatch.dylib0x1807e8ae4__dispatch_client_callout + 16
8libdispatch.dylib0x180824528__dispatch_queue_override_invoke$VARIANT$armv81 + 700
9libdispatch.dylib0x18082a3a4__dispatch_root_queue_drain + 592
10libdispatch.dylib0x18082a0f0__dispatch_worker_thread3 + 112
11libsystem_pthread.dylib0x180b1bfac__pthread_wqthread + 1176
12libsystem_pthread.dylib0x180b1bb08_start_wqthread + 4
你好,目前我使用官方 WeexPlayground 扫码可以实时调试 weex 页面,.vue
文件修改下保存,WeexPlayground 上的页面也是同步实时刷新的。
现在我自己的客户端集成了 weex,我想自己的 app 也能像 WeexPlayground 一样实时调试,.vue
文件修改下保存,也能同步刷新。主要是我实现的功能里面有很多自己的 module
, 使用 WeexPlayground 扫描调试完全不能满足需求,目前只能把 jsbundle
文件拖到我自己项目本地里,来调试,感觉很蠢很麻烦,也不能实时刷新调试。
有办法吗? 非常感谢🙏
swift项目用cocoapods引用WXDevtool,然后在bridging-header.h中导入WXDevtool,#import <WXDevtool/WXDevTool.h>,但是出现Missing submodule 'WXDevtool.WXDevTool'
,但是#import <WXDevtool/WXDevtool.h>
后一个WXDevtool的T
小写就正常编译,但是我同事用前者才正常编译。
查阅源码发现只有WXDevtool.h文件,但是WXDebugDomain.h、WXDebugDomainController.h都使用了小写的WXDevtool.h,其他多个文件引用了大写的WXDevTool.h,神奇的是这个项目居然能正常编译。
将WXDebugDomain.h、WXDebugDomainController.h的WXDevtool.h
改成大写WXDevTool.h
,这样#import <WXDevtool/WXDevTool.h>
引用就正常了
文档太老了,现在按文档写的根本没法运行了,0.9.5倒还可以,最新的0.15.3集成后一直报错
如题,集成了神策,启动会弹窗警告,WXDevtool会直接在Alert上显示调试工具。关闭后消失,再进入新的VC就会crash
按照文档集成,运行APP时crash
[WXDebugger registerCallCreateBody:]: unrecognized selector sent to instance
crash位置是weexSDK的WXBridgeManager.m
文件的第88行,也即
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
[error]WXMonitor.m:221, [WX_KEY_EXCEPTION_SDK_INIT_JSFM_INIT_FAILED] script don't exist:(null)
集成最新版本 0.17.1 版本运行时崩溃,原因是在 WebScoket 连接回调时注册设备时字典赋值的问题
WXDebugDomainController.m 文件 Line 88
- (void)registerDevice {
NSString *deviceID = [WXDeviceInfo getDeviceID];
NSString *machine = [WXDeviceInfo deviceName] ? : @"";
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"] ?: [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
NSMutableDictionary *parameters = [NSMutableDictionary dictionaryWithObjectsAndKeys:
deviceID, @"deviceId",
@"iOS", @"platform",
machine, @"model",
[WXSDKEngine SDKEngineVersion],@"weexVersion",
[WXDevTool WXDevtoolVersion],@"devtoolVersion",
[WXDebugger isVDom] ? @"vdom" : @"native",@"elementMode",
appName, @"name",
[WXLog logLevelString] ?: @"error",@"logLevel",
[NSNumber numberWithBool:[WXDevToolType isDebug]],@"remoteDebug",
[WXDebugger isNetwork], @"network", // 这是一个基本类型的 bool 值,需要转换一下
nil];
[self _registerDeviceWithParams:parameters];
}
好难用,搞了 一天了, 完全不知道这玩意儿如何集成,一步步按照文档集成的,不好使啊,页面空白
如题,求教大神们谁遇到了这个问题。先谢了,求明灯。。。
api('/api/organization/getAllDpts', data => { if (data) { modal.toast({ message:typeof data }) this.departments = data.departments.sort((a, b) => a.departmentOrder - b.departmentOrder); } });
类名字冲突了,编译不过去
按照README中的所有配置进行完之后,Xcode项目可以正常运行,但在application:didFinishLaunchingWithOptions:
中WXAppConfiguration
的一系列初始化方法之前调用如下方法,页面不显示。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
....
[self initDebug];
[self initWeexSDK]; // 所有WXAppConfiguration的初始化方法
return YES;
}
- (void)initDebug
{
[WXDevTool setDebug:YES];
[WXDevTool launchDevToolDebugWithUrl:@"ws://192.168.1.80:8088/debugProxy/native"];
}
其中,ws://192.168.1.80:8088/debugProxy/native
来自该项目路径下运行weex debug
之后的提示信息:The websocket address for native is ws://192.168.1.80:8088/debugProxy/native
。
将-initDebug
方法注掉之后,页面就可以显示出来了。
从log信息来看,只有一行如下,并无异常。
2017-04-14 14:32:26.087 WeexSample[84586:10868319] �[fg128,128,128; <Weex>[log]WXSDKInstance.m:151, Start rendering page:file:///Users/calios/Library/Developer/CoreSimulator/Devices/01F580FB-D99C-4A96-822D-81DAC7085755/data/Containers/Bundle/Application/FF49FEDF-DFCF-4BD5-A8FF-5BFB40B6C7DF/WeexSample.app/bundlejs/index.js �[;
请问如何在开启debug工具的同时正常显示页面呢?谢谢!
升级最新版本后报错:Uncaught ReferenceError: weex is not defined
iOS debug的时候,打开JS Debug开关会导致iOS崩溃。 如下:
2019-03-11 18:04:37.325752+0800 WeexDemo[14054:1228478] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[WXDebugger registerCallUpdateComponentData:]: unrecognized selector sent to instance 0x2812c5a80'
release/0.21.0 分支上貌似已经处理了这个崩溃问题,但是没有合并到master分支。而且cocoapods上最新的WXDevtool
还是0.20.0
版本,并没有 0.20.1(或0.21.0)版本。 @erha19
项目版本
weex -v
v1.0.1-beta.6
- weex-builder : v0.1.18
- weex-devtool : v0.2.77
ios 的palyground 扫码 不出来啊.weex
Using ATSDK-Weex (0.0.1)
Using SDWebImage (3.7.5)
Using SocketRocket (0.4.2)
Using WXDevtool (0.9.5)
Using WeexSDK (0.9.5.3)
debug 检查下面错误
[Native Error] Request to http://172.16.150.123:12580/examples/build/index.js?random=-1288989970 With no data return
(anonymous) @ Runtime.js:219
:8088/lib/Runtime.js:248 invalid destroyInstance[24] because runtime has been refreshed(It does not impact your code. )
(anonymous) @ :8088/lib/Runtime.js:248
:8088/lib/Runtime.js:219 [Native Error]
eventEmitter.on('Console.messageAdded', function (message) {
console.error('[Native Error]', message.params.message.text);
});
在使用模拟器进行开发调试的时候无法使用扫码功能,往往只能看到实现效果,无法使用chrome进行debug。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.