Adding a Cocoa Touch Static Library as a subproject - objective-c

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...

Related

xamarin.forms xaml value cannot be null parameter name: type

I wanted to Build my Project like every day, but now I cannot Build the project because I get the following error message in every .xaml File:
the value cannot be null.
parameter name: type
What can I do?
I deleted my bin/obj Folders in Portable and iOS Project, but nothing works.
Thanks.
There is an open bug of this on Xamarin's Github
Following is what helped some people solve this issue:
I've experienced an issue when Xamarin builds changes between Android and iOS. It might be possible to workaround by the following sequence:
Select your iOS project as the startup.
Make sure the Android project is NOT selected to be built in config management.
Clean solution.
Quit VS.
Delete bin & obj from XAML project and from the iOS project.
Restart VS.
Build XAML and iOS projects.
There are more workarounds that you might check if this does not work

Can't Add ReactNativeNavigation.xcodeproj to Libraries in Xcode

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.

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!

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.

Integrating an .app inside UIViewcontroller of another app

currently I'm using an external program (Stencyl) to build my app, however I can't integrate AdMob to it. I thought I might be able to integrate my app (or xcode project) into the AdMob xcode project. Is there a way to do this? Is it even possible?
To clarify:
I got the AdMob working in XCode, I want to add an app/xcodeproject inside my AdMob's xcodeproj main window.
If what you want to do is reference one project inside another, you can do this by dragging the project file (the .xcodeproj) from a Finder window into your AdMob XCode workspace. Make sure both projects are not open at once though.