Post

Replies

Boosts

Views

Activity

RSA encryption
Hi everyone, my app makes use of RSA encryption as follows: private func upload(publicKey: PublicKey, door:NWObjId, pin: String) throws -> Promise<(data: Data, response: HTTPURLResponse?)> { let str = "\(pin)\n\(NSDate().timeIntervalSince1970)" let clear = try ClearMessage(string: str, using: .utf8) let encrypted = try clear.encrypted(with: publicKey, padding: .PKCS1) let urlStr = "http://\(address)/nxw/api/pas/access/v1/doorlock" let payload = [ "oid": door.asKey, "auth": encrypted.base64String ] return try NWHttpApi.http(post: urlStr, payload: payload) } I always felt that it fell under "encryption limited to that within the Apple operating system" so no documentation required in App Store Connect. Is that correct? Thanks
1
0
115
6d
How to disable digital crown to scroll a List in swiftui
Hello, I have a TabView containing multiple views where one of them contains a list of items. The digital crown on the apple watch does not allow me to scroll the items in the tabview but only scrolls the list of items. Is there any way to disable that the scrolling of the list is done by the wheel or even a way to prioritize the digital crown to scroll the tabView and not the list? Thanks
3
0
357
Mar ’24
handleBackgroundTasks not called on apple watch but only on simulator
I'm trying to execute a background task following the Developer Documentation. This is my code import SwiftUI @main struct MyAppTest_Watch_AppApp: App { @Environment(\.scenePhase) var scenePhase let bs = BackgroundSession() @SceneBuilder var body: some Scene { WindowGroup { ContentView() }.backgroundTask(.appRefresh("prova")) { context in print("bg task") await scheduleTask() } .onChange(of: scenePhase) { phase in switch phase { case .active: print("\(#function) REPORTS - App change of scenePhase to ACTIVE") case .inactive: print("\(#function) REPORTS - App change of scenePhase Inactive") case .background: print("\(#function) REPORTS - App change of scenePhase Background") WKApplication.shared() .scheduleBackgroundRefresh( withPreferredDate: Date.init(timeIntervalSinceNow: 5 * 60.0), userInfo: "prova" as NSSecureCoding & NSObjectProtocol, scheduledCompletion: schedule) default: print("\(#function) REPORTS - App change of scenePhase Default") } } } func scheduleTask() async { bs.testSession() await WKApplication.shared() .scheduleBackgroundRefresh( withPreferredDate: Date.init(timeIntervalSinceNow: 5 * 60.0), userInfo: "prova" as NSSecureCoding & NSObjectProtocol, scheduledCompletion: schedule) } func schedule(error: Error?) { if error != nil { // Handle the scheduling error. fatalError("*** An error occurred while scheduling the background refresh task. ***") } print("Scheduled!") } } On the simulator the background refresh occurs correctly according to the preferred date and executes the background task, on the real watch it does not. I also set the app as complication in my watch face. The device I'm testing the app on is an Apple Watch Serie 7 with watchOS 10.3. Any idea?
0
0
355
Feb ’24