使用博览会反应原生链接?

2022-01-23 00:00:00 javascript react-native expo exponentjs

如何使用 react-native 链接或如何使用指数在 IOS 和 Android 中手动链接第三方库.

How can I use react-native link or How can I link a third party library manually in IOS and Android using exponent.

我试图链接 react-native-image-crop-picker 但无法在指数中使用.

I was trying to link react-native-image-crop-picker but unable to use in exponent.

推荐答案

你不能.它非常清楚地说明了这一点 在文档:

You can't. It states this very clearly in the docs:

但没有原生模块……

Expo 的最大限制是,如果不分离并使用 ExpoKit,就无法添加自己的原生模块.继续阅读下一个问题以获得完整的解释.

The most limiting thing about Expo is that you can’t add in your own native modules without detaching and using ExpoKit. Continue reading the next question for a full explanation.

如果你想使用任何需要react-native link的东西,那么你需要分离你的项目,然后开发它使用或没有 ExpoKit.这样做时,您将失去某些功能和集成(在我的脑海中,我认为通过 Expo 推送通知就是其中之一),但这是 Expo 作为一体化包提供的权衡.分离时,您会失去这些功能.

If you want to use anything that requires react-native link, then you need to detach your project and then develop it with or without ExpoKit. You will lose certain features and integrations (off the top of my head, I think Push Notifications via Expo is one of them) when doing so, but that is the trade-off Expo provides as an all-in-one package. When detaching, you lose those features.

相关文章