最近开始 利用Arcgis iOS 组件 开发
开始使用ArcGIS运行时SDK的iOS开发配置您的XCode项目。但是首先你必须确保你的项目的部署目标设置为iOS6或更高版本。
1. 添加引用路径。点击项目名称后在右侧选择Build Settings选项卡,在右侧的输入框里边输入:Framework Search path,在下方找到这个选项,展开选项,右边点击加号添加SDK路径,如下图所示 $(HOME)/Library/SDKs/ArcGIS/iOS/
2.在刚刚的输入框中输入other link 在下方的找到Other Linker Flags选项,双击打开对话框,点击右下角的➕: -ObjC -framework ArcGIS -l c++.
3. 设置theEnable Modules (C and Objective-C) setting to Yes. 这将使你的项目自动引用由ArcGIS所需的任何所需的系统框架和库。
接下来,就是添加依赖库了。在右侧选择右侧的Build Phases选项卡,在下方的Link Binary With Libraries 选项卡里边,添加以下依赖库
- CoreGraphics.framework
- CoreLocation.framework
- CoreText.framework
- Foundation.framework
- QuartzCore.framework
- MediaPlayer.framework
- MobileCoreServices.framework
- OpenGLES.framework
- Security.framework
- UIKit.framework
- 注意,ArcGIS.Framework也需要一起添加到项目里。这里需要使用Add Other 来添加。
4. Add ArcGIS resource bundle
5. Import header file
Add the following import statement to any header (.h) or implementation (.m) file in which you wish to use the API -
#import <ArcGIS/ArcGIS.h>
Note:
It is necessary to add the import statement if you are using the Enable Modules approach described in Step 3 above, otherwise, your project may not compile properly. This happens because, without the import statement, Xcode does not know which system libraries and frameworks ArcGIS depends upon and so cannot reference them at build time.
出现问题:
注意看提示,里边有一个normal armv7s,IPAD4不支持这注意看提示,里边有一个normal armv7s,IPAD4不支持这种CPU。关于armv6,armv7和armv7s,支持的版本如下:
Armv6:IPhone 2G/3G iPod 1G/2G
Armv7:iPhone 3GS/4/4S, iPod 3G/4G iPad 1G/2G/3G
Armv7s:iPhone5
https://developers.arcgis.com/en/ios/guide/introduction.ht