1. Invalid bitcode signature

背景:
我是拿iPhone 4s (iOS 8.1) 真機跑項目,報這個錯,iPhone 5s (iOS8) 沒有問題,就猜測是因為iPhone 4s是32位的原因,花了兩天時間,最后刪除Derived Data里的數(shù)據(jù)就好了,真是坑坑爹,后面看到一句話是這么說的:
Xcode無提示解決方案就可以刪除/Users/用戶名/Library/Developer/Xcode/DerivedData 路徑下的緩存文件,重啟xcode即可
萬能的解決方案,這個Error還真是沒有任何更詳細的提示。
解決方案:
刪除/Users/用戶名/Library/Developer/Xcode/DerivedData 路徑下的緩存文件,重啟xcode即可
2. 彈窗彈不出來,或者一閃而過
背景:
使用了keywindow,并且采用這樣的方式獲取keywindow
[UIApplication sharedApplication].keyWindow]
這邊要說明一下,keywindow真的要慎用,如果用系統(tǒng)的UIAlertView彈窗,蘋果是又重新創(chuàng)建了一個UIWindow作為keywindow,這個時候你再取keywindow就只能取到UIAlertControllerShimPresenterWindow,如下圖的

根據(jù)這個window再取當前控制器的時候,就會取出UIAlertController,如下圖:

解決方案:
用[UIApplication sharedApplication].delegate.window 代替 [UIApplication sharedApplication].keyWindow]
注:[UIApplication sharedApplication].delegate.window 取的是你AppDelegate設置的window,必須要有這個window,要不然點不出來,如下圖
Appdelegate.h

Appdelegate.m

3. iPhone has denied the launch request

解決方案:
code sign issue. Make sure you're signing with developer, not distribution.You need indeed to use an "iOS Development" provisioning profile.
3. 安裝Cocoapods的時候報錯Not a directory - /usr/local/bin/fuzzy_match
解決命令:
$ gem env
$ sudo gem install --user-install cocoapods
Cocoapods ERROR: While executing gem … (Errno::ENOTSUP)