Post

Replies

Boosts

Views

Activity

LockedCameraCaptureManager
Task { for await update in LockedCameraCaptureManager.shared.sessionContentUpdates { switch update { case .initial(let urls): print("frank: init \(urls)") await MainActor.run { let label = UILabel(frame: CGRect(x: 100, y: 100, width: 100, height: 30)) label.text = "frank test" label.textColor = .black UIViewController.getTop().view.addSubview(label) } case .added(let url): print("frank: add \(url)") case .removed(let url): print("frank: removed \(url)") default: break } } } why 'case .initial(let urls)': never never be executed? Can some one provide a sample code?
1
0
208
Oct ’24
ControlWigdet Open APP with URL
This code can open app, but the deep link is not send to the app. It doesn't seem to call the UIApplicationDelegate's "application(_:open:options:)" method, so I can't read the link string that was passed in func perform() async throws -> some IntentResult & OpensIntent { guard let url = URL(string: "myapp://myappintent") else { // throw an error of your choice here } return .result(opensIntent: OpenURLIntent(deepLink)) }
1
1
396
Aug ’24
ControlWidget Can't use onOpenURL
`struct OpenMainAppIntent: AppIntent { static let title: LocalizedStringResource = "OpenMainAppIntent" static var openAppWhenRun: Bool = true init() {} @MainActor func perform() async throws -> some IntentResult & OpensIntent { guard let url = URL(string: "myapp://open") else { throw OpenURLError.invalidURL } return .result(opensIntent: OpenURLIntent(url)) } } ` This is an action in my custom control widget, and i want to use this deeplink open my application and get the link's info, but it won't perform onOpenURL `@main struct TestControlWidgetApp: App { var body: some Scene { WindowGroup { ContentView() .onOpenURL { url in print("url: \(url)") } } } }`
2
0
347
Aug ’24
xcode16.1beta compile error
SDK has some compile errors, when it can be fixed? We want to develop iOS 18 new features in our application. /Users/***/XcodeBeta/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.1.sdk/usr/include/c++/v1/__type_traits/is_arithmetic.h:24:29 'std::is_arithmetic' has different definitions in different modules; defined here /Users/***/XcodeBeta/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.1.sdk/usr/include/c++/v1/__type_traits/is_integral.h:53:29 'std::is_integral' has different definitions in different modules; defined here
3
1
450
Aug ’24