Troubleshooting for Cocoa apps
This document outlines some troubleshooting tips and best practices to help you resolve any issues while using Apptics for applications built on Apple platform.
Requirements
- Xcode version 12 or later
- Need to install Xcode CLT
- Pod version 1.1.6 or later
- Ruby version 2.6 or later
- Deployment targets:
- iOS 9.1 or later
- macOS 10.8 or later
- tvOS 9.0 or later
- watchOS 2.0 or later
- Swift projects must use Swift 4.0 or later
Pod install failed with an error "Found multiple specifications for Apptics '~version'"
- This happens when more than one version of the Apptics SDK is specified. The pod will automatically install the latest version available, if the version is not mentioned.
- This error could occur if the version is mentioned for one and not for other dependency pods.
- Make sure all the pods of Apptics have the same version mentioned.
Build failure due to missing config file in the project's root directory.
- Check if the config file is available in your project's root directory. If not, provide the path by passing a value to the run the script param like the one mentioned below.
- --config-file-path="YOUR_PATH/apptics-config.plist".
- You can use more than one config file for a single project if needed. For details on multiple config files, refer to our integration guide.
The app crashes upon launch.
Terminating an app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Missing 'API_KEY', please check if you have added apptics-config.plist to your project.
If the above line appears in your console or crash trace, it indicates that there was a problem when you added Apptics' config file to your project.
Make sure that the apptics-config file is included in the target membership.
“Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: appversionid)' terminating with uncaught exception of type NSException”
If the above line appears in your console or crash trace, it indicates that there is a problem with the integration. Follow the below steps to fix this issue.
- Check if you have added the script_phase to your podfile.
- After installing the pod, make sure that if the Apptics pre build run script is added to your target's build phases.
- Make sure that it is placed above the compile sources.
- Make sure that the for install builds only is unchecked.
- Build the app and check if the app_version_meta is added to the apptics-config file.
There is no data in the Apptics console.
- Make sure that Apptics is initialized properly for the current configuration.
The data will be available in Search, Engagement and Audience within 15 minutes. It will take one day for the changes to be reflected in the Home, Dashboard and other pages.