mirror of
https://github.com/appwrite/sdk-for-apple.git
synced 2026-11-18 20:53:33 +00:00
33 lines
972 B
Markdown
33 lines
972 B
Markdown
```swift
|
|
import Appwrite
|
|
|
|
let client = Client()
|
|
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
|
.setProject("<YOUR_PROJECT_ID>") // Your project ID
|
|
|
|
let apps = Apps(client)
|
|
|
|
let app = try await apps.create(
|
|
appId: "<APP_ID>",
|
|
name: "<NAME>",
|
|
redirectUris: [],
|
|
description: "<DESCRIPTION>", // optional
|
|
clientUri: "https://example.com", // optional
|
|
logoUri: "https://example.com", // optional
|
|
privacyPolicyUrl: "https://example.com", // optional
|
|
termsUrl: "https://example.com", // optional
|
|
contacts: [], // optional
|
|
tagline: "<TAGLINE>", // optional
|
|
tags: [], // optional
|
|
images: [], // optional
|
|
supportUrl: "https://example.com", // optional
|
|
dataDeletionUrl: "https://example.com", // optional
|
|
postLogoutRedirectUris: [], // optional
|
|
enabled: false, // optional
|
|
type: "public", // optional
|
|
deviceFlow: false, // optional
|
|
teamId: "<TEAM_ID>" // optional
|
|
)
|
|
|
|
```
|