All Projects → lionheart → TipJarViewController

lionheart / TipJarViewController

Licence: Apache-2.0 license
Easy, drop-in tip jar for iOS apps.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to TipJarViewController

Search Engine Optimization
🔍 A helpful checklist/collection of Search Engine Optimization (SEO) tips and techniques.
Stars: ✭ 1,798 (+2175.95%)
Mutual labels:  tips
Git Tips
这里是我的笔记,记录一些git常用和一些记不住的命令。
Stars: ✭ 185 (+134.18%)
Mutual labels:  tips
Git Usage
자주 사용하는 깃 명령어 모음
Stars: ✭ 214 (+170.89%)
Mutual labels:  tips
Pine Utils
Code Snippets + Tricks & Tips to help Pine Script developers
Stars: ✭ 149 (+88.61%)
Mutual labels:  tips
Pharo Wiki
Wiki related to the Pharo programming language and environment.
Stars: ✭ 161 (+103.8%)
Mutual labels:  tips
Cs Univ Wiki
컴공생을 위한 대학 생활 가이드라인
Stars: ✭ 202 (+155.7%)
Mutual labels:  tips
Oscp Prep
my oscp prep collection
Stars: ✭ 105 (+32.91%)
Mutual labels:  tips
iOS-Daily-Tips
Daily Tips From iOS World 🔥
Stars: ✭ 42 (-46.84%)
Mutual labels:  tips
Torchfunc
PyTorch functions and utilities to make your life easier
Stars: ✭ 177 (+124.05%)
Mutual labels:  tips
Awesome Mac Things
some useful mac things:scripts, shells, doc, shortcut keys
Stars: ✭ 210 (+165.82%)
Mutual labels:  tips
Book Open Source Tips
Open Source book on Open Source Tips
Stars: ✭ 152 (+92.41%)
Mutual labels:  tips
Vim Galore
🎓 All things Vim!
Stars: ✭ 12,610 (+15862.03%)
Mutual labels:  tips
Guides
Here you will find Guides mainly for Sonarr/Radarr/Bazarr and everything related to it.
Stars: ✭ 207 (+162.03%)
Mutual labels:  tips
Cocoapods Tips
iOS 라이브러리를 관리하는 CocoaPods Tip정보 모음입니다.
Stars: ✭ 141 (+78.48%)
Mutual labels:  tips
Awesome Android Tips
some code tips for android 💯
Stars: ✭ 2,490 (+3051.9%)
Mutual labels:  tips
Synology
Cheatsheet and bash scripts sripts for Synology Nas Stations cheet cheat sheet nas networkdisk
Stars: ✭ 125 (+58.23%)
Mutual labels:  tips
Vue Cheatsheet
Modified version of the official VueMastery cheatsheet
Stars: ✭ 188 (+137.97%)
Mutual labels:  tips
mkBox
MacApp、PythonPackage、Scripts ..
Stars: ✭ 66 (-16.46%)
Mutual labels:  tips
myths-and-facts-about-programming
No description or website provided.
Stars: ✭ 31 (-60.76%)
Mutual labels:  tips
Preguntas Y Respuestas Entrevistas Frontend
Un listado de preguntas y respuestas que hemos y nos han preguntado en entrevistas para Ingenieros y Desarrolladores de Front End (Para facilitar las entrevistas y el estudio)
Stars: ✭ 207 (+162.03%)
Mutual labels:  tips

Version License Platform

Installation

TipJarViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'TipJarViewController'

Usage

Before you can use TipJarViewController in your app, you'll first need to create a few IAPs in iTunes Connect--2 subscription IAPs and 5 one-time IAPs. This is currently a requirement but may change in the future.

Once you've created your IAPs, you just need to configure the header and description at the top of the view controller, and tell TipJarViewController what your IAP product identifiers are, using the TipJarConfiguration protocol. E.g.,

struct TipJarOptions: TipJarConfiguration {
    static var topHeader = "Hi There"

    static var topDescription = """
If you've been enjoying this app and would like to show your support, please consider a tip. They go such a long way, and every little bit helps. Thanks! :)
"""

    static func subscriptionProductIdentifier(for row: SubscriptionRow) -> String {
        switch row {
        case .monthly: return "com.acme.app.TipJarSubscription.Monthly"
        case .yearly: return "com.acme.app.TipJarSubscription.Yearly"
        }
    }

    static func oneTimeProductIdentifier(for row: OneTimeRow) -> String {
        switch row {
        case .small: return "com.acme.app.Tip.Small"
        case .medium: return "com.acme.app.Tip.Medium"
        case .large: return "com.acme.app.Tip.Large"
        case .huge: return "com.acme.app.Tip.Huge"
        case .massive: return "com.acme.app.Tip.Massive"
        }
    }

    static var termsOfUseURLString = "https://acme.app/terms.html"
    static var privacyPolicyURLString = "https://acme.app/privacy.html"
}

And then, to instantiate the TipJarViewController:

let controller = TipJarViewController<TipJarOptions>()

If you want more customization options, just make your configuration conform to TipJarOptionalConfiguration. You can also specify a URL running Lionheart's receipt verifier to check for valid purchases on your own server.

extension TipJarOptions: TipJarOptionalConfiguration {
    static var title = "Tip Jar"
    static var oneTimeTipsTitle = "One-Time Tips"
    static var subscriptionTipsTitle = "Ongoing Tips ❤️"
    static var receiptVerifierURLString = "https://receipt-verifier.herokuapp.com/verify"
}

License

TipJarViewController is available under the Apache 2.0 license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].