简体   繁体   English

安装react-native-custom-segmented控件,需要安装ios框架才能进行react-native项目

[英]Installing react-native-custom-segmented control, need to install ios framework to react-native project

I'm trying to install this: https://github.com/wix/react-native-custom-segmented-control into my react-native project. 我正在尝试将其安装到我的react-native项目中: https//github.com/wix/react-native-custom-segmented-control

In the installation instructions, it says to move the .xcodeproj file to my project folder. 在安装说明中,提示将.xcodeproj文件移动到我的项目文件夹中。 I dragged it to the root folder of my project (though I am not sure that is right). 我将其拖动到项目的根文件夹中(尽管我不确定那是正确的)。

Then the instructions say to add the libCustomSegmentedControl.a file to my target's library. 然后,指令说明将libCustomSegmentedControl.a文件添加到目标库中。

The project was initialized using expo and I don't think it has a xcode target project? 该项目是使用expo初始化的,我认为它没有xcode目标项目吗? I am confused as to how to proceed in installing this. 我对如何进行安装感到困惑。 Is there a secret place in a react-native app that I can find the xcode project? 在我可以找到xcode项目的react-native应用程序中有一个秘密的地方吗?

I'm a beginner with ios so any help would be really appreciated! 我是ios的初学者,因此非常感谢您的帮助!

If you created the project using expo then you need to eject it before you can install any module that expo doesn't support. 如果使用expo创建了项目,则需要先弹出它,然后才能安装expo不支持的任何模块。

You can find more info at this link. 您可以在此链接中找到更多信息。 https://docs.expo.io/versions/latest/expokit/eject https://docs.expo.io/versions/latest/expokit/eject

Expo doesn't actually have an Xcode or Android project inside the code base, so you can't add react-native-custom-segmented-control to an expo project. Expo实际上没有在代码库中包含Xcode或Android项目,因此您不能将react-native-custom-segmented-control添加到expo项目。

This post does a good breakdown of the differences between creating a react-native project using expo or react-native init 这篇文章很好地分解了使用expo或react-native init创建一个react-native项目之间的区别

https://stackoverflow.com/a/49324689/5508175 https://stackoverflow.com/a/49324689/5508175

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在现有的 React Native iOS 项目中安装 React-Native Android? - Installing React-Native Android in existing React Native iOS project? 无法为 iOS 项目 React-Native 安装 CocoaPods 依赖项 - Failed to install CocoaPods dependencies for iOS project React-Native 将react-native项目捆绑为iOS框架或(.aar)Android库 - Bundling react-native project as iOS framework or (.aar) Android library 添加了IOS QuickLook框架以响应本机 - Added IOS QuickLook framework to react-native react-native ios项目+内存泄漏 - react-native ios project + memory leak 在React Native中更改分段控件的字体大小 - Change font size of Segmented Control in React native React-native Error: Failed to install CocoaPods dependencies for iOS project, 这是这个模板所需要的 - React-native Error : Failed to install CocoaPods dependencies for iOS project, which is required by this template 如果共享我的React-Native应用程序,是否需要将ios和android文件夹放入源代码管理中? - If I share my React-Native app do I need to put the ios and android folders into source control? React-Native自定义对话框 - React-Native custom dialog React-Native:错误:无法为iOS项目安装CocoaPods依赖项,这是该模板所需要的 - React-Native: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM