Code Monkey home page Code Monkey logo

unity-sdk's People

Contributors

actions-user avatar maria-bordunova avatar mnvrtx avatar rutraple avatar smejl avatar spertsyankm avatar suriksarkisyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

unity-sdk's Issues

Can't build for iOS

Hello, I got these errors when I built my project on Xcode. I imported the SDK via Git and I'm using Xcode 13.0.
com.qonversion.unity/Runtime/iOS/Plugins/Common/UtilityBridge.m:68:31: Definition of 'QNPermission' must be imported from module 'Qonversion.QNPermission' before it is required

com.qonversion.unity/Runtime/iOS/Plugins/Common/UtilityBridge.m:89:43: Definition of 'QNProduct' must be imported from module 'Qonversion.QNProduct' before it is required

com.qonversion.unity/Runtime/iOS/Plugins/Common/UtilityBridge.m:68:31: Definition of 'QNPermission' must be imported from module 'Qonversion.QNPermission' before it is required

com.qonversion.unity/Runtime/iOS/Plugins/Common/UtilityBridge.m:89:43: Definition of 'QNProduct' must be imported from module 'Qonversion.QNProduct' before it is required

[Android] Purchase not acknowledged/consumed, if app is closed when deferred purchase completes

Steps to reproduce:

  • Start purchase and select slow test card, approves after a few minutes
  • Kill app
  • Wait for purchase to complete(1 minute)
  • Open app

Result:

  • Using CheckEntitlements after Initialize it will return that the purchase has completed successfully and the entitlement is given to the user, HOWEVER Google will cancel the purchase because it was not acknowledged by Qonversion.

Currently I was unable to find a way to manually acknowledge/consume a purchase via API.
Since out of app purchases can happen on Android(preregistration, deferred) this should work out of the box...

Broken singleton

The Qonversion monobehaviour's getFinalInstance will create multiple gameobjects over the course of its lifetime.
As seen below - it doesnt respect the null check of the instance.
image
image

The above might be a solution to this issue. However, I can't tell if theres a good reason this is a monobehaviour? The object is never destroyed, and every public method is static anyways, and it doesnt seem as if any gameobject related functionality is used.

Execution failed for task ':launcher:checkReleaseDuplicateClasse'

Hey. I am new to Quonversion. I have tried to import the SDK following this guide (except multidex step) and then tried to build the project but I have got this error. I already had a Unity IAP implemented so I also excluded the billingclient dependency.
Unity: 2021.2.10f1
Qonversion: 7.0.0

Here are some logs:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'. Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'. Failed to transform moshi-1.14.0.jar (com.squareup.moshi:moshi:1.14.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}. Execution failed for JetifyTransform: /Users/daniel/.gradle/caches/modules-2/files-2.1/com.squareup.moshi/moshi/1.14.0/df173a3bfa0bd9e0cd2a8fc14b24fc336dca0de0/moshi-1.14.0.jar. > Failed to transform '/Users/daniel/.gradle/caches/modules-2/files-2.1/com.squareup.moshi/moshi/1.14.0/df173a3bfa0bd9e0cd2a8fc14b24fc336dca0de0/moshi-1.14.0.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 60. (Run with --stacktrace for more details.)

Screenshot 2024-02-27 at 16 08 45

PurchaseCallback is returning empty entitlements dictionary

   #region StartBuying()
    public void StartBuying( PurchasePack<IapPack> purchasePack, Action<string, PurchaseFinishStatus, string> purchaseFinishCallback )
    {
        var purchaseModel = purchasePack.StoreProduct.ToPurchaseModel();
        Qonversion.GetSharedInstance().Purchase( purchaseModel, ( entitlements, error, isCancelled ) =>
        {
            var purchaseFinishStatus = isCancelled ? PurchaseFinishStatus.Cancelled 
                : error == null ? PurchaseFinishStatus.Success 
                : error.Code == QErrorCode.PurchasePending ? PurchaseFinishStatus.Pending 
                : PurchaseFinishStatus.Failed;

            Log.Info( $"PurchaseManager - purchase of pack({purchasePack.IapPack.Id}) finished. Status({purchaseFinishStatus}) WasCancelled({isCancelled}) Error({error})" );
            if( entitlements is { Count: > 0 } )
            {
                foreach( var entitlement in entitlements )
                {
                    Log.Info( $"PCEntitlements -> Id: {entitlement.Key} Transactions:{string.Join(";", entitlement.Value.Transactions.Select(x=>x.TransactionId))}" );
                }
            }
            
            var transactionId = entitlements == null || entitlements.Count <= 0 ? string.Empty : entitlements.FirstOrDefault(x=>x.Value.ProductId == purchaseModel.ProductId).Value?.Transactions[0].TransactionId;
            Log.Info( $"PurchaseComplete for {purchaseModel.ProductId} with transactionId: {transactionId}" );
            
            Log.Assert( purchaseFinishStatus != PurchaseFinishStatus.Success || !string.IsNullOrEmpty( transactionId ), "Cannot have successful purchase with no transactionId" );
            purchaseFinishCallback?.Invoke( purchasePack.StoreProduct.StoreId, purchaseFinishStatus, transactionId );
            if( purchaseFinishStatus == PurchaseFinishStatus.Success ) rewardPurchase?.Invoke( purchasePack, transactionId );
        } );
    }
    #endregion StartBuying()

This is our purchasing code, that worked fine two months ago, last confirmed case was 22nd of May.

Testing with Test Card on Android:
Successful purchase is returning empty entitlements dictionary...
Pending purchases do not get success callback

We get normal confirmation emails from GooglePlay for these test purchases with valid transaction IDs, but the entitlements are empty...

This is happening with release 7.4.0 && 8.0.0, Unity version 2022.3.22f1

Android Broken dependency to "com.google.firebase:firebase-messaging:$firebase_messaging_version"

I wrote you guys about 10 days ago about this issue. Regarding gradle builds failing, specifically about cloud builds failing (as well as android studio exports) at this line here :
8353: [Unity] boolean result = Qonversion.handleNotification(notificationInfo); 8354: [Unity] class file for com.google.firebase.messaging.RemoteMessage not found

Now - i have solved this issue by going into your android Qonversion project and locating the specific version of com.google.firebase.messaging that you guys are using - and added that as a dependency in our custom gradle file. It seems to me, as if that dependency is not properly propagated out to the unity sdk. I feel like this should have been something you guys could have tested.

Also - i would recommend that you go in and update the version you point to in your installation guide on your documentation page, as that one has failing iOS cloud builds also. (The one specified as the Git url approach)

I hope this can be resolved soon. I dont know much about android, but i feel like the android issue could potentially live in the QonversionDependencies.xml file.

For anyone else having this issue - you can in you mainTemplate.gradle add the following line as a workaround until this is fixed (this is for the 3.4.1 release):
image

PurchaseProduct isCancelled is missing in the callback

Hello! I have problem with getting purchase was cancelled callback. Seems like it was missed in the Unity SDK and Unity documentation, however Unity is cross-platform engine with iOS support too.

Can you please add this feature or tell me where I can find it if exists.

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.