简体   繁体   English

加入Flurry分析之后,如何使我的构建在xcode中成功?

[英]How do I get my build to succeed in xcode after I include Flurry analytics?

I've included the folder labeled 'Flurry' in my project. 我在项目中添加了标有“ Flurry”的文件夹。 I've added the lines in AppDelegate.m: 我在AppDelegate.m中添加了以下行:

#import "Flurry.h"

- (void)applicationDidFinishLaunching:(UIApplication *)application
{
    [Flurry startSession:@"my_key"];
}

However, I get 7 errors after I try to run. 但是,尝试运行后出现7个错误。

Undefined symbols for architecture i386:
  "_SCNetworkReachabilityCreateWithAddress", referenced from:
      +[FlurryReachability flurryReachabilityWithAddress:] in libFlurry.a(libFlurry.a-i386-master.o)
  "_SCNetworkReachabilityCreateWithName", referenced from:
      +[FlurryReachability flurryReachabilityWithHostName:] in libFlurry.a(libFlurry.a-i386-master.o)
  "_SCNetworkReachabilityGetFlags", referenced from:
      -[FlurryReachability flurryCurrentReachabilityStatus] in libFlurry.a(libFlurry.a-i386-master.o)
      -[FlurryReachability isFlurryReachable] in libFlurry.a(libFlurry.a-i386-master.o)
      -[FlurryReachability isFlurryConnectionRequired] in libFlurry.a(libFlurry.a-i386-master.o)
      -[FlurryReachability isFlurryConnectionOnDemand] in libFlurry.a(libFlurry.a-i386-master.o)
      -[FlurryReachability isFlurryUserInterventionRequired] in libFlurry.a(libFlurry.a-i386-master.o)
      -[FlurryReachability isFlurryReachableViaWWAN] in libFlurry.a(libFlurry.a-i386-master.o)
      -[FlurryReachability isFlurryReachableViaWiFi] in libFlurry.a(libFlurry.a-i386-master.o)
      ...
  "_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
      -[FlurryReachability flurryStartNotifier] in libFlurry.a(libFlurry.a-i386-master.o)
  "_SCNetworkReachabilitySetCallback", referenced from:
      -[FlurryReachability flurryStartNotifier] in libFlurry.a(libFlurry.a-i386-master.o)
  "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
      -[FlurryReachability flurryStopNotifier] in libFlurry.a(libFlurry.a-i386-master.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

You're getting these errors because Flurry.h/.a reference the framework SystemConfiguration.framework , and you haven't added it to your project. 之所以会出现这些错误,是因为Flurry.h / .a引用了框架SystemConfiguration.framework ,并且尚未将其添加到项目中。

To add it to your project, select your project in Xcode (very top in the navigation thing on the left), and select your target. 要将其添加到项目中,请在Xcode中选择您的项目(在左侧导航栏中的顶部),然后选择目标。 Scroll down to the heading 'Linked Frameworks and Libraries'. 向下滚动到标题“链接的框架和库”。 There will be a list of items with little toolboxes next to them. 旁边会有一个带有小工具箱的项目列表。 Click the plus button at the bottom of that list. 单击该列表底部的加号按钮。

In the resulting popover thing, search for 'SystemConfiguration'. 在出现的弹出窗口中,搜索“ SystemConfiguration”。 Double click on it. 双击它。

Repeat for Each Target 对每个目标重复

Run your project. 运行您的项目。 Get build succeeded. 取得成功。 Done. 做完了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM