直接编译跑模拟器
- 发布:2020-09-10 17:08
 - 更新:2022-10-19 10:07
 - 阅读:1815
 
产品分类: uniapp/App
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: Xcode 11.6
HBuilderX类型: 正式
HBuilderX版本号: 2.8.11
手机系统: iOS
手机系统版本号: iOS 13.4
手机厂商: 模拟器
手机机型: iPhone 11
页面类型: vue
打包方式: 离线
项目创建方式: HBuilderX
操作步骤:
                                    
                                         
                                
                                                                                                预期结果:
                                    
                                    
                                        跑
                                     
                                
                                                                                                跑
实际结果:
                                    
                                    
                                        报错
                                     
                                
                                                            报错
bug描述:
iOS离线打包 直接报错
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Have you sent -__dcloud_io_setBackgroundColor: to <WKScrollView: 0x7fe0d6031c00; baseClass = UIScrollView; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x6000026e7bd0>; layer = <CALayer: 0x600002813b00>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}> off the main thread? To verify, look for a complaint in the logs: "Unsupported use of UIKit…", and fix the problem if you find it. If your use is main-thread only please file a radar on UIKit, and attach this log. exercisedImplementations = {  
    "__dcloud_io_setBackgroundColor:" =     (  
    );  
}'  
*** First throw call stack:  
(  
    0   CoreFoundation                      0x00007fff23e3de6e __exceptionPreprocess + 350  
    1   libobjc.A.dylib                     0x00007fff512539b2 objc_exception_throw + 48  
    2   CoreFoundation                      0x00007fff23e3dbe8 +[NSException raise:format:arguments:] + 88  
    3   Foundation                          0x00007fff258d6c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166  
    4   UIKitCore                           0x00007fff48ee649b PushNextClassForSettingIMP + 664  
    5   UIKitCore                           0x00007fff48ee6bfd TaggingAppearanceObjectSetterIMP + 37  
    6   WebKit                              0x00007fff2d4649d4 -[WKWebView(WKViewInternalIOS) _updateScrollViewBackground] + 785  
    7   WebKit                              0x00007fff2d43656c -[WKWebView _initializeWithConfiguration:] + 6519  
    8   WebKit                              0x00007fff2d4373f7 -[WKWebView initWithFrame:configuration:] + 98  
    9   WebKit                              0x00007fff2d434ba1 -[WKWebView initWithFrame:] + 83  
    10  链信公开课                     0x000000010b834df1 +[PTUserAgentUtil defaultUserAgent:] + 143  
    11  链信公开课                     0x000000010b88527b -[PDRCore load] + 2202  
    12  链信公开课                     0x000000010b8843e9 +[PDRCore initEngineWihtOptions:withRunMode:withAppManager:withDelegate:] + 150  
    13  链信公开课                     0x000000010ac4597d __32-[NTESAppDelegate setupPDRCore:]_block_invoke + 77  
    14  libdispatch.dylib                   0x000000010fc39f11 _dispatch_call_block_and_release + 12  
    15  libdispatch.dylib                   0x000000010fc3ae8e _dispatch_client_callout + 8  
    16  libdispatch.dylib                   0x000000010fc48d97 _dispatch_main_queue_callback_4CF + 1149  
    17  CoreFoundation                      0x00007fff23da1869 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9  
    18  CoreFoundation                      0x00007fff23d9c3b9 __CFRunLoopRun + 2041  
    19  CoreFoundation                      0x00007fff23d9b8a4 CFRunLoopRunSpecific + 404  
    20  GraphicsServices                    0x00007fff38c39bbe GSEventRunModal + 139  
    21  UIKitCore                           0x00007fff49325968 UIApplicationMain + 1605  
    22  链信公开课                     0x000000010ace7a10 main + 112  
    23  libdyld.dylib                       0x00007fff520ce1fd start + 1  
)  
libc++abi.dylib: terminating with uncaught exception of type NSException                                
                                                                                                                                                                                我的也遇到了这个问题,按照上面的说法去掉了IQKeyboardManage 库,但是报错,项目中用到了QMUIKit 这个库(4.5.1),因为这个库牵扯到的文件太多,去不掉,将这个库的版本降到了3.1.2,报terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Client error attempting to change layout margins of a private view' ,assertion failure in【 -[_UINavigationBarContentView setDirectionalLayoutMargins:],】这个错误定位在 QMUIKit 里面的QMUINavigationButton 文件,将报错的那几行代码注销掉,然后就显示正常了!