It’s been a little over two months since we released the initial public beta of ArcGIS API for iPhone. Since then, we’ve received really valuable feedback from all of you. Please keep sending us your feedback as we continue to evolve the API in areas that are most important to you. We’ve been working hard to keep up with the latest technological developments in the mobile landscape, most notable of which was the release of iPhone 4.
As some of you have already noticed, we renamed ArcGIS API for iPhone to ArcGIS API for iOS in anticipation of providing support for iOS 4. We are very pleased to announce that Update 1 of ArcGIS API for iOS is now available. This update, not surprisingly, adds support for iOS 4. You can use it to create applications that run on newer devices like iPad and iPhone 4, but you can also continue to target older devices such as iPhone 3G, iPhone 3GS, and iPod Touch as long as they are running iOS 3.1.2 or higher. We’ve also significantly revamped the map control in order to provide the best possible user experience across the range of supported devices. You can download the update from here (You will need to be signed in).
As a developer, you need to do a few things in order to start using the API update .
First, you need to uninstall the previous version of ArcGIS SDK, and install the updated SDK. You can find the uninstall script under ${HOME}/Library/Application Support/AGSiPhoneSDK. A change you will notice with the updated SDK is that the libAGSCore.a and libAGSiPhone.a libraries have been consolidated into a single library called libArcGIS.a. This consolidated library can be used both on the simulator and on physical devices. Also, the SDK no longer contains the AGSCore and AGSiPhone folders. Instead, it contains a single ArcGIS folder.
Next, you need to download and install iPhone SDK 4. You cannot use older iPhone SDKs to build applications with ArcGIS API for iOS, you must use iPhone SDK 4 or iPhone SDK 3.2.
Note : Installing the new iPhone 4 SDK will, by default, remove and replace your existing iPhone SDKs.
From this point on, any new projects you create using the ArcGIS Project Templates in XCode will reference the updated ArcGIS API for iOS.
Migrating your existing projects
If you have any existing projects that you are working on, you will need to make the following changes in order to migrate them to using the updated ArcGIS API for iOS -
- Modify Project’s settings. Under the Project menu, choose Edit Project Settings. Under the General tab, set the Base SDK to either version 3.2 or version 4.
- Modify Target’s build settings
- Set the Base SDK. Your target’s Base SDK could still be pointing to an older iPhone SDK that was removed while installing the iPhone SDK 4. If it is, set it to either version 3.2 or version 4.
- Modify Library Search Paths to take into account the consolidated ArcGIS library and the new SDK folder structure. Set Library Search Paths to $(HOME)/Library/SDKs/ArcGIS/${PLATFORM_NAME}.sdk/usr/local/lib
- Similarly, modify User header Search Paths and set it to $(HOME)/Library/SDKs/ArcGIS/
${PLATFORM_NAME}.sdk/usr/local/include/** - Fix broken references. References to iPhone SDK frameworks could be broken if they were pointing to an older iPhone SDK that was removed while installing the new iPhone SDK 4. Broken references are flagged in red color by XCode. To fix the broken references, remove them and then re-add them. The following references are needed for developing with ArcGIS API for iOS (Update 1) –
- CoreGraphics
- CoreLocation
- Foundation
- QuartzCore
- UIKit
- libz.dylib (new dependency introduced at Update 1)
- libArcGIS.a ( consolidated library at Update 1)
- Modify your source code to import the “ArcGIS.h” header file instead of “AGSiPhone.h” or “AGSCore.h”
- mapDidEndPanning and mapDidEndZooming methods have been removed. They have been replaced by “MapDidEndPanning” and “MapDidEndZooming” notifications respectively. Use the NSNotificationCenter to listen for these notifications.
- lods, currentLevel, and currentLevelResolution properties have been removed. The lods property is available on AGSTiledLayer’s tileInfo property. There is no replacement for currentLevel and currentLevelResolution properties because the map can now be zoomed to a scale between consecutive levels.
- centerAtPoint:atLevel:animated method has been removed. It has been replaced by centerAtPoint:animated:. Additional methods for navigation such at zoomIn:, zoomOut:, and zoomWithFactor:atAnchorPoint:animated: have been added.
- zoomLevel property has been removed. No replacement.
- currentLocation method has been added that returns the GPS location used by the map.
- autoPan property now defaults to NO. You need to enable it if you want the map to keep centering at the reported GPS location. Also, the autoPan property is automatically disabled when the user pans the map.
- All methods have a new operation parameter. This parameter can be interrogated developers to find out which operation invoked the delegate method. This is helpful, for instance, if the task was used to perform multiple query operations successively.
- All methods have a new operation parameter. This parameter can be interrogated developers to find out which operation invoked the delegate method. This is helpful, for instance, if the same task was used to perform multiple identify operations successively.
- New methods queryResultImage:paramName:imageParams: and queryResultImageLayer:paramName:imageParams: have been added. These allow you to retrieve geoprocessing results as an image and as a dynamic layer respectively.
- The results and inputs arguments have been removed from geoprocessor:jobDidSucceed:status:inputs:results:messages: method.