How to Monetize Your iOS App with Tip Jar: A Step-by-Step Guide 💰

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2024
  • Make Money While You Sleep 😴 Build A Tip Jar In SwiftUI Using StoreKit2 💰
    **********************************
    🚨 To help with your app submission make sure you watch the chapter with the checklist🚨
    Timestamps:
    00:00:00 - Intro/Preview
    00:00:58 - What is StoreKit2?
    00:01:34 - What are the different in app purchase types?
    00:02:26 - Project Breakdown
    00:04:38 - Creating & Setting Up A StoreKitConfiguration File In Xcode
    00:07:01 - Setting Up Test Products With StoreKitConfiguration File
    00:10:09 - Getting a single product using StoreKit2
    00:14:42 - Changing your StoreKitConfiguration File Storefront
    00:15:43 - Getting a list of products using StoreKit2
    00:26:15 - Making a purchase using StoreKit2 (Tipping in-app)
    00:35:58 - Handling a successful transaction in StoreKit2
    00:42:46 - Error handling in StoreKit2
    00:51:52 - Listen to transaction updates in StoreKit2
    01:00:51 - Handling In-App Purchase Interruptions
    01:02:03 - Managing transactions in Xcode
    01:05:24 - Filling Out Your Agreements, Tax & Banking
    01:07:21 - Setting up products in AppStoreConnect
    01:11:40 - Things to note
    01:12:07 - Adding Proof During Submission
    01:12:45 - Making Sure It Works In TestFlight
    01:13:28 - In-App Purchases Debugging Checklist
    01:17:54 - Summary
    **********************************
    In this tutorial, we'll learn how to create a tip jar in a SwiftUI app using the StoreKit2 framework. We'll start by setting up our project and configuring our in-app purchase products. Then, we'll implement the user interface for our tip jar, including a button to initiate the purchase process and a label to display the current balance. Along the way, we'll explore best practices for handling in-app purchases and handling errors. By the end of this video, you'll have a fully functional tip jar in your SwiftUI app, ready for users to start tipping.
    **********************************
    Check Out My Courses 👨🏽‍🏫
    Enjoy my teaching style? Check out my other courses on my website that may interest you, they range from beginner to advanced topics within iOS development.
    Link to Website
    tunds.dev/#courses
    **********************************
    Join the crew 🤝
    Want to help support the channel? Become a member with the join link below and get access to exclusive badges, stickers, and other perks coming soon.
    Become a channel member
    www.youtube.com/@tundsdev/join
    Support in other ways 💕
    You can support me for free and help the channel grow so that I can continue to make the best iOS development content for you by liking, commenting, subscribing, and hitting the notification bell.
    All this really helps my channel grow and allows me to keep making content for you. If you're interested in subscribing to the channel then you can do so with the link below.
    Subscribe to the tundsdev TH-cam channel
    th-cam.com/users/tundsdev?su...
    **********************************
    Download Source Code
    Interested in looking at the source code? Then check out the GitHub Repo below
    github.com/tunds/youtube-cont...
    **********************************
    EditorKeys
    View Editor Keys Amazing Products with the link below and use the discount code for 10% off any product
    www.editorskeys.com/tundsdev
    Get a 10% Discount Code on any product with the code below
    TUNDSDEV
    See my keyboard cover in action with my review below 👇🏾
    • Increase Your Xcode Pr...
    **********************************
    RØDE Wireless Mic
    amzn.to/3D5qo3V
    RØDE SmartLavPlus Microphone
    amzn.to/3DtVUdG
    2021 Apple MacBook Pro (16-inch, Apple M1 Pro chip with 10‑core CPU and 16‑core GPU, 16GB RAM, 1TB SSD) - Space Grey
    amzn.to/3Drc2fH
    Apple Magic Keyboard with Numeric Keypad (Wireless, Rechargeable)
    amzn.to/3VUctXh
    Apple Magic Mouse
    amzn.to/3sqXSoM
    Secretlab TITAN 2020 Charcoal Blue Gaming Chair
    amzn.to/3D2jVXI
    ErgoFoam Ergonomic Foot Rest for Under Desk
    amzn.to/3srJOLM
    Lumbar Support Pillow
    amzn.to/3eXVfrg
    Macbook Stand for Apple Macbook and All Notebooks
    amzn.to/3DqG7vR
    Portable Chair Green Screen Background
    amzn.to/3gG62GU
    **********************************
    #iosdev #iosdevelopment #swift #swiftlanguage #xcode #appdevelopment #mobileappdevelopment #iosappdevelopment #appdeveloper #iosprogramming #iosengineer #appdevelopmenttips #iosdevelopmenttips #swiftui

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

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

    Is not just one of the best videos for Store Kit 2, its the only one who takes you step-by-step including App Store Connect setup. Thanks, Tunds! 🙏

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

      Glad it was helpful!

  • @noobietubie
    @noobietubie ปีที่แล้ว +6

    This is so amazing!! I’ve always just watched your videos quietly but this time I wanted to say I love all of your tutorials! Thanks so much for what you do!!

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

      Glad you’re enjoying it 🤝

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

    God level tutorial Tunds. Now to sit down, do some hard graft and get my first app in the Store.

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

      Thanks for the donation, and you got this. Looking forward to seeing what you build 🤝

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

      @@tundsdev The app is ready, just need to figure out this payment stuff and get it in the store, I'll let you know. Thanks my man!

  • @andrejkling3886
    @andrejkling3886 11 หลายเดือนก่อน +1

    Excellent….💯 Thank you 🎉

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

      Welcome!

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

    Awesome video as always!...... keep posted.... learning a lot from you

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

      Glad you enjoyed it 🤝

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

    very cool exactly

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

    Thanks!

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

      No problem!

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

    You... you are a wonderful man. Thank you for making this video and the helpful explanations. Learned so many new things from this. Liked and subscribed!

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

      Thanks, glad you enjoyed it 🤝

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

    Tunes, you are a legend. Your vids are awesome - keep up the amazing work. A tip is the least I can do for ma boy

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

      I really appreciate the tip, since i’d be more that happy with you just sharing the vids with others who might find this interesting to help the channel grow, so this means a lot & a big thank you again bro 🤝

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

    This is super important but for some reason there aren't that many StoreKit2 tutorials on YT. Thank you so much!

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

      Glad you think so!

  • @manliomazzon
    @manliomazzon 4 หลายเดือนก่อน +1

    Signor Tunds, I have watched the first 4 minutes of your video, and I can already tell that I'll enjoy it and learn a lot from it, and so I just want to thank you very much. Greetings from Italy.

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

      Dang really appreciate the comment and glad you enjoy the content!

  • @JeffKomarow
    @JeffKomarow 5 หลายเดือนก่อน +1

    Top tier tutorial ✌

    • @tundsdev
      @tundsdev  5 หลายเดือนก่อน +1

      Thanks 🫂

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

    Bro, your videos are helpful 👍

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

      Glad you enjoyed it

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

    Really good video

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

      Thanks 🤝

  • @MessiFCBisseM
    @MessiFCBisseM 6 วันที่ผ่านมา

    Thanks this is really helpful

    • @tundsdev
      @tundsdev  วันที่ผ่านมา

      Glad it helped

  • @ags2099
    @ags2099 2 หลายเดือนก่อน +1

    what a legend

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

      No, you're the legend for the support and watching me!

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

    Thanks

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

      Haha you really didnt have too my man, thanks for the tip 🫂

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

      You saved my day, Tunds! I completely forget about your video and I was struggling a bit, now I fully understand the hole proccess.

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

    Your work is absolutely amazing. You both inspire us and lead us with the best coding skills. One question: Can we have different app users with specific pages and transfer the tip amount to their account instead of ours?

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

      Thanks and nope this would require a third party of some sorts

  • @sekarb1519
    @sekarb1519 10 หลายเดือนก่อน +1

    Great video. Thanks. I don't see the 'Fail Transactions' option in XCode 15. I have XCode 14 also and I can see in that. Any idea if it got moved somewhere?

    • @tundsdev
      @tundsdev  10 หลายเดือนก่อน +1

      Thanks & yh it got moved. If you click on the storekit configuration file you should see a new option called “Configuration Settings” change it there 👌🏾

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

      @@tundsdevThank you for the quick reply. Found it there. This video is exactly what I was looking for...to put a donate button in my first app :)

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

    Have another question. I have setup in-app purchases in app store connect. I will create a new storkit synced config file. Does this replace sandbox testing? When I upload it to testflight, do I need to create a sandbox user and test on my real device? Thank you!

    • @tundsdev
      @tundsdev  10 หลายเดือนก่อน +1

      Yh if you want to test in app purchases 100% setup a sandbox account for sure

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

    Legendary video!
    I added a Dutch locale to the products, but it seems he is only going for the default locale I defined in the StoreConfiguration file. Do you know if there's extra work needed for this? Might also be a bug as I'm on iOS 17 and Xcode 15

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

      So on the StoreConfiguration file you need to click on it and then there should be an option on the editor to change the storefront and you can set it to whatever is available 👌🏾

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

      @@tundsdev I noticed and tested on TestFlight as well, but setting a different language in my system doesn't change the in app purchases locales. The rest of the app is translated correctly though

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

      So it wont work in testflight since that uses the actual products in appstoreconnect so you’d need to set them up in there and then changing your device region and locale should update it.

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

      @@tundsdev Ohhh. I set those all up in App Store Connect, but they are waiting for review. Does that mean the extra locale will not work until Apple has reviewed the in-app purchase?

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

      Hmmm i didnt think it would tbh. I’m not too sure whats going on with your device. But i have defo tested this in xcode before testflight on the simulator and i just changed the locale and it worked fine for me. I’d watch one of the WWDC videos about testing out locales in StoreKit since i can’t attach a vid or screenshots here 😅

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

    I followed the tutorial but instead of using a sheet I used a whole new view for it. It works fine but on iPhone SE 3rd gen simulator, the tips are not displayed at all, the title and description are. Anyone help?

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

      deleted my storekit config file and created new one. Fixed the issue

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

    I'm using Xcode 15 with a iOS 17 app but I get this error when we get to the part where we verify the purchase `Publishing changes from background threads is not allowed; make sure to publish values from the main thread (via operators like receive(on:)) on model updates.` any ideas on how to fix this?

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

      Nevermind you went over this, just like testing it at each step but I'll continue to follow along haha.

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

      @Bankai3474 Haha no worries, defo watch the whole video and then implement it step by step 👌🏾

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

      Yeah haha, now I get an issue when trying to use the onChange modifier and it expects the TipsAction to conform to equatable.

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

      Ok, well conforming to equatable worked, which makes sense due to the method you wrote. I swear it wasn’t working before lol.

  • @Ciao.Namaste
    @Ciao.Namaste ปีที่แล้ว

    @11:44 maybe you don't have the 'canvas' on, that should enable the embed..

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

      I have it turned off on purpose, since sometimes storekit doesn’t play nicely with the swiftui preview 😅
      Using the simulator is way more reliable

    • @Ciao.Namaste
      @Ciao.Namaste ปีที่แล้ว

      @@tundsdev true, but i guess at timestamp @11:44 you were trying to command + click to get the dropdown option “embed in Vstack”. If you have the Canvas on, you will see the option on Cmd+click

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

      Yh I still find it weird how the two are connected, but I do forget that sometimes 😂

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

    Teşekkürler.

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

      Thank you!!!