无法导入pod Google / Analytics的框架目标

时间:2015-12-25 12:02:37

标签: ios swift google-analytics cocoapods

在我的项目中,我有一个名为'Util'的框架。我想在该框架中创建一个'AnalyticHelper.swift'。因此,我将“Google / Analytics”设置为“Util”目标。

这是我的podfile

platform :ios, '8.0' 
use_frameworks!

target 'GoogleAnalyticProb' do    
end

target 'Util' do   
    pod 'Google/Analytics'
end

然后我在AnalyticHelper.swift

import Google

问题是当我想在我的主目标中使用AnalyticHelper时。我需要import Util,而XCode说 Missing required module 'Google'

知道如何解决这个问题吗?

这是我的示例项目。您可以在AppDelegate文件中看到错误。 https://github.com/ppakorn/GoogleAnalyticProblem

我已经尝试将pod / Google Analytics分析到主要目标以消除错误,我收到了很多警告。

objc[37380]: Class GGLClearcutWriter is implemented in both /Users/Pakorn/Library/Developer/Xcode/DerivedData/BlueCrystal-cqptfbgzlujlfdcblsfabrkdwnrp/Build/Products/Dev-iphonesimulator/Utilities.framework/Utilities and /Users/Pakorn/Library/Developer/CoreSimulator/Devices/9069CB2D-4D55-44CB-BB09-04653BAE6AAD/data/Containers/Bundle/Application/AF714244-7C71-4252-86E2-D049EC39D765/BlueCrystal.app/BlueCrystal. One of the two will be used. Which one is undefined.

1 个答案:

答案 0 :(得分:0)

我最终将SDK直接导入到不使用Pod的框架中。