Developer

OpenUI for iOS Manual Xcode Project Setup

To use an existing project or to upgrade an existing Agentry Xcode project, you can manually create the project in Xcode and add the new Agentry Client framework resources. This project is necessary to make use of the OpenUI SDK, as well as to rebrand the Agentry application for iOS.

Prerequisites

  • Install the supported version of Xcode IDE on the Mac.
  • Install SAP Mobile Platform SDK for Mac OS. The Agentry Toolkit folder contains the iOS framework files, installed by default to AgentryToolkit/OpenUISDK/iOS/SMPAgentryClientFramework-iOS-70.x.x.tgz.

Context

The sample project files are located in ./Samples/SMPAgentryClientFrameworkSetup once you expand the TGZ file.

Procedure

  1. Expand the framework archive SMPAgentryClientFramework-iOS-70.x.x.tgz into a directory on the system.
  2. In Xcode, create a new project by selecting Start of the navigation path  iOS Application Next navigation step Single View Application End of the navigation path. Choose options for the new project, including the name and where the project is to be created, and click Create.

    The directory and project are created, and the project structure appears in the left pane.

  3. Under Branded Client, remove these extra files:
    • AppDelegate.h

    • AppDelegate.m

    • ViewController.h

    • ViewController.m

    • Main.storyboard

    • Launch.storyboard

  4. In General, make these settings:
    1. Under Deployment Info:
      • For Main Interface, make sure the field is empty.

      • In Deployment Target, set the default iOS device version, typically the most current iOS version, although you can select a slightly older version.

      • In Device Orientation, typically select all four options ‒ Portrait, Upside Down, Landscape Left, and Landscape Right.

      • Select Hide status bars.

    2. Under App Icons and Launch Images, make sure the Launch Screen File field is empty.
  5. In Build Settings, add the Agentry Client Framework.
    1. Select the project, the main target, then go to Build Settings.
    2. In Framework Search Path, search for $(SOURCE_ROOT)/.../SMPAGENTRYClientFramework/iOS/, and select recursive search.
    3. In Framework Search Path, search for $(SOURCE_ROOT)/.../SMPAGENTRYClientFramework/iOS/SMPAgentryClient.framework/Headers/, and select recursive search.

    The SampleApp and Samples directories appear.

  6. In Build Settings, add the Agentry Client Framework headers.
    Set the Header Search Path to /<SDK_HOME>/SMPAgentryClientFramework/iOS/SMPAgentryClient.framework/Headers/.
  7. In Build Settings, set Other Linker Flags to -ObjC -framework SMPAgentryClient.
  8. In Build Settings, set Strip Linked Product to No.
  9. In Build Settings, remove stripping from the project settings.
    Set In Device Orientation, typically select all four options - Portrait, Strip, Linked, Product to No.
  10. In Build Settings, set Enable Bitcode to No.
  11. In Build Phases, add libraries. Under Link Binary With Libraries, click + to add the following resources to the section:
    • libc++.tbd
    • libiconv.tbd
    • libicucore.tbd
    • libxml2.tbd
    • libsqlite3.tbd
    • AudioToolbox.framework
    • AVFoundation.framework
    • CFNetwork.framework
    • CoreGraphics.framework
    • CoreLocation.framework
    • CoreMedia.framework
    • CoreText.framework
    • CoreVideo.framework
    • Foundation.framework
    • QuartzCore.framework
    • Security.framework
    • UIKit.framework
  12. Add the resource bundle to the project, located in <Framework_BaseDir>/SMPAgentryClientFramework/iOS/SMPAgentryClient.framework/Resources/SMPAgentryClientResource.bundle.
    1. From the Xcode application menu, select Start of the navigation path File Next navigation step Add Files to Project End of the navigation path.
    2. Browse to Start of the navigation path SMPAgentryClientFramework  Next navigation step iOS Next navigation step SMPAgentryClient.framework Next navigation step Versions  Next navigation step Current  Next navigation step Resources  Next navigation step SMPAgentryClientResource.bundle End of the navigation path, then add it.
  13. Modify the main.m file within the project by replacing the application and app delegate class name for the return statement.
    • New application class name: @"SMPAgentryApplication"
    • New app delegate class name: @"SMPAgentryClientAppDelegate"
    • New return statement: return UIApplicationMain(argc, argv,@"SMPAgentryApplication", @"SMPAgentryClientAppDelegate");
  14. In Info, modify Info.plist so that view controllers do not determine the style of the status bar.
    1. Under Custom iOS Target Properties, add these privacy settings for iOS 10 and later:
      • Privacy - Camera Usage Description

      • Privacy - Location When in Use Description

      • Privacy - Photo Library Usage Description

      Optionally, you can provide a descrption for the Agentry Client user.
    2. (Optional) Under Custom iOS Target Properties, add this file sharing setting for iOS 10 and later: Application supports iTunes file sharing. This enables enterprise level file sharing of an encrypted database file.
    3. Under Custom iOS Target Properties, set View controller-based status bar appearance to No.
  15. You are ready to build the project. Select the project; specify product clean, and specify the target client.
  16. After building and launching the project, run the standard Agentry Client in either the simulator or on the client device.

Results

You now have an Xcode project using the resources provided in the Agentry Client framework for iOS. You can now start adding code for your custom adapters, and the Agentry Client picks them up dynamically.