As part of OpenUI, the iOS client has been "SDK-ized" into a pseudo framework containing a statically linked library that application designers can use to create an Xcode project and build their custom field adapters with. A sample pre-packaged Xcode project ready to accept field extensions is also provided with the library for ease of use and prototyping extensions easily.
This page contains a description of the pseudo framework contents, instructions on how to incorporate it into an arbitrary Xcode project, and a description of the sample project provided with the framework. Also at the end, see the notes section for hints.
The SMPAgentryClientFramework framework
The resources for OpenUI are delivered as a framework for iOS. Because at the present time Apple does not support the proper creation of dynamic frameworks, the library at the heart of our framework is supposed to be statically linked into the user's applications. This library and the resources provided with the framework contain all the functionality of the iOS Agentry Client. The framework is packaged as a TGZ file which name is in the format SMPAgentryClientFramework-iOS-W.X.Y.Z.tgz (W.X.Y.Z would be the current Agentry Version), and it has the following directory structure:
The static library
The framework static library is provided with slices for architectures armv7 and asmv7s as well as i386 so your applications can be tested in the simulator and devices alike.
Xcode project setup instructions
These instructions are to setup a new project to use the SMPAgentryClientFramework as well as to add it to an existing project. For ease of use a new project already setup is being provided in the Samples/ directory.
Pre-requisites:
Instructions:
You can now start adding code for your custom adapters, and the Agentry Client will pick them up dynamically.
Sample Projects
Creating this Xcode project and setting it up can be a tedious process, so that's why as mentioned above, sample projects are provided with the framework for common tasks these are:
SMPAgentryClientFrameworkSetup
This is an empty Xcode project with all the setup instructions from above integrated. Can be used to start developing a brand new app or to prototype sample adapters easily.
SMPAgentryClientFrameworkDemo
This is an Xcode project with sample adapters for our extensible fields provided as well as demo data and an Agentry application. This can be used to learn about the extension mechanisms and classes.
With branding, a customer can personalize the Agentry Client to include their art as well as strings and have the client use these resources even before it connects to the server. The iOS client can be easily branded using the SMPAgentryClientFrameworkSetup sample Xcode project. All the instructions below refer to using the SMPAgentryClientFrameworkSetup sample Xcode project to achieve this branding, but they also apply to any Xcode project that has been set up to use the SMPAgentryClient framework.
Currently, there are three types of resources that can be branded:
iOS Resources
These are resources that the OS uses on behalf of the application even before it launches such as the icon and name to use on the springboard or home screen, the default launch images to use while the app is being loaded for the first time, etc. These are the resources usually specified for an application in the Info.plist PLIST file.
To brand or change these resources, the customer just needs to modify the *Info.plist file in the SMPAgentryClientFrameworkSetup sample Xcode project to change the strings in the strings case or add their desired images to the application main bundle with the expected names (Default.png, Icon.png, etc ...). More information on the format these files must have can be found in Apple's website at: https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html
Agentry Resources
These are resources that the Agentry Client application uses by default before it has connected to the server. These include things such as the Login Dialog Image or the About Dialog Image. These resources are delivered as part of the SMPAgentryClientResources.bundle bundle that comes with the framework and is part of the SMPAgentryClientFrameworkSetup sample Xcode project as well.
To brand or change these resources, the customer just needs to add a file of the same name and size to the main bundle of their new app. The Agentry Client will give preference to using these resource files when present over the ones in the bundle.
Agentry Strings
These are localizable strings that are used throughout the Agentry Client User Interface. These can be overridden via the server mechanism, but they can be branded as well in order to customize the app even before the initial transmit.
To brand or change these resources, the customer just needs to add a file to the main bundle of their app called Branding.plist. This file should have a all the required strings in a dictionary with the format [key: String_N value: the new value] where N is the number of the resource string in the Agentry string resources file ClientText.ini. For instance, the following Branding.plist file:
<?xmlversion="1.0"encoding="UTF-8"?> <!DOCTYPEplistPUBLIC"-//Apple//DTDPLIST1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plistversion="1.0"> <dict> <key>String_6155</key> <string>FunwithBrandedApps</string> </dict> </plist>
Will change string 6155 (the Login Dialog Caption) from "Welcome to Agentry" to "Fun with Branded Apps".
If you are trying to integrate a library that requires you to include the -all_load linker flag. Do not do that because the Agentry Client includes libraries that do not handle this option. Instead, use the option -force_load path/to/the/library which will have the same effect on only that library. For a full technical note from Apple, visit this page: https://developer.apple.com/library/mac/#qa/qa2006/qa1490.html
If your directory paths have spaces, please enter them using double quotes such as "SDK_INSTALL_HOME/path with spaces/SMPAgentryClientFramework/iOS/**" or Xcode will think they are different compiler/linker options.
The sample projects have been tested with Xcode 5, Xcode 5.1 together with iOS 6.x, iOS 7.0, and iOS 7.1.