Xcode 报错

```swift

The application could not be verified.

```

-  Xcode装机报错:"The application could not be verified."

+  删除之前在设备上安装的app就好了,估计问题应该是上一次的证书跟现在的证书不一致导致。

-  还有就是证书的问题,要么就是失效了,去https://developer.apple.com/membercenter/index.action进行重新生成

-  要么就是没有在Build Settings的Code Signing里面的Debug和Rlease里面设置iPhone Devolopment证书环境以及在Provisioning Profile中加上你的证书

-  崩溃报错:

```swift

[dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib]

```

-  解决方法:Try to do clean, build and then run the project. Worked for me.

-  先打一个全局断点,崩溃的时候,就能通过断点定位到哪里

-  今天不知道为什么Xib文件关联不上,不停的崩溃。报错:

```swift

[Fatal error: unexpectedly found nil while unwrapping an Optional values]

```

-  这里就发现昨天还可以编译运行的Xib文件(用作扫描二维码形式动画)今天就突然运行不了了

-  这里的代码失效了

```swift

/**

开始冲击线动画

*/

private func startAnimation()

{

// 1.初始化冲击波位置

ScanLineTopCons.constant = -ContainerHeightCons.constant

view.layoutIfNeeded()

// 2.执行动画

UIView.animateWithDuration(2.5, animations: { () -> Void in

// 告诉系统该动画需要重复

UIView.setAnimationRepeatCount(MAXFLOAT)

self.ScanLineTopCons.constant = self.ContainerHeightCons.constant

self.view.layoutIfNeeded()

})

}

```

-  错误定位在这里,我也不知道为什么突然就报错了

```swift

ScanLineTopCons.constant = -ContainerHeightCons.constant

```

-  **未解决**

-  #####可能崩溃原因:我的手机是iOS9.2的系统,测试机只有iOS8.4的系统。

在我的手机上可以正常跑起来,测试机上不可以。

-  1.找出动画总是崩溃的原因找出来

+  以解决。方案:

+  在Swift中,加载Xib需要加载(iOS9里面不用,不知道是不是个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)

}

```

-  而且动画要在ViewDidAppear里面加载动画




```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

```

-  这个报错是因为我的iOS系统升级成了9.3,而Xcode没有升级,所以报错


```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.

```

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,178评论 0 10
  • 一般在程序中先打一个全局断点,崩溃的时候,一般就能通过断点定位到在哪里 1: Xcode装机报错:"The app...
    Tuberose阅读 5,229评论 7 17
  • PLEASE READ THE FOLLOWING APPLE DEVELOPER PROGRAM LICENSE...
    念念不忘的阅读 14,599评论 5 6
  • “ 人的精神世界好比一座冰山,清醒意识只占了其中浮出水面的那一小部分,在水面底下隐秘的大部分是潜意识,潜意识里面的...
    觉知中的帆阅读 1,769评论 0 0
  • 我是一名211院校工科研究生,目前研二。作为一名研究生,我们期待通过自己3年的学习,专业技能与本科生相比有跨越式的...
    possible先生阅读 4,172评论 0 7

友情链接更多精彩内容