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 Xcode IDE version 6.<x> 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-7.0.x.x.tgz
Context
The sample project files are located in the directory
./Samples/SMPAgentryClientFrameworkSetup once you expand the
TGZ file.
Tip
- Agentry Client libraries do not support the -all_load
linker flag. Instead, use the -force_load <path to
library> option. See the technical note from Apple: https://developer.apple.com/library/mac/#qa/qa2006/qa1490.html
.
- If your directory paths have spaces, surround them with double quotes, for
example, "$(HOME)/path with
spaces/SMPAgentryClientFramework/iOS/**" to avoid the issue
where Xcode thinks they are different compiler/linker options.
- The sample projects have been tested with Xcode 6.<x>, and
iOS 7.<x>. and 8.<x>.
Procedure
- Expand the framework archive SMPAgentryClientFramework-iOS-7.0.x.x.tgz
into a directory on the system.
- In Xcode, create a new project by selecting .
- Set the iOS deployment target to 7.0 or above.
- Add the Agentry Client Framework.
- Select the project, the main target, then go to Build Settings.
- In Framework Search Path, double-click and enter
/<SDK_HOME>/SMPAgentryClientFramework/iOS/**.
- Add the Agentry Client Framework headers.
Set the Header Search Path to
/<SDK_HOME>/SMPAgentryClientFramework/iOS/SMPAgentryClient.framework/Headers/**.
- Set Other Linker Flags to -ObjC -framework -SMPAgentryClient.
- In Build Phases, click + to add the following resources to the Link With
Dynamic Libraries section:
- libc++.dylib
- libiconv.dylib
- libicucore.dylib
- libxml2.dylib
- AudioToolbox.framework
- AVFoundation.framework
- CFNetwork.framework
- CoreLocation.framework
- CoreMedia.framework
- CoreText.framework
- CoreVideo.framework
- QuartzCore.framework
- Security.framework
- CoreGraphics.framework
- Foundation.framework
- UIKit.framework
- Remove stripping from the project settings.
In Build Settings, set the Strip Linked Product to
No.
- Add the resource bundle to the project. by and add the location:
<Framework_BaseDir>/SMPAgentryClientFramework/iOS/SMPAgentryClient.framework/Resources/SMPAgentryClientResource.bundle
- From the Xcode application menu, select .
- Browse to
/<SDK_HOME>/SMPAgentryClientFramework/iOS/SMPAgentryClient.framework/Resources/SMPAgentryClientResource.bundle,
then add it.
- 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");
- Modify Info.plist so that view controllers do not
determine the style of the status bar.
Include the following key:
UIViewControllerBasedStatusBarAppearance set to
false.
- 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.