Add base project

Implement auth method
This commit is contained in:
coreyphillips
2024-09-11 22:03:27 -04:00
parent 66649117dc
commit b03d04ccc4
192 changed files with 54913 additions and 3 deletions

16
ios/Pubky.swift Normal file
View File

@@ -0,0 +1,16 @@
import Foundation
@objc(Pubky)
class Pubky: NSObject {
@objc(auth:secretKey:withResolver:withRejecter:)
func auth(_ url: String, secretKey: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
Task {
do {
let result = try await react_native_pubky.auth(url: url, secretKey: secretKey)
resolve(result)
} catch {
reject("auth Error", "Failed to auth", error)
}
}
}
}