FlurrySDK with cocoapods

馋奶兔 提交于 2019-12-07 16:21:30

问题


I'm trying to integrate FlurrySDK framework in my app using Cocoapods (as I'm doing with already a lot of framework) but for some reason xcode keeps throwing this compilation error :

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_Flurry", referenced from:
  objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've added this line in my Podfile :

pod 'FlurrySDK'

and I ran a pod update wich successfully updated my Pods project (I can see FlurrySDK in my pods).

My AppDelegate.m is as follow :

#import <FlurrySDK/Flurry.h>
@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:    (NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    [Flurry startSession:FLURRY_API_KEY];
    ...
}
@end

I'm really desperate here, I'd like to keep my dependencies where they belong but it's seems that FlurrySDK podspec is not working properly...


回答1:


I finally found out where the issue was, it was linked to a faulty podspec file from a library I was using. The podspec did not pose any problem while making a pod update although the line specifying the libraries was corrupted. I changed :

 s.framework    = 'CoreLocation, MapKit' 

to

 s.framework    = 'CoreLocation', 'MapKit'

(note the single quotes: was one string, edited to be a list of two strings) and everything is now back on track.



来源:https://stackoverflow.com/questions/15133335/flurrysdk-with-cocoapods

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