Use of unresolved identifier 'FlurryAdInterstitial'

自闭症网瘾萝莉.ら 提交于 2019-12-07 10:06:00

问题


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.


回答1:


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"


来源:https://stackoverflow.com/questions/34478279/use-of-unresolved-identifier-flurryadinterstitial

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!