Ionic 7 app with React integration
Hello, I have Ionic 7 app with React, which I am converting to Android/iOS apps using Capacitor 5. How do I please integrate Fullstory to our app?
I found this tutorial on your web:
https://help.fullstory.com/hc/en-us/articles/16924219219223-Getting-Started-with-Cordova-or-Capacitor-Data-Capture
It states that for Android I should follow this tutorial first:
https://help.fullstory.com/hc/en-us/articles/360040596093-Getting-Started-with-Android-Data-Capture
I did all the steps (made changes in build.gradle file, app/build.gradle file, androidManifest.xml and added App.java file. But now build in Android studio fails. Changes are exactly according to tutorial, it seems like Fullstory is not intialized correctly. It doesn't recognize fullstory props set it app.build.gradle:
groovy.lang.MissingPropertyException: Could not get unknown property 'fs_record_on_start' for extension 'fullstory' of type com.fullstory.plugins.gradle.FullStoryExtension.
Invalid log level 'fs_log_level' - valid values are [off, log, debug, info, warn, error]
java.lang.IllegalArgumentException: Invalid log level 'fs_log_level' - valid values are [off, log, debug, info, warn, error]
Despite values are according to documentation:
fullstory {
org "orgId"
enabledVariants "release"
logLevel "info"
logcatLevel "info"
recordOnStart true
}
Next I should follow instructions in first tutorial (Getting Started with Cordova or Capacitor Data Capture) and first step is:
cordova plugin add @fullstory/cordova-plugin --variable FS_VERSION=1.48.0 --variable FS_ORG='orgId'
But this gives me error: Current working directory is not a Cordova-based project.
Its because I use Capacitor to build native app from Ionic and this tutorial is only for Cordova, despite Capacitor is mentioned there multiple times.
So is it actuallly needed to instal this @fullstory/cordova-plugin? If so how to add it to Capacitor project? Will this help with errors mentioned earlier?
Also when I tried to initialize new Ionic React app with Cordova, it gives me error: '[ERROR] Ionic doesn't support using Cordova with @ionic/react projects.'.
Thank you.
Comments
2 comments
Hi Lukas Dombrovsky ,
Before you can fully integrate FullStory with your Ionic/Capacitor app, you'll need to complete the setup for the native iOS and Android platforms:
Once you've completed the native setups, you can skip the Cordova plugin step as your app uses Ionic/Capacitor. Proceed with the “Additional Setup Requirements” from this guide: Getting Started with Cordova or Capacitor Data Capture.
Regarding the error you mentioned, could you please contact support@fullstory.com and provide your build.gradle files? This will allow us to better understand and assist with the issue.
Thanks!
Hello Uday,
thank you for your response. I actually followed exact steps for native platforms. Under “Additional Setup Requirements” for Android there are only steps: create subclass from application class android.app.Application and permissions, which are already in native tutorial.
I will provide build.graddle files to support.
Thanks.
Please sign in to leave a comment.