Couldn't add Javascript code to iOS safari extension app

I am building a safari extension app. the code(html, css, javascript) for the safari extension that is in the AppExtension directory works good, but when I added button to Main.html to make an Action, to make the app dynamically change (the application itself not the extension), and I want to send data from the app to the extension on Safari.

Could anyone help me to fix this issue.

This my html code:

<!--Main.html -->


<!DOCTYPE html>

<html>

<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <meta http-equiv="Content-Security-Policy" content="default-src 'self'">



    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">



    <link rel="stylesheet" href="../Style.css">
    <script src="../Script.js" defer></script>

</head>

<body>
        <!--The makeAction() function is defined in the `Script.js` file -->
        <button onclick="makeAction()">Dropdown</button>
</body>

</html>

And this is the files structure

Post not yet marked as solved Up vote post of osos Down vote post of osos
847 views

Accepted Reply

Are you trying to make a Safari App Extension or a Safari Web Extension?

It looks like this is a bit of a combination of both. Safari App Extensions are not supported on iOS, only Web Extensions.

  • Safari Web Extension is supported on iOS devices, Apple announced that 2 years ago

Add a Comment

Replies

Are you trying to make a Safari App Extension or a Safari Web Extension?

It looks like this is a bit of a combination of both. Safari App Extensions are not supported on iOS, only Web Extensions.

  • Safari Web Extension is supported on iOS devices, Apple announced that 2 years ago

Add a Comment