GoogleMaps 1 Setting for use with Swift

Get CocoaPods $ sudo gem update --system # update ruby $ sudo gem install cocoapods # install cocoapods Install the API in CocoaPods $ cd [your project directory] $ pod init # make Podfile $ vim Podfile # edit Podfile $ pod install Analyzing dependencies Downloading dependencies Installing GoogleMaps (1.10.0) Generating Pods project Integrating client project [!] Please close any current Xcode sessions and use `[your project name].xcworkspace` for this project from now on. $ open [your project name].xcworkspace Podfile source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' target 'GMAP001' do use_frameworks! pod 'GoogleMaps' end After you install the API, to open the .xcworkspace. Also before you install the API, to the latest version of Xcode and CocoaPods.
Creation of the [project name] -Bridging-Header.h

http://docs.fabo.io/swift/googlemap/img/GMAP001_1.png
http://docs.fabo.io/swift/googlemap/img/GMAP001_2.png

Importing GoogleMaps/GoogleMaps.h
#import <GoogleMaps/GoogleMaps.h>

To enable the GoogleMap SDK for iOS
To create a project in googleDevelopers. Google Maps SDK for iOS choices, enable
http://docs.fabo.io/swift/googlemap/img/GMAP001_3.png

To issue the API Key
http://docs.fabo.io/swift/googlemap/img/GMAP001_4.png
http://docs.fabo.io/swift/googlemap/img/GMAP001_5.png

Enter the name and bundle ID of the project, making the API.
http://docs.fabo.io/swift/googlemap/img/GMAP001_6.png

Reference

Google API SDK for iOS - Getting Started
https://developers.google.com/maps/documentation/ios/start

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.