【发布时间】:2015-06-18 04:29:14
【问题描述】:
我在名为 MyApp 的 iPad 项目中创建了一个名为 MyAppCore 的新“Cocoa Touch 框架”目标,目的是在其中放置一些通用代码。总的来说,它工作得很好,但是,我在添加 Google Analytics 提供的静态库时遇到了问题。
我希望不仅能够在 MyApp 目标中使用 Google Analytics,还希望能够在 MyAppCore 目标内部使用。为了构建两个目标,我必须将两个目标与 libGoogleAnalyticsServices.a 链接。这似乎可行,但是当我运行该应用程序时,日志会被以下消息轰炸:
Class GAI is implemented in both /path/to/MyAppCore.framework/MyAppCore
and /path/to/MyApp.app/MyApp.
One of the two will be used. Which one is undefined.
如何在两个目标之间成功共享 Google Analytics?
【问题讨论】:
-
你找到解决办法了吗?
标签: objective-c cocoa-touch google-analytics frameworks static-libraries