Skip to content

Commit 91f314b

Browse files
authored
Merge pull request #17 from appwrite/dev
Dev
2 parents d1c25a9 + 6c0f88c commit 91f314b

File tree

313 files changed

+8161
-913
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

313 files changed

+8161
-913
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2023 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c) 2024 Appwrite (https://appwrite.io) and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Package.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ let package = Package(
1313
products: [
1414
.library(
1515
name: "Appwrite",
16-
targets: ["Appwrite", "AppwriteModels", "JSONCodable"]
16+
targets: [
17+
"Appwrite",
18+
"AppwriteEnums",
19+
"AppwriteModels",
20+
"JSONCodable"
21+
]
1722
),
1823
],
1924
dependencies: [
2025
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.9.0"),
21-
.package(url: "https://github.com/apple/swift-nio.git", from: "2.32.0")
26+
.package(url: "https://github.com/apple/swift-nio.git", from: "2.32.0"),
2227
],
2328
targets: [
2429
.target(
@@ -27,6 +32,7 @@ let package = Package(
2732
.product(name: "AsyncHTTPClient", package: "async-http-client"),
2833
.product(name: "NIOWebSocket", package: "swift-nio"),
2934
"AppwriteModels",
35+
"AppwriteEnums",
3036
"JSONCodable"
3137
]
3238
),
@@ -36,6 +42,9 @@ let package = Package(
3642
"JSONCodable"
3743
]
3844
),
45+
.target(
46+
name: "AppwriteEnums"
47+
),
3948
.target(
4049
name: "JSONCodable"
4150
),

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
![Swift Package Manager](https://img.shields.io/github/v/release/appwrite/sdk-for-swift.svg?color=green&style=flat-square)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-swift.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-1.4.12-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.5.0-blue.svg?style=flat-square)
66
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
77
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
88
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
99

10-
**This SDK is compatible with Appwrite server version 1.4.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-swift/releases).**
10+
**This SDK is compatible with Appwrite server version 1.5.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-swift/releases).**
1111

1212
> This is the Swift SDK for integrating with Appwrite from your Swift server-side code. If you're looking for the Apple SDK you should check [appwrite/sdk-for-apple](https://github.com/appwrite/sdk-for-apple)
1313
1414
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Swift SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
1515

16-
![Appwrite](https://appwrite.io/images/github.png)
16+
![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)
1717

1818
## Installation
1919

@@ -33,7 +33,7 @@ Add the package to your `Package.swift` dependencies:
3333

3434
```swift
3535
dependencies: [
36-
.package(url: "[email protected]:appwrite/sdk-for-swift.git", from: "4.1.0"),
36+
.package(url: "[email protected]:appwrite/sdk-for-swift.git", from: "5.0.0"),
3737
],
3838
```
3939

@@ -77,9 +77,11 @@ let users = Users(client)
7777

7878
do {
7979
let user = try await users.create(
80-
userId: ID.unique(),
81-
email: "[email protected]",
82-
password: "password"
80+
userId: ID.unique(),
81+
82+
phone: "+123456789",
83+
password: "password",
84+
name: "Walter O'Brien"
8385
)
8486
print(String(describing: user.toMap()))
8587
} catch {
@@ -103,9 +105,11 @@ func main() {
103105

104106
do {
105107
let user = try await users.create(
106-
userId: ID.unique(),
107-
email: "[email protected]",
108-
password: "password"
108+
userId: ID.unique(),
109+
110+
phone: "+123456789",
111+
password: "password",
112+
name: "Walter O'Brien"
109113
)
110114
print(String(describing: user.toMap()))
111115
} catch {

0 commit comments

Comments
 (0)