我正在尝试将谷歌地图添加到我的iphone应用程序中,我按照google在这里说的那样 https://developers.google.com/maps/documentation/ios/start#getting_the_google_maps_sdk_for_ios
我做了他们所说的所有内容,并且没有理解,我在构建应用程序时遇到了六个错误,那些是:
Undefined symbols for architecture i386:
"_objc_setProperty_nonatomic", referenced from:
-[GMSx_PBGeneratedMessage setExtensionRegistry:] in GoogleMaps(ProtocolBuffers.o)
"_NSURLIsExcludedFromBackupKey", referenced from:
_GMSSetSkipBackupAttribute in GoogleMaps(GMSUtils.o)
"_objc_setProperty_nonatomic_copy", referenced from:
-[GMSBlockAnimationDelegate setStartBlock:] in GoogleMaps(GMSCoreAnimation.o)
-[GMSBlockAnimationDelegate setCompletionBlock:] in GoogleMaps(GMSCoreAnimation.o)
-[GMSGLTileProvider setAllTilesDeadBlock:] in GoogleMaps(GMSGLTileProvider.o)
-[GMSUserEvent3Logger setOutputFilter:] in GoogleMaps(GMSUserEvent3Logger.o)
-[GMSPanoramaLink setPanoramaID:] in GoogleMaps(GMSPanoramaLink.o)
-[GMSIconCache setName:] in GoogleMaps(GMSIconCache.o)
"_objc_setProperty_atomic", referenced from:
-[GMSDASHProtobufferRequest setProtobuffer:] in GoogleMaps(GMSDASHConnectionRequest.o)
-[GMSDASHConnection setServerURL:] in GoogleMaps(GMSDASHConnection.o)
-[GMSVectorModifierMapTileService setTileFilter:] in GoogleMaps(GMSVectorModifierMapTileService.o)
-[GMSx_GTMHTTPFetcher setMutableRequest:] in GoogleMaps(GTMHTTPFetcher.o)
-[GMSx_GTMHTTPFetcher setCredential:] in GoogleMaps(GTMHTTPFetcher.o)
-[GMSx_GTMHTTPFetcher setProxyCredential:] in GoogleMaps(GTMHTTPFetcher.o)
-[GMSx_GTMHTTPFetcher setPostData:] in GoogleMaps(GTMHTTPFetcher.o)
...
"_objc_setProperty_atomic_copy", referenced from:
-[GMSDASHBlocksRequest setAsyncRequestFailedHandler:] in GoogleMaps(GMSDASHConnectionRequest.o)
-[GMSDASHConnection setExperimentIDs:] in GoogleMaps(GMSDASHConnection.o)
-[GMSx_GTMHTTPFetcher setServiceHost:] in GoogleMaps(GTMHTTPFetcher.o)
-[GMSx_GTMHTTPFetcher setDownloadPath:] in GoogleMaps(GTMHTTPFetcher.o)
-[GMSx_GTMHTTPFetcher setTemporaryDownloadPath:] in GoogleMaps(GTMHTTPFetcher.o)
-[GMSx_GTMHTTPFetcher setComment:] in GoogleMaps(GTMHTTPFetcher.o)
-[GMSx_GTMHTTPFetcher setLog:] in GoogleMaps(GTMHTTPFetcher.o)
...
"_OBJC_CLASS_$_UIActivityViewController", referenced from:
objc-class-ref in GoogleMaps(GMSServices.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
注意,我的基础sdk是ios 5,我的开发目标是5
答案 0 :(得分:3)
SDK的最新版本1.5要求至少iOS 6 - 这可能就是您看到这些错误的原因。
如果您必须支持iOS 5,可以尝试下载其中一个旧版本:
https://developers.google.com/maps/documentation/ios/releases