ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

SwiftUI In-App Subscriptions with RevenueCat 2022

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 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 TH-cam:
    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

ความคิดเห็น • 103

  • @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

  • @user-ls2zw9nu7y
    @user-ls2zw9nu7y 4 หลายเดือนก่อน

    Thank you so much Chris!! Saved my time !

  • @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.

  • @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

  • @Janssonn
    @Janssonn 2 ปีที่แล้ว

    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! :)

    • @CodeWithChris
      @CodeWithChris  2 ปีที่แล้ว

      Thank you so much for watching! - Pat

  • @maxdondada
    @maxdondada 2 ปีที่แล้ว

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

    • @CodeWithChris
      @CodeWithChris  2 ปีที่แล้ว

      Thank you for watching them! - Pat

  • @soulyft
    @soulyft ปีที่แล้ว

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

  • @airstrike5062
    @airstrike5062 10 หลายเดือนก่อน

    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  10 หลายเดือนก่อน

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

  • @aydncanataberk4083
    @aydncanataberk4083 2 ปีที่แล้ว

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

    • @CodeWithChris
      @CodeWithChris  2 ปีที่แล้ว

      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

  • @kr1s0404
    @kr1s0404 2 ปีที่แล้ว

    Thank you Chris for this amazing video!

    • @CodeWithChris
      @CodeWithChris  2 ปีที่แล้ว

      Thank you for watching! - Pat

  • @raphaels8585
    @raphaels8585 8 หลายเดือนก่อน

    Awesome and useful tutorial. Thanks a lot

  • @nuclearpsyche
    @nuclearpsyche ปีที่แล้ว +1

    What an awesome intro! Thank you.

    • @CodeWithChris
      @CodeWithChris  ปีที่แล้ว

      Thank you so much!!
      @AdrienVillez

  • @TheDavid1234abcd
    @TheDavid1234abcd 7 หลายเดือนก่อน +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.”

  • @gregas3068
    @gregas3068 8 หลายเดือนก่อน

    Very Nice mister. Keep them comin

  • @karameid4426
    @karameid4426 ปีที่แล้ว

    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 😎🙌🏻

  • @kdtechniquesofficial6153
    @kdtechniquesofficial6153 ปีที่แล้ว

    Damn. Thank you so much. Loved it.

    • @CodeWithChris
      @CodeWithChris  ปีที่แล้ว +1

      Thanks for learning with us! - Iñaki

  • @iamuchey
    @iamuchey ปีที่แล้ว

    Thank you for this!

  • @CraigSchubert
    @CraigSchubert 2 ปีที่แล้ว

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

    • @CodeWithChris
      @CodeWithChris  2 ปีที่แล้ว

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

  • @prairieln
    @prairieln 5 หลายเดือนก่อน

    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!

  • @GairoDuran23
    @GairoDuran23 หลายเดือนก่อน

    Thanks Chris for the video! Question: If a user signs up for a recurring subscription at a certain price and the developer decides to change the price in the future, will the user automatically be charged the new price once the change is made?

  • @ABadea07
    @ABadea07 2 ปีที่แล้ว +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  2 ปีที่แล้ว

      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

  • @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 ปีที่แล้ว

      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!!

  • @prairieln
    @prairieln 5 หลายเดือนก่อน

    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!

  • @lovelacepuppy858
    @lovelacepuppy858 2 ปีที่แล้ว

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

    • @lovelacepuppy858
      @lovelacepuppy858 2 ปีที่แล้ว

      + 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  2 ปีที่แล้ว

      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

  • @martinjonesdh
    @martinjonesdh ปีที่แล้ว

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

  • @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

  • @matias.leonetti
    @matias.leonetti ปีที่แล้ว

    Amazing tutorial

  • @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…

  • @phorbinsflyers6280
    @phorbinsflyers6280 2 ปีที่แล้ว

    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  2 ปีที่แล้ว

      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

  • @over825hp
    @over825hp ปีที่แล้ว

    Keyboard switches? Lubed or not?

  • @kananabilzada2453
    @kananabilzada2453 3 หลายเดือนก่อน

    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 :)

  • @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

  • @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

  • @bobbygeneric9396
    @bobbygeneric9396 2 ปีที่แล้ว

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

    • @CodeWithChris
      @CodeWithChris  2 ปีที่แล้ว

      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

  • @Reloader449
    @Reloader449 2 ปีที่แล้ว

    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  2 ปีที่แล้ว

      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

  • @gabrielmoffa
    @gabrielmoffa ปีที่แล้ว

    thanks

  • @MahmudHasan-yi7ux
    @MahmudHasan-yi7ux หลายเดือนก่อน

    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

  • @LTNKidd
    @LTNKidd 2 ปีที่แล้ว

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

    • @CodeWithChris
      @CodeWithChris  2 ปีที่แล้ว

      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

  • @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

  • @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 8 หลายเดือนก่อน

      Did you ever find how to achieve this?

  • @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

  • @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

  • @SHOLINGER
    @SHOLINGER 2 ปีที่แล้ว +3

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

    • @Invisibletoday
      @Invisibletoday 2 ปีที่แล้ว +1

      Is that a compliment or insult?

    • @SHOLINGER
      @SHOLINGER 2 ปีที่แล้ว

      @@Invisibletoday compliment

  • @repostworldnews
    @repostworldnews 2 ปีที่แล้ว

    Hi am from nigeria

    • @CodeWithChris
      @CodeWithChris  2 ปีที่แล้ว

      Thank you for watching! :) - Pat

  • @curt8806
    @curt8806 2 ปีที่แล้ว

    Does this work with in-app purchases too?

    • @CodeWithChris
      @CodeWithChris  2 ปีที่แล้ว

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

    • @CodeWithChris
      @CodeWithChris  2 ปีที่แล้ว

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

  • @viktorosadsky5582
    @viktorosadsky5582 2 ปีที่แล้ว

    noice

    • @CodeWithChris
      @CodeWithChris  2 ปีที่แล้ว

      Thanks for watching, Viktor! - Pat

  • @airstrike5062
    @airstrike5062 10 หลายเดือนก่อน

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

  • @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, TH-cam 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

  • @koketsomashego8075
    @koketsomashego8075 2 ปีที่แล้ว

    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  2 ปีที่แล้ว +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 ปีที่แล้ว

    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  ปีที่แล้ว

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