gpt4 book ai didi

ios - 未找到“GooglePlaces/GooglePlaces.h”文件 - 未声明的 kGMSAutocompleteMatchAttribute

转载 作者:行者123 更新时间:2023-11-29 05:32:58 25 4
gpt4 key购买 nike

我正在尝试构建一个几年前运行良好的应用程序,但现在出现错误,因为找不到 GooglePlaces.h。

如果没有的话,我会得到一些未声明的标识符,例如[突出显示的 enumerateAttribute:kGMSAutocompleteMatchA

我尝试过安装/更新 Pod。我已经检查了路径

尝试了常见的方法,但没有成功。我希望下面的内容可以帮助别人帮助我......

#import "XLFormGooglePlacesAutoCompletePickerViewController.h"
#import <GoogleMaps/GoogleMaps.h>
#import <GooglePlaces/GooglePlaces.h>

@interface AddressModal : NSObject
@property(retain,nonatomic) NSAttributedString* text;
@end

@implementation AddressModal
+addressModalWithTitle: (NSAttributedString*)title
{
AddressModal* modal = [[self alloc] init];
if(modal){
NSMutableAttributedString *highlighted = [title mutableCopy];
[highlighted enumerateAttribute:kGMSAutocompleteMatchAttribute
inRange:NSMakeRange(0, highlighted.length)
options:0
usingBlock:^(id value, NSRange range, BOOL *stop) {
if(value){
[highlighted addAttribute:NSBackgroundColorAttributeName value:[UIColor colorWithRed:1.0 green:0.9778 blue:0.5437 alpha:1.0] range:range];
}
}];
modal.text = highlighted;
}
return modal;
}
@end

部署目标 12.2

XCode 10.3

pod 'UIActionSheet-Blocks'
pod 'GooglePlaces'
pod 'GoogleMaps'
pod 'GooglePlacePicker'
pod 'XLFormGooglePlacesAutoCompletePicker', :path => 'XLFormGooglePlacesAutoCompletePicker'
pod 'QRCodeReaderViewController'

enter image description here

enter image description here

最佳答案

  1. 从以下链接下载最新版本的 GooglePlaces 和 GoogleMaps:“https://dl.google.com/dl/cpdc/8a8ad90cc90f312f/GooglePlaces-3.3.0.tar.gz “” https://dl.google.com/dl/cpdc/97fb1c4023fbdb2b/GoogleMaps-3.3.0.tar.gz
  2. 将 GoogleMapsBase.framework 和 GooglePlaces.framework 拖至您的项目文件夹
  3. 将框架添加到您的目标

关于ios - 未找到“GooglePlaces/GooglePlaces.h”文件 - 未声明的 kGMSAutocompleteMatchAttribute,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57351954/

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