-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parent Application Opening #5
Comments
Ugh. Unfortunately, I have researched all possible ways to make this possible and Apple just has not made it even natively doable. Like you can't even open your app "schema" because opening URLs from the main bundle is not accessible to the Shield extensions :( pretty lame right? |
but how jomo app is doing then? any rough idea. |
interesting. you're right. i'll have to dig into that a bit more 🤔 |
let me know if you find anything. |
try using the |
give this hacky solution a shot... in your override func handle(action: ShieldAction, for application: ApplicationToken, completionHandler: @escaping (ShieldActionResponse) -> Void) {
// Handle the action as needed.
switch action {
case .primaryButtonPressed:
completionHandler(.close)
case .secondaryButtonPressed:
completionHandler(.defer)
if let url = URL(string: "your-app-schema://") {
// hack option 1
let webView = WKWebView()
webView.load(URLRequest(url: url))
// hack option 2
let context = NSExtensionContext()
context.open(url)
}
@unknown default:
fatalError()
}
} |
have you tried it? its not working on my side. |
have you searched it out more or have you done the testing on code you shared? |
So I have tried doing quite a bit more research and it's practically impossible to find a way for this to work natively so far |
i want to get the screen time used. |
Uh. are you having issues making the library features work? or are you having issues with this particular "feature" why seems to only be achieveable by using non public methods |
Is it possible that we can open the parent application from the shield.
i have a functionality that when the user click on the primary button on shield action extension it opens the parent app(App who has installed the restrcition on another app).
same thing is happenin in jomo app. @NoodleOfDeath
The text was updated successfully, but these errors were encountered: