手动集成google map iOS sdk

Sure there is:

How did I do it (Useful for any library you need)

  • Go to the pod you need, in this case: https://cocoapods.org/pods/GoogleMaps
  • Click on "See Podspec" link below Library on the bottom right corner
  • You are gonna be taken to the podspec.json
  • At the end of the JSON, find the key "source" and use the url provided to download the SDK.(cocoapods里最新sdk下载地址

If you need instructions on how to install it manually, you can use the waybackmachine websitea and put the corresponding url, setting an earlier date. I'll save you some time:

Adding Google Maps the old way:

  1. Launch Xcode and either open an existing project, or create a new project.
    • If you're new to iOS, create a Single View Application, and ensure that Use Automatic Reference Counting is on.
  2. Drag the GoogleMaps.framework bundle to your project. When prompted, select Copy items into destination group's folder.
  3. Right-click GoogleMaps.framework in your project, and select Show In Finder.
  4. Drag the GoogleMaps.bundle from the Resources folder to your project. When prompted, ensure Copy items into destination group's folder is not selected.
  5. Select your project from the Project Navigator, and choose your application's target.
  6. Open the Build Phases tab, and within Link Binary with Libraries, add the 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
    • CoreBluetooth.framework 
    • Accelerate.framework
    • CoreTelephony.framework
  7. Choose your project, rather than a specific target, and open the Build Settings tab.
    • In the Other Linker Flags section, add -ObjC. If these settings are not visible, change the filter in the Build Settings bar from Basic to All.
  8. Finally, add your API key to your AppDelegate.
    • #import <GoogleMaps/GoogleMaps.h>
    • Add the following to your application:didFinishLaunchingWithOptions: method, replacing API_KEY with your API key. [GMSServices provideAPIKey:@"API_KEY"];

#import <GoogleMaps/GoogleMaps.h>

Add the following to your application:didFinishLaunchingWithOptions: method, replacing API_KEY with your API key.

[GMSServices provideAPIKey:@"API_KEY"];


You would also need CoreBluetooth.framework and Accelerate.framework, otherwise you will get undefined symbol errors. Tested on Xcode 7 for iOS 9 –  marcos1490  Sep 26 '15 at 2:38
1 
I've followed this guide and got the framework installed manually - thanks for the info! I've now got an issue where I cannot get my app to compile, the error is: ld: framework not found GoogleMaps for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Any suggestions? –  ecs Oct 20 '15 at 10:08
 
Thanks for this! According to latest podspec link, you also need to add the CoreGraphics framework. –  Ri_ Nov 18 '15 at 7:05
 
Thanks a lot for your answer! (Y) –  Gati  2 days ago


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值