Flurry Ads integration issue when using CocoaPods
Asked Answered
D

2

7

I am using CocoaPods to integrate Flurry Ads in my project as per the instructions on the Flurry Developer Documentation.

I have my Podfile as below:

platform :ios, '9.0'
use_frameworks!

target 'Foo' do
    pod 'Flurry-iOS-SDK/FlurrySDK'
    pod 'Flurry-iOS-SDK/FlurryAds'
end

I am not using a Bridging Header since in CocoaPods 0.39 we can use use_frameworks! to avoid the bridging header. I have set the 'Build Active Architecture' to Yes for Debug and No for Release.

This is the error I get: _OBJC_CLASS_$_FlurryXXXXXX referenced from FooViewController, linker command failed with exit code 1

enter image description here

Demobilize answered 9/1, 2016 at 1:40 Comment(1)
V
0

As posted in the github issue https://github.com/flurry/Flurry-iOS-SDK/issues/18 and in this SO answer: Use of unresolved identifier 'FlurryAdInterstitial': 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 => "[email protected]:justadreamer/Flurry-iOS-SDK.git"

Hope this will save you some time

Venatic answered 17/1, 2016 at 15:1 Comment(1)
Thanks for the effort, though I would wait for the official response. I have contacted the Flurry support and they said they are looking into it.Demobilize
M
-1

I integrate Flurry from Scratch using your CocoaPods Settings. You have to add some libraries and frameworks which are requires to run app successfully.

Please attach below given Frameworks and libraries as given in Images:

libz.1.1.3.tbd
libz.1.2.5.tbd
libz.1.tbd
libz.tbd
SystemConfiguration.ramework
MediaPlayer.framework
AdSupport.framework
libFlurry_7.3.0.a
libFlurryAds_7.3.0.a
Security.framework
Flurry_iOS_SDK.framework
Pods_ProjectName.framework

Add this line to AppDelegate.swift

//  AppDelegate.swift

import Flurry_iOS_SDK

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Override point for customization after application launch.

    Flurry.startSession("YOUR_API_KEY");
    return true
}

enter image description here

enter image description here

Maleficent answered 11/1, 2016 at 14:34 Comment(7)
So these are to be added to the Main project and not to the Pods project?Demobilize
Add it to Target settings.Maleficent
Target of the Main project or the Flurry target of the Pods project?Demobilize
Target of Main Project. If you find any issue then let me know.Maleficent
I tried with all the settings above, still the same issue :(. I did not add the libFlurry*.a, because thats what I'd do without Cocoapods. The whole point of using Cocoapods is that I don't have to manually include the dependencies.Demobilize
So are you using CocoaPods or not ?Maleficent
Yes, I am. That is why I do not want to include the Flurry libs directly as in the screenshot. But apart from that I still cannot build with the above settings you have shown.Demobilize

© 2022 - 2024 — McMap. All rights reserved.