Set up the Xcode project and build the iOS app set-up-the-xcode-project-and-build-the-ios-app
AEM Forms provides the complete source code of the AEM Forms app. The source contains all components to build custom AEM Forms app. The source code archive, adobe-lc-mobileworkspace-src-<version>.zip
is a part of the adobe-aemfd-forms-app-src-pkg-<version>.zip
package on Software Distribution.
To get the AEM Forms app source, perform the following steps:
-
Open Software Distribution. You require an Adobe ID to log in to the Software Distribution.
-
Select Adobe Experience Manager available in the header menu.
-
In the Filters section:
- Select Forms from the Solution drop-down list.
- Select the version and type for the package. You can also use the Search Downloads option to filter the results.
-
Select the package name applicable to your operating system, select Accept EULA Terms, and select Download.
-
Open Package Manager and click Upload Package to upload the package.
-
Select the package and click Install.
-
To download the source code archive, open
https://<server>:<port>/crx/de/content/forms/mobileapps/src/adobe-lc-mobileworkspace-src-<version>.zip
in your browser.
The source package is downloaded on your device.
The following image displays the extracted contents of the adobe-lc-mobileworkspace-src-<version>.zip
.
The following table details contents of the adobe-lc-mobileworkspace-src-[version]/ios
folder.
For detailed information about Code Signing and adding devices to the iOS Provisioning Portal, see iOS Code Signing Setup, Process, and Troubleshooting.
Build standard AEM Forms app set-up-the-xcode-project
-
Perform the following steps to set up a project in Xcode and provide a signing identity:
Log in to your Mac machine that has Xcode and iOS SDK installed and configured.
-
Copy the
adobe-lc-mobileworkspace-src-<version>.zip
archive from the downloads folder to[User_Home]/Projects/
. -
Extract the archive in the
[User_Home]/Projects/[your-project]
directory. -
Navigate to the
[User_Home]/Projects/
[your-project]/adobe-lc-mobileworkspace-src-[version]/ios
directory. -
Open the
AEM Forms.xcodeproj
project in Xcode. -
Click AEM Forms, under TARGETS, select AEM Forms. Select the Build Settings tab, locate the Code Signing Entitlement section, and in Debug and Release fields do one of the following:
- Leave the fields unspecified to build a standard Mobile Workspace app
- Specify the fields to as explained in Building a Secure AEM Forms app for iOS to build a secure AEM Forms app.
-
In the Build Settings tab, click All and then click Combined.
-
From the Settings list, expand Code Signing.
-
For Code Signing Identity, select the appropriate signature. For detailed information about, creating new signatures, see Creating and Downloading Development Provisioning Profiles.
-
Ensure that the same signature is selected for Debug, Release, and Any iOS SDK.
-
Replace the following code in the
AEM Forms-info.plist
file:code language-xml <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
with the following while replacing
yourserver.com
with an appropriate host name for your server.code language-xml <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>yourserver.com</key> <dict> <!-Include to allow subdomains-> <key>NSIncludesSubdomains</key> <true/> <!-Include to allow HTTP requests-> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> <!-Include to support forward secrecy-> <key>NSExceptionRequiresForwardSecrecy</key> <false/> <!-Include to specify minimum TLS version-> <key>NSTemporaryExceptionMinimumTLSVersion</key> <string>TLSv1.1</string> </dict> </dict> </dict>
note note NOTE This step is required only if AEM Forms app needs to connect to a server that does not follow App Transport Security requirements. -
Under PROJECT, select AEM Forms and ensure that the appropriate signature is selected for Code Signing Identity, Debug, Release and Any iOS SDK.
-
Connect a provisioned iPad to a Mac machine.
-
Select the provisioned device for the AEM Forms project.
A provisioned device, iPad Air 2, is selected.
-
Select Product > Clean.
-
Select Product > Build.
Build the installer for the AEM Forms app build-the-installer-for-the-mobile-workspace-app
You need to archive the Xcode project to build the installer (an .ipa file) and a property list (a .plist file) file. The property list file contains configuration information of the hosted in-house app, such as the name and the hosting location of the app. For more information about property list file, see About Information Property List Files.
-
Connect a provisioned iPad to a Mac machine. For detailed information about provisioning an iPad, see Creating and Downloading Development Provisioning Profiles
-
Select the provisioned device for the AEM Forms project.
A provisioned device, iPad Air 2, is selected.
-
Select Product > Clean.
-
Select Product > Build.
-
Select Product > Archive.
-
In Organizer - Archives, select the latest archive of your project and click Distribute.
-
Select Save for Enterprise or Ad-Hoc Deployment as the method of distribution and click Next.
-
Select the appropriate Code Signing Identity and click Next. Click Allow to apply the signature.
-
Provide name of the app and select Save for Enterprise Distribution.
-
Provide the Application URL for the app. For example, to host the app on a CRX server, provide URL
https://[LC_host]:'port'/lc/content/distribution/mobileworkspace/APP_NAME.ipa
. -
In the Title field, specify AEM Forms.
-
Click Save and close Xcode.
An installer file,
AEM Forms.ipa
, and property list file,AEM Forms-info.plist
, are created at the specified location. -
Open the
AEM Forms-info.plist
file in an editor. -
Replace all the spaces in the URL of your .ipa file with %20.
-
Save and close the
AEM Forms-info.plist
file.