After downloading the sea creator project, found here:
https://developer.apple.com/documentation/safariservices/safari_web_extensions/developing_a_safari_web_extension
Opening it in XCode immediately crashes XCode itself. Running XCode Version 12.0 beta 5 on mac catalina 10.15.6.
This is the error log I'm getting:
Application Specific Information:
ProductBuildVersion: 12A8189h
UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[_NSCFString replaceCharactersInRange:withString:]: nil argument
UserInfo: (null)
Open FDs: 27/4864
Hints:
Backtrace:
0 exceptionPreprocess (in CoreFoundation)
1 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
2 objcexceptionthrow (in libobjc.A.dylib)
3 -[NSCFString characterAtIndex:].cold.1 (in CoreFoundation)
4 mutateError.cold.4 (in CoreFoundation)
5 mutateError (in CoreFoundation)
6 -[NSCFString replaceCharactersInRange:withString:] (in CoreFoundation)
7 -[NSConcreteMutableAttributedString replaceCharactersInRange:withString:] (in Foundation)
8 -[NSMutableAttributedString(DVTNSAttributedStringAdditions) dvtappendString:withAttributes:] (in DVTCocoaAdditionsKit)
9 +[IDEDocumentController informativeTextForQuarantineProperties:] (in IDEKit)
10 +[IDEDocumentController shouldOpenItemAtURLWithSynchronousQuarantinePrompt:documentType:] (in IDEKit)
11 -[IDEDocumentController openProjectsPlaygroundsAndWorkspaces:display:openedDocuments:simpleFileDocumentLocations:completionHandler:] (in IDEKit)
12 -[IDEDocumentController openProjectsPlaygroundsAndWorkspaces:display:completionHandler:] (in IDEKit)
13 -[IDEDocumentController openDocumentsForDocumentLocations:display:completionHandler:] (in IDEKit)
14 -[IDEDocumentController asyncOpenDocumentsWithContentsOfURLs:display:completionHandler:] (in IDEKit)
15 -[IDEApplicationController openURLs:completionBlock:] (in IDEKit)
16 -[IDEApplicationController application:openFiles:] (in IDEKit)
17 withWindowOrderingObserverHeuristic (in AppKit)
18 -[NSApplication(NSAppleEventHandling) openURLs:withCompletionHandler:] (in AppKit)
19 _69-[NSApplication(NSAppleEventHandling) handleAEOpenDocumentsForURLs:]blockinvoke (in AppKit)
20 _90-[NSDocumentController(NSInternal) autoreopenDocumentsFromRecords:withCompletionHandler:]blockinvoke (in AppKit)
21 -[NSDocumentController(NSInternal) autoreopenDocumentsFromRecords:withCompletionHandler:] (in AppKit)
22 97-[NSDocumentController(NSInternal) autoreopenDocumentsIgnoringExpendable:withCompletionHandler:]blockinvoke3 (in AppKit)
23 -[NSDocumentController(NSInternal) autoreopenDocumentsIgnoringExpendable:withCompletionHandler:] (in AppKit)
24 -[NSApplication reopenWindowsAsNecessaryIncludingRestorableState:completionHandler:] (in AppKit)
25 -[NSApplication(NSAppleEventHandling) handleAEOpenDocumentsForURLs:] (in AppKit)
26 -[NSApplication(NSAppleEventHandling) handleCoreEvent:withReplyEvent:] (in AppKit)
27 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] (in Foundation)
28 -[NSAppleEventManager(DVTAssertionOverrides) swizzleDispatchRawAppleEvent:withRawReply:handlerRefCon:] (in IDEKit)
29 NSAppleEventManagerGenericHandler (in Foundation)
30 HandleOpenDocAE (in IDEKit)
31 0x00007fff2fdbd203 (in AE)
32 0x00007fff2fdbc929 (in AE)
33 aeProcessAppleEvent (in AE)
34 AEProcessAppleEvent (in HIToolbox)
35 DPSNextEvent (in AppKit)
36 -[NSApplication(NSEvent) nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
37 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
38 -[NSApplication run] (in AppKit)
39 NSApplicationMain (in AppKit)
40 start (in libdyld.dylib)
abort() called
Post
Replies
Boosts
Views
Activity
Currently trying to port a web extension over to safari which heavily relies on the include\_globs property of content\_scripts.
Is this something Safari plans to support?
When the sandbox directive is included in the contentsecuritypolicy, even when it includes allow-scripts, it breaks all functionality from the extensions. It seems allow-scripts is simply ignored.
When including something like http: or https: in the connect-src and img-src directives of the contentsecuritypolicy of webextensions, they are simply ignored.
Other matches like https://*.example.com/ work as expected.
I'm trying to put a view (html page) from a web extension into an iframe on a website. The html file is listed correctly in web\_accessible\_resources, however when I'm trying to load it, I get the following error:
Failed to load resource: The operation couldn’t be completed. (Cocoa error -1008.)
When trying to Submit an update for review, I get the following message:
Unable to Submit for Review
The items below are required to start the review process:
You must provide copyright information for the app you are adding.
However, there is not any box where I can fill in copyright info for my app. What to do now?
What can we expect from Apple / Safari in terms of Manifest v3? When/if will it be supported? When is the end of life for manifest v2?
The extension popups don't seem to support the dark mode media query.
The only way the query gets detected is when a color-scheme is added:
<meta name="color-scheme"content="light dark">
To provide users the ability for a keyboard shortcut to open extensions, you can define this in manifest:
"commands": {
"_execute_browser_action": {
"description": "Open extension popup"
}
},
This doesn't set a keyboard shortcut yet allows the user to assign one.
However, in iOS safari, when two extensions offer this functionality, the browser warns about it. See screenshot:
Contentscripts are not executed for frames within extension popups even with all_frames set to true.
See Feedback Assistant report #9637605
Manifest.json:
{
"manifest_version": 2,
"name": "all_frames contentscript popup issue",
"description": "all_frames contentscript popup issue",
"version": "1.0",
"permissions": [
"<all_urls>"
],
"content_scripts": [{
"all_frames": true,
"matches": ["<all_urls>"],
"js": ["/content-script.js"]
}],
"icons": {
"16": "/icon.png"
},
"browser_action": {
"browser_style": false,
"default_popup": "/popup.html"
}
}
popup.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>all_frames contentscript popup issue</title>
</head>
<body>
<iframe src="https://www.google.com/error"></iframe>
</body>
</html>
content-script.js:
'use strict';
(function () {
document.head.textContent = '';
document.body.textContent = '';
document.body.style.cssText = 'background: red !important';
})();
Try to send a message from an iframe running a contentscript to the extension page containing the iFrame.
See feedback assistant report:
https://feedbackassistant.apple.com/feedback/9637664
The report includes a sample extension. If it works (like in Chrome), the text of the extension page should change to "success".
When using chrome.windows.getAll to get a list of all windows. On iOS, you get two windows, 1 normal and 1 private.
Say the current tab is a non private window. And you then try to open a window in private in the extension. It opens kinda a ghost private window which hosts inside the non-private window.
Correct behaviour is that it simply opens that tab in the only private window possible.
Also reported as feedback assistent issue:
https://feedbackassistant.apple.com/feedback/9653213
Currently extensions are not allowed to load on iOS when the background persistent key is set to true.
To allow a single code base between iOS and macOS, it's very welcome to allow the persistent key to be set to true and accept it in iOS. As currently Apple doesn't want to support persistent background pages on iOS, Safari in iOS can simply ignore the persistent key and run the background page as if persistent is set to false.
See also feedback assistant report:
https://feedbackassistant.apple.com/feedback/9676503
Since Safari 15, the extensions local and sync storage seems to be merged into one. This means operations in local storage apply to sync storage and the reverse.
This caused the users of of my extensions with more than half a million of downloads to loose all their user settings.
To keep compatibility across browsers, the sync and local storage should be separated.