Xcode 7中的XPC连接在iOS 9中被中断 [英] XPC connection interrupted in Xcode 7 for iOS 9

查看:93
本文介绍了Xcode 7中的XPC连接在iOS 9中被中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近更新到Xcode 7,并将iPhone升级到iOS9.我开发并发布了一个iOS应用程序,该应用程序在最新版本的iOS 8和Xcode 6上运行良好.

I recently updated to Xcode 7 and upgraded my iPhone to iOS 9. I have developed and released an iOS app that had worked perfectly fine on the latest version of iOS 8 and Xcode 6.

在尝试完成针对iOS 9支持的应用程序更新过程时,我遇到了最荒唐的奇怪错误,使我感到困惑.

Upon trying to go through the process of updated the app for iOS 9 support, I am getting the most ridiculously strange error that has left me baffled.

我已经通过Xcode自动完成了所有语法更正,现在我的应用可以正确构建.一开始它甚至运行良好.

I have done all the syntax corrections automatically through Xcode, and now my app builds properly. It even runs fine at first.

我有一个按钮,可以通过WebView链接到视图控制器.该视图控制器加载了一个链接,该链接将显示来自YouTube的图像,网站或视频.内容加载一如既往的完美.但是,当我单击后退"按钮(我在导航堆栈中)时,该程序将崩溃并重新启动模拟器(和我的iPhone),并将我发送到锁定屏幕.

I have a button that segues to a view controller with a WebView. This view controller loads a link that will display either an image, website, or video from youtube. The content is loaded perfectly fine as always. However, the program will crash and reboot the simulator (and my iPhone) and send me to the lock screen when I click the Back button (I am on a navigation stack).

在Xcode中,我收到以下消息:

In Xcode, I get the following messages:

XPC连接中断. 由于没有系统应用程序而终止.

XPC Connection Interrupted. Terminating since there is no system app.

顺便说一句,我在我的应用程序中集成了Flurry分析,不确定是不是一个问题.

I have Flurry analytics integrated in my app by the way, not sure if thats an issue.

如何解决此问题?我对XPC连接的搜索似乎未返回与我类似的问题.我什至不知道XPC连接是什么,那为什么仍然要在我的应用程序中使用它?

How can I fix this issue? My searches for XPC connections do not seem to return problems similar to mine. I do not even have a clue what an XPC connection is, so why is this in my app anyway?

我找到了解决该问题的方法.我不能真的说这是解决方法.

I have found a workaround for the issue. I cannot really say it is a fix.

当使用方法self.navigationController?.popViewControllerAnimated设置为true时,发生崩溃.我碰巧将其设置为false,然后崩溃停止了(现在过渡看起来很糟糕).

The crashing was occurring during the use of the method self.navigationController?.popViewControllerAnimated, when set to true. I happened to set this to false, and the crashing stops (now the transition looks awful).

我不知道为什么会这样,这只会增加我的困惑.

I do not know why this works, and just adds to my confusion.

推荐答案

这个问题对我来说也存在于情节提要中.我创建了一个新项目,并列出了视图,一切似乎都正常进行.我在情节提要板源中找到了以下几行代码(右键单击情节提要板,然后将视图选择为->源代码),这在工作版本和损坏的版本之间并不常见:

The problem lied in the storyboard for me as well. I created a new project and laid out the views and everything seemed to be working fine. I found these couple lines in the storyboard source (right click on storyboard and select view as -> source code) which weren't common between the working version and the broken version:

<keyCommands>
    <keyCommand/>
</keyCommands>

我不知道这些行应该怎么做,或者它们如何潜入我的情节提要文件中,但是它们是使应用程序崩溃的严重原因,以至于手机不得不重启.我从主项目中删除了这些行,一切又恢复了.

I have no idea what those lines are supposed to do, or how they crept into my storyboard file, but they were what was crashing the app so hard that the phone had to restart. I removed those lines from my main project and everything worked again.

这篇关于Xcode 7中的XPC连接在iOS 9中被中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆