iOS 초보

iOS. 구글맵

돌비 2015. 8. 11. 15:57

* 구글맵 framework 다운로드
https://developers.google.com/maps/documentation/ios/start#getting_the_google_maps_sdk_for_ios


* 구글맵 api 키 생성
https://developers.google.com/maps/documentation/ios/start#obtaining_an_api_key


* xcode 프로젝트 셋팅 변경
프로젝트 -> Build Settings -> Objective-C Automatic Reference Counting : YES
프로젝트 -> Build Settings -> Other Linker Flags : -ObjC


* xcode 프로젝트에 framework 추가
AVFoundation.framework
CoreData.framework
CoreLocation.framework
CoreText.framework
GLKit.framework
ImageIO.framework
libc++.dylib
libicucore.dylib
libz.dylib
OpenGLES.framework
QuartzCore.framework
SystemConfiguration.framework
GoogleMaps.framework


* xcode 프로젝트에 GoogleMaps.bundle 추가
GoogleMaps.framework 안에 Resources 폴더안에 GoogleMaps.bundle 파일을 프로젝트에 넣는다
(복사는 하지 말고)


* AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  // 구글맵 API KEY 설정
  [GMSServices provideAPIKey:GOOGLE_MAP_API_KEY];
  return YES;
}



반응형