Problem Submitting Safari Extension - The value '$allowedDomains' for key 'Allowed Domains' in extension EXTENSION is incorrect.

I have embedded a simple Safari extensionfor MacOS in one of my apps esentially building on the XCode template (XCode 8A218a). Everything works nicely, but when trying to submit to the App Store, Application loader reports the following error:


ERROR ITMS-90656: "Invalid Safari Extension. The value '$allowedDomains' for key 'Allowed Domains' in extension 'MYEXTENSION' is incorrect."


where MYEXTENSION is the name of my extension. The relevant segment of my Info.plist is


<key>NSExtension</key>

<dict>

<key>SFSafariWebsiteAccess</key>

<dict>

<key>Level</key>

<string>All</string>

</dict>



which is essentially the template with the access level set to All. If I use a different string (for example 'Any'), Application loader reports a more sensible message (along the lines that the key 'Any' is not valid, instead of $allowedDomains).


Has anybody managed to successfully submit a Safari Extension with full website acces to the app store?


Cheers


Morten

Replies

To answer my own question, it appears that in addition to specifiy access level 'All', it is also neccessary to set some value for 'Allowed Domains'.


A Info.plist like this works on the App Store, while retaining arbitrary website access.


<key>SFSafariWebsiteAccess</key>

<dict>

<key>Allowed Domains</key>

<array>

<string>*.*</string>

</array>

<key>Level</key>

<string>All</string>

</dict>

I think it's a bug in the web service, the documentation says that Allowed Domains should only be required for level Some. I had the same problem, I solved it by adding an Allowed Domains entry which is an empty array. File a bug report, maybe they'll fix it.

It looks like you are correct, that specifying some "Allowed Domains" is required to submit your app to the Mac App Store. However, if your Website Access Level is "All", the list of allowed domains will have no effect, so it shouldn't need to be there at all!


If you could please file a bug report at https://bugreport.apple.com, I will definitely get this pointed out to the right folks so we can remove this requirement.

My bug report was filed as #28319589.

BTW, while we're talking about bug reports, could you also take a look at #28504919, since it actually affects my app? 🙂 ("SFSafariWindow can't fetch active tab info in full screen windows")

Same problem happened but it has been resolved by your solution.

Thanks a lot!

Thanks for posting this! Ran into the cryptic error and had no idea what to do until I Googled and found this result (among no others!).

Are you still seeing this when trying to submit?

I realized I never responded to this, but this should have been fixed for a while. You're not still seeing htis are you?

I'm still seeing this error today.

@bweinstein -- as if Xcode 9.4.1 and Application Loader 3.7.1, this is still an issue. When uploading a macOS package that includes a Safari App Extension with Level set to All, the following error was shown in the Application Loader:


ERROR ITMS-90656: "Invalid Safari Extension. The value '$allowedDomains' for key 'Allowed Domains' in extension 'name.app/Contents/PlugIns/name.appex' is incorrect."


I resolved this by adding an empty array for the key "Allowed Domains".


Note this doesn't appear to have anything to due with Xcode (the extension runs just fine without the change), it's more of an issue with whatever Application Loader and iTunes Connect use to look for errors in submissions.

This should be fixed as of this afternoon. Please let us know if it happens again.

This problem still occurs when uploading an application to the app store.