Implement donate to Ukraine inside your app, with Apple Pay

Overview

DonateToUkraine

DonateToUkraine uses monobank's official donation service. You can always donate on your own: https://uahelp.monobank.ua

DonateToUkraine gives you a simple way to provide "donate to Ukraine" functionality in your app via an official donation service (endorsed here). The service will be opened inside the app, keeping a native feel. Apple Pay is supported.

Additionally, DonateToUkraine also provides you with DonateToUkraineButton out of the box in different styles, and a UserDefaults-backed way to track completed donations.

Buttons Step 1 Step 2
s0 s1 s1

Maintainer: @dreymonde

Usage

DonateToUkraine.withDonation(contextViewController: self) { donation in
    // success!
}

Using DonateToUkraineViewController

let donateVC = DonateToUkraineViewController { donation in
    // donation.amount
    // donation.amount.uah
    // donation.amount.approxUSD
    // donation.donatedAt
    // donation.receiptId
}
self.present(donateVC, animated: true)

"Donate to Ukraine" buttons

let button = DonateToUkraineButton(
    style: .black,
    variant: .donate,
    contextViewController: self
)
button.didOpen = { /* ... */ }
button.completion = { donation in /* ... */ }

// or:

let button = DonateToUkraineButton(
    style: .black,
    variant: .donate
)
button.contextViewController = self

Styles:

.black
.white
.automatic // .black in light mode, .white in dark mode

.blackOutline
.whiteOutline
.automaticOutline

Variants (text):

.donate // "Donate to Ukraine", default
DonateToUkraineButton.Variant(rawValue:) // custom text

Donation tracking & history

You can use this to "unlock" some functionality after a donation is made.

if DonateToUkraine.hasDonated {
    /* success! */
}
let allDonations = DonateToUkraine.donationReceipts
let totalDonatedUAH = DonateToUkraine.totalDonated.uah
let totalDonatedUSD = DonateToUkraine.totalDonated.approxUSD

Note: donation history uses UserDefaults and is cleared on app uninstall.

For transparency and reporting purposes, DonateToUkraine will report every successful donation to a dedicated service. The report consists only of receipt ID and donation amount, no other information is sent. However, if you want to opt out, add this line in your AppDelegate.swift or similar:

DonateToUkraine.isAnonymousDonationReportingDisabled = true

Apps that use "DonateToUkraine"

Installation

Swift Package Manager

  1. Click File → Swift Packages → Add Package Dependency.
  2. Enter http://github.com/dreymonde/DonateToUkraine.git.

What happens to the money?

DonateToUkraine uses an official donation service created by Monobank, one of the largest and most trusted banks in Ukraine. The service was endorsed by the Ukrainian government here.

As you can read on the https://uahelp.monobank.ua webpage, every donation is transferred directly to a special account opened by the National Bank of Ukraine to raise funds for Ukraine’s Armed Forces. Official announcement of the account: here.

NBU regularly reports on the money it raises, and how it's being distributed. An example of such report here.

Keep in mind that weapons are negotiated between governments on a higher level and are funded / purchased through different channels. The vast majority of donations made to the official NBU account goes towards support payments for soldiers and their families, as well as local purchases of medical supplies, protective gear etc.

If you have any questions regarding the donations, don't hesitate to reach out to me at [email protected].

You might also like...
Ruby Gem for Rails - Easy iTunes In-App Purchase Receipt validation, including auto-renewable subscriptions
Ruby Gem for Rails - Easy iTunes In-App Purchase Receipt validation, including auto-renewable subscriptions

Monza is a ruby gem that makes In-App Purchase receipt and Auto-Renewable subscription validation easy. You should always validate receipts on the ser

A lightweight iOS library for In-App Purchases

#RMStore A lightweight iOS library for In-App Purchases. RMStore adds blocks and notifications to StoreKit, plus receipt verification, content downloa

A modern In-App Purchases management framework for iOS.

MerchantKit A modern In-App Purchases management framework for iOS developers. MerchantKit dramatically simplifies the work indie developers have to d

With SwiftUI payment share app
With SwiftUI payment share app

Splitpayment With SwiftUI payment share app.

Square In-App Payments iOS SDK SwiftUI

Square In-App Payments iOS SDK SwiftUI Build remarkable payments experiences in

SwiftUI BusinessCard - Created iOS Business card app to practice SwiftUI
SwiftUI BusinessCard - Created iOS Business card app to practice SwiftUI

SwiftUI_BusinessCard Created iOS Business card app to practice SwiftUI

Handle in-app purchases in iOS in a convenient way

InAppPurchases Handle in-app purchases in iOS in a convenient way. Overview InAppPurchases covers all the basic aspects of in-app purchases in swift i

iOS SDK for cross-platform in-app purchase and subscription infrastructure, revenue analytics, engagement automation, and integrations
iOS SDK for cross-platform in-app purchase and subscription infrastructure, revenue analytics, engagement automation, and integrations

Qonversion is the data platform to power in-app subscription revenue growth. fast in-app subscriptions implementation back-end infrastructure to valid

A jailed in-app purchase cracker for iOS 12.2-15.6

Satella Jailed For, um, educational purposes only or something. Definitely don't use this to pirate in-app purchases in apps to which you don't have l

Releases(0.0.4)
Owner
Oleg Dreyman
WWDC 2018 Scholarship Winner. iOS Engineer @nicephoton.
Oleg Dreyman
TPInAppReceipt is a lightweight, pure-Swift library for reading and validating Apple In App Purchase Receipt locally.

TPInAppReceipt is a lightweight, pure-Swift library for reading and validating Apple In App Purchase Receipt locally. Features Read all

Pavel T 492 Sep 20, 2022
Allow to add .pkpass files to Apple wallet

Allow to add .pkpass file to Apple Wallet

Jose Valentin Abundo Hernandez 1 Jul 6, 2022
Make and accept payments in your iOS app via Venmo

Venmo iOS SDK The Venmo iOS SDK lets you make and accept payments in your app using Venmo. Installation If you're using CocoaPods: If you don't have a

Venmo 167 Sep 26, 2022
Accept credit cards and PayPal in your iOS app

Important: PayPal Mobile SDKs are Deprecated. The APIs powering them will remain operational long enough for merchants to migrate, but the SDKs themse

PayPal 974 Sep 2, 2022
A framework to add patronage to your apps.

PatronKit A framework for add a patronage area to your apps. PatronKit uses CloudKit to record purchases, and then display tallies back to the user. I

Moshe 364 Sep 9, 2022
Card Decks is a small utility application for your iPhone, iPod touch and iPad which brings you simple, configurable, colored, multi-line text cards that are grouped into card decks

Card Decks is a small utility application for your iPhone, iPod touch and iPad which brings you simple, configurable, colored, multi-line text cards that are grouped into card decks.

Arne Harren 39 Jul 1, 2022
Easily integrate Credit Card payments module in iOS App. Swift 4.0

MFCard Buy me a coffee MFCard is an awesome looking Credit Card input & validation control. Written in Swift 3. YOoo, Now MFCard is on Swift 5. Swift

MobileFirst 359 Jul 6, 2022
In-app purchases and subscriptions made easy. Support for iOS, iPadOS, watchOS, and Mac.

In-app purchases and subscriptions made easy. Support for iOS, iPadOS, watchOS, and Mac.

RevenueCat 1.4k Sep 23, 2022
Lightweight In App Purchases Swift framework for iOS 8.0+, tvOS 9.0+ and macOS 10.10+ ⛺

SwiftyStoreKit is a lightweight In App Purchases framework for iOS, tvOS, watchOS, macOS, and Mac Catalyst. Features Super easy-to-use block-based API

Andrea Bizzotto 6.1k Sep 22, 2022
In App Purchase Manager framework for iOS

InAppFramework In App Purchase Manager framework for iOS Disclaimer I know it's been too long since the last update, quite a few things happened in my

Sándor Gyulai 40 May 23, 2020