Swift Package: FastSpring In-App Purchase

The recent release of TableFlip v1.6 is the first one that includes a new in-app purchase (IAP) component I assembled for my projects. It’s used in TableFlip to purchase a lifetime license within the app.

With future releases, the package will support in-app purchases of consumables or individual features, too.

Find package source code here:
https://github.com/CleanCocoa/FastSpringStore

The Swift Package Index listing:
https://swiftpackageindex.com/CleanCocoa/FastSpringStore

To use this in your app, all you need is:

  • A FastSpring account with the modern backend that everyone gets. (If you are still on “Classic”, you’ll know.)
  • Create an Embedded Storefront to display a very minimal shopping UI on a HTML page. Put this on your website or another trusted source: You will have to tell FastSpring that the form is legit with a domain-based allow-list, so you should really own the source.
  • Include the package in your app and point to the URL of your self-hosted embedded storefront.
  • Bonus: if you use my Trial and Licensing package, you can quickly unlock the app after a purchase has been made. The IAP component notifies your app on success.

With that in place, you can display a dedicated purchase window inside your app that doesn’t require a large context switch to the browser to make a sale:

TableFlip's dedicated purchase window

The setup is quite short. I use a dedicated service object:

class PurchaseLicense {
    let store: FastSpringStore

    init() {
        self.store = FastSpringStore(
            storeURL: storeURL,
            purchaseCallback: { store, purchases in
                // Could have multiple purchased items, e.g. if you
                // offer in-app purchases of bundled features.
                assert(purchases.count == 1)
                guard let purchase = purchases.first else { return }

                for license in purchase.licenses {
                    // Unlock via license.licenseName & license.licenseCode, e.g.
                    // using the https://github.com/CleanCocoa/TrialLicensing package:
                    //
                    //   TrialLicensing.AppLicensing.register(
                    //       name: license.licenseName,
                    //       licenseCode: license.licenseCode
                    //   )
                }
            })
    }

    func showStore() {
        // Localize and customize the window title:
        store.showStore(title: "Purchase MyApp")
    }
}

I introduced this feature to my apps because its predecessor was a popular choice to purchase a license among WordCounter users. There, it is being picked for about 50% of license sales in total.

It appears that if the option exists, it will be used. I can’t tell whether having this option actually increases sales or not, though.

FastSpring Introduces Multi-Discount Coupon Codes

Recently, FastSpring announced what they call “Multi-Discount Coupons”. These are coupon codes that: This is different from regular coupon codes that would only apply to one product. To implement a coupon-based discount for a combination of products, the best bet so far was to create a (temporary) product bundle and apply a re-usable coupon to that.

Continue reading …

Make Money Outside the MAS v2 Book Writing Stage is Done

My ebook update routine has changed a bit for Swift 5 this year: I’ve expanded the “Make Money Outside the Mac App Store” book typoscript a lot. It’s about twice as long, with many more explanations for the setup, many new additional feature discussions, and practices that I’ve learned of in the last years. FastSpring’s revamped store kind of forced me to re-take screenshots anyway, so I figured I might as well take more.

Continue reading …

With DevMate Closing Shop, Here's What You Can Do

Teaser image

DevMate are closing their doors. The announcement isn’t news anymore, but since I didn’t use their service, I didn’t think much of it. I did report back in 2016 when they changed their pricing model. Nowadays I discover more and more people struggling to migrate away, and my blog pops up in their searches – apparently because I wrote a book on selling apps on FastSpring.

Continue reading …

Live FastSpring Store Examples

Teaser image
The demo page with a modal shopping cart shows perfectly how you can make your own website into a store; you don't need to switch to an e-commerce website provider at all!

I discovered the FastSpring Examples page the other day. There, you can interact with different store setups to get a feeling for the capabilities of FastSpring’s new and updates Store Builder API. The examples also either include or link to documentation pages and CodePen-like source code demos.

All in all, I think this is a very cool addition to the docs.

When you play around with the examples, you will see that the new store styles aren’t just for fancier checkout pages. The new store has an API that you can easily (!) use to transform even a static HTML website into a dynamic store front, including a live shopping cart. This is very, very powerful.

See also:

Imposing Bans and App Store Sanctions

Brent Simmons wrote about imposing sanctions by making apps unavailable in certain countries (in his case: Saudi Arabia) in November 2018. I never thought about the mere possibility of doing so. It’s an intriguing thought: even when politics don’t result in whatever you want, you can always be picky about who you do custom with. It’s a power we have, a power every producer and craftsperson has. Turn down a business for moral reasons.

Continue reading …

Register for My Webinar About Ditching the Mac App Store

I will be hosting a webinar about distributing your app outside the Mac App Store next week. It’s free, and you’re very welcome to attend!

Wednesday, February 15th, 2017 @ 10:00 AM PST (will run 1 hour)

→ Register Now

Topics include:

  • Ditching the Mac App Store – Why, and what it means.
  • Is There Life After the Mac App Store? – Choosing an e-commerce provider.
  • Getting Back to Development – How you change your code to work outside the Mac App Store.

Plus you’ll see me live. That alone should be motivation for you to visit, no matter the topic :)

Disclaimer, aka Code of Honesty and Transparency

Maybe you just arrived on my blog and don’t know how I do things around here, yet, and how much I value morality over profit anytime. So let me erase your doubts about this webinar cooperation.

I use FastSpring to sell my stuff. I really like their service, so I wrote a guide in 2015. FastSpring in turn was impressed by my initiative and helped me spread the word a bit and provide background info whenever I needed anything. I am not getting paid by FastSpring for the book. It’s my own creative work. I maintain it because I think it helps you, fellow developer, to set up your own indie business.

Then late 2016, FastSpring approached me as their go-to expert for Mac app development. They plan to show how easy it is to use FastSpring to distribute Mac apps. In other words, they want to own part of the good news for obvious marketing reasons.

With the recent Out-of-App-Store Success Stories by Rogue Amoeba and Kapeli, it may even be a growing market.

I was skeptical at first. I will not violate my strong ethics; teaching people the One True Way™ is more important than easy money. But I came to find FastSpring values delivering useful content over running a 60-minute ad show. From the get go, FastSpring wanted me to create the content. Not even once did they suggest I add something to my slides. They totally risk I go live on Wednesday and tell people to use a competing service. But I won’t, because I know no better service provider. I liked the concept, so I agreed. I am getting paid by FastSpring for this webinar gig. But it’s 100% my webinar.

To stay true to myself, I will give genuinely helpful advice to empower the attendees to become independent. Of course I’ll show FastSpring’s features, just like the screenshots I put in my book. All because I believe in their service, not because they bought my loyalty with the speaker fee.

In short, this is not an advertisement for FastSpring. I haven’t sold my soul. It’s a cooperation out of mutual respect.

Hope to be seeing you around on Wednesday!

DevMate is Completely Free Now

When DevMate launched, I dabbled with the backend a bit and I really liked it. They use FastSpring for the store and enabling DevMate to integrate into your FastSpring account is very simple.

It seemed to be kind of expensive, though. Since then, they changed the pricing model once or twice and made the platform more attractive to upcoming indies and teams with a lower budget. Now it’s free.

Their SDK seems to provide easy integration. I think I’ll check it out with my next app to tell you more about the details. I just hope they’re doing well – lowering the price could just as well mean that they try to attract more devs because it doesn’t pay off to run the platform at the moment. (I think I’ll just ask them to be sure.)

Make Money Outside the Mac App Store now Available on Amazon

book cover

My e-book about creating and selling apps for Mac without the Mac App Store is now available on amazon.com if you prefer a print edition!

Why does print cost less?
The digital edition will be updated regularly with the latest Swift syntax. Further editions and major revisions are free for customers, too. I can’t do that with a print edition on your bookshelf, obviously. That’s why.

It feels weird, I know, because paper costs money and print book feel more precious. I’m making about 50% less with each sale, so there’s quite some cost involved printing the book. The feeling of physical good in your hand is part of the perceived value, and everyone would tell me I should factor that in, but I’m a bad businessman. It’s the right thing to do. Why should you pay more for something with less long-term value only because my costs are higher?

Make Money Outside the Mac App Store

book cover

Today I’m proud to announce the release of my e-book Make Money Outside the Mac App Store!

Get it for $25 $19 until Dec 24th from my store!

Shaving off VAT and then again 30% for Apple for every purchase of your app in the Mac App Store can be madness: the only real benefit is that people know how to operate the store. But if you’re just starting to run your business, discoverability is hardly a feature.

Instead of drowning in the warehouse that the app store is, put your software in your own store. You have to build an audience anyway to get started. So stay in touch with them. Know your customers. And stop giving away 30% for a promise that doesn’t hold.

  • Save days of research and implement the techniques today
  • Copy & paste Swift 2.0 code to integrate into your app in <1 hour
  • Utilize in-app purchase of licenses for a higher conversion instantly
  • 2 fully functional sample applications, including a time-based trial app
  • Secure license code generation and verification included

Take a look at the details page for more info.

This book will save you hours of research and days of fiddling with SDKs. It shows you how to set up products for sale on FastSpring including automatic license code generation and then guides you through the process of adding license verification to your app.

Don’t need all the explanations? Just follow the setup steps and copy the code into your project and you’re ready to roll in half an hour!

I’m not affiliated with FastSpring. I just think their service is awesome.

Here’s what FastSpring’s CTO Mike Smith has to say about the book:

We appreciate Christian’s efforts in creating a guide that enables Mac developers to sell applications through FastSpring’s award-winning e-commerce platform. He has provided detailed instructions to help developers configure key elements of their online sales process. The spirit of community captured in his book reflects FastSpring’s mission to connect people globally in the digital economy.

I truly believe in the spirit of community and I believe you can make it as a developer without the App Store. This book is here to empower you so you don’t have to figure out all the scary details.

So many other indies rely on FastSpring, too, including:

  • Smile Software (TextExpander, PDFpen)
  • Realmac Software (Clear, RapidWeaver)
  • Tyler Hall (VirtualHostX)
  • Ironic Software (Yep, Leap)
  • Bohemian Coding (Sketch)
  • toketaWare (iThoughtsX)
  • well, and me, obviously :)

Get to know their stories from this book. Be inspired and take the leap.

Because I think it’s so worth your time as a Mac developer, get it for 25% off until Christmas when you buy from my store.

Make Money with Mac Apps Outside the MAS: E-Book Prerelease, Need Feedback

I have written a book about releasing apps outside the Mac App Store. It comes with two fully working sample applications to cover checkout from within the app, licensing, and locking the app after a trial period.

It’s called:

Make Money Outside the Mac App Store: How to Sell Your Mac App with FastSpring, Secure It With License Codes Against Piracy, and Offer Time-Based Trial Downloads.

I’d love to have feedback on this.

If you want to help out, just shoot me a line at: hi@christiantietze.de

Thanks!

P.S.: The secret Leanpub page is here.