上點干貨,目前得知的一些bug解決匯總:
iOS10相冊相機閃退bug
http://www.jianshu.com/p/5085430b029f
iOS 10 因蘋果健康導致閃退 crash
http://www.jianshu.com/p/545bd1bf5a23
麥克風、多媒體、地圖、通訊錄
ios10相機等崩潰
http://www.jianshu.com/p/ec15dadd38f3
iOS10 配置須知
http://www.jianshu.com/p/65f21dc5c556
iOS開發 適配iOS10以及Xcode8
http://www.jianshu.com/p/9756992a35ca
iOS 10 的適配問題
http://www.jianshu.com/p/f8151d556930
兼容iOS10資料整理筆記
http://www.jianshu.com/p/0cc7aad638d9?from=groupmessage&isappinstalled=0
1.Notification(通知)
自從Notification被引入之后,蘋果就不斷的更新優化,但這些更新優化只是小打小鬧,直至現在iOS 10開始真正的進行大改重構,這讓開發者也體會到UserNotifications的易用,功能也變得非常強大。
iOS 9 以前的通知
1.在調用方法時,有些方法讓人很難區分,容易寫錯方法,這讓開發者有時候很苦惱。
2.應用在運行時和非運行時捕獲通知的路徑還不一致。
3.應用在前台時,是無法直接顯示遠程通知,還需要進一步處理。
4.已經發出的通知是不能更新的,內容發出時是不能改變的,並且只有簡單文本展示方式,擴展性根本不是很好。
iOS 10 開始的通知
1.所有相關通知被統一到了UserNotifications.framework框架中。
2.增加了撤銷、更新、中途還可以修改通知的內容。
3.通知不在是簡單的文本了,可以加入視頻、圖片,自定義通知的展示等等。
4.iOS 10相對之前的通知來說更加好用易於管理,並且進行了大規模優化,對於開發者來說是一件好事。
5.iOS 10開始對於權限問題進行了優化,申請權限就比較簡單了(本地與遠程通知集成在一個方法中)。
如果使用了推送:
iOS 10 通知學習相關資料:
UserNotifications: 蘋果官方文檔
-蘋果官方視頻1
- 蘋果官方視頻2
- 蘋果官方視頻3
活久見的重構 - iOS 10 UserNotifications 框架解析 WWDC2016 Session筆記 - iOS 10 推送Notification新特性
2.ATS的問題
iOS 9中默認非HTTS的網絡是被禁止的,當然我們也可以把NSAllowsArbitraryLoads設置為YES禁用ATS。不過iOS 10從2017年1月1日起蘋果不允許我們通過這個方法跳過ATS,也就是說強制我們用HTTPS,如果不這樣的話提交App可能會被拒絕。但是我們可以通過NSExceptionDomains來針對特定的域名開放HTTP可以容易通過審核。
NSExceptionDomains方式 設置域。可以簡單理解成,把不支持https協議的接口設置成http的接口。
具體方法:
1)、在項目的info.plist中添加一個Key:App Transport Security Settings,類型為字典類型。
2)、然后給它添加一個Exception Domains,類型為字典類型;
3)、把需要的支持的域添加給Exception Domains。其中域作為Key,類型為字典類型。
4)、每個域下面需要設置3個屬性:NSIncludesSubdomains、NSExceptionRequiresForwardSecrecy、NSExceptionAllowsInsecureHTTPLoads。
如圖:
細節提示:在iOS9以后的系統中如果使用到網絡圖片,也要注意網絡圖片是否是HTTP的哦,如果是,也要把圖片的域設置哦!
3.iOS 10 隱私權限設置
iOS 10 開始對隱私權限更加嚴格,如果你不設置就會直接崩潰,現在很多遇到崩潰問題了,一般解決辦法都是在info.plist文件添加對應的Key-Value就可以了。
(錯誤: This app attempts to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.—訪問相冊失敗,請求權限
This app attempts to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.–訪問相機(二維碼識別等)錯誤,要求相機權限
)
以上Value值,圈出的紅線部分的文字是展示給用戶看的,必須添加。
4.Xcode 8 運行一堆沒用的logs解決辦法
Xcode8代碼出現ubsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0,,enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 2016-09-14 17:18:55.843428 MyApp[6880:340837]
自己新建的一個工程啥也沒干就打印一堆爛七八糟的東西,我覺得這個應該是Xcode 8的問題,
具體也沒細研究,解決辦法是設置OS_ACTIVITY_MODE : disable
【product】-【scheme】-【Edit Scheme】-【Run】-【Argument】-【Environment Variable】添加keyValue【OS_ACTIVITY_MODE disable】可以停止輸出打印此日志
遺留問題:還會出現Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x10a39a910) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x10a1c4210). One of the two will be used. Which one is undefined.
5.iOS 10 UIStatusBar方法過期:
在我們開發中有可能用到UIStatusBar一些屬性,在iOS 10 中這些方法已經過期了,如果你的項目中有用的話就得需要適配。
UIStatusBarStyle 和 prefersStatusBarHidden這兩個屬性是readonly readonly readonly也就是說我們如果在iOS 10中調用,你需要使用preferredStatusBar比如這樣:
//iOS 10
- (BOOL)prefersStatusBarHidden{ return YES; } - (UIStatusBarStyle)preferredStatusBarStyle { return UIStatusBarStyleDefault; }
6.iOS 10 UICollectionView 性能優化
隨着開發者對UICollectionView的信賴,項目中用的地方也比較多,但是還是存在一些問題,比如有時會卡頓、加載慢等。所以iOS 10 對UICollectionView進一步的優化。
UICollectionView cell pre-fetching預加載機制UICollectionView and UITableView prefetchDataSource 新增的API針對self-sizing cells 的改進Interactive reordering
在iOS 10 之前,UICollectionView上面如果有大量cell,當用戶活動很快的時候,整個UICollectionView的卡頓會很明顯,為什么會造成這樣的問題,這里涉及到了iOS 系統的重用機制,當cell准備加載進屏幕的時候,整個cell都已經加載完成,等待在屏幕外面了,也就是整整一行cell都已經加載完畢,這就是造成卡頓的主要原因,專業術語叫做:掉幀.要想讓用戶感覺不到卡頓,我們的app必須幀率達到60幀/秒,也就是說每幀16毫秒要刷新一次.
iOS 10 之前UICollectionViewCell的生命周期是這樣的:
1.用戶滑動屏幕,屏幕外有一個cell准備加載進來,把cell從reusr隊列拿出來,然后調用prepareForReuse方法,在這個方法里面,可以重置cell的狀態,加載新的數據;
2.繼續滑動,就會調用cellForItemAtIndexPath方法,在這個方法里面給cell賦值模型,然后返回給系統;
3.當cell馬上進去屏幕的時候,就會調用willDisplayCell方法,在這個方法里面我們還可以修改cell,為進入屏幕做最后的准備工作;
iOS 10 UICollectionViewCell的生命周期是這樣的:
1.用戶滑動屏幕,屏幕外有一個cell准備加載進來,把cell從reusr隊列拿出來,然后調用prepareForReuse方法,在這里當cell還沒有進去屏幕的時候,就已經提前調用這個方法了,對比之前的區別是之前是cell的上邊緣馬上進去屏幕的時候就會調用該方法,而iOS 10 提前到cell還在屏幕外面的時候就調用;
2.在cellForItemAtIndexPath中創建cell,填充數據,刷新狀態等操作,相比於之前也提前了;
3.用戶繼續滑動的話,當cell馬上就需要顯示的時候我們再調用willDisplayCell方法,原則就是:何時需要顯示,何時再去調用willDisplayCell方法;
4.當cell完全離開屏幕以后,會調用didEndDisplayingCell方法,跟之前一樣,cell會進入重用隊列.
在iOS 10 之前,cell只能從重用隊列里面取出,再走一遍生命周期,並調用cellForItemAtIndexPath創建或者生成一個cell.在iOS 10 中,系統會cell保存一段時間,也就是說當用戶把cell滑出屏幕以后,如果又滑動回來,cell不用再走一遍生命周期了,只需要調用willDisplayCell方法就可以重新出現在屏幕中了.
iOS 10 中,系統是一個一個加載cell的,二以前是一行一行加載的,這樣就可以提升很多性能;iOS 10 新增加的Pre-Fetching預加載這個是為了降低UICollectionViewCell在加載的時候所花費的時間,在 iOS 10 中,除了數據源協議和代理協議外,新增加了一個UICollectionViewDataSourcePrefetching協議,這個協議里面定義了兩個方法:
- (void)collectionView:(UICollectionView *)collectionView prefetchItemsAtIndexPaths:(NSArray*)indexPaths NS_AVAILABLE_IOS(10_0); -(void)collectionView:(UICollectionView*)collectionView cancelPrefetchingForItemsAtIndexPaths:(NSArray*)indexPaths NS_AVAILABLE_IOS(10_0);
在ColletionView prefetchItemsAt indexPaths這個方法是異步預加載數據的,當中的indexPaths數組是有序的,就是item接收數據的順序;
CollectionView cancelPrefetcingForItemsAt indexPaths這個方法是可選的,可以用來處理在滑動中取消或者降低提前加載數據的優先級.
注意:這個協議並不能代替之前讀取數據的方法,僅僅是輔助加載數據.
Pre-Fetching預加載對UITableViewCell同樣適用.
WWDC2016 Session筆記 - iOS 10 UICollectionView新特性
7.iOS 10 UIColor 新增方法
以下是官方文檔的說明:
Most graphics frameworks throughout the system, including Core Graphics, Core Image, Metal, and AVFoundation, have substantially improved support for extended-range pixel formats and wide-gamut color spaces. By extending this behavior throughout the entire graphics stack, it is easier than ever to support devices with a wide color display. In addition, UIKit standardizes on working in a new extended sRGB color space, making it easy to mix sRGB colors with colors in other, wider color gamuts without a significant performance penalty.
(譯:大多數圖形架構整個系統,包括核心圖形核心形象,金屬,和AVFoundation,有擴展范圍的像素格式和寬色域的色彩空間大幅改善的支持。通過將此行為擴展到整個圖形堆棧中,它比以往任何時候都更容易支持具有寬顏色顯示的設備。此外,UIKit規范在新擴展的sRGB色彩空間工作,因此很容易與其他顏色混合的sRGB顏色,更寬的色域不顯著的性能損失。)
Here are some best practices to adopt as you start working with Wide Color.
(譯:這里是一些最佳實踐,采用你開始與多種顏色的工作)
In iOS 10, the UIColor class uses the extended sRGB color space and its initializers no longer clamp raw component values to between 0.0 and 1.0. If your app relies on UIKit to clamp component values (whether you’re creating a color or asking a color for its component values), you need to change your app’s behavior when you link against iOS 10.
(譯:在iOS 10中,該UIColor類使用擴展的sRGB色彩空間和初始化不再夾原成分值在0和1之間。如果你的應用程序依賴UIKit夾緊元件值(無論你是創建一個顏色或要求顏色其組件的值),你需要改變你的應用程序的行為時,你的鏈接和iOS 10。)
When performing custom drawing in a UIView on an iPad Pro (9.7 inch), the underlying drawing environment is configured with an extended sRGB color space.
(譯:當執行在iPad上親一個UIView的自定義繪制(9.7英寸),基本的繪圖環境配置一個擴展的sRGB色彩空間。)
If your app renders custom image objects, use the new UIGraphicsImageRenderer class to control whether the destination bitmap is created using an extended-range or standard-range format.
(譯:如果你的應用程序提供自定義的圖像對象,使用新的uigraphicsimagerenderer類控制是否目標位圖是使用擴展的范圍或標准格式創建。)
If you are performing your own image processing on wide-gamut devices using a lower level API, such as Core Graphics or Metal, you should use an extended range color space and a pixel format that supports 16-bit floating-point component values. When clamping of color values is necessary, you should do so explicitly.
(譯:如果您正在使用較低級別的接口,如核心圖形或金屬,在寬色域設備上執行自己的圖像處理,則應該使用擴展的范圍顏色空間和支持16位浮點組件值的像素格式。當對顏色值進行夾緊是必要的,你應該明確地這樣做。)
Core Graphics, Core Image, and Metal Performance Shaders provide new options for easily converting colors and images between color spaces.
(譯:圖形核心,核心形象,和金屬的性能提供了新的選擇,很容易着色的顏色和圖像之間的顏色空間轉換。)
因為之前我們都是用RGB來設置顏色,反正用起來也不是特別多樣化,這次新增的方法應該就是一個彌補吧。所以在iOS 10 蘋果官方建議我們使用sRGB,因為它性能更好,色彩更豐富。如果你自己為UIColor寫了一套分類的話也可嘗試替換為sRGB,UIColor類中新增了兩個Api如下:
+(UIColor *)colorWithDisplayP3Red:(CGFloat)displayP3Red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha NS_AVAILABLE_IOS(10_0); -(UIColor *)initWithDisplayP3Red:(CGFloat)displayP3Red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha NS_AVAILABLE_IOS(10_0);
8.iOS 10 UITextContentType
// The textContentType property is to provide the keyboard with extra information about the semantic intent of the text document.@property(nonatomic,copy) UITextContentType textContentType NS_AVAILABLE_IOS(10_0); // default is nil
在iOS 10 UITextField添加了textContentType枚舉,指示文本輸入區域所期望的語義意義。
使用此屬性可以給鍵盤和系統信息,關於用戶輸入的內容的預期的語義意義。例如,您可以指定一個文本字段,用戶填寫收到一封電子郵件確認uitextcontenttypeemailaddress。當您提供有關您期望用戶在文本輸入區域中輸入的內容的信息時,系統可以在某些情況下自動選擇適當的鍵盤,並提高鍵盤修正和主動與其他文本輸入機會的整合。
9.iOS 10 字體隨着手機系統字體而改變
當我們手機系統字體改變了之后,那我們App的label也會跟着一起變化,這需要我們寫很多代碼來進一步處理才能實現,但是iOS 10 提供了這樣的屬性adjustsFontForContentSizeCategory來設置。因為沒有真機,具體實際操作還沒去實現,如果理解錯誤幫忙指正。
UILabel *myLabel = [UILabel new]; /* UIFont 的preferredFontForTextStyle: 意思是指定一個樣式,並讓字體大小符合用戶設定的字體大小。 */ myLabel.font =[UIFont preferredFontForTextStyle: UIFontTextStyleHeadline]; /* 指示是否應自動更新相應元素的字體時,裝置的uicontentsizecategory。 這個屬性生效,元素的字體必須使用+ preferredfontfortextstyle: 或+ preferredfontfortextstyle:compatiblewithtraitcollection:一個有效的uifonttextstyle。 */ //是否更新字體的變化 myLabel.adjustsFontForContentSizeCategory = YES;
10.iOS 10 UIScrollView新增refreshControl
iOS 10 以后只要是繼承UIScrollView那么就支持刷新功能:
@property (nonatomic, strong, nullable) UIRefreshControl *refreshControl NS_AVAILABLE_IOS(10_0) __TVOS_PROHIBITED; - (instancetype)init; @property (nonatomic, readonly, getter=isRefreshing) BOOL refreshing; @property (null_resettable, nonatomic, strong) UIColor *tintColor; @property (nullable, nonatomic, strong) NSAttributedString *attributedTitle UI_APPEARANCE_SELECTOR; // May be used to indicate to the refreshControl that an external event has initiated the refresh action - (void)beginRefreshing NS_AVAILABLE_IOS(6_0); // Must be explicitly called when the refreshing has completed - (void)endRefreshing NS_AVAILABLE_IOS(6_0);
11.iOS 10 判斷系統版本正確姿勢
判斷系統版本是我們經常用到的,尤其是現在大家都有可能需要適配iOS 10,那么問題就出現了,如下圖:
我們得到了答案是:
//值為 1 [[[[UIDevice currentDevice] systemVersion] substringToIndex:1] integerValue] //值為10.000000 [[UIDevice currentDevice] systemVersion].floatValue, //值為10.0 [[UIDevice currentDevice] systemVersion]
所以說判斷系統方法最好還是用后面的兩種方法,哦~我忘記說了[[UIDevice currentDevice] systemVersion].floatValue這個方法也是不靠譜的,好像在8.3版本輸出的值是8.2,記不清楚了反正是不靠譜的,所以建議大家用[[UIDevice currentDevice] systemVersion]這個方法!
Swift判斷如下:
if #available(iOS 10.0, *) { // iOS 10.0 print("iOS 10.0"); } else { }
12.推送的時候,開啟Remote notificationsYou’ve implemented -[application:didReceiveRemoteNotification:fetchCompletionHandler:],
but you still need to add “remote-notification” to the list of your supported UIBackgroundModes in your Info.plist.
解決方案:需要在Xcode 中修改應用的 Capabilities 開啟Remote notifications,請參考下圖:
13.One of the two will be used. Which one is undefined.”
objc[5114]:Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x1109a5910) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x110738210). One of the two will be used. Which one is undefined.
在模擬器中、發現“One of the two will be used. Which one is undefined.”日志
查找資料發現原因:objc runtime 對所用app使用同一個命名空間(flat namespace),運行機制如下:
首先二進制映像被加載,檢查程序依賴關系
每一個二進制映像被加載的同時,程序的objc classes在objc runtime命名空間中注冊
如果具有相同名稱的類被再次加載,objc runtime的行為是不可預知的。一種可能的情況是任意一個程序的該類會被加載(這應該也是默認動作)
14.Xcode 8 Command + / 不能注釋
解決方法:在終端輸入
//sudo /usr/libexec/xpccachectl
重啟電腦即可.
另外:Xcode 推出來快速文本注釋:Command +Option +/
/** <#Description#> @param frame <#frame description#> @return <#return value description#> */ - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { [self initUiConfig]; } return self; }
15證書問題
這個問題剛開始估計大家都會碰到也是第一個要解決的問題
這個問題就是一個證書的設置問題,下面看兩張圖
正常我們會在BuildeSettings中設置證書:
但是在xcode8.0中我們看到下面的新特性:
相信大家都能看到在Genreal下面會有Siging,沒錯這就是新特性,為了方便用戶來管理,大家可以選擇Automatically manage signing。需要輸入開發者賬號!如果沒有賬號也沒關系,在下面也可以選擇Debug、Realease、inHouse模式下對應的證書也可以!
但是 但是 但是 如果你的證書如果是通配符類型的,但是你的app包含了比如推送、apple pay、他會報錯提示你未報含xx.id的manteid等等。所以你要生成針對你app的bundleid對應的證書!
16跳轉到app內的隱私數據設置頁面
我們知道用戶沒開啟,肯定要提醒用戶去設置開啟的吧,所以我們要跳轉到app的隱私數據界面。如何調用呢
iOS10 之前調用方法:
NSURL*url=[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]; [[UIApplication sharedApplication] openURL:url];
但是iOS10 之后不能再調用此方法進行跳轉隱私設置界面.
iOS10之后:
1)定義一個宏方便調用
//-----------------------系統權限設置路徑(iOS8以后適用)--------------------- //url #define SettingURL [NSURL URLWithString:UIApplicationOpenSettingsURLString] //調到設置 #define GoToSetting if([[UIApplication sharedApplication] canOpenURL:SettingURL]) { \ [[UIApplication sharedApplication] openURL:SettingURL];}}
調用
//去設置 if (IOS8_OR_LATER) { GoToSetting; }
2,方法中直接調用
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
17真彩色的顯示
真彩色的顯示會根據光感應器來自動的調節達到特定環境下顯示與性能的平衡效果,如果需要這個功能的話,可以在info.plist里配置(在Source Code模式下):
UIWhitePointAdaptivityStyle
它有五種取值,分別是:
UIWhitePointAdaptivityStyleStandard // 標准模式 UIWhitePointAdaptivityStyleReading // 閱讀模式 UIWhitePointAdaptivityStylePhoto // 圖片模式 UIWhitePointAdaptivityStyleVideo // 視頻模式 UIWhitePointAdaptivityStyleStandard // 游戲模式
如果你的項目是游戲類的,就選擇UIWhitePointAdaptivityStyleStandard這個模式,五種模式的顯示效果是從上往下遞減,也就是說如果你的項目是圖片處理類的,你選擇的是閱讀模式,給選擇太好的效果會影響性能.
18.Xib文件的注意事項
使用Xcode8打開xib文件后,會出現下圖的提示。
QQ20160913-9.png-41.7kB
大家選擇Choose Device即可。
之后大家會發現布局啊,frame亂了,只需要更新一下frame即可。如下圖
QQ20160913-11.png-113.2kB
- 注意:如果按上面的步驟操作后,在用Xcode7打開Xib會報一下錯誤,
QQ20160913-12.png-32.3kB
- 解決辦法:需要刪除Xib里面
這句話,以及把< document >中的toolsVersion和< plugIn >中的version改成你正常的xib文件中的值<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
,不過不建議這么做,在Xcode8出來后,希望大家都快速上手,全員更新。這就跟Xcode5到Xcode6一樣,有變動,但是還是要盡早學習,盡快適應喲!
19.MJRefresh出現崩潰現象
解決辦法:類庫增加判斷
1
2
3
|
if
(range.location !=
NSNotFound
) {
language = [language substringToIndex:range.location];
}
|
20.iOS 10 ImagePickerController.cameraViewTransform問題
(本條更新於:2016-09-21) 很多人反映自定義相機出現了問題,cameraViewTransform不能用了,其實網上關於這個的資料不是很多,在這里提供參考辦法如下:
通過監聽AVCaptureSessionDidStartRunningNotification來解決
//#import <AVFoundation/AVFoundation.h>
//監聽
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(cameraNotification:) name:AVCaptureSessionDidStartRunningNotification object:nil];
//監聽方法
- (void)cameraNotification:(NSNotification *)notification {
dispatch_async(dispatch_get_main_queue(), ^{
// 這里實現
imagePickerController.cameraViewTransform = CGAffineTransformMakeTranslation(50, 50);
});
}
- 使用AVFoundation框架
看來UIImagePickerController視乎不在適用於iOS 10了。所以說可以選擇AVFoundation來解決這個問題。 下面是參考學習: UIImagePickerController’s cameraViewTransform
21.Xcode8 警告報錯 “xx”is missing from working copy 問題解決
iOS開發時,將Xcode升級到8后,工程運行后出現了很多的報錯警告,如下圖所示,幾乎每個文件都有“xx”is missing from working copy的警告。某某文件 is missing from working copy字面意思來看是類似使用SVN時出現的刪除某個文件后,此文件仍出現在SVN緩存的問題。但是奇怪的是這個工程我暫時還沒有使用SVN,所以個人推斷原因可能是文件路徑緩存的問題。(有哪位同仁知道具體原因請麻煩告知)

問題具體原因:
同問題描述中所述。
問題解決:
1.打開Mac終端;
2.cd 到出問題的工程文件夾下 (to 新手朋友,就是在終端中輸入 cd 然后 輸入空格,再把出問題的那個文件拖拽到終端的窗口內,然后點擊回車。這其實就是一種獲取文件路徑的快速方法)
3.輸入 find . -type d -name .svn | xargs rm -rf (此命令的意思為刪除置頂文件下的所有SVN相關)
4.重新打開Xcode運行,成功,不在報錯“xx”is missing from working copy。
注意⚠️:此處應用的方法為解決svn緩存的方法,如果是因為SVN緩存問題出現的個別某個文件“xx”is missing from working copy報錯,請在第3步中輸入 svn rm --force 丟失文件的名稱,而不是刪除所有svn相關。
問題相關其他問法(為方便各種搜索問題習慣的朋友快速找到此解決方法):
Xcode8升級后報錯is missing from working copy;
iOS 報錯is missing from working copy;
升級Xcode8后很多警告報錯;
iOS很多警告報錯is missing from working copy;
某某文件 is missing from working copy;
參考資料及鳴謝:
http://blog.csdn.net/sinat_29789455/article/details/52640913
http://blog.csdn.net/hdfqq188816190/article/details/52594761
等等。
- iOS10適配問題點總結
- Xcode8下iOS10常見報錯閃退,字體適配和編譯不過的問題及解決方案
- iOS開發之適配iOS10以及Xcode8
- Xcode8以及iOS10適配等常見問題匯總(整理篇)
- 兼容iOS 10 升級xcode8出現的問題及一些適配問題的解決方案
- iOS10 App適配權限 Push Notifications 字體Frame 遇到的問題
- iOS10適配之權限Crash問題的完美解決方案
- iOS10 適配遠程推送功能實現代碼
- iOS10適配(必看)