Show TOC

Native OData SDKLocate this document in the navigation structure

New or changed features for OData SDK version 3.0 SP10.

Sample Reference App (iOS) is Not Available

The initial OData SDK version 3.0 SP10 release indicated that a CRM OData App and Xcode project was included with the release. This is not the case, and that information has now been removed.

Do Not Use Hashtags in Log Messages
For this and previous SAP Mobile Platform SDK releases, the hashtag character ‘#’ is a reserved character that you must not use when creating log messages. Hashtags ‘#’ are used as delimiters within logs, used for validation and parsing of log entry fields, and prevents the log file from being uploaded to SAP Mobile Platform Server or SAP HANA Cloud Platform mobile services if used within the log file. For this reason, all hashtag ‘#’ characters found within a log message will be replaced by question marks ‘?’” to prevent log validation related issues. For example:
LOGERR( @“### Request failed!” ); 
Will generate the following log message:
??? Request failed! ”
Native OData SDK Developers

Authorized users are encouraged to frequently visit the Developing Native Mobile Apps with SMP Web site on SAP Community Network published on SAP site for additional Native OData app development resources, including webinars, videos, how-to guides, blogs, and more.

Support for OData V4 Annotations (Android and iOS)

This version of the SDK (online and offline) supports a mix of OData 2.0 and 4.0 metadata annotations for defining additional characteristics or capabilities of a metadata element, such as a service, entity type, property, function, action, or parameter. For example, you can now define a valid range of values for a particular property. Windows supports only 2.0.

On iOS, the new SODataMetaAnnotable interface includes property and methods, which is implemented by these metaclasses: SODataMetaComplexType, SODataMetaEntitySet, SODataMetaEntityType, SODataMetaFunctionParameter, SODataMetaProperty, SODataMetaNavigationProperty, SODataMetaEntityContainer, SODataMetaFunctionImport. These metaobjects now include:
 Retrieves the V4 annotation names.
@property (readonly, nonatomic, strong) NSArray* vocabularyAnnotationNames;

 Retrieves the annotation value of the entity set specified by the given fully qualified annotation name.
 @param annotationName the name of the annotation
 @return id<SODataAnnotation>
- (id<SODataAnnotation>)vocabularyAnnotationForAnnotationName:(id<SODataAnnotationName>)annotationName;

 Retrieves the annotation value of the entity set with the given annotation namespace and localname.
 @param name the name of the annotation
 @param namespace the namespace of annotation
 @return id<SODataAnnotation>
- (id<SODataAnnotation>)vocabularyAnnotationForName:(NSString*)name namespace:(NSString*)aNamespace;
SODataAnnotation (the V4 annotation itself) looks like this:
 The Term of the annotation. \sa SODataAnnotationTerm
@property (readonly, nonatomic, assign) id<SODataAnnotationTerm> annotationTerm;

 The value of the annotation.
@property (readonly, nonatomic, strong) NSObject* value;

 The qualifier of the annotation.
@property (readonly, nonatomic, copy) NSString* qualifier;

AnnotationTerm is also new. For details, see the Native OData API documentation for your platform, which is installed with the SDK.

Android Studio Support Updates

SDK files are now delivered as JAR and AAR files that can be added to Android Studio. See See Setting Up Android Studio for Native SDK Development in Native OData App Development.

Custom Headers in ODataRequestParam (Android and iOS)
The ODataRequestParam has been extended with a Dictionary (Map) of custom headers, which allows the developer to add any header to the request that is sent to the server. This affects classes that implement this protocol (RequestParamSingle, RequestParamBatch). For example:
 Headers can be added to the RequestParam.
 @property (nonatomic, strong) NSMutableDictionary* customHeaders;
The ODataResponse protocol already includes a header map that stores the code, location, and several headers. The keys have been changed to a more common format, for example, Http.code. Additionally, every incoming header is now added to the response. However, you cannot modify headers that have already been added to responses; instead, implement this using RequestExecutionDefault (on iOS):
 Headers dictionary which contains all the response headers.
 @property (readonly, nonatomic, strong) NSMutableDictionary* headers;
The ODataDownloadMediaResult protocol (media request scenario) has also been extended with a headers Dictionary:
 Headers of the media response.
 @property (nonatomic, strong) NSMutableDictionary* headers;

All the response headers are added after a media download executes.

For details, see the Native OData API documentation for your platform, which is installed with the SDK.

iOS 9 and Xcode 7 Support

This release includes support for the Apple iOS 9 operating system and Xcode 7 development environment.

Developer Efficiency: CocoaPod (iOS) Subspec Support

This version of the SDK supports subspecs for dependency management on iOS and, which allows the developer to import specific libraries into a project. See the topic Creating a Project and Importing the OData Libraries and Bundles in Native OData App Development for details.

Public Encrypt and Decrypt APIs for DataVault

(iOS, Android, and Windows) Use the DataVault encrypt and decrypt methods to encrypt and decrypt application data. Once you have encrypted data, use standard persistence mechanisms; typically, file or database mechanisms.

The DataVault library and APIs are useful for securing and persisting small amounts of sensitive data. The implementations use best practices for deriving encryption keys, seeding, salting, and encrypting its contents. This release also includes additional APIs that you can use to encrypt larger amounts of data, but those APIs do not provide data persistence.

The encrypt and decrypt APIs rely on a unique AES-256 encryption key, which is automatically generated once and persisted during sessions; it is independent from other keys used by the various DataVault APIs. Additionally, the AES-256 key cannot be altered by any external means, including password updates.

For security reasons, the streamed based APIs listed here do not persist data, even temporarily. API Signatures include:
1. „Plain” encrypt / decrypt DataVault APIs (UML):
 *  Encrypts data using an AES 256 encryption key
encrypt(unencryptedData : byte[] ) : encryptedData : byte[]
 *  Decrypts data previously encoded using encrypt:error:
decrypt( encryptedData : byte[] ) : unencryptedData : byte[]

2. Stream-based encrypt / decrypt DataVault APIs (UML):
 *  Encrypts streamed data; use for large data
encrypt( unencryptedStream: InputStream* ) : encryptedStream : InputStream*
 *  Decrypts streamed data; use for large data
decrypt(encryptedStream: InputStream* ) : encryptedStream : InputStream*
Note The above API signatures are provided in Unified Modeling Language (UML). For the appropriate adaptations and additional details, see the Native OData API documentation for your platform, which is installed with the SDK.
API to Remove All Log Entries

(iOS, Android, and Windows) The ability to remove all log entries already exists for upload methods. The new wipeClientLogs method has been added to the ClientLogManager public API, and allows removal of all client log entries independent of upload methods.

App developers may find the wipeClientLogs method useful when debugging an application, since it is often easier to begin debugging with an empty log file, then reproduce the behavior you are interested in examining.

For details, see the Native OData API documentation for your platform, which is installed with the SDK.

Application Wizard in Visual Studio to Facilitate App Development
(Windows) The SAP Business Application wizard generates a skeleton for mobile apps for various versions of Windows. The wizard integrates with Visual Studio and allows the developer to configure application features such as onboarding, logging and tracing, connected services, and so on.
Restriction The generated project will not compile when using SP10 PL04 or lower version.

Workaround: If using SP10 PL04 or lower, open the packages.config (.NET and Store Apps) or packages.json (UWP apps) file and replace the "-SNAPSHOT" string with an empty string "". When done, do a rebuild and the app will compile. Do this replacement for each and every project in the solution.