ios - GoogleMaps without CocoaPods -
i add googlemaps
ios project don't want use cocoapods
. there way achieve that?
sure there is:
- immediate answer: https://www.gstatic.com/cpdc/0646cf0bd434ed77-googlemaps-1.10.1.tar.gz (download , unzip it)
how did (useful library need)
- go pod need, in case: https://cocoapods.org/pods/googlemaps
- click on "see podspec" link below library on bottom right corner
- you gonna taken podspec.json
- at end of json, find key "source" , use url provided download sdk.
if need instructions on how install manually, can use waybackmachine websitea , put corresponding url, setting earlier date. i'll save time:
adding google maps old way:
- launch xcode , either open existing project, or create new project.
- if you're new ios, create a single view application, , ensure that use automatic reference counting is on.
- drag the googlemaps.framework bundle project. when prompted, select copy items destination group's folder.
- right-click googlemaps.framework in project, , select show in finder.
- drag the googlemaps.bundle from the resources folder project. when prompted, ensure copy items destination group's folder is not selected.
- select project project navigator, , choose application's target.
- open the build phases tab, , within link binary libraries, add following frameworks:
- avfoundation.framework
- coredata.framework
- corelocation.framework
- coretext.framework
- glkit.framework
- imageio.framework
- libc++.dylib
- libicucore.dylib
- libz.dylib
- opengles.framework
- quartzcore.framework
- systemconfiguration.framework
- choose project, rather specific target, , open the build settings tab.
- in the other linker flags section, add
-objc
. if these settings not visible, change filter in the build settings bar from basic to all.
- in the other linker flags section, add
- finally, add api key your appdelegate.
#import <googlemaps/googlemaps.h>
- add following your
application:didfinishlaunchingwithoptions:
method, replacing api_key with api key.[gmsservices provideapikey:@"api_key"];
#import <googlemaps/googlemaps.h>
add following application:didfinishlaunchingwithoptions:
method, replacing api_key
api key.
[gmsservices provideapikey:@"api_key"];
Comments
Post a Comment