Error-工作中遇到的

weixin_33912445發表於2017-11-14

1.載入mapView時出現問題

didFailWithError:Error Domain=kCLErrorDomain Code=0 "(null)"

Painter Z index: 1023 is too large (max 255)

這可能是MKMapView 的解構函式的問題,不管你的地圖檢視物件如何配置,在Xcode8和iOS10系統下都有機率出現凍結你的應用程式,主執行緒掛起。

為了幫助在除錯、切後臺一段時間再喚醒應用程式時,不會引起凍結應用程式,建議在使用MKMapView 物件的檢視控制器的dealloc方法中新增如下程式碼:

- (void)dealloc

{

#if DEBUG

// Xcode8/iOS10 MKMapView bug workaround

staticNSMutableArray* unusedObjects;

if(!unusedObjects)

unusedObjects = [NSMutableArraynew];

[unusedObjectsaddObject:mapView];

#endif

}

2.出現duplicate錯誤 

說明有重複內容

3.libMobileGestalt MobileGestaltSupport.m:153: pid 10883 (XXMap) does not have sandbox access for xxxxxxx and IS NOT appropriately entitled

這是蘋果系統的BUG

4.Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service

解決:I solved this by changing the MKMapType Standard to Satellite


5.Painter Z index: 1023 is too large (max 255)


6.[Client] Geocode error: Error Domain=GEOErrorDomain Code=-8 "(null)"


7.pod xxx時,出現下面問題/Library/Ruby/Site/2.0.0/rubygems.rb:250:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException)  ,詳情如圖

8428109-d28af52ed49d9351.png


解決方案:解除安裝原來的cocoapods,再重新安裝

~ user$ which pod

/usr/local/bin/pod

~ user$ sudo rm -rf /usr/local/bin/pod

~ user$ gem list

~ user$ sudo gem uninstall cocoapods -v 1.3.1

~ user$ sudo gem uninstall cocoapods -v 1.3.1

~ user$ sudo gem install cocoapods


8.TIC Read Status [2:0x604000164500]: 1:57

Apple staff gave the following answer:

TIC expands to “TCP I/O connection”, which is a subsystem within CFNetwork that runs a TCP connection

2 is a connection ID number within TIC

0x604000164500 is a pointer to the TIC object itself

1 and 57 are the CFStreamError domain and code, respectively; a domain of 1 is kCFStreamErrorDomainPOSIX and, within that domain, 57 is ENOTCONN

In short, a TCP read has failed with ENOTCONN.

As the TCP I/O connection subsystem has no public API, you must necessarily be using it via some high-level wrapper (like NSURLSession).

9.Undefined symbols for architecture x86_64: “OBJC_CLASS$_AFHTTPRequestOperationManager”, referenced from: type metadata accessor for __ObjC.AFHTTPRequestOperationManager in UserManager.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

一般出現這種問題都是少庫

使用Pod降級AFNetworking後,會發生這樣的錯誤,重新安裝AFN都不行。

解決辦法:

在自己的工程Build Phases的Link Binary With Libraries中新增libAFNetworking.a


8428109-e1a875e6daa84778.png


10.expected selector for objective-c method

這個報錯非常噁心:原因竟然是在匯入標頭檔案的地方多寫了一個“+”號,可能問題在一個檔案,報錯在另一個檔案

11.Shell Script Invocation Error Group

解決:input files去掉引用framework

8428109-1dc4812b73704d5a.png

12. 關於Duplicate interface definition for class'*'


13.ld: library not found for -lMBProgressHUD


14.CUICatalog: Invalid asset name supplied: ''

問題分析:這個問題其實是老問題,產生原因就是因為在使用的時候[UIImage imageNamed:]時,圖片不存在或者傳入的圖片名為nil.

解決方法:新增一個系統斷點,來判斷如果圖片名字為nil或者@""的時候,來攔截掉。

8428109-f85ee0ca4e826014

15. dyld: Library not loaded: @rpath/Hyphenate.framework/Hyphenate

Referenced from: /Users/liangyi/Library/Developer/CoreSimulator/Devices/F3F0CB24-F891-489D-B71F-1AA6DA17832C/data/Containers/Bundle/Application/8D4D4F2E-A19F-4590-BE80-41403C735448/EMDemo.app/EMDemo

Reason: image not found

16. [WebActionDisablingCALayerDelegate willBeRemoved]: unrecognized selector sent to instance 0x600000015050

為 WebActionDisablingCALayerDelegate 這個私有類新增方法,在後面的一次提交稽核過程中,ipa檔案提交失敗:引用私有API(還是私有類,記不得了)。所以建議不要採用。


failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode

2017-12-12 14:53:54.549638+0800 xx[5748:131628] void SendDelegateMessage(NSInvocation *): delegate (webView:resource:didFinishLoadingFromDataSource:) failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode

17."Unable to insert COPY_SEND"

相關文章