Flutter Plugin Troubleshooting
ENGAGE® Flutter Plugin Troubleshooting
Common problems that may arise during ENGAGE Flutter plugin integration.
Why am I not able to add plugin dependency in pubspec.yaml?
For your Pub command-line client to work with the Artifactory repository, you first need to set the environment variable run the following command:
export PUB_HOSTED_URL="https://firstorion.jfrog.io/artifactory/api/pub/fo-external-pub-flutter"
This step ensures that when you add the ENGAGE plugin as a dependency in your Flutter project's pubspec.yaml, the Dart package manager knows where to look for it and fetch it from the correct server. Without setting PUB_HOSTED_URL, Dart's package manager would default to fetching packages from https://pub.dev, which might not have the ENGAGE plugin hosted there.
Why I am getting this Error 'DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead?
Replacing DT_TOOLCHAIN_DIR with TOOLCHAIN_DIR may be necessary to resolve issues related to environment variables in the Xcode build settings. This can address conflicts or misconfigurations that prevent the build process from locating the correct toolchain paths.
By addressing these common issues, you can ensure that both your Notification Service Extension and CocoaPods setup function correctly, leading to a more stable and reliable build process for your iOS project.
The script should be placed in your Podfile, typically located in the root directory of your Xcode project. It is added at the end of the Podfile, after all pod dependencies are listed.
post_install do |installer|
installer.aggregate_targets.each do |target|
target.xcconfigs.each do |variant, xcconfig|
xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
xcconfig_path = config.base_configuration_reference.real_path
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
end
How can I ensure that my Flutter installation is set up correctly?
Run flutter doctor
in your terminal/command prompt. It checks your environment for any issues with the Flutter installation, such as missing dependencies or configuration problems.
What should I do to update my Flutter SDK to the latest version?
Ensure that you are using the latest stable version of the Flutter SDK by running flutter upgrade in your terminal/command prompt.
How can I verify the dependencies listed in my Flutter project's pubspec.yaml file?
Check your pubspec.yaml
file to ensure that all dependencies are correctly spelled and have the correct version numbers.
What should I do if I encounter unexpected behavior in my Flutter app due to Flutter plugins?
Make sure that the Flutter plugins you are using are compatible with your Flutter SDK version and other dependencies.
What can I do if I am experiencing strange behavior in my IDE or editor while working on a Flutter project?
Try restarting your IDE or editor (e.g., Android Studio, Visual Studio Code) to resolve various issues related to code analysis, debugging, and hot reload.
How can I clean the build cache in my Flutter project?
Run flutter clean in your terminal/command prompt to clean the build cache, removing the build directory and resolving issues related to stale build artifacts.
What should I look for in Flutter logs when running my Flutter project?
Review the output in the terminal/command prompt when running flutter run or flutter build for any error messages or warnings that may indicate the source of the problem.
How can I address platform-specific behavior differences in my Flutter app?
Double-check any platform-specific code you have implemented to ensure it correctly handles platform differences (e.g., iOS vs. Android).
What should I do if I suspect build-related issues in my Flutter project?
Delete the build folder manually from your project directory or use flutter clean to remove it. Afterward, run your project again to trigger a fresh build, potentially resolving any build-related issues present before.
How can I share data between the Notification Service Extension(NSE) and the main app?
If you are sharing data between the NSE and the main app, ensure both targets (main app and NSE) have the same App Group configured.
Why is my Notification Service Extension (NSE) not working / not getting invoked?
Ensure below settings are done in your Runner
Build Phases:
In the project navigator, Go to the Targets-> Runner-> Build Phases-> Embed Foundation Extensions. it's essential to ensure that the Embed Foundation Extensions in Build Phases is positioned directly above the Copy Bundle Resources phase to properly prioritize the embedding of system frameworks and extensions.
When configuring the Embed Foundation Extensions build phase in Xcode, it's important to ensure that the "Copy only when installing" option is unchecked.
Why didn't my test call come through?
The portal uses a 3rd-party for sending test calls. Although rare, it is possible that the call might not come through. In this case, make sure a contact has been created on device with the proper name, number, and image. If the contact has been created, you can assume proper functionality when deployed in production.
Why are ENGAGE pushes not coming through?
The most common reason that ENGAGE pushes do not make it to the device is due to conflicts with Firebase. If the host app is using Firebase, make sure you refer to the steps from scenario 2 in the Common Integration Scenarios page .
If the Firebase setup has been double checked and verified or if the host app does not use Firebase, make sure the device is properly connected to the internet. If it is on WiFi, try testing it again on cellular data. If a VPN is enabled, try disabling and test again.
If none of the suggestions solve the issue, double check the device has given the proper permission. Without having received the permissions, ENGAGE functionality will be compromised.
Why does my device fail ENGAGE authentication?
Double check the ENGAGE verification type in your ENGAGE configuration file. It should be located at:
app/src/main/assets/enage-config.json
The pin
verification type is rate-limited. It is possible that through development and testing, the limit has been reached and the platform is denying the request. Check the logs to verify that this is the case. To learn more about logging, refer to this page.
NOTE
If you are still experiencing issues with integration, please reach out to First Orion. We are available to help determine and solve these issues for you.
Updated 7 months ago