Hey,
I'm new here I am using appwrite cloud
I have already implimented in Dart and working fine I am able to create - read document but I need one app for macOS also, I have tried to get countries and other apis all are not working and also I am not able to create-read document
in macOS I am getting same error -65563: ServiceNotRunning Please help me if you know how to handle this
static let shared = AppWriteManager()
private init() {}
func uploadTweet(_ models: [TweetUIViewModel], documentId: String) async {
let db = getDatabase()
do {
let countries = try await Appwrite.Locale(client).listCountries()
print(countries)
let result = try await db.createDocument(
databaseId: "",
collectionId: "paid_tweets",
documentId: documentId,
data: [
"tweets": models.map { getRemoteTweet(from: $0) }
]
)
print("result: \(result)")
} catch let error {
print("Error....... \(#function)", error)
}
}
private let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1")
.setProject("")
.setSelfSigned(true)
private func getDatabase() -> Databases {
let db = Databases(client)
return d
}
private func getRemoteTweet(from: TweetUIViewModel) -> [String: Any] {
return [
"title": from.title,
"rate": Int(from.rate) ?? 0,
"desc": from.desc,
"by": from.by,
"id": UUID().uuidString
]
}
}
This is my code, every time I get the same error
Recommended threads
- Apple OAuth2 "Registration Not Complete"...
I'm getting a "Registration Not Complete" error when implementing Apple Sign In OAuth2 on self-hosted Appwrite. Environment: Self-hosted Appwrite (latest), iOS...
- Cannot use Apple Oauth2 in React Native/...
Hi! I've trying to add the Apple sign in feature into my Expo App. I followed the docs, but I still receiving the error "Cannot set 'location.href'". Can someon...
- Deeplinking/hosting apple-app-site-assoc...
I'm trying to implement deeplinking so that after a user logs in, they are redirected to the place in my app I want them to go. As far as I understand, I need a...