Open onmyway133 opened 1 month ago
func perform() async throws -> some IntentResult & OpensIntent { let url = URL(string: "myapp://book")! return .result(opensIntent: OpenURLIntent(url)) } 这种方式iOS18不能跳转APP
func perform() async throws -> some IntentResult & OpensIntent { let url = URL(string: "myapp://book")! return .result(opensIntent: OpenURLIntent(url)) } 这种方式iOS18不能跳转APP
把target membership的主工程和extension都加上应该就可以了“The system requires the Target Membership of the app intent to be set to both the app and the widget extension to open the app.”
In iOS 18, we can make Control Widget in Widget extension
From Creating controls to perform actions across the system
We can open our app with
OpenIntent
The system requires the Target Membership of the app intent to be set to both the app and the widget extension to open the app.
Another way is to use OpenURLIntent from iOS 18 to open universal link
Note that you need to use a universal link for your URL representation, you can’t use a custom URL scheme.
There's an issue in iOS 18 where universal link triggered from Control Widget does not open the app correctly. iOS 18.1 fixes this problem. Read iOS 18.1 release notes
Read more