Change active build target xcode 4 - compilation

I am not able to run the TestXcodeColors.app in this project

Product / Edit Scheme...
Choose the "Scheme" aka "Target to build" in the drop down that says "Scheme" and hit "OK"

Related

Teamcity: Force force sequence build

I have 2 configurations:
Build App
Build Installer for App
Sometimes I want to rebuild installer without rebuilding App, so I cannot add snapshot dependency to "Build Installer".
But sometimes I want rebuild App and Installer. OK, I add third configaration "Build App and Installer", add 2 snapshot dependencies (to "Build App" и "Build Installer"), press "Run" and "Build App" and "Build Installer" runs in parallel.
So question is: how to make "Build App" and "Build Installer" to run sequenced ?

Linking React Native Libraries: "RNNotifications.h" not found

I am trying to use the react-native-notifications library but I am getting a file not found error when I try to import "RNNotifications.h".
I followed the "Linking Libraries Manually" guide on the React Native docs. Play by play, this is what I did:
Step 1:
I opened my project on Xcode, clicked my project's name, opened its "Libraries" folder, then used Finder to add "RNNotifications.xcodeproj" (a file located inside my project's node_modules/react-native-notifications/RNNotifications folder).
Step 2:
Made sure my project was selected, targeted my project's name, then added "libRNNotifications.a" in "Build Phases" under "Link Binary With Libraries".
Step 3: I went under "Build Settings" and added the following path to my "Header Search Paths":
$(SRCROOT)/../node_modules/react-native-notifications/RNNotifications
I did so with the "non-recursive" option because there are no sub-folders inside the RNNotifications folder.
Step 4:
I went inside my project's "AppDelegate.m" and added the following import statement:
#import "RNNotifications.h"
After these four steps, I get a "'RNNotifications.h' file not found" error.
On step 3 when you search for "Header Search Paths" make sure to select the target which is your projects name, you can do this by looking at the left tab, you should see the Project tab with the xcodeproj file under it and another Targets tab. just select your project under the Targets before searching for "Header Search Paths" then add the path there
$(SRCROOT)/../node_modules/react-native-notifications/RNNotifications
This image shows the TARGETS tab which you must select first
As I experiences with these issue.
I have no idea with this package installment.
It's working fine in Android, but not in iOS.
But I have solved it by re-create RNNotifications.h and RNNotifications.m into directory of the main project instead.
Because Main project it's connected with Firebase Library directed.
But if we call from RNNotifications project, you will got error by 'RNNotifications.h' file not found
Here is my structure and edition sample for you, hope it will be help you for some idea:
I had the same problem, so what I did is steps 1, 2, and 3 you have listed above, but before I did step 4, close Xcode and open it which will re index the project or workspace, then type your import statement and it should work, thats what worked for me. If you don't restart xcode or close and open your por
Strangely enough, this seems to have resolved itself. I did nothing differently, nor did I make any modifications--I suppose it is another "wonderful" quirk of Xcode. – user8951490 Jan 25 at 12:17  
Use pod install and this will install required library

Xcode - Add a target app to main app

I have an application in Xcode which I can compile.
When I do a Product -> Archive I am getting a macOS App Archive which I can export and publish.
Now I created a 2nd target in my project which is also an .app and which I want to be added to the 1st .app.
So I added a "Copy Files" Build Phase to my 1st target, set the destination to "Resources" and added my 2nd target to the list.
When I now do a Product -> Archive I'm getting a Generic Xcode Archive which I cannot export as an .app.
Am I missing something here?
Thanks

Xcode - duplicate Target - new Target fails to build

using Xcode 3.2.5 on 10.6.6 (10J521) and now 10J537.
I have an Xcode project containing 1 Target: "MyApp". It builds and runs successfully.
As well as source and resource files, the Target contains a "Copy Files" build phase which copies "Sparkle.framework" in. The framework is in the same directory as the project.
I want to duplicate this Target. Steps taken:
Did "Clean all Targets".
Right-clicked on the "MyApp" Target within Xcode, and then chose "Duplicate".
Renamed the duplicated target to "MyAppTarget2".
Selected "MyAppTarget2" as the Active Target from the popup menu in the top-left.
Did "Build".
The problem:
error: Sparkle/Sparkle.h: No such file or directory
At the line:
#import <Sparkle/Sparkle.h> // In MyAppDelegate.mm
This is puzzling! Further info:
Each Build step appears to have been replicated in the duplicated Target, including the "Copy Files" phase.
The Sparkle.framework itself exists in the project's folder.
In the "Link Binaries with Library" phase of both "MyApp" and "MyAppTarget2", I am linking to the Sparkle.framework at the above location. A "Get Info" on the linked binary reports that it is a member of both Targets.
If I right-click on the Sparkle.framework file within the "Copy Files" build phase of the duplicated Target, and select "Reveal in Finder", then the correct Sparkle.framework file is shown. The required file exists at Sparkle.framework/Headers/Sparkle.h
If I switch back to the original "MyApp" target, it builds and runs successfully.
Am I doing something obviously wrong here? Thanks.
[EDIT - SOLVED]
I had a look at the Build settings for each supposedly-identical Target.
Under "Framework Search Paths", the first Target had this:
$(inherited) "$(SRCROOT)"
But the duplicated Target had this path:
$(inherited) \"$(SRCROOT)\"
It appears that Xcode incorrectly escaped the path during the duplication process. Ouch.
I know you have already solved this issue yourself, but I thought I'd share my fix for this issue (as it has happened to me several times). I've always been able to get rid of this error by deleting the file in question and just recreating it. I have no idea why this works... but, as is often the case with XCode, there seems to be some Voodoo at work.
Build Phase copy is still broken in 12.5! It does only copy a few of the source targets build phases. What a crap IDE.

How to add a 'Copy Files build phase' to my Target

I am trying to use a framework that requires me to add a 'Copy Files build phase' to my target. Does anyone know what this means and how to do it?
In Xcode 5, you have to click on your target, then on Editor (menu bar) --> Add build phase --> Add Copy Files Build Phase:
Right-Click on your target in XCode, select add "new build phase" and then "new copy files build phase".
A "DIY" answer: Go to Xcode --> Help --> type your query, e.g., "add copy". And Xcode helpfully points you in the right direction.
In Xcode 4, the option is in Editor->Add Build Phase.
The Copy Files build phase then appears in the Project Navigator and you can add things to it by clicking the plus.

Resources