cio-sdk-tools
v1.4.0
Published
A self service tool to run diagnostics on your mobile SDK installation
Downloads
77
Readme
cio-sdk-tools
A collection of tools to assist in the integration of the Customer.io mobile SDKs.
🚧 This tool is a work in progress.
For feedback or feature requests, open an issue.
Available Commands
What It Does
The tool assists in diagnosing and troubleshooting the Customer.io mobile SDK installations. It examines:
- Project Setup: Recognizing your mobile framework, such as React Native.
- SDK Initialization: Verification of the SDK's initiation within key project files based on our setup guide recommendations.
- Push Notification Setup:
- Validation of the presence and correct embedding of Notification Service Extensions.
- Verification of deployment target versions to ensure compatibility with the CIO SDK.
- Examination of
AppDelegate
to ensure correct metrics tracking for push notifications. - Checking entitlements for push notification capabilities and potential conflicts.
- Dependencies:
- Validation against any conflicting libraries in
package.json
andPodfile
for now. - Consolidates and displays versions of key integrations like the Customer.io SDK in various configuration files.
- Validation against any conflicting libraries in
Warning
Advanced or custom implementations might require manual troubleshooting.
The tool caters to React Native, Flutter, and iOS Native applications. If you're using a different framework, you can still use the tool to diagnose your iOS Native integration.
The tool currently recognizes:
- Cocoapods
(Note: Swift Package Manager (SPM) is not supported at this time.)
Learn More
| Section | iOS | React Native | Flutter | |-------------------------|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | SDK Initialization | Read More | Read More | Read More | | Push Notification Setup | Read More | Read More | Read More |
Usage
Doctor Command
To run the diagnostic tool:
npx cio-sdk-tools@latest doctor
Example:
Export Logs to Your Preferred Location:
npx cio-sdk-tools@latest doctor /path/to/project --report diagnostics_report.txt
View Additional Options:
npx cio-sdk-tools@latest doctor /path/to/project --help
What It Does
The tool assists in sending a rich push notification to a specified device. The rich notification contains an image to be able to test that the app is configured correctly to receive rich push notifications. Optionally, you can also send a deep link to test that the app handles those correctly.
Usage
Example:
Using the native push provider for the related device platform:
npx cio-sdk-tools@latest send-push --api-key API_KEY --token DEVICE_TOKEN --platform DEVICE_PLATFORM
Note: For
--api-key API_KEY
, this required an App API key. You can visit https://fly.customer.io/settings/api_credentials?keyType=app to get your API key.
Specifying a deep link to be sent with the push notification:
npx cio-sdk-tools@latest send-push --api-key API_KEY --token DEVICE_TOKEN --platform DEVICE_PLATFORM --deep-link DEEP_LINK
Important
If you are using Firebase Cloud Messaging (FCM) on iOS as your push provider, you would need to use the
--provider
flag.
Specifying provider when using FCM with iOS app:
npx cio-sdk-tools@latest send-push --api-key API_KEY --token DEVICE_TOKEN --platform ios --provider fcm
View Additional Options:
npx cio-sdk-tools@latest send-push --help
Reporting Issues
Encounter problems or have suggestions? Create an issue on GitHub.
License
MIT License. See LICENSE
for details.
Contributing
We value an open, welcoming, diverse, inclusive, and healthy community for this project. We expect all contributors to follow code of conduct.