Search code examples
iosxcodeswiftflurry

Flurry issue: Xcode 7 and Swift Language


I've implemented flurry 6.7.0 to my Xcode 7 project ( swift language ) as described in the page ::

https://developer.yahoo.com/flurry/docs/analytics/gettingstarted/swift/?soc_src=mail&soc_trk=ma

But when the project is building, i get this error message :

ld: library not found for -lFlurry_6.7.0 clang: error: linker command failed with exit code 1 (use -v to see invocation)

How do i resolve the problem ? any idea please?

EDIT::

HOLY SHIT!! Just added .a file to copy bundle resources... I thought that I have checked that before and still the problem is there........

EDIT 2::

now I have removed it without any problem

I don't know what was the problem :|


Solution

  • I recommend you tu use CocoaPods to avoid all of these problems, flurry has a Pod, here it is, if your are not familiar with CocoaPods, here is a very straight forward tutorial

    I Made It work

    • Xcode 7 Beta 5
    • CocoaPods v0.38.2

    Here's my PodFile:

    # Uncomment this line to define a global platform for your project
    platform :ios, '8.0'
    use_frameworks!
    
    target 'FlurryTest' do
        pod 'FlurrySDK', '~>6.6'
    end
    

    And then had to add manually a bridging header Flurry-Bridging-Header.h just with this content:

    #import "Flurry.h"
    

    Now add to your target Build Settings this under Swift Compiler - Code Generation in the value of Objective-C Brinding Header:

    enter image description here

    Then you just use it under your classes

    enter image description here

    And it compiles of course :D