1、导入 import { Platform } from 'react-native';
2、使用 Platform.OS == 'IOS' ? doAFunc() : doBFunc()
就这么简单。