Integrate Flurry SDK for iOS - - Manual Flurry SDK Integration

If you are looking to integrate Flurry SDK via CocoaPods follow the instructions for CocoaPods Integration.

Import Flurry Libraries

Follow these steps:

  1. Download the SDK for your iOS project. The downloaded SDK includes the required library containing Flurry’s collection and reporting code.

ios sdk download
  1. Open your Xcode project and click your project’s subfolder, as shown in the screenshot below.

  2. Click File > Add Files to your-build-target-name. In this window, navigate to the downloaded Flurry SDK and add the following folders:

  • Flurry (needed for all integration of the Flurry API)

  • FlurryAds (only needed if you want to use Flurry Advertising)

  1. Once you’ve added these folders, open the options tab at the lower left corner and do the following:

  • Check Copy items if needed to move the files to the project, not just reference them.

  • Select Create groups to organize the Flurry folders only visually in Xcode and prevent any errors from hierarchical organization.

  • Check your-build-target-name under Add to targets to ensure the libraries are linked to the binary.


ios integration project
  1. Next, click on your project root, then select Build Phases and look under Link Binary with Libraries, as shown in the screen illustration below. Make sure the libraries you are using are listed here.

Note

If you are not using Flurry Advertising or Flurry Analytics for the Apple Watch, you can remove those libraries by selecting them and clicking the “-” button.


ios build phases
  1. Depending on the Flurry libraries you are using, add the following frameworks to your build target by clicking the “+” button:

Frameworks needed for Flurry Analytics and all other Flurry Integration:

  • Security.framework

  • SystemConfiguration.framework

  • CoreLocation.framework

Frameworks needed only for Flurry Ads: - - AdSupport.framework - AVFoundation.framework - CoreGraphics.framework - CoreMedia.framework - Foundation.framework - MediaPlayer.framework - StoreKit.framework - UIKit.framework - WebKit.framework - CoreTelephony.framework - libz.tbd

Important

To clean up your Project navigator, we recommend that you select all frameworks you added in the Project navigator: Right-click them, select New Group from Selection and name this Frameworks.

Note

Flurry SDK does not require CoreLocation framework and does not collect GPS location by default.

To track geographic location, follow the steps in outlined in the Advanced Features for Flurry Analytics.

Swift SDK Integration

For Swift integration, you’ll need to implement a Bridging Header. Follow these steps if you are importing manually using Swift.

  1. Create the Bridging Header:

  • Click on your project’s subfolder (the folder with your app delegate, storyboard, and view controller under it).

  • Click File > New > File. You’ll be prompted to choose a template for your new file, which you will select Source under iOS along with Header File.

  1. Save the Bridging Header:

  • When prompted to save the file, name it using the following convention: projectname-Bridging-Header.h, where projectname is the name of your project.

  1. Expose the Bridging Header:

  • Select your project root and select Build Settings.

  • Make sure All not Basic is highlighted and then navigate to the Swift Compiler section.

  • Add the path to your Bridging Header as a key to the Objective-C Bridging Header item: projectname/projectname-Bridging-Header.h.


ios bridging header swift
  1. Import Objective-C libraries using the Bridging Header.

  • Select the Bridging Header file you created and add the import statements for each needed header file. The following bridging header example imports all Flurry libraries.

#ifndef IntegrationTest_Bridging_Header_h
#define IntegrationTest_Bridging_Header_h

//Needed for all Flurry Integration
#import "Flurry.h"

//Only needed for Flurry Advertising Integration
#import "FlurryAdBanner.h"
#import "FlurryAdBannerDelegate.h"
#import "FlurryAdDelegate.h"
#import "FlurryAdError.h"
#import "FlurryAdInterstitial.h"
#import "FlurryAdInterstitialDelegate.h"
#import "FlurryAdNative.h"
#import "FlurryAdNativeAsset.h"
#import "FlurryAdNativeDelegate.h"
#import "FlurryAdNativeStyle.h"
#import "FlurryAds.h"
#import "FlurryAdTargeting.h"

#endif /* IntegrationTest_Bridging_Header_h */