```swift
The application could not be verified.
```
-? Xcode裝機(jī)報(bào)錯(cuò):"The application could not be verified."
+? 刪除之前在設(shè)備上安裝的app就好了,估計(jì)問(wèn)題應(yīng)該是上一次的證書(shū)跟現(xiàn)在的證書(shū)不一致導(dǎo)致。
-? 還有就是證書(shū)的問(wèn)題,要么就是失效了,去https://developer.apple.com/membercenter/index.action進(jìn)行重新生成
-? 要么就是沒(méi)有在Build Settings的Code Signing里面的Debug和Rlease里面設(shè)置iPhone Devolopment證書(shū)環(huán)境以及在Provisioning Profile中加上你的證書(shū)
-? 崩潰報(bào)錯(cuò):
```swift
[dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib]
```
-? 解決方法:Try to do clean, build and then run the project. Worked for me.
-? 先打一個(gè)全局?jǐn)帱c(diǎn),崩潰的時(shí)候,就能通過(guò)斷點(diǎn)定位到哪里
-? 今天不知道為什么Xib文件關(guān)聯(lián)不上,不停的崩潰。報(bào)錯(cuò):
```swift
[Fatal error: unexpectedly found nil while unwrapping an Optional values]
```
-? 這里就發(fā)現(xiàn)昨天還可以編譯運(yùn)行的Xib文件(用作掃描二維碼形式動(dòng)畫(huà))今天就突然運(yùn)行不了了
-? 這里的代碼失效了
```swift
/**
開(kāi)始沖擊線動(dòng)畫(huà)
*/
private func startAnimation()
{
// 1.初始化沖擊波位置
ScanLineTopCons.constant = -ContainerHeightCons.constant
view.layoutIfNeeded()
// 2.執(zhí)行動(dòng)畫(huà)
UIView.animateWithDuration(2.5, animations: { () -> Void in
// 告訴系統(tǒng)該動(dòng)畫(huà)需要重復(fù)
UIView.setAnimationRepeatCount(MAXFLOAT)
self.ScanLineTopCons.constant = self.ContainerHeightCons.constant
self.view.layoutIfNeeded()
})
}
```
-? 錯(cuò)誤定位在這里,我也不知道為什么突然就報(bào)錯(cuò)了
```swift
ScanLineTopCons.constant = -ContainerHeightCons.constant
```
-? **未解決**
-? #####可能崩潰原因:我的手機(jī)是iOS9.2的系統(tǒng),測(cè)試機(jī)只有iOS8.4的系統(tǒng)。
在我的手機(jī)上可以正常跑起來(lái),測(cè)試機(jī)上不可以。
-? 1.找出動(dòng)畫(huà)總是崩潰的原因找出來(lái)
+? 以解決。方案:
+? 在Swift中,加載Xib需要加載(iOS9里面不用,不知道是不是個(gè)Bug)
+? FaceDetectViewController.swift和FaceDetectViewController.xib這里的Xib要在PhotoViewController.swift里面的signButtonClickAction()方法中加載一下
```swift
func signButtonClickAction(){
let detectViewController = FaceDetectViewController(nibName: "FaceDetectViewController", bundle: nil)
detectViewController.delegate = self
presentViewController(detectViewController, animated: true, completion: nil)
}
```
-? 而且動(dòng)畫(huà)要在ViewDidAppear里面加載動(dòng)畫(huà)
```swift
The model used to open the store is incompatible with the one used to create the store
```
-? 解決方法
+? Remove the app from the simulator and perform a clean on your project. That should clear those issues up. Make sure that you are not running in the debugger when you delete the app or else it won't actually delete it properly.
+? If you want to be sure its gone, check this directory?Users/INSERT_YOUR_USER_HERE/Library/Application Support/iPhone Simulator/
for your app's folder, under the version you're running.
+? Note: This is for development only. For production, you need to implement some sort of migration. Google "Core Data Migration", with lightweight migration being the simplest.
```swift
Could not find Developer Disk Image
```
-? 這個(gè)報(bào)錯(cuò)是因?yàn)槲业膇OS系統(tǒng)升級(jí)成了9.3,而Xcode沒(méi)有升級(jí),所以報(bào)錯(cuò)
```swift
[Xcode 7.2 no matching provisioning profiles found]
```
-? 解決辦法
```swift
I also had some problems after updating Xcode.
I fixed it by opening Xcode Preferences (?+,), going to?*Accounts*?→?*View Details*. Then select all provisioning profiles and delete them with backspace. Restart Xcode, else the list doesn't seem to update properly.
Now click the?*Download all*?button, and you should have all provisioning profiles that you defined in the Member center back in Xcode. Don't worry about the Xcode-generated ones (Prefixed with?XC:
), Xcode will regenerate them if necessary.
Now go to the?*Code Signing*?section in your Build Settings and select the correct profile and cert. If necessary, restart Xcode again.
Why this happens at all? No idea... I gave up on understanding Apple's policies regarding app signing.
```