iOS8 phonegap cordova网络信息应用崩溃 [英] iOS8 phonegap cordova network-information app crashes

查看:190
本文介绍了iOS8 phonegap cordova网络信息应用崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用


  • Xcode 6.1

  • iOS 8.1

  • cordova 4.0.0(iOS 3.6.3)

  • org.apache.cordova.network-information 0.2.13

  • Xcode 6.1
  • iOS 8.1
  • cordova 4.0.0 (iOS 3.6.3)
  • org.apache.cordova.network-information 0.2.13

首先,当我添加插件,它从来没有添加SystemConfiguration.framework。我需要手动将它添加到Buiild阶段。

First, when I add the plugin it never adds the SystemConfiguration.framework. I need to add it manually to the Buiild Phase.

一旦完成,应用程序可以构建,但它在任何离线事件崩溃。

Once this is done, the app can build but the it crashes on any offline event.

updateReachability被执行,并且_callbackId变量的[self sendPluginResult]调用发起和EXC_BAD_ACCESS异常。

"updateReachability" is executed and the [self sendPluginResult] call originates and EXC_BAD_ACCESS exception on the _callbackId variable.

cordova 3.1.0。

I found many reports since cordova 3.1.0. Is this just not working anymore or did someone found a fix for this problem?

感谢任何提示。

推荐答案

看起来我发现了问题。一旦您在XCode项目(Project-> Build Settings)中禁用了ARC(自动引用计数),Network-Information Plugin就会导致崩溃。所以我通过将选项设置为YES(在Target& Project中)来修复它。

It looks like I found the problem. Once you have ARC (Automatic Reference Counting) disabled in your XCode Project (Project->Build Settings) the Network-Information Plugin seems to cause a crash. So I fixed it by setting the option back to YES (in both Target & Project).

但是在我的例子中,我有一些类会导致构建失败ARC是。因此,我在Project-> Build Phases-> Compile Sources中为每个类添加了一个标志 -fno-objc-arc

But in my case I had some classes which causes the build to fail with ARC YES. Therefore I added a flag -fno-objc-arc for each those classes in Project->Build Phases->Compile Sources.

这篇关于iOS8 phonegap cordova网络信息应用崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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