Giter VIP home page Giter VIP logo

qonversion / flutter-sdk Goto Github PK

View Code? Open in Web Editor NEW
90.0 6.0 18.0 5.44 MB

Flutter SDK for cross-platform in-app purchase and subscription infrastructure, revenue analytics, engagement automation, and integrations

Home Page: https://qonversion.io

License: MIT License

Kotlin 11.06% Ruby 3.08% Swift 18.94% Objective-C 0.74% Dart 65.64% HTML 0.53%
analytics in-app-purchase flutter-purchases subscriptions trials receipt-validation ios ios-subscription iap-verification flutter

flutter-sdk's Issues

ANR com.qonversion.android.sdk.FacebookAttribution.getAttributionId Input dispatching timed out

Hello. My apps for Android are showing me this ARN with a lot of users affected (is less than 1% but is the ANR with more affected users in my case):

qonversion_flutter: ^5.1.0

On Play Console (Android vitals section):

com.qonversion.android.sdk.FacebookAttribution.getAttributionId
Input dispatching timed out

On Crashlytics:

FacebookAttribution.java
com.qonversion.android.sdk.FacebookAttribution.getAttributionId

main (native):tid=1 systid=9761
#00 pc 0xd6b94 libc.so (__ioctl + 4)
#1 pc 0x936c4 libc.so (ioctl + 156)
#2 pc 0x51a7c libbinder.so (android::IPCThreadState::talkWithDriver(bool) + 296)
#3 pc 0x52a68 libbinder.so (android::IPCThreadState::waitForResponse(android::Parcel*, int*) + 60)
#4 pc 0x527d8 libbinder.so (android::IPCThreadState::transact(int, unsigned int, android::Parcel const&, android::Parcel*, unsigned int) + 184)
#5 pc 0x4b01c libbinder.so (android::BpBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int) + 188)
#6 pc 0x12b19c libandroid_runtime.so (android_os_BinderProxy_transact(_JNIEnv*, _jobject*, int, _jobject*, _jobject*, int) + 152)
at android.os.BinderProxy.transactNative(BinderProxy.java)
at android.os.BinderProxy.transact(BinderProxy.java:540)
at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:5945)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:7138)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2954)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:2509)
at android.content.ContentResolver.query(ContentResolver.java:1181)
at android.content.ContentResolver.query(ContentResolver.java:1128)
at android.content.ContentResolver.query(ContentResolver.java:1084)
at com.qonversion.android.sdk.FacebookAttribution.getAttributionId(FacebookAttribution.java)
at com.qonversion.android.sdk.QUserPropertiesManager.sendFacebookAttribution(QUserPropertiesManager.java)
at com.qonversion.android.sdk.Qonversion.launch(Qonversion.java)
at io.qonversion.sandwich.QonversionSandwich.launch(QonversionSandwich.java)
at com.qonversion.flutter.sdk.qonversion_flutter_sdk.QonversionFlutterSdkPlugin.launch(QonversionFlutterSdkPlugin.java)
at com.qonversion.flutter.sdk.qonversion_flutter_sdk.QonversionFlutterSdkPlugin.onMethodCall(QonversionFlutterSdkPlugin.java)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0(DartMessenger.java)
at io.flutter.embedding.engine.dart.DartMessenger.$r8$lambda$TsixYUB5E6FpKhMtCSQVHKE89gQ(DartMessenger.java)
at io.flutter.embedding.engine.dart.DartMessenger$$InternalSyntheticLambda$0$ceffc6bae7d364cb48afaf1aaebd60bf9050360d0efb9035ebc54f0851df0a05$0.run(DartMessenger.java)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8037)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)

My flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.3, on macOS 13.2.1 22D68 darwin-arm64, locale es-CO)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.75.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!

Sdk not initializing

Hi team.

flutter doctor -v
[√] Flutter (Channel stable, v1.17.3, on Microsoft Windows [Version 10.0.18362.900], locale ru-RU)
• Flutter version 1.17.3 at D:\flutter
• Framework revision b041144f83 (2 weeks ago), 2020-06-04 09:26:11 -0700
• Engine revision ee76268252
• Dart version 2.8.4

version: qonversion_flutter: ^0.2.5

Tried each of these methods: launchWith, launchWithClientSideUserId, launchWithAutoTrackPurchases
But after the method is called, nothing comes back and the new user does not appear in the statistics.
In debug mode, I was able to reach the call of native functions, after them, nothing happens.

Restore String Bug after Upgrading Conversion Version

Hey after upgrading the Qonversion package (qonversion_flutter: ^7.3.0) to the newest package the following error occurs on Android after Restoring:

[error] Uncaught Platform Error
_TypeError (type '_Map<Object?, Object?>' is not a subtype of type 'String?')
 #0      QonversionInternal.restore (package:qonversion_flutter/src/internal/qonversion_internal.dart:184:49)
                       <asynchronous suspension>
 await Qonversion.getSharedInstance().restore().then((value) {
            Map<String, QEntitlement> map = value;
            bool proActive = map["Pro"]?.isActive ?? false;

Fatal Exception: NSInvalidUnarchiveOperationException on iOS

Hello.

After the update to qonversion_flutter: ^5.0.0 some errors appear on Firebase crashlytics on iOS.

QNUserDefaultsStorage.m line 41
-[QNUserDefaultsStorage loadObjectForKey:]

image

Fatal Exception: NSInvalidUnarchiveOperationException
0 CoreFoundation 0xa248 __exceptionPreprocess
1 libobjc.A.dylib 0x17a68 objc_exception_throw
2 Foundation 0x536b78 -[NSCoder __failWithException:]
3 Foundation 0x536cbc -[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:]
4 Foundation 0x48c70 _decodeObjectBinary
5 Foundation 0x203f0 _decodeObject
6 Foundation 0x4ba9c -[NSKeyedUnarchiver decodeObjectForKey:]
7 Foundation 0xbe6fc +[NSKeyedUnarchiver unarchiveObjectWithData:]
8 Qonversion 0x1a8f0 -[QNUserDefaultsStorage loadObjectForKey:] + 41 (QNUserDefaultsStorage.m:41)
9 Qonversion 0xde38 -[QNProductCenterManager cachedLaunchResult] + 132 (QNProductCenterManager.m:132)
10 Qonversion 0xdf18 -[QNProductCenterManager getActualProducts] + 145 (QNProductCenterManager.m:145)
11 Qonversion 0x11c08 -[QNProductCenterManager loadProducts] + 620 (QNProductCenterManager.m:620)
12 Qonversion 0xe2a0 __47-[QNProductCenterManager launchWithCompletion:]_block_invoke + 179 (QNProductCenterManager.m:179)
13 Qonversion 0x12fac __33-[QNProductCenterManager launch:]_block_invoke + 772 (QNProductCenterManager.m:772)
14 Qonversion 0x71e0 __41-[QNAPIClient processRequest:completion:]_block_invoke + 84 (QNAPIClient.m:84)
15 Qonversion 0x86c8 __55-[QNAPIClient dataTaskWithRequest:tryCount:completion:]_block_invoke + 272 (QNAPIClient.m:272)
16 CFNetwork 0x1fd1c CFURLRequestSetMainDocumentURL
17 CFNetwork 0x2fc40 _CFNetworkErrorCopyLocalizedDescriptionWithHostname
18 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release
19 libdispatch.dylib 0x3fdc _dispatch_client_callout
20 libdispatch.dylib 0xb694 _dispatch_lane_serial_drain
21 libdispatch.dylib 0xc214 _dispatch_lane_invoke
22 libdispatch.dylib 0x16e10 _dispatch_workloop_worker_thread
23 libsystem_pthread.dylib 0xdf8 _pthread_wqthread
24 libsystem_pthread.dylib 0xb98 start_wqthread

On our test the app and qonversion works fine.

Can't write unit test against Qonversion

The following flutter unit test is as simple as they get:

import 'package:flutter_test/flutter_test.dart';
import 'package:qonversion_flutter/qonversion_flutter.dart';

void main() async {
  await Qonversion.launch('***SaLiJB',
      isObserveMode: false);

  group('foo', () {
    test('bar', () async {
      // void
    });
  });
}

This fails with

package:flutter/src/services/platform_channel.dart 132:86  MethodChannel.binaryMessenger
package:flutter/src/services/platform_channel.dart 157:36  MethodChannel._invokeMethod
package:flutter/src/services/platform_channel.dart 340:12  MethodChannel.invokeMethod
package:qonversion_flutter/src/qonversion.dart 331:16      Qonversion._storeSdkInfo
package:qonversion_flutter/src/qonversion.dart 52:5        Qonversion.launch
test/unit/payment_service_test.dart 5:20                   main

Failed to load "test/unit/payment_service_test.dart": Null check operator used on a null value

pubspec qonversion_flutter: ^4.3.0

Flutter Web Support

We love Qonversion and really want to use the platform. Any word on when the SDK will support Flutter Web?

How are developers achieving the "App Store, Play Store, Stripe" paradigm illustrated in the Readme of the SDK today (given their Flutter apps are deployed to Apple, Android, and Web)?

Error in iOS Emulator

Does it work on the emulator? I tried but the pop up is not displayed, on the physical iphone it worked but in the emulator nothing happens and I get this message in the log: ⚠️ Store products request failed with message: Error Domain=com.qonversion.io Code=0 "UNKNOWN_ERROR" UserInfo={NSLocalizedDescription=UNKNOWN_ERROR}

The biggest problem is that when I sent the app for apple review, when they click on the subscribe button, they reported that nothing happens, in the test they used an iPad with iOS 14.4.

I don't have an iPad to test, but on my iPhone it's working properly, it's also running iOS 14.4.

Now I'm lost, by the way in the emulator you can't really test.

Not recording/tracking purchase data

Hi Team,

It's my first time using your package. I know it's in beta. But I still used it when I launched a new version of my app. But unfortunately, it is not able to track/record purchases as I cannot see any purchases in the web dashboard.

Still, I am very excited to see this beat RevenueCat since it looks a lot more promising and not to mention the awesome pricing!

Thank you very much

My app keeps crashing in. release mode

The app works fine in debug mode but crashes in release mode with this log. I really can't make anything of it

FATAL EXCEPTION: main
E/AndroidRuntime(16123): Process: com.example.app, PID: 16123
E/AndroidRuntime(16123): java.lang.IllegalArgumentException: Unable to create call adapter for interface m.g
E/AndroidRuntime(16123):     for method Api.init
E/AndroidRuntime(16123):        at m.Y.c(Unknown Source:43)
E/AndroidRuntime(16123):        at m.Y.a(:71)
E/AndroidRuntime(16123):        at m.X.c(Unknown Source:29)
E/AndroidRuntime(16123):        at m.V.invoke(Unknown Source:32)
E/AndroidRuntime(16123):        at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
E/AndroidRuntime(16123):        at $Proxy3.init(Unknown Source)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.QonversionRepository.initRequest(Unknown Source:38)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.QonversionRepository.init(Unknown Source:34)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.QProductCenterManager.processInit(Unknown Source:17)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.QProductCenterManager.access$processInit(Unknown Source:0)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.QProductCenterManager$continueLaunchWithPurchasesInfo$1.invoke(Unknown Source:36)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.QProductCenterManager$continueLaunchWithPurchasesInfo$1.invoke(Unknown Source:2)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.billing.QonversionBillingService$queryPurchases$1$1.invoke(Unknown Source:76)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.billing.QonversionBillingService$queryPurchases$1$1.invoke(Unknown Source:2)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.billing.QonversionBillingService.withReadyClient(Unknown Source:14)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.billing.QonversionBillingService.access$withReadyClient(Unknown Source:0)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.billing.QonversionBillingService$queryPurchases$1.invoke(Unknown Source:9)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.billing.QonversionBillingService$queryPurchases$1.invoke(Unknown Source:2)
E/AndroidRuntime(16123):        at com.qonversion.android.sdk.billing.QonversionBillingService$executeRequestsFromQueue$1$1$1.run(Unknown Source:3)
E/AndroidRuntime(16123):        at android.os.Handler.handleCallback(Handler.java:873)
E/AndroidRuntime(16123):        at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(16123):        at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime(16123):        at android.app.ActivityThread.main(ActivityThread.java:6705)
E/AndroidRuntime(16123):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(16123):        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(16123):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
E/AndroidRuntime(16123): Caused by: java.lang.IllegalArgumentException: Call return type must be parameterized as Call<Foo> or Call<? extends Foo>
E/AndroidRuntime(16123):        at m.d0.e(Unknown Source:16)
E/AndroidRuntime(16123):        at m.t.a(:2)
E/AndroidRuntime(16123):        at m.X.a(:1)
E/AndroidRuntime(16123):        at m.Y.a(:1)
E/AndroidRuntime(16123):

I am getting this error for calling collectApplesearchAds method

Hello

while implementing qonversion in my app i started to see this error after adding collectAppleSearchads method

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(NoNecessaryDataError, Could not find necessary arguments, Make sure you pass correct call arguments, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18)

Many issues on example code

1、flutter pub get since low vesion
% flutter pub get
Resolving dependencies...
The lower bound of "sdk: '>=2.3.0 <3.0.0'" must be 2.12.0'
or higher to enable null safety.

The current Dart SDK (3.4.0-220.0.dev) only supports null safety.

2、FlatButton is not defined
3、The return type 'Null' isn't a 'QEntitlement'
4、Why dependency firebase?
5、Cloud you please provide a demo gif for your example?

Permissions is empty!

Hello guys!

When we call:
await Qonversion.checkPermissions()
await Qonversion.restore()

permission length is empty

Work properly:
await Qonversion.purchaseProduct(qProduct)
await Qonversion.offerings()

2022-04-08_15-27-54

2022-04-08_15-28-54

2022-04-08_15-41-59

QOnversion failures not throwing

Recently, QOnversion started to fail A LOT. All API requests started to fail and when it happens, it doesn't throws anything on the Flutter side. Although I can see on the logs it returns 4xx or even 5xx errors.

Well, we need to be able to catch these errors, if not, lots of unexpected issues starts to happen. Like, subscriptions going to the wrong users and so on.

As you can see here, I tried to call a QOnversion.identify(), it didn't throw anything but on the logs below we can see that QOnversion is logging it and also Firebase Performance catched the http response.

D/Qonversion(20781): Thread - main identityRequest - failure - QonversionError: {code=BackendError, description=There was a backend error, additionalMessage=HTTP status code=403, error=failed to parse the backend response. }
I/FirebasePerformance(20781): Logging network request trace: https://api.qonversion.io/v2/identities (responseCode: 403, responseTime: 0,466ms)

Without throwing anything, a new user can sign-in on our App but it will remains the same for QOnversion, causing lots of conflicts when getting their subscriptions later on.

MacOS - [MissingPluginException(No implementation found for method listen on channel qonversion_flutter_promo_purchases)]

I'm getting the below error when implementing promo purchases on MacOS. Maybe the doc is should mention that this is only for iOS. Thanks

[MissingPluginException(No implementation found for method listen on channel qonversion_flutter_promo_purchases)]
flutter: ══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞═════════════════════════════════════════════════════════
flutter: The following MissingPluginException was thrown:
flutter: MissingPluginException(No implementation found for method listen on channel
flutter: qonversion_flutter_promo_purchases)
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0      MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:165
flutter: <asynchronous suspension>
flutter: #1      EventChannel.receiveBroadcastStream.<anonymous closure>
package:flutter/…/services/platform_channel.dart:506
flutter: <asynchronous suspension>

StrictMode policy violation on Google Play prelaunch report

We used your new SDK which version of 4.0.0 but we have got same issue on Google Play prelaunch report.

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Lcom/android/org/conscrypt/ConscryptEngineSocket;->setHostname(Ljava/lang/String;)V at android.os.StrictMode.lambda$static$1(StrictMode.java:416) at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2) at java.lang.Class.getDeclaredMethodInternal(Native Method) at java.lang.Class.getPublicMethodRecursive(Class.java:2079) at java.lang.Class.getMethod(Class.java:2066) at java.lang.Class.getMethod(Class.java:1693) at n.g0.k.e.b(Unknown Source:1) at n.g0.k.e.a(Unknown Source:7) at n.g0.k.e.d(Unknown Source:4) at n.g0.k.e.e(Unknown Source:0) at n.g0.k.a.g(Unknown Source:21) at n.g0.f.c.f(Unknown Source:62) at n.g0.f.c.j(Unknown Source:52) at n.g0.f.c.d(Unknown Source:178) at n.g0.f.g.f(Unknown Source:221) at n.g0.f.g.g(Unknown Source:0) at n.g0.f.g.i(Unknown Source:22) at n.g0.f.a.intercept(Unknown Source:25) at n.g0.g.g.j(Unknown Source:167) at n.g0.g.g.c(Unknown Source:6) at n.g0.e.a.intercept(Unknown Source:124) at n.g0.g.g.j(Unknown Source:167) at n.g0.g.g.c(Unknown Source:6) at n.g0.g.a.intercept(Unknown Source:161) at n.g0.g.g.j(Unknown Source:167) at n.g0.g.j.intercept(Unknown Source:48) at n.g0.g.g.j(Unknown Source:167) at n.g0.g.g.c(Unknown Source:6) at com.qonversion.android.sdk.api.NetworkInterceptor.intercept(Unknown Source:85) at n.g0.g.g.j(Unknown Source:167) at n.g0.g.g.c(Unknown Source:6) at n.z.e(Unknown Source:115) at n.z$b.k(Unknown Source:10) at n.g0.b.run(Unknown Source:17) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923)

and also show second error:

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Lcom/android/org/conscrypt/ConscryptEngineSocket;->setUseSessionTickets(Z)V at android.os.StrictMode.lambda$static$1(StrictMode.java:416) at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2) at java.lang.Class.getDeclaredMethodInternal(Native Method) at java.lang.Class.getPublicMethodRecursive(Class.java:2079) at java.lang.Class.getMethod(Class.java:2066) at java.lang.Class.getMethod(Class.java:1693) at n.g0.k.e.b(Unknown Source:1) at n.g0.k.e.a(Unknown Source:7) at n.g0.k.e.d(Unknown Source:4) at n.g0.k.e.e(Unknown Source:0) at n.g0.k.a.g(Unknown Source:12) at n.g0.f.c.f(Unknown Source:62) at n.g0.f.c.j(Unknown Source:52) at n.g0.f.c.d(Unknown Source:178) at n.g0.f.g.f(Unknown Source:221) at n.g0.f.g.g(Unknown Source:0) at n.g0.f.g.i(Unknown Source:22) at n.g0.f.a.intercept(Unknown Source:25) at n.g0.g.g.j(Unknown Source:167) at n.g0.g.g.c(Unknown Source:6) at n.g0.e.a.intercept(Unknown Source:124) at n.g0.g.g.j(Unknown Source:167) at n.g0.g.g.c(Unknown Source:6) at n.g0.g.a.intercept(Unknown Source:161) at n.g0.g.g.j(Unknown Source:167) at n.g0.g.j.intercept(Unknown Source:48) at n.g0.g.g.j(Unknown Source:167) at n.g0.g.g.c(Unknown Source:6) at com.qonversion.android.sdk.api.NetworkInterceptor.intercept(Unknown Source:85) at n.g0.g.g.j(Unknown Source:167) at n.g0.g.g.c(Unknown Source:6) at n.z.e(Unknown Source:115) at n.z$b.k(Unknown Source:10) at n.g0.b.run(Unknown Source:17) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923)

Release Apk Build Failed

Building apk fails with the following output:

flutter\.pub-cache\hosted\pub.dartlang.org\qonversion_flutter-4.0.0\android\src\main\kotlin\com\qonversion\flutter\sdk\qonversion_flutter_sdk\QonversionFlutterSdkPlugin.kt: (42, 71): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':qonversion_flutter:compileReleaseKotlin'.
> Compilation error. See log for more details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 32s
Running Gradle task 'assembleRelease'...                           34.3s
Gradle task assembleRelease failed with exit code 1

Clash between Qonversion SDK and In_app_purchase package

Hello,

I have a problem integrating QonversionSdk for Android in observeMode.
In_app_purchase Flutter library uses newer version of native BillingClient than this library.


Latest Flutter version of in_app_purchase uses native library which uses BillingClient 3.0.2
https://github.com/flutter/plugins/blob/main/packages/in_app_purchase/in_app_purchase_android/android/build.gradle

Tagged version of latest quonversion for flutter uses Android QonversionSdk for android in version 3.2.4:
https://github.com/qonversion/flutter-sdk/blob/4.3.1/android/build.gradle

Lastly Android QonversionSdk for uses BillingClient 4.0.0
https://github.com/qonversion/android-sdk/blob/main/sdk/build.gradle

Mapping Error During Restore on iOS

I have an issue with Flutter SDK a mapping error occurs when I call the restore function, even though I have updated the SDK version to 7.3.1.

final Map<String, QEntitlement> entitlements = await Qonversion.getSharedInstance().restore();

The error message is:

Error: type '_Map<Object?, Object?>' is not a subtype of type 'String?'

This error only happens on iOS devices.

Null values for most properties

HI, i've been trying to add the Qonversion SDK to my app but the product details returned have a lot of null values in places that shouldn't be null.
This is my code for getting my offerings

Future<void> _loadQonversionObjects() async {
    try {
      final QOfferings offerings = await Qonversion.offerings();
      final products = offerings.main?.products ?? <QProduct>[];
      if (products.isNotEmpty) {
        // Display your products
        print("Qonversion products");
        print(products);
        print(products.first.price);
        print(products.first.prettyPrice);
      }

      permissions = await Qonversion.checkPermissions();
    } catch (e) {
      print(e);
      permissions = <String, QPermission>{};
    }
  }

Here, price and prettyPrice are both null. Other properties like skuDetails are also null.

iOS integration Error

@SpertsyanKM, I am testing the purchases for iOS, and getting these outputs:

1- I tried on a real device (iPad pro iOS 16) and (designed for Macbook iPad) and getting the same error logs.
2- I tried on a simulator (iPad, iPhone...) and the same output is given.
3- Sometimes the logs give an extra output for the storekit file saying that Failed to fetch storekit file but I was not able to get that extra line in further testings and forgot to record it.
4- On android, everything is functional if that helps.
5- The app is published for external testers and IAP is not working too, the server recorded similar outputs.

All tests are within sandbox environment and sandbox registered apple ids and using iOS 16.
Note: using qonversion_flutter version 5.0.1.

2023-01-15 20:02:48.533788+0200 Runner[27043:144514] ❎ Try to fetch user receipt...
2023-01-15 20:02:51.970205+0200 Runner[27043:144514] <SKReceiptRefreshRequest: 0x600000287040>: Finished refreshing receipt with error: Error Domain=ASDErrorDomain Code=500 "Failed to write receipt to URL: file:///Users/user/Library/Containers/com.app.name/Data/StoreKit/sandboxReceipt" UserInfo={NSDebugDescription=Failed to write receipt to URL: file:///Users/user/Library/Containers/com.app.name/Data/StoreKit/sandboxReceipt, NSUnderlyingError=0x600000dab240 {Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “StoreKit” in the folder “Data”." UserInfo={NSFilePath=/Users/user/Library/Containers/com.app.name/Data/StoreKit, NSUnderlyingError=0x600000dab810 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}}, AMSServerErrorCode=0}
2023-01-15 20:02:51.970678+0200 Runner[27043:144514] ⚠️ Receipt not found
2023-01-15 20:02:54.170340+0200 Runner[27043:198157] [connection] nw_resolver_start_query_timer_block_invoke [C103.1] Query fired: did not receive all answers in time for api.qonversion.io:443

Migration to null safety.

Hi!

I ran into a problem with the migration of my project to Null Safety Sound. Since the plugin does not support zero security.

Please tell me if plans for the migration of the plugin?

com.qonversion.io error 2. isUserCancelled: false

Hello everyone, set up my project, cloned this the repository, modified the project id.
The product list is listing correctly, but the permissions are not listen. When I try to buy an item, I get this error:

The operation couldn’t be completed. (com.qonversion.io error 2.), isUserCancelled: false

I am developing on iOS debug mode, virtual device. Where can I search for a solution to this error 2?

No implementation found for method storeSdkInfo on channel qonversion_flutter_sdk error

qonversion_flutter: ^3.0.1

I want to switch from revenuecat to qonversion but when I run my app I have an error below line.

await Qonversion.launch('****-vY7N7', isObserveMode: false);
E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: MissingPluginException(No implementation found for method storeSdkInfo on channel qonversion_flutter_sdk)
    #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7)
    <asynchronous suspension>
E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: MissingPluginException(No implementation found for method launch on channel qonversion_flutter_sdk)
    #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7)
    <asynchronous suspension>
    #1      Qonversion.launch (package:qonversion_flutter/src/qonversion.dart:49:23)
    <asynchronous suspension>
    #2      Initialization.initPlatformState (package:flutter_module/app/controllers/initialization.dart:281:38)
    <asynchronous suspension>

After that I try to pub get, I have an error.

❯ flutter pub get
Running "flutter pub get" in flutter_module...                     928ms
The plugin `qonversion_flutter` is built using an older version of the Android plugin API which assumes that it's running in a full-Flutter environment. It may have undefined behaviors when Flutter is integrated into
an existing app as a module.
The plugin can be updated to the v2 Android Plugin APIs by following https://flutter.dev/go/android-plugin-migration.

By the way I tried flutter clean, and also I am using FlutterView on Android.

BUG: call to userInfo() with null "identityId" throws exception (user.g.dart:12:24) - v5.1.0

I'm seeing an error when trying to call userInfo(). The generated JSON parsing for the User object tries to cast the value of identityId in the JSON response to a string. If this value is null an execption is thrown and no userinfo object is returned.

QUser _$QUserFromJson(Map<String, dynamic> json) {
return QUser(
json['qonversionId'] as String,
json['identityId'] as String,
);

Stack trace:

0      _$QUserFromJson (package:qonversion_flutter/src/dto/user.g.dart:12:24)
1      new QUser.fromJson (package:qonversion_flutter/src/dto/user.dart:16:7)
2      QMapper.userFromJson (package:qonversion_flutter/src/internal/mapper.dart:50:18)
3      QonversionInternal.userInfo (package:qonversion_flutter/src/internal/qonversion_internal.dart:191:28)
<asynchronous suspension>
4      SubscriptionService._launch (package:app/core/services/subscriptions/subscription_service.dart:109:20)
<asynchronous suspension>
5      SubscriptionService.init (package:app/core/services/subscriptions/subscription_service.dart:46:5)
<asynchronous suspension>

skuDetails is null

i showing skuDetails is null

App pushlised Play Market
also i showing prettyPrice null

2021-09-24_16-43-21
2021-09-24_16-43-38
Uploading 2021-09-24_16-43-55.png…
2021-09-24_16-45-01

Getting "A data connection is not currently allowed" error on iOS

hello

i am getting this error

QonversionInternal.checkEntitlements
[FlutterError - PlatformException(-1020, A data connection is not currently allowed., Qonversion Error Code: -1020, null). Error thrown null.]

from my error understanding is that because there is no connection but in qonversion offline sdk documentation it said that it will return the last user entitlements cache

Permission isActive property is false after subscribing to a product

Hi, i've been trying to figure out my user's isActive property on the permission object is always false. Is this because I'm in debug mode? Here's a snippet of my code

Future<void> _initQonversionState() async {
   if (kDebugMode) {
     Qonversion.setDebugMode();
   }

   await Qonversion.launch(
     'mykey',
     isObserveMode: false,
   );

   await Qonversion.identify("${_authController.currentUser.value?.uid}");

   if (Platform.isIOS) Qonversion.setAppleSearchAdsAttributionEnabled(true);

   _loadQonversionObjects();
 }

 Future<void> _loadQonversionObjects() async {
   try {
     final QOfferings offerings = await Qonversion.offerings();
     products = offerings.main?.products ?? <QProduct>[];
     if (products.isNotEmpty) {
       // Display your products
       print("Qonversion products");
       
     }

     permissions = await Qonversion.checkPermissions();
     premiumActive = permissions["Premium"]?.isActive;
     print("permissions");
     print(permissions["Premium"]?.isActive);
   } catch (e) {
     print(e);
     permissions = <String, QPermission>{};
   }
 }

 Future<void> purchasePremium(QProduct product) async {
   try {
     permissions = await Qonversion.purchaseProduct(product);
     print("Premium purchased successfully");
     premiumActive = permissions["Premium"]?.isActive;
     print("permissions");
     print(permissions["Premium"]?.isActive);
   } on QPurchaseException catch (e) {
     print("Error purchasing premium");
     print(e);
    
     return Future.error("Error purchasing premium");
   }
 }

Crash with casting timestamp

Hello,
updated flutter sdk to 2.0.0 and iOS pod Qonversion (2.4.1) detect problem with casting property QNLaunchResult.timestamp to NSUInteger

Снимок экрана 2020-12-21 в 00 29 32

because of this I have a crash app in Xcode 11.7
Снимок экрана 2020-12-21 в 00 33 14

can't even flutter pub get this code. update it.

Because qonversion_flutter depends on build_runner >=0.1.1 <2.0.0 which doesn't support null safety, version solving failed.

The lower bound of "sdk: '>=1.9.1 <3.0.0'" must be 2.12.0 or higher to enable null safety.
For details, see https://dart.dev/null-safety

The lower bound of "sdk: '>=2.3.0 <3.0.0'" must be 2.12.0'
or higher to enable null safety.

The current Dart SDK (3.3.0) only supports null safety.

For details, see https://dart.dev/null-safety
exit code 65

--

[example] flutter pub get --no-example
Resolving dependencies...
The lower bound of "sdk: '>=2.3.0 <3.0.0'" must be 2.12.0'
or higher to enable null safety.

The current Dart SDK (3.3.0) only supports null safety.

For details, see https://dart.dev/null-safety
exit code 65

Exception(Qonversion.offerings) - type 'Future<String?>' is not a subtype of type 'FutureOr<String>' in type cast

Somehow I can't believe I'm the first one to hit this so I might be doing something wrong since updating to the null-safe version of this package. Please let me know.

Calling for offerings Qonversion.offerings(); throws a cast exception.

Package version: 3.0.0

Error:

type 'Future<String?>' is not a subtype of type 'FutureOr<String>' in type cast. 
Non-fatal Exception: FlutterError
0   ???                            0x0 offerings + 211 (qonversion.dart:211)

Code to reproduce:

final offerings = await Qonversion.offerings();

Code Location
https://github.com/qonversion/flutter-sdk/blob/main/lib/src/qonversion.dart#L210-L211

I suspect this is also an issue:
https://github.com/qonversion/flutter-sdk/blob/main/lib/src/qonversion.dart#L223-224

JSON Parsing Error with RemoteConfig

I call up RemoteConfig as usual and this error currently appears:

[error] Uncaught Platform Error
[sentry.platformError] _TypeError (type 'Null' is not a subtype of type 'String' in type cast)
[sentry.platformError] #0 _$QRemoteConfigurationSourceFromJson (package:qonversion_flutter/src/dto/remote_configuration_source.g.dart:19:24)
#1 new QRemoteConfigurationSource.fromJson (package:qonversion_flutter/src/dto/remote_configuration_source.dart:41:7)
#2 _$QRemoteConfigFromJson (package:qonversion_flutter/src/dto/remote_config.g.dart:15:32)
#3 new QRemoteConfig.fromJson (package:qonversion_flutter/src/dto/remote_config.dart:28:7)
#4 QMapper.remoteConfigFromJson (package:qonversion_flutter/src/internal/mapper.dart:70:26)
#5 QonversionInternal.remoteConfig (package:qonversion_flutter/src/internal/qonversion_internal.dart:180:28)

#6 RemoteConfigNotifer.loadRemoteConfig (package:histamin_scanner/Provider/remote_config_notifer.dart:9:26)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.