安装
yarn add react-native-share
iOS 下
npx pod-install
Android 下
当前版本无需其他处理
使用
import * as React from 'react';
import { View, StyleSheet, TouchableOpacity } from 'react-native';
import EvilIcons from 'react-native-vector-icons/EvilIcons';
import Share from 'react-native-share';
const HomeScreen = () => {
const shareOptions = {
title: '分享的标题',
message: '分享的消息',
url: 'https://clwy.cn',
subject: `来自「长乐未央」的分享`,
};...