Questions tagged [safari-app-extension]

Safari app extensions leverage web technologies and native code to extend the web-browsing experience in Safari

Safari app extensions leverage web technologies and native code to extend the web-browsing experience in Safari.

Safari app extensions are available in OS X 10.12 and later and in OS X 10.11.5 when Safari 10 is installed. Using a Safari app extension, you can add new functionality to Safari, read and modify web page content, and communicate with your native application to integrate its content into Safari or send web data to your app.

Safari app extensions are written using a combination of JavaScript, CSS, and native code written in Objective-C or Swift. Safari app extensions are built on the standard app extension model.

Docs: https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/SafariAppExtension_PG/

89 questions
0
votes
1 answer

Capture screenshot of web page in safari app extension

I am converting legacy Safari extension to Safari app extension, Here's a link My legacy extension used safari.application.activeBrowserWindow.activeTab.visibleContentsAsDataURL function to capture screenshot of active tab, how can I do that with…
PhuTa
  • 59
  • 6
0
votes
1 answer

Is it possible to import content scripts out of project folder for Safari App Extension?

I'm developing a Safari App Extension. But my content scripts are out of Xcode project folder. Is it possible to import those script files? I see in Apple's official document: For each script file, add a dictionary to the array. Each dictionary…
zhm
  • 3,513
  • 3
  • 34
  • 55
0
votes
1 answer

How to properly inject an iframe to the DOM with Safari App Extensions?

I'm porting my WebExtension to Safari using a Safari App Extension. My extension is an iframe inject in the DOM so I was thinking to have something like this injection script loaded as a…
0
votes
1 answer

safari app extensions: broadcast a message to all tabs from swift background process

In a legacy extension it was possible to iterate over safari.application.activeBrowserWindow.tabs to send a message to all tabs registered with the extension. Is there any equivalent available with the new safari app extensions? I've been trough the…
paolo.caminiti
  • 526
  • 4
  • 15
0
votes
1 answer

How to enable Safari App Extension programmatically?

I'm developing a Safari App Extension inside a macOS app. When a user installs this app, the extension is added to Safari, but it's disabled by default. We can detect the state of extension by using SFSafariExtensionManager class via its…
sam
  • 481
  • 2
  • 8
  • 21
0
votes
1 answer

Closing a Tab from a Safari App Extension

I am having a surprisingly hard time finding a way to close a tab from a Safari App Extension. I can open a tab with SFSafariApplication.getActiveWindow(completionHandler: { $0?.openTab(with: url, makeActiveIfPossible: true) }) Yet neither…
Matthias Winkelmann
  • 15,870
  • 7
  • 64
  • 76
0
votes
2 answers

Need to convert a legacy safari extension into Safari App Extension. Searching for documentation, starting steps and tutorials on Xcode

I have a legacy safari extension which I need to convert into Safari App Extension to submit into Extension Gallery. I am new to Xcode therefore, not familiar with it's build and run process. I tried looking into official documentation from…
0
votes
1 answer

Safari 12 Extensions and NativeMessaging

With the release of Safari 12, Safari will no longer support NPAPI plugins. My use case is to be able to launch a java application located on a client from a browser extension which I can currently do in Chrome and Firefox with NativeMessaging. From…
0
votes
1 answer

save email to safari local storage after login success

I am trying to develop safari extension using swift safari services. The project is created from mac os and then safari extension. I am javascript developer but developing safari extension needed to use swift but I do not have any idea on how to…
Tushant
  • 1,534
  • 1
  • 14
  • 24
0
votes
1 answer

change to another screen after login is successful

The use case of the app I am developing is I will have login view at the initial. When user logs in with valid credentials, the user should see another view saying welcome user. I am totally beginner and I don't know much more about xcode. I see the…
Tushant
  • 1,534
  • 1
  • 14
  • 24
0
votes
0 answers

how to get postition of safari toolbar download button in safari app extension

I want to point an arrow to download button of safari toolbar after one downloads my app extension like below but the download button seem to change the position when window size is reduced. how to handle this?
0
votes
1 answer

Safari App Extension localized contextual menus

I have localized a Safari App Extension and everything works just fine, but I cannot get the contextual menus localized... Following the Apple guidelines I have come up with the following entry in my InfoPlist.strings file: "Context Menu Item Label…
gypsyDev
  • 1,232
  • 1
  • 14
  • 22
0
votes
1 answer

Safari App Extension: Cannot find executable file that matches the value of CFBundleExecutable in nested bundle

I'm trying to validate my OS X application's archive, but I keep running into the following errors. Bad CFBundleExecutable. Cannot find executable file that matches the value of CFBundleExecutable in the nested bundle MySafariExtension…
-1
votes
1 answer

How to debug js code inside a wkwebview of safair app extensionn popover?

It's not just a wkwebview, it's a single page app running inside a wkwebview which is the popover of Safari app extension. I need to communicate between my SafariExtensionViewController and this spa inside wkwebview. I totally lost the idea of how…
yuan
  • 1,701
  • 2
  • 13
  • 24
1 2 3 4 5
6