Multiple build commands for output file in Xcode - xcode

My xCode project for an OSX app gives me the following error.
Warning: Multiple build commands for output file
/Users/myusername/Library/Developer/Xcode/DerivedData/Flui-dpvozbfxcmsipwfrrannskcofgit/Build/Products/Debug/appname.app/Contents/Resources/Icons
Is this something I should be worried about or fix immediately?
Also is there a way to make this go away?

Open the Copy Bundle Resources from the Build Phase in your project. Find the duplicate files in that list and delete their references.

Related

How to get a Run Script phase to run first during compile in xcode?

In xcode 10.2, there is a run-script build phase. I have a script to copy a framework to a specific pod in DerivedData/somename-someguid/products/etc...
However, it seems that the script is not running first based on the print statements and it fails to find the file. If I manually copy the file there first, I can see the output of my script in the build log and it succeeds.
I tried dragging it up in the build-phase panel. I also tried adding it to the copy-file section, but copy does not understand how to embed with the correct pod.
Is there a way to specify the order of running these scripts? Is there a pre-everything section I don't know about?
Of course, it turns out I had the run script phase on the main app project instead of the pod project targets not realizing it built the pods first. So adding it there fixes it. Saving other noobs from this mistake by leaving the question up....

Project ... cannot be opened because it is missing its project.pbxproj file

I recently downloaded LLVM-3.9 and built XCode project files for it with:
mkdir llvm-3.9.0.XCode # The .XCode in the name was probably a bad idea
cd llvm-3.9.0.XCode
cmake -G Xcode ../llvm-3.9.0.src/
The cmake then generated a valid looking XCode project files.
Then when I tried opening the project directory with XCode, I kept getting error:
Project .../llvm-3.9.0.XCode cannot be opened because it is missing its project.pbxproj file.
Apparently this error message is often the result of corrupt project files, but this is not the problem in my case. It seems this error can be shown due to different reasons. Here are some similar, but not identical questions that did not help me:
One about merge problems.
A question about where the file shoud be.
One about dropbox problems?
One where the problem seems to be corrupt project files
One where the problem was permissions
The solution I used was this:
cd llvm-3.9.0.XCode
cd LLVM.xcodeproj
open .
In other words, I navigated to the newly generated LLVM.xcodeproj with the shell
and used the system open command on that folder.

The application bundle does not contain a valid identifier

I try to run my project but i get the following error "The application bundle does not contain a valid identifier."
here my info.plist
I followed other answer on the question. I don't have any "Ressources" folder inside my project.
Thanks for your help
I solve this problem after I delete all build files by Xcode.
Your build file path at Xcode > Preferences > Locations > Derived Data
If you didn't change the default path, Your path is like
I just deleted all files under DerivedData
In my case, this problem occurred when I manually removed a pod from my file browser in XCode.
In order to fix it, I deleted the associated entry in my podfile, and ran 'pod install' from the terminal.
Additionally, I had to delete the relevant search paths and other references to that pod. And of course I had to clean the project.
In my case, my app's bundle contained a dash like com.some-thing.app so I just changed it to com.something.app and the problem was fixed.
In my case, the value for "Bundle Identifier" key was missing in Info.plist
In my case the info.plist had the wrong encoding format, I still don't know why it changed. So I had to create a new one from Xcode and copy paste all the keys.
Cleaning the project solves my issue. Product -> Clean
I was building the wrong target on a device in my case. I was building the Test target rather than the normal app target.
In my case, I've added a framework into Embed Binaries phase, but it was already in my Link Frameworks and Binaries phase, which created a duplicate entry. Once I deleted one of them, this error starting appearing.
To fix it, I've removed the framework from both build phases and added it one more time
For my case, it's caused by a wrong Info.plist in a framework(lack of Bundle identifier and Executable file)
Use ideviceinstaller -i xx.app can see the detailed error log.
I ran into this issue trying to run flutter build ios, where the errors were related to trying to access WatchOS and TvOS simulators. For now, not sure how to disable that.
What worked was to run flutter run
In my case, the framework info.plist lack of Bundle identifier.
use cmake create dynamic framwork misss Bundle identifier of the info.plist

Crashlytics Won't Pass "Add a Run Script Build Phase"

After installing Crashlytics and checking out the source code for the project I am helping out with, I add a build phase script and add the following code:
./Crashlytics.framework/run <api_key>
This initially worked until I blew away my changes. I then tried to build and was missing my Crashlytics.h file. I then tried to reconnect the app but I get stuck at the "Add a Run Script Build Phase".
I have tried removing Crashlytics and reinstalling it without success. Does anyone have insight into how I can get things running again?
Thanks in advance!
Check Debug Information Format for Debug, and Release. They should be DWARF with dSYM File.
dSYM file is in order to show debug symbols. The Run Script will upload dSYM file.
Make sure that you have pasted Run command bellow the Shell /bin/sh field:
I was able to fix this by manually grabbing the Crashlytics files that are generated and import them into the project. They are generated in the Crashlytics folder when you add the run script build phase, but not imported.

Xcode 4 not outputting .app package when building OSX project

My Xcode 4 project is not actually building the .app bundle that it is supposed to when it finishes building. What are some reasons why this might be happening? The build process is not giving any errors, but it simply isn't giving me an app bundle which I can execute. What might be causing this?
The build output directory changed in xcode4. Open the Organizer (projects tab):
The built .app is located in the Derived Data directory, in this case:
~/Library/Developer/Xcode/DerivedData/GKTapper-dbndueflsmkgokewelsloryzthni

Resources