ArcGis For iOS 開發配置

最近開始 利用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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章