Can't Add ReactNativeNavigation.xcodeproj to Libraries in Xcode - react-native

I can't add the ReactNativeNavigation.xcodeproj file to my projects Libraries. Any ideas on how to get around this? I left click on Libraries then click add files to my project then go into node_module → react-native-navigation → iOS but then I can't click on the Xcode.proj is like a disabled button when I click on it.
I'm using Xcode 9.4.1.
Screenshot:
Solution:
Some how (probably my doing) the ReactNativeNavigation was added to the main project folder so I dragged it down to where the Libraries folder was, and the problem was solved. I suggest if you have this issue to search all the folder in your project, because it is probably already added somewhere in the project.

I discovered ReactNativeNavigation was added to the main project folder so I dragged it down to where the Libraries folder was, and the problem was solved. I suggest if you have this issue to search all the folder in your project, because it is probably already added somewhere in the project.

Related

How to link library manually?

I want to use react-native-youtube but it shows the error Native component for "RCTYouTube" does not exist, i try to find the solution it looks like i have to link the library manually if the library with native code.
But i have no idea with this link talk about Manual linking Step1 https://facebook.github.io/react-native/docs/linking-libraries-ios.html
I use type command create-react-native-app testyoutube to create my react native project, Visual Studio Code is my tool.
I'm not familiar with Xcode. I try to open my project folder testyoutube in Xcode. It will show an alert Could not open file.
If i want to follow Manual linking Step1 what step should i do ?
Here is my folder structure:
Any help would be appreciated. Thanks in advance.
To expand upon Adeel's answer:
Locate the RCTYouTube.xcodeproj at {your project root} /node_modules/react-native-youtube.
Use XCode to open your iOS project's .xcworkspace (or .xcodeproj if .xcworkspace does not exist).
Locate the 'Libraries' folder in the project navigator pane on the left hand side of the window and drag the RCTVideo.xcodeproj file inside it.
Select your project's target from the targets list pane on the inner left hand side of the window then scroll down to the 'Linked Libraries and Frameworks' section.
Click the plus symbol at the bottom of the section and use the search bar to find 'libRTCYouTube.a', select it from the results, and hit the 'Add' button.
Your library should now be linked!
You have two options to link libraries with your Xcode/Android project.
Automatic linking (run in your terminal in the root folder of your react-native project):
react-native link
Manual Setup:
It's actually very simple. Open your react native xcode project (.xcodeproject file) with Xcode.
On the left side you have the project navigator. Drag the Xcode project from react-native-youtube inside the Libraries group.
Project Navigator
Next step is to add the library to you project. Click on the left side on your xcode project in the project navigator. Go to the libraries section and add the RCTYoutube library.
After you have setup everything up, rebuild the project and you are good to go!

Xcode's default projects folder missing

I'm quite new in iOS development and right now I'm watching tutorial videos. In them I see that every time a new project is created, Xcode suggests /home/Xcode as root destination where you can store your project. This folder has even a special icon with the Xcode logo on it.
On my Mac this folder is missing. I still can save the project elsewhere but even after re-installing Xcode that folder is missing.
Any idea how I can fix that?
The /home/Xcode folder is not the default location to store Xcode projects. The home folder is hidden by default on macOS so I suggest choosing a different folder to store your projects.
It does not matter where you save your Xcode projects. Save them wherever you want on your computer.

Can't remove today view extension from iOS

I tried to remove an iOS8 today view extension from my iOS App in Xcode6, but somehow the extension is still built and always appearing on the device. I removed both the extensions files from the project as well as the build target. I also removed the application multiple times but the widget is still always copied whenever I build the application.
If you want to keep the sourcecode and only remove the today widget:
go to your app target into your project file
select General -> Embedded binaries
remove the TodayWidgetName.appex file with the minus button
do a clean
If you compile or archive you should not see any longer the today widget appearing in the iOS notification center.
I finally found a solution: in the menu go to Product > Clean and the extensions that are not used or built anymore are gone!
Apparently, there is a way of removing embedded binaries from compiled IPA package if you don't want to recompile. Obviously, after altering the package you'll have to resign it.
This is where embedded binaries are placed:
Payload > .app > PlugIns > .appex
I've tried removing the PlugIns and resigning the whole bundle - seems to be working well.

Adding a Cocoa Touch Static Library as a subproject

How do I add a cocoa touch static library as a subproject to an application project in Xcode 4 (4.5 in this case)?
I have seen lots of screenshots that show a full project nested inside another project. However, whenever I follow the tutorials I just get a single .xcodeproj file inside my project, not a whole project (with it's own project and target etc).
I've tried to create a workspace too - but still no luck. What am I doing wrong? I've seen many questions on SO that seem to be similar but nothing that has helped me resolve this.
I had tried dragging in from Finder and it seemed to work for apps but not libs. #Eiko got it in the comments to another answer... It was because the project was open elsewhere at the time. If I goto File > Close Project (on the original library project in xcode) and then drag in from Finder it works.
Drag it from finder into the sidebar of xcode.
When doing it this way just now it worked for me.
and as #Eiko points out close the project if it is open elsewhere first, since it can only be opened once...

Where is the .app program? (Mac OS X and iOS)

I'm trying to find the .app file in my project folders but I can't find it. As I remember it was just to go into the build folder in the project folder and the .app file should be there but now I don't have a build folder in those app.
Thank you in advance!
In Xcode: expand Products then, right click on your app and from the menu click on Show on Finder or Reveal on Finder.
In Xcode 4, build products are stored by default in:
~/Library/Developer/Xcode/DerivedData/AppName-lotsofrandomchars/Build/Products/
If you've upgraded to Xcode 4, things have changed. Click Product/Archive to build a release version of your app, then Window/Organizer, and select the Archives pane. Select the archive you just built, then click the "share" button towards the top right.