Hello,
I’m having some difficulties with implementing Capacitor and Vue 3 for Android.
Firstly, I want to figure out how to handle locked areas in my app upon boot. As I understand it, the app will send a request to the RevenueCat API to check the subscription status of each user IDs, which will return either a “subscribed” or “unsubscribed” response.
I think the best approach would be to save this status in persistent storage and then develop the necessary logic to lock or unlock functions in my app.
Could you please confirm if my understanding is correct?
Additionally, regarding the Vue.js part: should I include this logic in the App.vue file?
Thank you!
if (Platform.is.android) {
try {
const revenuecat = await import('@revenuecat/purchases-capacitor');
const Purchases = revenuecat.Purchases;
const LOG_LEVEL = revenuecat.LOG_LEVEL;
await Purchases.setLogLevel({ level: LOG_LEVEL.DEBUG });
await Purchases.configure({
apiKey: process.env.REVENUECAT_API_KEY_ANDROID,
appUserID: this.authStore.userId
});
console.log("RevenueCat SDK configured!");
} catch (error) {
console.error('Error configuring RevenueCat:', error);
}
}
If yes, I cannot work how to show the offerings that I created inside my revenue cat account.
Could you please show me an example on this for vue 3?
Thanks!