Giter Club home page Giter Club logo

purchasely-ios's Introduction

Purchasely-iOS

Features

Purchasely
πŸ”₯ In App purchase in your app using 5 lines of code (really !)
🌎 Multi language supported (17 supported languages) and overrides possible
✨ Product presentation pages ready to display on iPhone, iPad and Apple TV and fully customizable from the admin site
πŸ“± iPhone and iPad support
βœ… Server-side receipt validation
πŸ”” Receive user subscription status events with server-to-server notifications (Webhooks) including events like new purchase, renewal, cancellation, billing issue, …
πŸ“Š Analytics available in our dashboard (conversion rate, MRR, …) and sent by our SDK to the app for dispatching to your custom analytics tracking system
πŸ• Detailed user activity (viewed product, subscribed, churned, …)
πŸ—£ Β Available in Objective-C and Swift but also for Android and React Native

βœ… Requirements

  • iOS 11.0+

🏁 Documentation

A complete documentation is available on our website https://docs.purchasely.com

πŸ€• Troubleshooting

Having troubles ? You might find some answers by changing the log level :

Purchasely.setLogLevel(.debug)

πŸ‘€ Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Author

Purchasely SAS

License

Custom

purchasely-ios's People

Contributors

epikorial avatar jfgrang avatar kherembourg avatar mlanoy1 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

Watchers

 avatar  avatar

purchasely-ios's Issues

Purchasing from opened presentation

We are looking to allow users to Purchase from a presentation opened over the top of an originally presented PLYPresentationViewController.

In the console we have done the following:

  • Added an action of type "Open presentation"
  • Selected another of our paywalls.

After making a purchase from the opened presentation, the view controllers are not dismissed causing a confusing user experience and meaning that users have to do this manually.

We've tried the following to dismiss the view controllers ourselves without any luck:

  • Using the closure of the underlying controller called by the presentationController method but it is not called on purchase.
  • Using the action interceptor but this only gives button taps rather than actual purchase events.
  • Using the purchase notification through notification center but the notification is not received.

How do you suggest we handle this use case?

Thanks!

Clarification: Getting the below error while trying to subscribe

Passing action openPresentation to interceptor.
[Purchasely]] Executing action openPresentation as it wasn't handled by interceptor.

You are currently in paywallObserver mode that doesn't handle transactions and you don't listen to purchase action using the purchase interceptor.
You should do one of the following:

  • use the interceptor and handle the purchase actions

Error finding presentation (null). Too many calls on /configuration

Hi,
I implemented Purchasely in an app and I found that if I tap too frequently on a subscribe button (which call Purchasely.presentationController(for:, completion:)) I have the error Error finding presentation (null). Too many calls on /configuration

The view is shown but full white instead of the configured paywall.

Is there a delay needed between two calls of this function ?

Here is the code in the button IBAction :

guard let paywallCtrl = Purchasely.presentationController(for: "default_placement", completion: { [weak self] result, error in
        if let error = error {
            Logger.error("Error \(error)")
        }
        Logger.debug("Result \(result)")
    }) else {
        Logger.error("Error while getting Purchasely presentation controller")
        return
    }
    
    presentingViewController.present(paywallCtrl, animated: true)

XCFramework for Carthage

We are unable are unable to get the .xcframework via carthage. Is it possible to support it since our project is setup to only support this framework type for all 3rd party libraries. I believe only SPM supports xcframework for now.

Example project is out of date

Hi, your example project doesn't work and needs updating.

e.g.
Purchasely.isReadyToPurchase(true)
Type 'Purchasely' has no member 'isReadyToPurchase'

I believe this needs changing to:
Purchasely.readyToOpenDeeplink(true)

and:

Purchasely.start(withAPIKey: "afa96c76-1d8e-4e3c-a48f-204a3cd93a15",
						 appUserId: "DEMO_USER",
                                                   logLevel: .debug)

needs changing to: (it was missing the now required storeKitSetting)

Purchasely.start(withAPIKey: "afa96c76-1d8e-4e3c-a48f-204a3cd93a15",
						 appUserId: "DEMO_USER",
                                                   storekitSettings: .storeKit2, 
                                                   logLevel: .debug)

and:
Purchasely.handle(deeplink: url)

needs changing to:
Purchasely.isDeeplinkHandled(deeplink: url)

It would also be good if you can add an example of how to handle restores.

Error installing Purchasely: Remote branch 4.3.6 not found in upstream origin

Just tried a 'pod update' and getting this error:

[!] Error installing Purchasely
[!] /usr/bin/git clone https://github.com/Purchasely/Purchasely-iOS.git /var/folders/4c/tg51wkw12vl20wwz9jwwwqs40000gn/T/d20240509-59170-ymozrw --template= --single-branch --depth 1 --branch 4.3.6

Cloning into '/var/folders/4c/tg51wkw12vl20wwz9jwwwqs40000gn/T/d20240509-59170-ymozrw'...
warning: Could not find remote branch 4.3.6 to clone.
fatal: Remote branch 4.3.6 not found in upstream origin

I see 4.3.4 here on GitHub, so why is cocoapods trying to pull 4.3.6?

My podfile has the below, no version specified:
pod 'Purchasely'

iOS errors after updating to XCode 15.0.1

Libraries/com.purchasely.unity/Native/IOS/PurchaselyBridge.mm:471:34: error: cannot initialize a parameter of type 'enum PLYAttribute' with an lvalue of type 'int'
        [Purchasely setAttribute:attribute value:value];
                                 ^~~~~~~~~
Libraries/com.purchasely.unity/Native/IOS/PurchaselyBridge.mm:2:
build/ReleaseForRunning-iphoneos/XCFrameworkIntermediates/Purchasely/Purchasely.framework/Headers/Purchasely-Swift.h:1317:41: note: passing argument to parameter 'attribute' here
+ (void)setAttribute:(enum PLYAttribute)attribute value:(NSString * _Nonnull)value;
                                        ^
Libraries/com.purchasely.unity/Native/IOS/PurchaselyBridge.mm:471:50: error: cannot initialize a parameter of type 'NSString * _Nonnull' with an lvalue of type 'const char *'
        [Purchasely setAttribute:attribute value:value];

I have fixed this by changing:

void _purchaselySetAttribute(int attribute, const char* value) {
        [Purchasely setAttribute:attribute value:value];
}

TO

void _purchaselySetAttribute(int attribute, const char* value) {
        [Purchasely setAttribute:(PLYAttribute)attribute value:[NSString stringWithUTF8String:value]];
}

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.