SwiftUI In-App Subscriptions with RevenueCat 2022

Поделиться
HTML-код
  • Опубликовано: 11 июн 2024
  • RevenueCat + SwiftUI = easy in-app subscriptions. Learn how to add in-app subscriptions to your SwiftUI app with the latest version of the RevenueCat SDK 4.
    You’ll learn how to set up your entitlements and offerings, how to configure the subscription products in App Store connect, how to integrate the RevenueCat SDK into your Xcode project and finally, you’ll see how to add the code to allow your app users to make a purchase and enjoy the paid content.
    Links:
    RevenueCat Sign Up
    codewithchris.com/rcat
    Project Source
    github.com/codewithchris/reve...
    RevenueCat QuickStart
    docs.revenuecat.com/docs/gett...
    RevenueCat Magic Weather SwiftUI Demo:
    github.com/RevenueCat/purchas...
    Timestamps:
    00:00 Intro
    00:22 RevenueCat in Theory
    02:43 Ch. 01 - Setting Up a RevenueCat Account
    03:13 Ch. 02 - Projects VS Apps
    04:12 Ch. 03 - Setting Up Your Products in Apple Connect
    14:00 Ch. 04 - Setting Up Entitlements and Offerings in RevenueCat
    20:21 Ch. 05 - Adding the RevenueCat SDK and Code Snippets
    24:07 Ch. 06 - Displaying Products on the Paywall
    32:35 Ch. 07 - Making a Purchase
    35:19 Ch. 08 - Detecting Subscription Status
    44:40 Ch. 09 - Testing the In App Subscription
    49:13 Outro
    🚨 SPECIAL CWC+ OFFER FOR RUclips:
    cwc.to/youtubeoffer
    MY FREE ONLINE COURSE:
    ⚡ How to make an app in 14 days - cwc.to/14days
    CWC+ PROGRAM:
    👩‍💻 All our courses in a learning path - cwc.to/plus
    WEEKLY UPDATES VIA EMAIL:
    ✉️ Every Saturday, receive an email digest of new content - cwc.to/newsletter
    CONNECT:
    🌍 Website - codewithchris.com
    😺 GitHub - github.com/codewithchris
    📸 Instagram - / codewithchris
    🐦 Twitter - / codewithchris
    ABOUT CODEWITHCHRIS:
    Hi I’m Chris! I’m dedicated to teaching fundamentals about how to make an app. This is important if you’re trying to land an iOS job, be a freelancer, increase or start a business with an app idea. On this channel and my website, you'll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have learned to code and build apps on their own! cwc.to/reviews
    DID THESE LESSONS HELP YOU?
    Please let me know! - feedback.codewithchris.com
    ROADMAP:
    roadmap.codewithchris.com
    #InAppPurchase #RevenueCat #MakeMoneyWithApps

Комментарии • 102

  • @escoffierdesign179
    @escoffierdesign179 Год назад +1

    Enjoyed the tutorial. I mad e the mistake of not entering my details and ticking tax forms info right at the beginning of the Tutorial which gave strange errors later down the line. I left the problem for 3 weeks and came back to it and quickly realised my mistake. Just goes to show that many times the errors encountered are down to not paying full attention to the Tutorial.
    Thanks again for the content, and as bellow I think it would be useful to see what Andrew Badea was requesting.
    Perhaps one of individual non consumables. This is definitely the best tutorial out there on Revenue Cat and hope that they can appreciate the concise way that you went through this and thought it.
    Cheers

    • @CodeWithChris
      @CodeWithChris  Год назад

      Small mistake but a big learning experience because you NEVER going to make this error again! #growth
      @AdrienVillez

  • @Janssonn
    @Janssonn Год назад

    This is by far the best video showing how to use the methods in RevenueCat! I have my set up working but but optimal and very clunky code (new ios dev here..) This video just made so much sense to me on another level. Thank you! :)

  • @damjandabo
    @damjandabo Год назад +1

    Thank you very much for this tutorial! It's very useful to have visual and spoken content together with the documentation when integrating RC. I've just added in-App subscriptions to my new app with ease. I've used your link to create the RC account ;)

    • @CodeWithChris
      @CodeWithChris  Год назад +1

      Glad to hear it was helpful! If you didn't know, RC has an amazing podcast where they interview iOS Devs and it's always about monetization and IAP. Very useful and I always learn something new! Perfect for the daily commute!
      @AdrienVillez

    • @damjandabo
      @damjandabo Год назад +1

      @@CodeWithChris Thank you for the suggestion, I will try out their podcast.

  • @maxdondada
    @maxdondada Год назад

    Chris I wanted to thank-you for making these videos.

  • @airstrike5062
    @airstrike5062 8 месяцев назад

    I may have already said this before, but thanks for the great video and great vibe throughout all these tutorials. Truly top tier talent, thank you!

    • @CodeWithChris
      @CodeWithChris  8 месяцев назад

      Thanks for that wonderful comment! I'll be sure to let Chris know :) - Iñaki

  • @user-ls2zw9nu7y
    @user-ls2zw9nu7y 2 месяца назад

    Thank you so much Chris!! Saved my time !

  • @aydncanataberk4083
    @aydncanataberk4083 Год назад

    Thank you! I’ve released my first supscription app thanks to your video. Now it’s time to update it.

    • @CodeWithChris
      @CodeWithChris  Год назад

      That's great! Thank you for learning with us! If you want to be featured in our CWC Success Stories Campaign, you can email us at care@codewithchris.com with your story! :) - Pat

  • @soulyft
    @soulyft Год назад

    Thank you Chris... this was great! Really helped me as I am working on my first app.

  • @Swift_Alvar
    @Swift_Alvar Год назад +5

    Thanks for your tutorial, very clear and useful, I want to add Generate App Specific Shared Secret was moved to General > App Information in App Store Connect

  • @kr1s0404
    @kr1s0404 Год назад

    Thank you Chris for this amazing video!

  • @nuclearpsyche
    @nuclearpsyche Год назад +1

    What an awesome intro! Thank you.

  • @raphaels8585
    @raphaels8585 7 месяцев назад

    Awesome and useful tutorial. Thanks a lot

  • @TheDavid1234abcd
    @TheDavid1234abcd 5 месяцев назад +1

    For everyone watching now. Don’t forget to add a store kit certificate and upload it to revenuecat. Otherwise it will say “invalid purchase.”

  • @lovelacepuppy858
    @lovelacepuppy858 Год назад

    Thank you for keeping the Revenue Cat tutorials up to date!
    Question: How can I cancel the subscription in my app?

    • @lovelacepuppy858
      @lovelacepuppy858 Год назад

      + When I clear purchase history under Sandbox Testers, I can still see the subscribed user in Revenue Cat data. Although I have cleared the purchase history on App Store, every time I get the user info in XCode, "isSubscriptionActive" returns true.

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hi there! You can post your question to our CodeCrew forum (codecrew.codewithchris.com) so our tech support staff can assist you and help you with your question. Thank you! - Pat

  • @kdtechniquesofficial6153
    @kdtechniquesofficial6153 10 месяцев назад

    Damn. Thank you so much. Loved it.

    • @CodeWithChris
      @CodeWithChris  10 месяцев назад +1

      Thanks for learning with us! - Iñaki

  • @gregas3068
    @gregas3068 6 месяцев назад

    Very Nice mister. Keep them comin

  • @CraigSchubert
    @CraigSchubert Год назад

    This is great! Would love to see more like this. :-)

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hi Craig! Thanks for watching! Stay tuned to our RUclips channel for more videos like this! - Pat

  • @ABadea07
    @ABadea07 Год назад +2

    Great video! Will you be making a series on non-consumable purchase strategy? Many RevenueCat tutorials cover subscription purchases; however, I’m curious on the best method to implement non-consumables. Using your meditation app as an example, what if only a few cards in your CardView ForEach loop were designated for in-app purchases (reasons for this could vary, from skill level to explicit material and the need to include a paywall for only a few cards)? Also, once these few cards are purchased, how might you display them in a “My Purchased Cards” View for easy access and filtering. Just something I’m considering and haven’t been able to find. Thanks!

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hey Andrew! Thanks for watching! Do you mind sharing your tutorial recommendations here app.productstash.io/codewithchris#/ideas? We'll have our team look at them and see what we can do! :) - Pat

  • @karameid4426
    @karameid4426 10 месяцев назад

    Hi Chris,
    This was a great video to follow with to complete myself so thank you. Was just wondering, how can I link a user's account (made through Firebase Authentication for example) to the data indicating they paid for a particular membership? So that if they were to log in on another device or re-install the app, the user account still has access as is it's a paid account. Any clarification you can give would be highly appreciated. Thank you.

  • @yusufcaglar
    @yusufcaglar Год назад +1

    Thank you Chris 😎🙌🏻

  • @prairieln
    @prairieln 3 месяца назад

    Thank you, Chris, for another valuable content provided to the community! As always, it was masterfully delivered! Separately, I'm wondering whether you happen to have a video on how to implement Promo Offer by any chance. Thanks again!

  • @prairieln
    @prairieln 3 месяца назад

    Chris, is it possible you can make a video on testing Restore Purchase? I'm having a hard time validating it using Sandbox environment. Much appreciated!

  • @iamuchey
    @iamuchey Год назад

    Thank you for this!

  • @martinjonesdh
    @martinjonesdh Год назад

    Great video Chris. Im getting my subscription costs showing in $ and not £ even though App Store Connect is showing £. Any suggestions please?

  • @matias.leonetti
    @matias.leonetti Год назад

    Amazing tutorial

  • @phorbinsflyers6280
    @phorbinsflyers6280 Год назад

    Thanks again for another great video. Any idea what you need to include in your privacy policy for your app as far as the type of data collected by revenue cat when using this implementation? I'm using a policy generation service called iUbenda and they're giving me options for the revenue cat service for the following data types: Device information, trackers, unique device identifiers (IDFA/google ad ID), Usage data, and User ID. Any thoughts? Thanks!

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hi! Thanks for watching! You may post your question on our CodeCrew forum (codecrew.codewithchris.com) so that our tech support staff can assist you! - Pat

  • @Enzo-sp3bf
    @Enzo-sp3bf Год назад

    Thanks very much for the great and easy understanding tutorial ! I have successfully repeated what the project suppose to show. Only one little problem I faced and have solved: the two buttons on the paywall are only able to show up after the "Agreements, Tax and Banking" are filled and have Active Status.

    • @CodeWithChris
      @CodeWithChris  Год назад

      Thank you for watching and great job solving the issue you encountered!! - Pat

  • @JohnSchwartz-yr4bm
    @JohnSchwartz-yr4bm Год назад +2

    Hi Chris,
    I’m writing to thank you your great instructional content on SwiftUI and especially this video!
    I teach a dog sport called Rally Obedience and sometime last year, my wife said to me “you need to figure out a way to teach more students than the few who can attend your classes in person.”
    After considerable thought, I decided an App was the way to go. I had a clear vision of what I wanted the app to be, how I wanted it to look and how it should function. I wanted to include free content and an in-app subscription for content that I’ve developed over the years.
    This idea of an app serves a niche-market of a niche-market, so it’s not commercially viable enough to invest to have developed - so I decided I had to do it myself. The only problem - I’m not an app developer - I didn’t have the first clue about developing or coding an app. What was I thinking?
    After watching a ton of video lessons and tutorials, Swift started to make sense. I still struggle a bit with writing and syntax, but I can understand most of what I read - ultimately, I’ve found the solutions for my project.
    My project started back in September when I decided iOS, Swift and Xcode were the path to follow. I setup my developer account in mid-September and by the end of the month I had uploaded by first rudimentary build to TestFlight.
    As weeks continued, the design and function fell into place and was actually pretty fun.
    But the final piece, the thing that I was most worried about, was integrating in-app subscription - and that’s when I found this video.
    You made it so easy even a non-coder, non-developer could follow along and get it done.
    Yesterday, just a few months after this all began, v1.0.0(1) of my app has been approved and is now live in the App Store - it’s far better than I imagined and I’ve already got my first subscription!
    Thank you!

    • @CodeWithChris
      @CodeWithChris  Год назад +1

      Oh wow! That's awesome!! It always starts with a great app idea and then the hardwork comes after. Congratulations on your app!! - Pat

    • @airstrike5062
      @airstrike5062 10 месяцев назад

      That is such an awesome story! Thank you for sharing. Made my day just to know you achieved your goal and made your dream app come true. Keep up the good work!!

  • @opsenpai8818
    @opsenpai8818 Год назад

    Hi Chris, great video. But how do I set the restore purchases from transfer purchases to block restores? Is there any additional code for that?

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hi thanks for watching! We suggest posting your question on our CodeCrew forum codecrew.codewithchris.com and have our tech support staff help you. - Pat

  • @vfxdsn8898
    @vfxdsn8898 Год назад

    if you have an offer for first-time-user, how can you test to find if the offer is successfully working?
    my app has first month free trial subscription products but there’s no way to know if it really is since when you purchase with a sandbox account, it doesn’t show you when the bill starts…

  • @kananabilzada2453
    @kananabilzada2453 Месяц назад

    Thank you for great video 👌, After Purchase I get App Store Server Notification from App Store. How we know which user subscribed? We get transactionID just from RevenueCat, and I think it is not enough for trust user (User also can update subscription from Account Setting) Please tell me correct way to do that :(
    Thanks again for the content :)

  • @bobbygeneric9396
    @bobbygeneric9396 Год назад

    Great, would love to see a tutorial for a single non consumable in app purchase

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hey Bobby! Thanks for watching! You can post your tutorial recommendations here app.productstash.io/codewithchris#/ideas :) - Pat

  • @amonjavree
    @amonjavree Год назад +1

    Thank you so much. Wouldn't it be possible to upload just this project to github?

    • @CodeWithChris
      @CodeWithChris  Год назад +1

      It is already hosted on our GitHub, here is the link: github.com/codewithchris/revenuecat-subscriptions
      (all other links are in this video's description)
      Have a wonderful Xmas!
      @AdrienVillez

  • @over825hp
    @over825hp Год назад

    Keyboard switches? Lubed or not?

  • @labfpv
    @labfpv Год назад

    Thanks! but how can I distinct the design of the 2 buttons.
    I would like to have different buttons depending on the type of subscription (monthly, yearly) and therefore to be able to customize them individually, to distinguish between the different products by varying the design of the buttons.

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hi! We suggest posting on our CodeCrew forum so that our tech support staff can help you. Just visit this link codecrew.codewithchris.com - Pat

  • @Reloader449
    @Reloader449 Год назад

    So by this time many are running Xcode 13.x and Monterey?
    I have started the one-year-old "2021 SwiftUI Tutorial for Beginners" and lessons 3 and 4 cause my MacBook Pro to shut down without warnings. I tried going back to Xcode 12.x but Monterey wouldn't let me do that. Problems started with app store Xcode 13.4.1 so now I have the 14 beta. This got past the shut down problem in Lesson 3, but it is back now in lesson 4. This macbook has 16GB memory and about 200GB free drive space, was recently wiped and has a new battery.

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hey Curt, sorry to hear that. You can post about this on our CodeCrew forum (codecrew.codewithchris.com) so our tech support staff can help you out. - Pat

  • @kr1s0404
    @kr1s0404 Год назад

    Hey Chris, after watching this video, I've added the RevenueCat in my app and publish it to the App Store. But I have encounter one problem. When I use a simulator to test my app, the product(button) will appear in the swiftUI view, but when I download my App from App Store, the product disappear, do you know what's the problem? (the product also appear on the testflight version of my App)

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hi Kris! We suggest posting your question on our CodeCrew forum codecrew.codewithchris.com so that our tech support staff can assits you. - Pat

  • @gabrielmoffa
    @gabrielmoffa Год назад

    thanks

  • @jackmcline8211
    @jackmcline8211 Год назад

    Should I use official xcode version? Because I always get error "Error fetching offerings - The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 1.)"

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hi Jack! We suggest posting on our CodeCrew forum so our tech support staff can help you. Here's the link codecrew.codewithchris.com - Pat

  • @MahmudHasan-yi7ux
    @MahmudHasan-yi7ux 2 дня назад

    Hi Chris how to fix this problem. (There is an issue
    with your configuration. Check the underlying error for more details. There's a problem with
    your configuration. None of the products registered in the RevenueCat dashboard could be fetched
    from App Store Connect (or the StoreKit Configuration file if one is being used)

    • @CodeWithChris
      @CodeWithChris  День назад +1

      Hi, please note that this is an old video from 2 years ago. If you need to learn the up-to-date way to integrate RevenueCat, I suggest going over to their docs at: www.revenuecat.com/docs/welcome/overview. - Iñaki

  • @Enzo-sp3bf
    @Enzo-sp3bf Год назад

    As the app owner and developer. Is there any way to use all subscription tier features without paying to subscript my own product in production environment?

    • @PhilGerb93
      @PhilGerb93 6 месяцев назад

      Did you ever find how to achieve this?

  • @LTNKidd
    @LTNKidd Год назад

    Is there a simple way in my PreviewProvider that I can set isSubscriptionActive to true?

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hi there! We ecnourage you to post your question on our CodeCrew forum codecrew.codewithchris.com and have our tech support staff assist you. Thank you! - Pat

  • @jonivadeaf
    @jonivadeaf Год назад

    I don’t know revenuecat in-app Subscriptions to SwiftUI sheets need button error..😢I want Subscriptions me help you… I am sad😞

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hi! We suggest posting on our CodeCrew forum so that our tech support staff can help you. Just visit this link codecrew.codewithchris.com - Pat

  • @curt8806
    @curt8806 Год назад

    Does this work with in-app purchases too?

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hey Curt, you can post your question on our CodeCrew forum (codecrew.codewithchris.com) so our tech staff assist you. - Pat

    • @CodeWithChris
      @CodeWithChris  Год назад

      Yes: docs.revenuecat.com/docs/ios-products
      @AdrienVillez

  • @Growwithsayf
    @Growwithsayf Год назад

    Hi am from nigeria

  • @SHOLINGER
    @SHOLINGER Год назад +3

    you haven’t changed even a little bit from 4 years

    • @Invisibletoday
      @Invisibletoday Год назад +1

      Is that a compliment or insult?

    • @SHOLINGER
      @SHOLINGER Год назад

      @@Invisibletoday compliment

  • @koni3855
    @koni3855 Год назад

    Great tutorial, and thanks for RevenueCat to sponsor it! Given the fact this was sponsored by RevenueCat, it would have been even better not to put ads in the video... I got more than 15 ads while watching this video, really annoying... :/

    • @CodeWithChris
      @CodeWithChris  Год назад

      Hello! Sorry to hear about that! Ads do help us make more videos for this channel (and our courses on www.codewithchris.com). Now, even with or without ads turned on, RUclips has full power over if they still want to add ads for their own goods or not, so out of the 15, a good half was probably the platform
      @AdrienVillez

  • @viktorosadsky5582
    @viktorosadsky5582 Год назад

    noice

  • @airstrike5062
    @airstrike5062 8 месяцев назад

    having said that, this video has SO MANY ads it's painful to skip back and forth through the content. jesus!

  • @koketsomashego8075
    @koketsomashego8075 Год назад

    Very good video
    Sadly I am getting this when attempting to purchase a package. in Sandbox
    {
    message: There was a problem with the App Store.,
    underlyingErrorMessage: An unknown error occurred,
    readable_error_code: STORE_PROBLEM,
    code: 2,
    readableErrorCode: STORE_PROBLEM,
    userCancelled: false
    }

    • @CodeWithChris
      @CodeWithChris  Год назад +1

      Hi Koketso! We suggest posting this to our CodeCrew forum codecrew.codewithchris.com so that our tech support staff can help you out. - Pat

  • @markcui8277
    @markcui8277 11 месяцев назад

    HI Chris,
    Thank you so much for the tutorial. I integrated what you did and almost there. I run into a problem: when I have a new installation to iPhone, a wireless network permission popup for user to approve, after the approval, subscription details does not show on the paywall. If I run from Xcode on the device again, those details appears. Any suggestions?

    • @CodeWithChris
      @CodeWithChris  11 месяцев назад

      We suggest posting on our CodeCrew forum so that our tech support staff can help you. Just visit this link codecrew.codewithchris.com - Pat