gpt4 book ai didi

swift - 没有 pod 安装如何快速获取 placepicker

转载 作者:行者123 更新时间:2023-11-28 07:54:42 33 4
gpt4 key购买 nike

我已经安装了 pod 但现在我想再添加一个 pod 'GMSPlacePickerController' ,过去我已经更改了我的项目名称所以每当我尝试安装 pod 时有时找不到 pod 文件,有时会发生其他错误。所以我只想要没有 pod 安装的 google place picker。

最佳答案

来自 https://developers.google.com/places/ios-api/start

This guide shows how to manually add the GooglePlaces framework to your project and configure your build settings in Xcode.

1. Download the SDK source files:
- GooglePlaces-2.5.0
- GoogleMaps-2.5.0
- GooglePlacePicker-2.5.0
- GooglePlacePicker-2.5.0 is only needed if you are using the place picker.
2. Unpack the source files.
3. 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 disable Use Storyboards and enable Use Automatic Reference Counting.
4. Remove any Maps bundles from previous releases from your project.
5. Drag the following bundles into your project (when prompted, select Copy items if needed):
- GooglePlaces-2.5.0/Frameworks/GooglePlaces.framework
- GoogleMaps-2.5.0/Base/Frameworks/GoogleMapsBase.framework

If you are using the place picker, drag the following bundles into your project (in addition to the previously listed bundles):

- GooglePlacePicker-2.5.0/Frameworks/GooglePlacePicker.framework
- GoogleMaps-2.5.0/Maps/Frameworks/GoogleMapsCore.framework
- GoogleMaps-2.5.0/Maps/Frameworks/GoogleMaps.framework

6. Right-click GooglePlaces.framework in your project, and select Show In Finder.
7. Drag the GooglePlaces.bundle from the Resources folder into your project. When prompted, ensure Copy items into destination group's folder is not selected.
8. If you are using the place picker, repeat the previous step and drag the GoogleMaps.bundle and GooglePlacePicker.bundle files into your project. These can be found in the GoogleMaps.framework and GooglePlacePicker.framework respectively.
9. Select your project from the Project Navigator, and choose your application's target.
10. Open the Build Phases tab, and within Link Binary with Libraries, add the following frameworks:
- GooglePlaces.framework
- GoogleMapsBase.framework
- GooglePlacePicker.framework (only if using the place picker)
- GoogleMapsCore.framework (only if using the place picker)
- GoogleMaps.framework (only if using the place picker)
- Accelerate.framework
- CoreData.framework
- CoreGraphics.framework
- CoreLocation.framework
- CoreTelephony.framework
- CoreText.framework
- GLKit.framework
- ImageIO.framework
- libc++.tbd
- libz.tbd
- OpenGLES.framework
- QuartzCore.framework
- SystemConfiguration.framework
- UIKit.framework
11. Choose your project, rather than a specific target, and open the Build Settings tab.
12. 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.

关于swift - 没有 pod 安装如何快速获取 placepicker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48581252/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com