MaxAst / expo-share-extension

Expo config plugin for creating iOS share extensions with a custom view.
MIT License
205 stars 4 forks source link

inconsistency in sharing URLs #28

Closed kayode0x closed 4 months ago

kayode0x commented 4 months ago

TLDR: sharing URLs from safari works, but it doesn't from the website itself (i guess that uses navigator.share(...))

app.config.js

[
    "expo-share-extension",
    {
        height: 700,
        activationRules: [
            { type: "url" },
            { type: "text" },
            { type: "image" },
            { type: "video" },
        ],
        backgroundColor: {
            red: 255,
            green: 255,
            blue: 255,
            alpha: 0,
        },
        preprocessingFile: "./ShareExtension/preprocess.js",
        excludedPackages: [
            "expo-font",
            "expo-updates",
            "expo-dev-client",
            "expo-splash-screen",
        ],
    },
]

https://github.com/MaxAst/expo-share-extension/assets/60462284/52ce623a-6196-4691-acbb-6ef91cad5591

kayode0x commented 4 months ago

figured the preprocessing.js file and it's activation NSExtensionActivationSupportsWebPageWithMaxCount rule clashes with activationRules: [{ type: "url" }]. dropped the file, and everything works now.

MaxAst commented 4 months ago

glad you resolved it! I actually mention this in the README, but should probably throw an error during prebuild (or filter out the url activation rule if a preprocessing file exists