iOS 「[App] if we're in the real pre-commit handler we can't actually add any new fences due

最近運行APP,發現了這個問題,本着寧肯錯看,不可放過的原則,上stackoverFlow學習了一下:ios

連接:http://stackoverflow.com/questions/38458170/ios-10-app-if-were-in-the-real-pre-commit-handler-we-cant-actually-add-anyxcode

----- 「[App] if we're in the real pre-commit handler we can't actually add any new fences due 」app

翻譯:框架

-----「[應用]若是咱們在真實預提交處理咱們不能添加任何新的圍欄,因爲CA限購」學習

才知道這個問題實際上是xcode 編譯器設置的問題,其實並不影響app使用:this

"-------it comes from +[UIWindow _synchronizeDrawingAcrossProcessesOverPort:withPreCommitHandler:] via os_log API. It doesn't depend from another components/frameworks that you are using(only from UIKit) - it reproduces in clean single view application project on changing interface orientation.
This method consists from 2 parts:
adding passed precommit handler to list of handlers;
do some work, that depends on current finite state machine state.
When second part fails (looks like prohibited transition), it prints message above to error log. However, I think that this problem is not fatal: there are 2 additional assert cases in this method, that will lead to crash in debug.---".net

翻譯:翻譯

----它來自+ [ UIWindow _synchronizedrawingacrossprocessesoverport:withprecommithandler:]經過os_log API。它不取決於另外一個組件/框架,您使用的是(從UIKit)-再現清潔單視圖應用程序項目改變界面取向。
該方法由2部分組成:
並經過預提交處理程序處理程序列表;
作一些工做,這取決於當前的有限狀態機狀態。
當第二部分失敗(看起來像被禁止的過渡)時,它將上面的消息打印到錯誤日誌上。然而,我認爲這個問題不是致命的:有2個額外的斷言在這種方法的狀況下,這將致使崩潰在調試debug

----------------------------華麗的分割線-------------------------------------調試

解決方法:

 

in your Xcode:

  • Click on your active scheme name right next to the Stop button
  • Click on Edit Scheme....
  • in Run (Debug) select the Arguments tab
  • in Environment Variables click +
  • add variable: OS_ACTIVITY_MODE = disable

其實這好像是老版xcode 的,

其實點擊Xcode的product就能夠找到(OS_ACTIVITY_MODE是name,disable 是值)


(特別注意:標註爲disable失效後,程序可能會運行失敗!)

 

感謝分享, 本人到沒有遇到過。  你們遇到的能夠借鑑這個  原文  http://blog.csdn.net/ws1836300/article/details/52957056

相關文章
相關標籤/搜索