WKBrowsingContextController is invalid

Is this code invalid on a phone running xcode16 iOS18?

Class cls = NSClassFromString(@"WKBrowsingContextController");

SEL sel = NSSelectorFromString(@"registerSchemeForCustomProtocol:");

if ([(id)cls respondsToSelector:sel]) {

[(id)cls performSelector:sel withObject:@"http"];

[(id)cls performSelector:sel withObject:@"https"];

}

}

Answered by DTS Engineer in 843100022

WKBrowsingContextController is not part of WebKit’s public API, making it an implementation detail. We don’t support developers writing code that relies on implementation details. They can and do change without warning.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

WKBrowsingContextController is not part of WebKit’s public API, making it an implementation detail. We don’t support developers writing code that relies on implementation details. They can and do change without warning.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

What method should be used to transfer files from an app to H5

What method should be used to transfer files from an app to H5

It’s hard to offer more advice without more context. Let’s start with something simple: What does H5 mean?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

WKBrowsingContextController is invalid
 
 
Q