Migrating iOS Native OData Applications

Migrate your iOS OData application from version 2.x to SAP Mobile Platform version 3.0.

Overview

This section covers migration of a REST based application from SAP Mobile Platform 2.3.x to version 3.x. The following aspects of a REST based application are covered:
  • Registration
  • Request-Response (data fetch)
  • Parsing

Registration

There is no change in code and no refactoring is required to migrate an application from 2.3.x to 3.x. Existing applications based on 2.x will continue to work against the SAP Mobile Platform 3.0 OData SDK post migration, without any code changes, with just a rebuild. The deprecated class details in this section is applicable for new application development, where it is requested or mandatorily required to use the new APIs. To use OData offline and other features such as batch processing, the new classes are mandatory.

Request-Response

With 3.x, the old SDM API has been deprecated and a new Request API is introduced for uniformity in API nomenclature. With this change, all SDM* classes and methods have been replaced with class names removing the SDM tag. The following table lists the old and new class names. The method names mostly remain the same, unless specified otherwise in this section. The class names are listed first, followed by the header files to which the classes belong.
List of Refactored Classes
Class name in 2.3.x version (old - deprecated) Class name in 3.0 version (new - refactored)
SDMHttpRequest (SDMHttpRequest.h) Request (Request.h)
SDMRequestBuilder (SDMRequestBuilder.h) RequestBuilder (RequestBuilder.h)
SDMDownloadCache (SDMDownloadCache.h) DownloadCache (DownloadCache.h)
SDMFormDataRequest (SDMFormDataRequest.h) FormDataRequest (FormDataRequest.h)
SDMNetworkQueue (SDMNetworkQueue.h) NetworkQueue (NetworkQueue.h)
<SDMRequesting>** (SDMRequesting.h) <Requesting> (Requesting.h)
<SDMCacheDelegate> (SDMCacheDelegate.h) <CacheDelegate> (CacheDelegate.h)
<SDMHttpRequestDelegate> (SDMHttpRequestDelegate.h) <RequestDelegate> (RequestDelegate.h)
<SDMProgressDelegate> (SDMProgressDelegate.h) <ProgressDelegate> (ProgressDelegate.h)
SDMConnectivityException (SDMConnectivityException.h) ConnectivityException (ConnectivityException.h)
Note: ** corresponds to the protocol refactoring

Parser

All SDM* classes have been refactored with OData* classes. The following table lists the refactored classes and protocols. All method names remain the same. In this section, all public header files are listed first with their corresponding refactored names. If the class names in the file are different and the file contains multiple class names, different legends have been provided accordingly.
List of Refactored Classes
Class name in 2.3.x version (old - deprecated) Class name in 3.0 version (new - refactored)
SDMFunctionImportResultParser.h ** ODataFunctionImportResultParser.h
SDMGenericParser.h ** ODataGenericParser.h
SDMOData.h * OData.h
SDMODataCollection.h ** ODataCollection.h
SDMODataDataParser.h ** ODataDataParser.h
SDMODataEntitySchema.h ** ODataEntitySchema.h
SDMODataEntry.h ** ODataEntry.h
SDMODataError.h ** ODataError.h
SDMODataErrorXMLParser.h ** ODataErrorXMLParser.h
SDMODataFunctionImport.h # ODataFunctionImport.h
SDMODataFunctionImportParameter ODataFunctionImportParameter
SDMODataFunctionImport ODataFunctionImport
SDMODataIconInfo.h ** ODataIconInfo.h
SDMODataLink.h # ODataLink.h
SDMODataLink ODataLink
SDMODataRelatedLink ODataRelatedLink
SDMODataMediaResourceLink ODataMediaResourceLink
SDMODataActionLink ODataActionLink
SDMODataMetaDocumentParser.h ** ODataMetaDocumentParser.h
SDMODataProperty.h * ODataProperty.h
SDMODataPropertyInfo.h ** ODataPropertyInfo.h
SDMODataPropertyValueFactory.h ** ODataPropertyValueFactory.h
SDMODataPropertyValues.h # ODataPropertyValues.h
SDMODataPropertyValueObject ODataPropertyValueObject
SDMODataPropertyValueInt ODataPropertyValueInt
SDMODataPropertyValueString ODataPropertyValueString
SDMODataPropertyValueComplex ODataPropertyValueComplex
SDMODataPropertyValueDateTime ODataPropertyValueDateTime
SDMODataPropertyValueBoolean ODataPropertyValueBoolean
SDMODataPropertyValueGuid ODataPropertyValueGuid
SDMODataPropertyValueBinary ODataPropertyValueBinary
SDMODataPropertyValueSingle ODataPropertyValueSingle
SDMODataPropertyValueDouble ODataPropertyValueDouble
SDMODataPropertyValueDecimal ODataPropertyValueDecimal
SDMDuration ODataDuration
SDMODataPropertyValueTime ODataPropertyValueTime
SDMODataPropertyValueTimeOffset ODataPropertyValueTimeOffset
SDMODataSchema.h ** ODataSchema.h
SDMODataServiceDocument.h ** ODataServiceDocument.h
SDMODataServiceDocumentParser.h ** ODataServiceDocumentParser.h
SDMODataWorkspace.h ** ODataWorkspace.h
SDMODataXMLBuilder.h # ODataXMLBuilder.h
SDMODataEntryXML ODataEntryBody
SDMOpenSearchDescription.h # OpenSearchDescription.h
SDMOpenSearchDescriptionURLTemplate OpenSearchDescriptionURLTemplate
SDMOpenSearchDescription OpenSearchDescription
SDMOpenSearchDescriptionXMLParser.h ** OpenSearchDescriptionXMLParser.h
<SDMParserDelegate.h> ## <ODataParserDelegate.h>
SDMParserException.h ** ODataParserException.h
SDMPerformanceUtil.h ** PerformanceUtil.h
SDMSubscriptionXMLBuilder.h # ODataSubscriptionXMLBuilder.h
SDMSubscriptionInfo ODataSubscriptionInfo
SDMSubscriptionXML ODataSubscriptionXML
  • * Indicates a header file and not class definition. Renaming the header file in the #import statement is sufficient.
  • ** Indicates that the class name is same as the name of the header file. For example : SDMODataError.h file has a class definition whose name is SDMODataError.
  • # Indicates that these header files have multiple class definitions in the header file and are listed below the same, italicized.
  • ## Indicates that this corresponds to protocol definition in iOS.
Note: SAP recommends you to update the APIs to the newly re-factored APIs listed. The deprecated SDM APIs are supported for backward compatibility.
Related concepts
Developing iOS Applications