I want to use GoogleMaps
in My Cocoapod library.
There is GoogleMaps in cocoapod. but, you can't use dependency
because it is static library. probably...
I referenced this answer.
Building a Cocoapod with Swift and dependency on Objective-C framework
And, building library was succeeded.
I have problem when using builded library in Example project.
When I built Example project, first problem is
ld: framework not found GoogleMaps for architecture arm64
And, I tried to add GoogleMaps
to Example project's Podfile
.
next problem is
The 'Pods-MapLibraryWrapper_Example' target has frameworks with conflicting names: GoogleMaps.
Is there a way to solve the problem? or, Is there a other way to use GoogleMaps
?
Thanks.
Part of My library's podspec.
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'
directory structure
$(project_root)
|- MapLibraryWrapper.podspec
|- Dependencies/
|- GoogleMaps.framework
|- Example
|- Podfile
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