timedtext / expo-config-plugin-ios-share-extension

An Expo config plugin to auto-configure iOS Share Extension.
78 stars 13 forks source link

expo-config-plugin-ios-share-extension

This extension allows you to easily add your applications icon to the iOS share sheet of other applications like Safari. It wil handle (nearly) all the for you, like registering the iOS Share Extension and enables Deep Linking.

Installation

Install it in your project:

expo install expo-config-plugin-ios-share-extension

In your app’s Expo config (app.json, or app.config.js), make sure that expo-config-plugin-ios-share-extension has been added to the list of plugins. Under scheme, define your apps scheme.

"expo": {
  "name": "my-app",
  "scheme": "myapp",
  "plugins": [
      ["expo-config-plugin-ios-share-extension"]
  ]
}

Package version incompatibility

Currently there is a bug in the package xcode this library depends on. For now a workaround is needed, where the xcode package get's patched automatically.

Usage

To determine which URL was passed to your application, you can read the app open url.

import { useURL } from "expo-linking";
import { Text } from 'react-native';

export default function App() {
  const url = useURL();

  return <Text>URL: {url}</Text>;
}

The format of the url is: [schema]://share/?url=[shared url]

Building

Next, rebuild your app.

eas build --profile development --platform ios

Known limitations

How it works.

-

TODO

Acknowledgements

This plugin was inspired by: