Safari Services

RSS for tag

Enable web views and services in your app using Safari Services.

Posts under Safari Services tag

149 Posts

Post

Replies

Boosts

Views

Activity

SFContentBlockerManager reloadContentBlocker crash on macOS 10.15.7 in Catalyst application
Hello, I have use Safari content blocker extension on Mac Catalyst application. Here is the code for reloadContentBlocker // Config.BLOCKER_EXTENSION = Content blocker extension bundle identifier func reloadBlockerRules() {     if #available(macCatalyst 13.4, *) {       SFContentBlockerManager.reloadContentBlocker(withIdentifier: Config.BLOCKER_EXTENSION, completionHandler: { error in         if error != nil {           TextLog.shared.write("RELOAD OF \(Config.BLOCKER_EXTENSION) FAILED WITH ERROR -\(error?.localizedDescription ?? "")")         }       })     } else {       // Fallback on earlier versions       TextLog.shared.write("Fallback on earlier versions - reloadBlockerRules")     }   } I have reload the blocker rules on application startup but its cashing every time with following reason : System Integrity Protection: enabled Crashed Thread:    0 Dispatch queue: com.apple.main-thread Exception Type:    EXC_CRASH (SIGABRT) Exception Codes:    0x0000000000000000, 0x0000000000000000 Exception Note:    EXC_CORPSE_NOTIFY Application Specific Information: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSXPCInterfaceProxy_SafariExtensionHelperProtocol loadContentBlockerWithIdentifier:sandboxExtensionToken:invokedBySafariFamily:reply:]: unrecognized selector sent to instance 0x6000012ac370' terminating with uncaught exception of type NSException abort() called Can you please help me out for find the crash reason ?
1
0
1k
Oct ’21
Use of Prefs: Settings
Hi everyone: How all we know the use of App-Prefs:root is a headache, because it causes rejection in AppStore, because it's considered that root and following is a private API. The app-settings: scheme redirect to our app settings, and that's not the behaviour expected @eskimo what about only use App-Prefs:? Is it considered private API? Is it not an app scheme? We have a lot of issues open by users because the mobileconfig download, since iOS 12.2 from Safari, not redirect the user to the profile settings. Users complain because of it, and maybe with the simple fact of could open settings not our app settings, the settings app could solve the problem because of the iOS Bug is not resolved nowadays. Thanks for all, Best regards,
4
1
8.7k
Oct ’21
iOS Swift SFSafariViewController update new URL and refresh view
I'm using SFSafariViewController for load weblinks, In my case first I need to open one URL after some process/time(like 10 sec) I need to update my URL in the same tab and refresh SFSafariViewController. if let url = URL(string: "Google.com") { let VC= SFSafariViewController(url: url) VC.delegate = self self.present(VC, animated: true, completion: nil) } There is any way to update The URL and refresh the current SFSafariViewController page?
0
0
951
Sep ’21
Resizing Issue with Safari App Extension popover
I'm experiencing an intermittent bug with Auto Layout in the popover for Safari App Extensions. It appears that any resizing in the view controller sometimes happens before the window itself is resized, and this has a very odd appearance. I'd like to figure out how to stop this from happening. I've tried moving any constraint changes into the updateConstraints method as suggested in AppKit resources I've found, however the bug remains. For reference, here are the collapsed and expanded views: Here are the intermediate frames that I'd like to prevent: This is the function that toggles the constraints to show/hide the long text: @objc private func toggleContent(_ sender: NSButton) { if longText.isDescendant(of: contentView) { contentButton.title = "Show text" // Remove text longText.removeFromSuperview() initialBottomConstraint.isActive = true } else { // Add text contentButton.title = "Hide text" initialBottomConstraint.isActive = false longText.translatesAutoresizingMaskIntoConstraints = false contentView.addSubview(longText) NSLayoutConstraint.activate([ longText.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 16.0), longText.topAnchor.constraint(equalTo: contentButton.bottomAnchor, constant: 16.0), longText.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16.0), longText.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -16.0) ]) } } Edit: for screenshot size
0
0
913
Sep ’21
Webapp bottom tabbar shrinks down when reloading on Safari iOS
Hi, I've been scratching my head for few days for the same problem I'm having. When I initially tab into my web-app, the bottom tab bar renders beautifully, with the bottom 0px and height of 64px. But the issue occurs when I leave the app and re-enter after few seconds, suddenly the tab bar container gets shrink down from where I expected to be leaving a horror gray area. On Android shows no problem but with iPhone-which I think is because of Safari iOS bottom navigator-the bottom: 0px, doesn't get the right layout. I'm attaching pictures to describe what I'm going through. There's one more weird part. I have several other apps which basically has same code line, front-end and back-end, but only two of them seem to show the same bug. Is this something to do with the native? Would appreciate any suggestions! Thank you,
0
0
639
Aug ’21
SFContentBlockerManager reloadContentBlocker crash on macOS 10.15.7 in Catalyst application
Hello, I have use Safari content blocker extension on Mac Catalyst application. Here is the code for reloadContentBlocker // Config.BLOCKER_EXTENSION = Content blocker extension bundle identifier func reloadBlockerRules() {     if #available(macCatalyst 13.4, *) {       SFContentBlockerManager.reloadContentBlocker(withIdentifier: Config.BLOCKER_EXTENSION, completionHandler: { error in         if error != nil {           TextLog.shared.write("RELOAD OF \(Config.BLOCKER_EXTENSION) FAILED WITH ERROR -\(error?.localizedDescription ?? "")")         }       })     } else {       // Fallback on earlier versions       TextLog.shared.write("Fallback on earlier versions - reloadBlockerRules")     }   } I have reload the blocker rules on application startup but its cashing every time with following reason : System Integrity Protection: enabled Crashed Thread:    0 Dispatch queue: com.apple.main-thread Exception Type:    EXC_CRASH (SIGABRT) Exception Codes:    0x0000000000000000, 0x0000000000000000 Exception Note:    EXC_CORPSE_NOTIFY Application Specific Information: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSXPCInterfaceProxy_SafariExtensionHelperProtocol loadContentBlockerWithIdentifier:sandboxExtensionToken:invokedBySafariFamily:reply:]: unrecognized selector sent to instance 0x6000012ac370' terminating with uncaught exception of type NSException abort() called Can you please help me out for find the crash reason ?
Replies
1
Boosts
0
Views
1k
Activity
Oct ’21
chrome_settings_overrides For iOS
do we have settings for changing search provider through extension on latest iOS 15?
Replies
1
Boosts
0
Views
941
Activity
Oct ’21
Use of Prefs: Settings
Hi everyone: How all we know the use of App-Prefs:root is a headache, because it causes rejection in AppStore, because it's considered that root and following is a private API. The app-settings: scheme redirect to our app settings, and that's not the behaviour expected @eskimo what about only use App-Prefs:? Is it considered private API? Is it not an app scheme? We have a lot of issues open by users because the mobileconfig download, since iOS 12.2 from Safari, not redirect the user to the profile settings. Users complain because of it, and maybe with the simple fact of could open settings not our app settings, the settings app could solve the problem because of the iOS Bug is not resolved nowadays. Thanks for all, Best regards,
Replies
4
Boosts
1
Views
8.7k
Activity
Oct ’21
iOS 15 Safari web extensions
Where can I find sample codes and some api listing for iOS only?
Replies
3
Boosts
0
Views
691
Activity
Oct ’21
Safari on opening of 1 second it get crashed
in one secound seen that in one of the tab showing facebook.com webpage. Tried all the solution on internet forum, but unable to over come. please do share file system solution or new app.
Replies
1
Boosts
0
Views
579
Activity
Sep ’21
iOS Swift SFSafariViewController update new URL and refresh view
I'm using SFSafariViewController for load weblinks, In my case first I need to open one URL after some process/time(like 10 sec) I need to update my URL in the same tab and refresh SFSafariViewController. if let url = URL(string: "Google.com") { let VC= SFSafariViewController(url: url) VC.delegate = self self.present(VC, animated: true, completion: nil) } There is any way to update The URL and refresh the current SFSafariViewController page?
Replies
0
Boosts
0
Views
951
Activity
Sep ’21
Resizing Issue with Safari App Extension popover
I'm experiencing an intermittent bug with Auto Layout in the popover for Safari App Extensions. It appears that any resizing in the view controller sometimes happens before the window itself is resized, and this has a very odd appearance. I'd like to figure out how to stop this from happening. I've tried moving any constraint changes into the updateConstraints method as suggested in AppKit resources I've found, however the bug remains. For reference, here are the collapsed and expanded views: Here are the intermediate frames that I'd like to prevent: This is the function that toggles the constraints to show/hide the long text: @objc private func toggleContent(_ sender: NSButton) { if longText.isDescendant(of: contentView) { contentButton.title = "Show text" // Remove text longText.removeFromSuperview() initialBottomConstraint.isActive = true } else { // Add text contentButton.title = "Hide text" initialBottomConstraint.isActive = false longText.translatesAutoresizingMaskIntoConstraints = false contentView.addSubview(longText) NSLayoutConstraint.activate([ longText.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 16.0), longText.topAnchor.constraint(equalTo: contentButton.bottomAnchor, constant: 16.0), longText.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16.0), longText.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -16.0) ]) } } Edit: for screenshot size
Replies
0
Boosts
0
Views
913
Activity
Sep ’21
In iOS 15 beta 8, SFSafariViewController autherize/cancel buttons blurred
In iOS 15 beta 8, Safari/WKWebView autherize/cancel buttons shown as white box. On click it is shown the text in blank but still filled colour is white
Replies
1
Boosts
0
Views
793
Activity
Sep ’21
Webapp bottom tabbar shrinks down when reloading on Safari iOS
Hi, I've been scratching my head for few days for the same problem I'm having. When I initially tab into my web-app, the bottom tab bar renders beautifully, with the bottom 0px and height of 64px. But the issue occurs when I leave the app and re-enter after few seconds, suddenly the tab bar container gets shrink down from where I expected to be leaving a horror gray area. On Android shows no problem but with iPhone-which I think is because of Safari iOS bottom navigator-the bottom: 0px, doesn't get the right layout. I'm attaching pictures to describe what I'm going through. There's one more weird part. I have several other apps which basically has same code line, front-end and back-end, but only two of them seem to show the same bug. Is this something to do with the native? Would appreciate any suggestions! Thank you,
Replies
0
Boosts
0
Views
639
Activity
Aug ’21