DEV Community

Cover image for Building apps just got Swifter! - Announcing Appwrite v0.11
Jake Barnby for Appwrite

Posted on

Building apps just got Swifter! - Announcing Appwrite v0.11

Apple Platforms

The last month has been a wild one at the Appwrite community! We've been working tirelessly to bring you some awesome new features with each new version. That said, we're excited to announce our newest release: Appwrite 0.11 🥳 Packed with a ton of cool new features like support for Apple platforms (iOS, macOS, watchOS and tvOS), as well a brand new Swift Server SDK, a Swift Cloud Function runtime and more!

Let's not forget, this is also an Appwrite release, where our open source contributors have outnumbered the maintainers! 🤯 We've merged over 150 PRs from our contributors during Hacktoberfest, and still have over 450 PRs waiting to be merged! With all those exciting numbers aside, let's dive right in! 🐳

Appwrite is an open-source, self-hosted Backend-as-a-Service that aims to make app development easier with SDKs available in a variety of programming languages. Come hang out with us on Discord.

🍎 Apple Support

It's finally here 🌟 Appwrite now has official support for Apple platforms! Our SDK has just been released, and we're looking to gather some feedback from our amazing community! We've got all the setup instructions in our new Getting Started Guide. If you just can't wait to try it out, here are the steps to get you started ASAP.

Add the SDK

The Appwrite Apple SDK is available via Swift Package Manager. In order to use the Appwrite Apple SDK from Xcode, select File > Swift Packages > Add Package Dependency.

  • In the dialog that appears, enter the Appwrite Apple SDK package URL and click Next.
  • Once the repository information is loaded, add your version rules and click Next again.
  • On the final screen, make sure Appwrite is selected to add to your target as a library.

Make a Request

You can now make your first request 😍 below are two examples of simple integrations with the SDK, one for SwiftUI and one for UIKit.

Using SwiftUI

import Appwrite
import SwiftUI

@main
struct TestApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

struct ContentView: View {
    var body: some View {
        Button("Click Me!", action: {
            let client = Client()
                .setEndpoint("https://[HOSTNAME_OR_IP]/v1")
                .setProject("5df5acd0d48c2")

            let account = Account(client)

            account.create(email: "email@example.com", password: "password") { result in
                switch result {
                case .failure(let error): break
                case .success(let user): break
                }
            }
        })
    }
}
Enter fullscreen mode Exit fullscreen mode

Using UIKit

import Appwrite
import UIKit

class ViewController: UIViewController {

    let client = Client()
        .setEndpoint("https://[HOSTNAME_OR_IP]/v1")
        .setProject("5df5acd0d48c2")

    lazy var account = Account(client)

    @IBAction func clickMe(_ sender: Any) {        
        account.create(email: "email@example.com", password: "password") { result in
            switch result {
            case .failure(let error): break
            case .success(let user): break
            }
        }
    }
Enter fullscreen mode Exit fullscreen mode

We also have some example apps to help you get started:

🏎️ Swift Server SDK

We have also released a brand new Swift Server SDK to go along with the Apple one! Setting up the Swift SDK only requires adding the dependency to your Package.swift file. You can check out our Getting Started Guide or follow along for a quick summary.

Add the package to your Package.swift dependencies:

    dependencies: [
        .package(url: "https://github.com/appwrite/sdk-for-apple", from: "0.1.0 "),
    ],
Enter fullscreen mode Exit fullscreen mode

Then add the library as a dependency of your target:

    targets: [
        .target(
            name: "[YourAppTarget]",
            dependencies: [
                .product(name: "Appwrite", package: "sdk-for-apple")
            ]
        )
    ],
Enter fullscreen mode Exit fullscreen mode

You can now make your first request using:

import Appwrite

let client = Client()
    .setEndpoint("https://[HOSTNAME_OR_IP]/v1")
    .setProject("5df5acd0d48c2")

func main() {
    let account = Account(client)

    account.create(email: "email@example.com", password: "password") { result in
        switch result {
        case .failure(let error): break
        case .success(let user): break
        }
    }
}
Enter fullscreen mode Exit fullscreen mode

We also have some example apps to help you get started

🏃 Swift Cloud Function Runtime!

Our Cloud Function runtimes list continues to grow with over 20+ (!) runtimes. This time we've added support for swift-5.5, which thanks to ABI stability, supports running code all the way back to Swift 4. We've got you covered 💪 no matter what your favourite language is! We have demos available for a wide variety of languages.

Swift Function

🚅 Everything else

Team Work

  • We've been having a lot of fun on our Discord server! Weekly chats and AMAs with the Appwrite maintainers, Live PR reviews, Hacktoberfest Countdown parties, impromptu chess games and most importantly, The community run #meme channel!. You'll find yourself right at home. Come on in

PR Party

⛏️ Breaking Changes

This release introduces no breaking changes, which means you can upgrade your Appwrite instance without needing to run the Appwrite migration script.

Computer Crash

😍 And More!

That's not all! We've included other small fixes and optimizations to make everyone's Appwrite experience the best it can be. For full details of the 0.11 release, you can check out the changelog on GitHub.

If you're upgrading from an older version of Appwrite, be sure to follow our upgrading guide so that you don't lose your way in uncharted territories 😉.

If you're curious about what's next for Appwrite, or have a great idea, head on over to our RFC repo for more details.

Our list of awesome tutorials, videos, and demos keeps growing, head over to the awesome-appwrite repo to check them out.

If you've just discovered Appwrite and would like to get started, check out our 30 Days of Appwrite series where we explain step-by-step everything you need to know to build awesome Appwrite-powered apps. Come hang out on Discord, follow us on Twitter, Dev, or wherever you find your friendly neighborhood Appwriter.

Discussion (0)