使用未解析的标识符“ FlurryAdInterstitial” [英] Use of unresolved identifier 'FlurryAdInterstitial'

查看:85
本文介绍了使用未解析的标识符“ FlurryAdInterstitial”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用
cocoapods集成 Flurry 非页内广告 / code>在 Swift Xcode 7.1.1 中。



我正在从开发人员yahoo网站上浏览此文档

https://developer.yahoo.com/flurry/docs/publisher/code/ios/#tab=0



这些说明似乎对我不起作用。首先,我在AppDelegate.swift中遇到此错误:


使用未解析的标识符'Flurry'


然后我在Flurry Github存储库中发现了一个已关闭的问题

https://github.com/flurry/Flurry-iOS-SDK/issues/3



我能够使用

  import Flurry_iOS_SDK 


但是现在 FlurryAdInterstitial 也有同样的错误


使用未解决的标识符'FlurryAdInterstitial'


我无法使用<$删除此链接错误c $ c>导入Flurry_iOS_SDK 。如果导入Flurry_iOS_SDK,则会出现此链接错误:


架构arm64的未定义符号:
_OBJC_CLASS _ $ _ FlurryAdInterstitial,引用自:在ViewController.o中用于__ObjC.FlurryAdInterstitial的
类型元数据访问器
ld:体系结构arm64找不到符号
铛:错误:链接器命令失败,退出代码为1(使用-v (请参阅调用)。


我还在Github中做了一个演示项目,以重现此链接错误。

https://github.com/rishi420/TestSwiftFlurryAd



只需下载此存储库并在Xcode 7.x中构建,您就应该会遇到此错误。

解决方案

如github问题中所述-需要在Flurry-iOS-SDK / FlurryAds podspec中指定-all_load链接器标志。这是一个有效的补丁程序(希望很快会合并到官方规范中,或者它们将通过其他方式解决):

  pod 'Flurry-iOS-SDK',:git =>  git@github.com:justadreamer / Flurry-iOS-SDK.git 


I am trying to integrate Flurry Interstitial Ads using cocoapods in Swift and Xcode 7.1.1.

I am following this documentation from developer yahoo site
https://developer.yahoo.com/flurry/docs/publisher/code/ios/#tab=0

The instructions don't seem to be working for me. First, I get this error in my AppDelegate.swift:

Use of unresolved identifier 'Flurry'

Then I found a closed issue in the Flurry Github repository
https://github.com/flurry/Flurry-iOS-SDK/issues/3

I was able to remove the error using

import Flurry_iOS_SDK

But now FlurryAdInterstitial also has same kind of error

Use of unresolved identifier 'FlurryAdInterstitial'

I am not able to remove this linking error using import Flurry_iOS_SDK. If I import Flurry_iOS_SDK I get this linking error:

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_FlurryAdInterstitial", referenced from: type metadata accessor for __ObjC.FlurryAdInterstitial in ViewController.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've also made a demo project in Github to reproduce this linking error.
https://github.com/rishi420/TestSwiftFlurryAd

Just download this repository and build in Xcode 7.x, you should able to get this error.

解决方案

As posted in the github issue - need to specify -all_load linker flag in the Flurry-iOS-SDK/FlurryAds podspec. Here is a working patch (hopefully will be merged into the oficial spec soon, or they will solve in other ways):

pod 'Flurry-iOS-SDK', :git => "git@github.com:justadreamer/Flurry-iOS-SDK.git"

这篇关于使用未解析的标识符“ FlurryAdInterstitial”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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