didi / dokit Goto Github PK
View Code? Open in Web Editor NEW一款面向泛前端产品研发全生命周期的效率平台。
License: Apache License 2.0
一款面向泛前端产品研发全生命周期的效率平台。
License: Apache License 2.0
Please complete the following informations.
Expected behavior and actual behavior.
Steps to reproduce the problem.
Android or iOS? OS version? Brand?
More informations such as error messages and stack traces are welcomed.
请补充如下信息。
期望的表现和实际的表现。(如有)
android 帧率 cpu 内存无法查看
问题重现的步骤。(如有)
按文档进行下列步骤接入sdk
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:1.0.5'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:1.0.5'
}
DoraemonKit.install(application)
进入具体某个页面点击悬浮窗开启 cpu ram 帧率 这三个 按返回键 ,
内存cpu frame始终是0
Android 还是 iOS?系统版本是多少?手机品牌是什么?(如有)
android 红米5plus miui10 android8.1
其他的错误信息和堆栈信息如果有也可以一并提供出来。(如有)
Undefined symbols for architecture arm64:
"OBJC_CLASS$_CNContactStore", referenced from:
objc-class-ref in libDoraemonKit.a(DoraemonAppInfoUtil.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我 pod 'DoraemonKit/Core', '~> 1.0.2' 版本
正常使用 Load 耗时模块的同时能够正常打包
工程中引入 DoraemonKit 库后,Aarchive 时挂掉:
看起来像是 DoraemonLoadAnalyze.framework
没有提供 armv7
对应的版本
iOS / 任意型号
ld: warning: ignoring file /Users/eyrefree/Documents/XXX/Pods/DoraemonKit/iOS/DoraemonKit/Framework/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze, missing required architecture armv7 in file /Users/eyrefree/Documents/XXX/Pods/DoraemonKit/iOS/DoraemonKit/Framework/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze (2 slices)
Undefined symbols for architecture armv7:
"_dlaLoadModels", referenced from:
-[DoraemonMethodUseTimeListViewController viewDidLoad] in DoraemonMethodUseTimeListViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
挺想用下你们这个的,希望你们能优化一下这个,把那个分类加上前缀
在application初始化时,需要引入代码,由于不建议把功能带到线上,会导致在编译线上包时,若不删除application中的相关代码,则会编译失败。建议提供no-op的依赖,这样就不用修改application中额代码了,即依赖可以写成:
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:1.0.1'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:1.0.1'
android 小米8 按文档配置了,流量检测开关也启动成功了,但是没检测到任何数据
fileSize 定义成了指针
@interface DoraemonUtil : NSObject
@property (nonatomic, assign) NSInteger *fileSize;
请教一下为什么要引入 BSBacktraceLogger 这个库来获取调用堆栈,不直接使用系统提供的方法,是有什么深意吗?[NSThread callStackSymbols] 这个API我觉得完全可以胜任。
使用 BSBacktraceLogger 打印的堆栈信息:
BSBacktraceLogger: Backtrace of Thread 14851:
libsystem_kernel.dylib 0x1091c820a mach_msg_trap + 10
libsystem_kernel.dylib 0x1091c43b3 thread_get_state + 403
BeeHiveDemo 0x103548a1a bs_mach_copyMem + 58
BeeHiveDemo 0x103548103 _bs_backtraceOfThread + 675
BeeHiveDemo 0x103547e2b +[BSBacktraceLogger bs_backtraceOfNSThread:] + 59
BeeHiveDemo 0x103548729 +[BSBacktraceLogger bs_backtraceOfCurrentThread] + 89
BeeHiveDemo 0x103601f7a -[UIView(DoraemonSubThreadUICheck) uiCheck] + 170
BeeHiveDemo 0x103601e58 -[UIView(DoraemonSubThreadUICheck) doraemon_setNeedsDisplay] + 72
UIKitCore 0x10efce01e -[UILabel setNeedsDisplay] + 53
UIKitCore 0x10f43ee4e -[UIView _createLayerWithFrame:] + 937
UIKitCore 0x10f43f817 UIViewCommonInitWithFrame + 856
UIKitCore 0x10f43f481 -[UIView initWithFrame:] + 98
UIKitCore 0x10efc4b06 -[UILabel initWithFrame:] + 62
UIKitCore 0x10f43ea9f -[UIView init] + 44
UIKitCore 0x10f714b00 -[_UINavigationBarContentView _setupTitleViewAnimated:] + 778
UIKitCore 0x10f71690e -[_UINavigationBarContentView updateContentAnimated:] + 86
UIKitCore 0x10f74d417 -[_UINavigationBarVisualProviderModernIOS _updateContentForTopItem:backItem:animated:] + 1926
UIKitCore 0x10f751105 -[_UINavigationBarVisualProviderModernIOS navigationItemUpdatedTitleContent:animated:] + 214
UIKitCore 0x10f05a9f3 -[UINavigationItem _notifyObserver_navigationItemUpdatedTitleContentAnimated:] + 62
UIKitCore 0x10f05a849 -[UINavigationItem setTitle:] + 247
UIKitCore 0x10f48b56e -[UIViewController setTitle:] + 127
BeeHiveDemo 0x10350db51 __29-[ViewController viewDidLoad]_block_invoke + 49
libdispatch.dylib 0x108e1d5d1 _dispatch_call_block_and_release + 12
libdispatch.dylib 0x108e1e63e _dispatch_client_callout + 8
libdispatch.dylib 0x108e210a0 _dispatch_queue_override_invoke + 1028
libdispatch.dylib 0x108e2f028 _dispatch_root_queue_drain + 351
libdispatch.dylib 0x108e2f9cd _dispatch_worker_thread2 + 130
libsystem_pthread.dylib 0x109208169 _pthread_wqthread + 1387
libsystem_pthread.dylib 0x109207be9 start_wqthread + 13
使用 [NSThread callStackSymbols] 打印的堆栈信息:
callStackSymbols: (
0 BeeHiveDemo 0x0000000103601fbd -[UIView(DoraemonSubThreadUICheck) uiCheck] + 237
1 BeeHiveDemo 0x0000000103601e58 -[UIView(DoraemonSubThreadUICheck) doraemon_setNeedsDisplay] + 72
2 UIKitCore 0x000000010efce01e -[UILabel setNeedsDisplay] + 53
3 UIKitCore 0x000000010f43ee4e -[UIView _createLayerWithFrame:] + 937
4 UIKitCore 0x000000010f43f817 UIViewCommonInitWithFrame + 856
5 UIKitCore 0x000000010f43f481 -[UIView initWithFrame:] + 98
6 UIKitCore 0x000000010efc4b06 -[UILabel initWithFrame:] + 62
7 UIKitCore 0x000000010f43ea9f -[UIView init] + 44
8 UIKitCore 0x000000010f714b00 -[_UINavigationBarContentView _setupTitleViewAnimated:] + 778
9 UIKitCore 0x000000010f71690e -[_UINavigationBarContentView updateContentAnimated:] + 86
10 UIKitCore 0x000000010f74d417 -[_UINavigationBarVisualProviderModernIOS _updateContentForTopItem:backItem:animated:] + 1926
11 UIKitCore 0x000000010f751105 -[_UINavigationBarVisualProviderModernIOS navigationItemUpdatedTitleContent:animated:] + 214
12 UIKitCore 0x000000010f05a9f3 -[UINavigationItem _notifyObserver_navigationItemUpdatedTitleContentAnimated:] + 62
13 UIKitCore 0x000000010f05a849 -[UINavigationItem setTitle:] + 247
14 UIKitCore 0x000000010f48b56e -[UIViewController setTitle:] + 127
15 BeeHiveDemo 0x000000010350db51 __29-[ViewController viewDidLoad]_block_invoke + 49
16 libdispatch.dylib 0x0000000108e1d5d1 _dispatch_call_block_and_release + 12
17 libdispatch.dylib 0x0000000108e1e63e _dispatch_client_callout + 8
18 libdispatch.dylib 0x0000000108e210a0 _dispatch_queue_override_invoke + 1028
19 libdispatch.dylib 0x0000000108e2f028 _dispatch_root_queue_drain + 351
20 libdispatch.dylib 0x0000000108e2f9cd _dispatch_worker_thread2 + 130
21 libsystem_pthread.dylib 0x0000000109208169 _pthread_wqthread + 1387
22 libsystem_pthread.dylib 0x0000000109207be9 start_wqthread + 13
)
工程中引入 DoraemonKit 库后,Xcode 中 Console 报错统计接口 uploadAppData 接口由于 ATP 所以请求失败:
iOS / 任意型号
Task <500A5CFF-A68B-4855-8A17-01BD2B28F7A1>.<1> load failed with error Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection., NSErrorFailingURLStringKey=http://doraemon.xiaojukeji.com/uploadAppData, NSErrorFailingURLKey=http://doraemon.xiaojukeji.com/uploadAppData, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <500A5CFF-A68B-4855-8A17-01BD2B28F7A1>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <500A5CFF-A68B-4855-8A17-01BD2B28F7A1>.<1>, NSUnderlyingError=0x282e1b270 {Error Domain=kCFErrorDomainCFNetwork Code=-1022 "(null)"}} [-1022]
应该还是 bitcode 的问题:
2019-02-15 16:16:44.044 xcodebuild[2770:4958222] [MT] IDEDistribution: Step failed: <IDEDistributionPackagingStep: 0x7f921fc6d810>: Error Domain=IDEFoundationErrorDomain Code=1 "Failed to verify bitcode in DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze:
error: Bundle only contains bitcode-marker /var/folders/1w/mfxlxzjn69b6rnvcq9s82bym0000gn/T/XcodeDistPipeline.5O4/Root/Payload/TuandaiLoan.app/Frameworks/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze (armv7)
" UserInfo={NSLocalizedDescription=Failed to verify bitcode in DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze:
error: Bundle only contains bitcode-marker /var/folders/1w/mfxlxzjn69b6rnvcq9s82bym0000gn/T/XcodeDistPipeline.5O4/Root/Payload/TuandaiLoan.app/Frameworks/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze (armv7)
}
error: exportArchive: Failed to verify bitcode in DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze:
error: Bundle only contains bitcode-marker /var/folders/1w/mfxlxzjn69b6rnvcq9s82bym0000gn/T/XcodeDistPipeline.5O4/Root/Payload/TuandaiLoan.app/Frameworks/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze (armv7)
Error Domain=IDEFoundationErrorDomain Code=1 "Failed to verify bitcode in DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze:
error: Bundle only contains bitcode-marker /var/folders/1w/mfxlxzjn69b6rnvcq9s82bym0000gn/T/XcodeDistPipeline.5O4/Root/Payload/TuandaiLoan.app/Frameworks/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze (armv7)
布局信息:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="@+id/tool_bar"
android:layout_width="0dp"
android:layout_height="50dp"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="#F2F2F2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tool_bar"
/>
</android.support.constraint.ConstraintLayout>
希望可以提供手动控制悬浮窗的方法
比如我想默认不显示悬浮窗,当我需要用到DoraemonKit的时候,双击状态栏,再打开悬浮窗
All
iOS 12.1
10.1
1.0.3
实际上设备已经完全授权了网络权限,但CTCellularDataRestrictedState
查询网络授权状态 有误:
CTCellularData
这个类设计成所有的状态变化都通过cellularDataRestrictionDidUpdateNotifier
来触发,必须在其block
内获取状态信息
另外需要注意的是:在模拟器上
typedef void (^CellularDataRestrictionDidUpdateNotifier)(CTCellularDataRestrictedState);
这个回调是不会进的,不过模拟上对网络权限也没啥好判断的😓
CTCellularData
这个类有局限性,只能判断出:未知、完全授权(蜂窝 && WIFI) 以及 不完全授权(only WIFI || both 关闭),如果需要更详尽的判断可以参考简书: 检测 iOS 系统网络权限被关闭
MARK: 作者在DoraemonKit群里 @zie
Please complete the following informations.
Expected behavior and actual behavior.
Steps to reproduce the problem.
Android or iOS? OS version? Brand?
More informations such as error messages and stack traces are welcomed.
请补充如下信息。
期望的表现和实际的表现。(如有)
问题重现的步骤。(如有)
Android 还是 iOS?系统版本是多少?手机品牌是什么?(如有)
其他的错误信息和堆栈信息如果有也可以一并提供出来。(如有)
引入DoraemonKit后,APP启动时无法正常加载其他第三方so库。
错误信息:java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader
异常设备:Android9.0的小米8、Android7.0的小米Max
但是在魅族设备上没问题
希望增加一个activity和fragment视图堆栈显示。
类似这个库这种,有个view浮层
https://github.com/rome753/ActivityTaskView
崩溃信息:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableView setContentInsetAdjustmentBehavior:]: unrecognized selector sent to instance 0x7f883e922e00'
*** First throw call stack:
(
0 CoreFoundation 0x000000010c16ee65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000110ec0deb objc_exception_throw + 48
2 CoreFoundation 0x000000010c17748d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010c0c490a forwarding + 970
4 CoreFoundation 0x000000010c0c44b8 _CF_forwarding_prep_0 + 120
5 Finance 0x00000001091e829b -[DoraemonSandboxViewController initUI] + 619
6 Finance 0x00000001091e7ebe -[DoraemonSandboxViewController viewDidLoad] + 94
7 UIKit 0x000000010e0a4f98 -[UIViewController loadViewIfRequired] + 1198
8 UIKit 0x000000010e0e9651 -[UINavigationController _layoutViewController:] + 54
9 UIKit 0x000000010e0e9f26 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 462
10 UIKit 0x000000010e0ea098 -[UINavigationController _startTransition:fromViewController:toViewController:] + 126
11 UIKit 0x000000010e0eb2f1 -[UINavigationController _startDeferredTransitionIfNeeded:] + 890
12 UIKit 0x000000010e0ec3af -[UINavigationController __viewWillLayoutSubviews] + 57
13 UIKit 0x000000010e292ff7 -[UILayoutContainerView layoutSubviews] + 248
14 UIKit 0x000000010dfc54a3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
15 QuartzCore 0x000000010dc8f59a -[CALayer layoutSublayers] + 146
16 QuartzCore 0x000000010dc83e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
17 QuartzCore 0x000000010dc83cee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
18 QuartzCore 0x000000010dc78475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
19 QuartzCore 0x000000010dca5c0a _ZN2CA11Transaction6commitEv + 486
20 UIKit 0x000000010df08f7c _UIApplicationHandleEventQueue + 7329
21 CoreFoundation 0x000000010c09aa31 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
22 CoreFoundation 0x000000010c09095c __CFRunLoopDoSources0 + 556
23 CoreFoundation 0x000000010c08fe13 __CFRunLoopRun + 867
24 CoreFoundation 0x000000010c08f828 CFRunLoopRunSpecific + 488
25 GraphicsServices 0x000000011287fad2 GSEventRunModal + 161
26 UIKit 0x000000010df0e610 UIApplicationMain + 171
27 Finance 0x0000000108b56220 main + 112
28 libdyld.dylib 0x0000000111c7092d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
这边看了下,导致这个崩溃的原因是DoraemonSandboxViewController.m文件的第51行
手机:oppo r9m
系统:5.1
报错信息:
Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.action.MANAGE_OVERLAY_PERMISSION dat=package:com.xbkj.caruser }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1792)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)
at android.app.Activity.startActivityForResult(Activity.java:3896)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:767)
at android.app.Activity.startActivityForResult(Activity.java:3845)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:754)
at android.app.Activity.startActivity(Activity.java:4232)
at android.app.Activity.startActivity(Activity.java:4147)
at com.didichuxing.doraemonkit.util.PermissionUtil.requestDrawOverlays(PermissionUtil.java:89)
at com.didichuxing.doraemonkit.DoraemonKit.requestPermission(DoraemonKit.java:175)
at com.didichuxing.doraemonkit.DoraemonKit.access$100(DoraemonKit.java:46)
at com.didichuxing.doraemonkit.DoraemonKit$1.onActivityResumed(DoraemonKit.java:85)
at android.app.Application.dispatchActivityResumed(Application.java:216)
at android.app.Activity.onResume(Activity.java:1248)
at androidx.fragment.app.FragmentActivity.onResume(FragmentActivity.java:514)
at com.trello.rxlifecycle2.components.support.RxAppCompatActivity.onResume(RxAppCompatActivity.java:73)
at com.xbkj.caruser.framwork.BaseActivity.onResume(BaseActivity.java:250)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1267)
at android.app.Activity.performResume(Activity.java:6337)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3422)
DoraemonKit is an awesome tools for native app developers.
Please add react-native support.
期望的表现和实际的表现。(如有)
能否添加一个带有window的初始化方法
问题重现的步骤。(如有)
我们的项目中AppDelegate没有window属性,初始化DoreamonKit后就会闪退。
Note:希望添加监控网络请求详情的功能
Please complete the following informations.
Expected behavior and actual behavior.
Steps to reproduce the problem.
Android or iOS? OS version? Brand?
More informations such as error messages and stack traces are welcomed.
请补充如下信息。
期望的表现和实际的表现。(如有)
问题重现的步骤。(如有)
Android 还是 iOS?系统版本是多少?手机品牌是什么?(如有)
其他的错误信息和堆栈信息如果有也可以一并提供出来。(如有)
Swift项目引用1.1.0版本报错 'UITextView+Placeholder/UITextView+Placeholder.h' file not found
集成masonry,[[DoraemonManager shareInstance] install]; 会进入[MASViewConstraint install] 方法
DoraemonAppInfoUtil文件中的 + (NSString *)iphoneType 方法缺少新机型支持。
Android SDK:
WebDoor Kit Callback,can add the context for the next page to the callback
public interface WebDoorCallback {
void overrideUrlLoading(String url); //can add the context for the next page to the callback
}
Android 没有元素边框线功能吗? 视觉工具盒那里只有三个功能 (取色,迟标,控件检查)
Android
添加以下依赖,不能找到仓库
debugImplementation 'com.didichuxing.doraemonkit:kit:1.0.5'
releaseImplementation 'com.didichuxing.doraemonkit:kit-no-op:1.0.5'
正常 Mock GPS 信息
使用腾讯云 SDK 的 pod 库 QCloudCOSXML
后,初始化 TencentLBSLocationManager
时,挂在 CLLocationManager+Doraemon.m
的第 28 行:
NSAssert(NO, @"你在Delegate %@ 中所使用的SEL %@,暂不支持,请联系DoraemonKit开发者",delegate,sel);
delegate 类型为 TencentLBSLocationManager
。
iOS / 任意型号
大佬,有没有私有方法啊,上架不存在风险吧?
Attribute "text" already defined with incompatible format.
Message{kind=ERROR, text=Attribute "text" already defined with incompatible format.,
sources=[project/build/intermediates/res/merged/deft/debug/values/values.xml:3043],
original message=, tool name=Optional.of(AAPT)}
Attribute "titleColor" already defined with incompatible format.
Message{kind=ERROR, text=Attribute "titleColor" already defined with incompatible format.,
sources=[/build/intermediates/res/merged/deft/debug/values/values.xml:3148],
original message=, tool name=Optional.of(AAPT)}
资源属性冲突,建议对属性也加上前缀。
遇到这种问题,请更新一下本地仓库
像.bottom .top 你和masonry冲突了, masonry至少还能让用户选择,他默认是有加mas_的前缀,你们也试着优化下啊,比起你这个,正常masonry用户肯定是用masonry用的多啊。。把那个uiview+position那个分类加个前缀吧
打开NSLog监控功能,如果打印以下日志,会rash
NSString *s = @"callnative://saveTian/%22saveTianDataCallback43%22";
NSLog(@"%@",s);
DoraemonPlugin 中,增加aspectj,但是gradle 3.+ 会报warning,
WARNING: Configuration 'debugCompile' is obsolete and has been replaced with 'debugImplementation' and 'debugApi'.
project.dependencies {
// TODO this should come transitively
debugCompile 'org.aspectj:aspectjrt:1.8.6'
}
Please complete the following informations.
Expected behavior and actual behavior.
Steps to reproduce the problem.
Android or iOS? OS version? Brand?
More informations such as error messages and stack traces are welcomed.
请补充如下信息。
期望的表现和实际的表现。(如有)
屏幕支持有些问题,比方说:
横屏的时候,组件检查显示的内容是竖屏的,小屏幕显示不全
横屏的时候,带刘海的机型在显示设备信息的时候显示不全
问题重现的步骤。(如有)
Android 还是 iOS?系统版本是多少?手机品牌是什么?(如有)
iOS
其他的错误信息和堆栈信息如果有也可以一并提供出来。(如有)
每当状态栏发生变化(如: 时间跳动,4G切WIFI,横竖屏切换等),状态栏会走layoutSubviews
方法,会导致状态栏也出现元素边框;
而[UIApplication sharedApplication].windows
数组内拿不到UIStatusBarWindow
,关闭元素边框无法及时隐藏状态栏的边框线:
解决方法供参考:
DoraemonViewMetricsConfig.m
内- (void)setEnable:(BOOL)enable
加上对状态栏的额外判断:- (void)setEnable:(BOOL)enable
{
_enable = enable;
....以前的判断.....
// 每当状态栏发生变化(如: 时间跳动,4G切WIFI,横竖屏切换等),状态栏会走`layoutSubviews`方法,会导致状态栏也出现元素边框;而[UIApplication sharedApplication].windows数组内拿不到UIStatusBarWindow,关闭元素边框无法及时隐藏状态栏的边框线
// 也可以在`UIView+DoraemonViewMetrics.h`内的`shouldShowMetricsView`中直接禁掉状态栏的元素边框
NSString *statusBarString = [NSString stringWithFormat:@"_statusBarWindow"];
UIWindow *statusBarWindow = [[UIApplication sharedApplication] valueForKey:statusBarString];
if (statusBarWindow) {
if (!enable) {
[statusBarWindow hideDoraemonMetricsRecursive];
}
}
}
UIView+DoraemonViewMetrics.h
的- (BOOL)shouldShowMetricsView
- (BOOL)shouldShowMetricsView
{
....其他的情况....
// 状态栏不需要显示元素边框
NSString *statusBarString = [NSString stringWithFormat:@"_statusBarWindow"];
UIWindow *statusBarWindow = [[UIApplication sharedApplication] valueForKey:statusBarString];
if (statusBarWindow && [self isDescendantOfView:statusBarWindow]) {
return NO;
}
return YES;
}
Please complete the following informations.
Expected behavior and actual behavior.
Steps to reproduce the problem.
Android or iOS? OS version? Brand?
More informations such as error messages and stack traces are welcomed.
请补充如下信息。
期望的表现和实际的表现。(如有)
问题重现的步骤。(如有)
Android 还是 iOS?系统版本是多少?手机品牌是什么?(如有)
其他的错误信息和堆栈信息如果有也可以一并提供出来。(如有)
先给大佬们 手动点赞👍
提个小需求 记录下启动时间 帮助优化App。
最好能定位耗时过程,虽然 Instruments已经很详细 但是集成版本有的话就更方便了。
正常使用 Load 耗时模块的同时能够在 ENABLE_BITCODE = YES
模式下正常打包
工程中引入 DoraemonKit 库后,Aarchive 时挂掉:
看起来像是 DoraemonLoadAnalyze.framework
提供的 armv7
对应版本没有在 ENABLE_BITCODE = YES
模式下生成
iOS / 任意型号
ld: bitcode bundle could not be generated because '/Users/eyrefree/Documents/XXX/Pods/DoraemonKit/iOS/DoraemonKit/Framework/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/eyrefree/Documents/XXX/Pods/DoraemonKit/iOS/DoraemonKit/Framework/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze' for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
在 Podfile 合适的地方添加如下代码:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if 'DoraemonKit' == config.build_settings['PRODUCT_NAME']
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
end
~pod install 失败,报错信息:
Fetching podspec for 'DoraemonKit' from '../'
[ ! ] Unable to find a specification for 'BSBacktraceLogger' depended upon by 'DoraemonKit/WithLogger'
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.