Reputation: 857
I am creating a framework in iOS Using Swift. I have created the podspec file and put the dependency of googlemap in my framework.
When I am trying to install the my framework in sample application,It shows "No Such Module Find" for "GooogleMaps". Please let me how to link google maps in my framework so any application when install my cocoapod will automatically get GoogleMaps without any error.
Upvotes: 5
Views: 1407
Reputation: 6547
If you have created a pod
and in your .podspec
file you are trying to add a dependency
(like Alamofire, RealmSwift..) after that you should go to the Example/..
folder and do a pod install
to make the dependencies required from the .podspec of your custom pod
visible to the .swift files in your custom pod/framework.
A typical example of a pod project folder hierarchy would be:
- SMCustomPod/
- _Pods.xcodeproj
- Example/ // <-- do a pod install under this folder in order to get the dependencies declared in your .podspec
- Podfile
- SMCustomPod.xcodeproj
- SMCustomPod.xcworkspace
- SMCustomPod/
- Classes/ // <-- folder with pod specific logic that also uses Alamofire
- Assets/
- SMCustomPod.podspec // <-- your podspec with dependencies (Alamofire..)
Upvotes: 3
Reputation: 136
try this :-
target 'Circle' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks!
# Pods for Circle --------->>>>>>>>>. Your Project name
pod 'GoogleMaps'
pod 'GooglePlaces'
end
Upvotes: 0
Reputation: 4950
First off try to clean the project by
Command + Shift + Options + K
If I'm not mistaken, GoogleMaps framework is built from Objective-C so if there's still a problem then do the following steps:
Create a bridging header file which you can trigger and setup automatically by creating a dummy Objective-C class in your Swift project. Xcode will then ask you if you would want to create a bridging header, click yes. Delete the dummy class you created after.
Configure the header search path to point the Pods with recursion
Do a clean-build.
Upvotes: 0