Troubleshooting

Error: MAM SDK Does not Contain Bitcode

When building, if the Linker complains that an SDK “does not contain bitcode”, verify that the Enable Bitcode in build settings is set to No.

Solution

In Xcode, navigate to Target -> Build Settings -> Build Options and set Enable Bitcode to No.

Error: “Could not find Icon entry in … , icons are mandatory”

When running the CGAppClPrepTool the following error may occur:

2020-12-04 12:10:12.834 CGAppCLPrepTool[22010:786341] [ManifestLib] Could not find Icon entry in 
/Users/johnsmith/devtrees/MyMAMSDKTestApp/Build/Products/Debug-iphoneos/MyMAMSDKTestApp.app , icons 
are mandatory
<!--NeedCopy-->

Solution

To resolve this issue, add icons to your applications. In particular, you must have a 60x60 pixel icon in PNG format with the name AppIcon60x60.png.

Error indicating that <CTXMAMCore/CTXMAMCore.h> cannot be found

This error occurs if the SimpleBrowserApp folder was copied from the .zip file without the Frameworks folder. The SimpleBrowserApp folder contains relational links.

Solution

To resolve this issue:

  • Delete the contents of the /SimpleBrowserApp/Frameworks folder.
  • Copy the framework files from the .zip file into you empty /SimpleBrowserApp/Frameworks folder.

Error: “Building for iOS Simulator, but the linked and embedded framework ‘CTXMAMAppCore.framework’ was built for iOS + iOS Simulator”

This issue occurs when you build using Xcode 12, which is designed to use .xcframework files, but the MAM SDKs are distributed (at least initially) as .framework files.

Solution

To resolve this issue:

  • Click the root of the project in Xcode
  • Select the target (for example, “SimpleBrowserApp”)
  • Click the Build Settings tab, show All settings
  • Under Build Options set Validate Workspace to Yes (do not set the Yes (Error) option).

As expected, the build errors will change to build warnings because the .framework files that are shipped includes both iOS and iOS Simulator binaries.

Error: “/SimpleBrowserApp/Tools/../Data: No such file or directory (in target ‘SimpleBrowserApp’ from project ‘SimpleBrowserApp’)”

This issue occurs if the SimpleBrowserApp and Tools folder were copied from the .zip file. The Tools folder has a relational link to the Data folder that is also needed.

Solution

To resolve this issue copy the Data folder from the .zip folder into your SimpleBrowserApp folder. The Data relational link in the Tools folder will now work.

This can also happen if you set the TOOLKIT_DIR in the wrong location or you have the folders in the wrong place. Check the value of this variable and adjust the folder locations or update this variable.

Error: “/SimpleBrowserApp/../Tools/CGAppCLPrepTool: No such file or directory”

This issue occurs because just the SimpleBrowserApp folder was copied from the .zip file. If you navigate to Project -> Build Phases you’ll see a build phase called Create MDX File. This is a script which assumes that the Tools folder is coterminous with the SimpleBrowserApp folder (like it is in the .zip file).

Solution

To resolve this issue:

  • Copy both the Tools and Data folders from the .zip file into your SimpleBrowserApp folder.
  • In the Create MDX File script located in the Build Phase tab change the line export TOOLKIT_DIR="$PROJECT_DIR/../Tools" to export TOOLKIT_DIR="$PROJECT_DIR/Tools".

Running the CGAppCLPrepTool tool gives an error about malicious software

This issue occurs because the CGAppCLPrepTool is not signed or notarized and the following error is displayed:

“CGAppCLPrepTool” can't be opened because Apple cannot check it for malicious software
<!--NeedCopy-->

Solution

To resolve this issue go to the Apple menu -> System Preferences -> Security & Privacy -> General tab, and then at the bottom click Allow Anyways. This allows you to run the CGAppCLPrep app.

Compliance error about “App has Debug enabled”

While testing your release build, if you select anything other than App Store Connect you may get a compliance pop-up error message that states “the device is out of compliance and that the App has Debug enabled”.

Solution

The logic in the Compliance SDK for determining whether debug is enabled looks at more than just whether it’s a Debug or Release build. This won’t be a problem for apps published to the Apple App Store.

To resolve this issue in your QA environment, for development purposes, in the Citrix Endpoint Management admin web console set the Non-compliant device behavior policy to Allow.

Where is the .mdx file located?

After an .ipa file is produced, for an app that is created in Xcode from Product -> Artifact, where can the .mdx file be found in the file system?

Solution

It is recommended to use the same Create MDX File script found in the sample Simple Browser App to produce the .mdx file as part of the build process. In Xcode for the Simple Browser App select the SimpleBrowserApp target, then select the Build Phases tab, then at the bottom look for the Create MDX File build phase. After you build your app you’ll see the .mdx file in the same location where Xcode stores its build artifacts.

This varies from machine to machine, for example if you’re building the Simple Browser app it will be something like /Users/terry/Library/Developer/Xcode/DerivedData/SimpleBrowserApp-elwhvgjakaowfzcaviopbpsvluci/Build/Products/Debug-iphoneos. In other words it will be relative to your Xcode library location, in a subdirectory path of DerivedData -> App name with a unique ID -> Build -> Products -> Debug -> target platform.