How to disable the target for application extension when building in xcode? - xcode6

I am looking a way to disable today extension target to decrease build time everytime while developing for application target.

In order to disable building/running the NSExtension you build, you should:
Click the project file in the project navigator
Click the containing app target (the one you DO want to run)
Click Build Phases tab
Open Target Dependencies or Embed App Extensions
Remove the extension (the one you DON'T want to run)
To bring it back, simply click the + sign in the same place and re-add it.

In Xcode 9 the Extension was stil visible in the Widget List of the phone.
In order to hide totally it I had to remove it from "Embed App Extensions".
The procedure is similar to the one described by nurxyz:
Click the project file in the project navigator
Click the containing app target (the one you DO want to run)
Click Build Phases tab
Open Embed App Extensions
Remove the extension (the one you DON'T want to run)

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!

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.

Create an execution file from Xcode mac project

I had created a mac app in Xcode, and i would like to create a file out of it , so that it will be a regular program on my mac, which i can run on startup , and send to other people.
I don't know if it has to be a .dmg , , or something else.
I have tried this link to do that, but the dmg is just a file that when i open, shows me the Xcode project and not run the app as like any other mac app :
Creating a .DMG (dbf answer and marc answer)
How do you create an app? a regular mac app from Xcode project ??
How do enable it to be open at startup as like any other app ?
EDIT
I can see lots of people just taking the .app from Xcode, to use as the desktop app . but for me, when i click this file .app . nothing is happens, (it open and than closed)
Thanks.
Open your project in Xcode.
In the "Products" folder on the left-hand side of the Xcode window, select .app
In the "Product" menu, select "Archive."
When Xcode has finished building your project, the Archive window will open.
On the right, near the top is an "Export..." button. Click it.
You have several options for creating your Archive. The last one is: Export as a Mac Application. That option will simply save your project as an ordinary Mac application. Click it.
You'll then be presented with a dialog in which you can select the destination folder for your application. Choose where you want your application saved, and click "Export."
In the "Finder" go to the same folder you just selected and your application will be there.
~~
To make your application open when you log into your account on your computer, open "System Preferences," select "Users & Groups," select the "Login Items" tab, click on the "+" button, find your application, click on the "Add" button.

How to link Cocoa Touch Static Library and Application Xcode 5 projects in the same workspace?

I've done the following steps:
Create an Xcode workspace
Right click the project navigator, choose new project, and add a Cocoa Static Touch Framework to the workspace
Right click the project navigator, choose new project, and add a Single View Application to the workspace
In the Single View Application's target, under Linked Frameworks and Libraries, add the libFrameworkName.a
In the Single View Application's Build Settings, add -ObjC to the Other Linker Flags
Now I'd like to go into the App Delegate of the Single View Application and #import "MyFramework" but it is not found.
What am I missing to Link the new Framework with the sample application?
I've obviously tried cleaning and building the project but that is not working. I think there must be some way to indicate that the Framework is a dependency of the Application but I'm not sure how.
In the build settings of the Sample Application search for "Search Paths". Add "../" as a recursive search path for User Header Search Paths.

How to make built app with icon?

I'm writing an OSX App and added an icon for it.
After building in Xcode, I can see the app with icon under Products folder, but when I RightClick->'Show in Finder', the built file is shown without icon. I want the built file to have an icon.
For Mac OS applications, you need to create an .icns file and include it in your Info.plist just like any other project.
Just change icon.png to icon.icns
When I submit an icon image for my app, I never add the .icns extension. It is automatically assumed by the compiler. So for the icon file "icon.icns", simply enter "icon".