错误“'sharedApplication'不可用:iOS(App Extension)上不可用....”在pod更新后进行编译时 [英] Error "'sharedApplication' is unavailable: not available on iOS (App Extension)...." when compiling after pod update

查看:2331
本文介绍了错误“'sharedApplication'不可用:iOS(App Extension)上不可用....”在pod更新后进行编译时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你有一个使用cocoapods的projets(包括app扩展)。 (使用Parse,Bolts等库)。

Hi have a projets(including app extension) using cocoapods. (with Parse, Bolts, etc library).

之前一切正常(使用螺栓1.1.5库),但是,当我运行pod更新时(螺栓) 1.2.0),我现在得到一些错误:

All work fine before (using bolts 1.1.5 library), but, when i've run a pod update (Bolts 1.2.0), I now get some errors:

/ Volumes / project 2 / Pods / Bolts / Bolts / iOS / BFAppLinkNavigation.m:100:29:' sharedApplication不可用:iOS上不可用(App Extension) - 在适当的情况下使用基于视图控制器的解决方案。

"/Volumes/project 2/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.m:100:29: 'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead."

任何想法如何解决这个问题?

Any Idea how to solve this?

推荐答案

Cocoapods非常有用(我敢肯定),但是它们可以用于应用程序,而不是App Extensions,最终会失去控制力他们在更新过程中介绍的功能,因此您需要根据他们使用的API对您使用的库的版本进行更多的判断。

Cocoapods are very useful (I'm sure), however they are designed to work with Apps, not App Extensions, and ultimately you lose control of the features they introduce during an update, so you will need to be more judicial about what versions of libraries you do use, based on the APIs they utilize.

在螺栓1.2.0的情况下,显然决定使用 sharedApplication ,因此不适合在App扩展中使用。

In the case of Bolts 1.2.0, it's obviously decided to use sharedApplication, thus making it unsuitable for use in an App Extension.

所以你会eed开始使用源代码形式的库,可能每个都使用 git submodule ,这将允许您在更新上游时更新它们。

So you will need to start using the libraries in source form, perhaps using git submodule for each one, that will allow you to update them when upstream is updated.

这篇关于错误“'sharedApplication'不可用:iOS(App Extension)上不可用....”在pod更新后进行编译时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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