我想在My Cocoapod库中使用GoogleMaps
。
有GoogleMaps in cocoapod。但是,您无法使用dependency
,因为它是静态库。大概...
我引用了这个答案
Building a Cocoapod with Swift and dependency on Objective-C framework
而且,建筑图书馆也成功了。
在示例项目中使用构建库时遇到问题。
当我构建Example项目时,第一个问题是
ld:未找到框架架构arm64的GoogleMaps
并且,我尝试将GoogleMaps
添加到示例项目的Podfile
下一个问题是
' Pods-MapLibraryWrapper_Example'目标有框架 名称冲突:GoogleMaps。
有没有办法解决这个问题?或者,还有其他方法可以使用GoogleMaps
吗?
感谢。
s.platform = :ios, '8.0'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
s.resource_bundles = {
'MapLibraryWrapper' => ['Pod/Assets/*.png']
}
s.ios.resource_bundle = { 'MapLibraryWrapper-ios' => 'Resources/*.png' }
s.public_header_files = 'Pod/Classes/**/*.h'
s.frameworks = "Accelerate", "AVFoundation", "CoreData", "CoreLocation", "CoreText", "Foundation", "GLKit", "ImageIO", "OpenGLES", "QuartzCore", "SystemConfigurati\
on", "GoogleMaps"
# s.dependency 'GoogleMaps'
s.libraries = "c++", "icucore", "z"
s.vendored_frameworks = 'Dependencies/GoogleMaps.framework'
s.prepare_command = './download-googlemaps.sh'
$(project_root)
|- MapLibraryWrapper.podspec
|- Dependencies/
|- GoogleMaps.framework
|- Example
|- Podfile
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'MapLibraryWrapper_Example', :exclusive => true do
pod 'MapLibraryWrapper', :path => '../'
pod 'GoogleMaps'
end
target 'MapLibraryWrapper_Tests', :exclusive => true do
pod 'MapLibraryWrapper', :path => '../'
pod 'Quick', '~> 0.8.0'
pod 'Nimble', '3.0.0'
end