So im getting a 2 errors when im using phonegap to create a native ios app and im not really sure how to resolve them. Xcode and Objective-C are beyond my knowledge right now so I'm not sure what to do. They state that there are multiple build commands.
Warning: Multiple build commands for output file /Users/gcollins/Library/Developer/Xcode/DerivedData/Hanna_Instruments_App-dcesxqrxziqltacadrozhxjujrgz/Build/Products/Debug-iphonesimulator/hanna-project.app/icon-72.png
Warning: Multiple build commands for output file /Users/gcollins/Library/Developer/Xcode/DerivedData/Hanna_Instruments_App-dcesxqrxziqltacadrozhxjujrgz/Build/Products/Debug-iphonesimulator/hanna-project.app/Default-Portrait~ipad.png
Xcode tells you that you are trying to add into the bundle the same files two/multiple times.
Select your Xcode project file in "Project Navigator". Look for "Copy Bundle Resources" Build Phase, it will show all files included into your project. Delete the duplicate reference.
Related
following is the error in xcode
I have also tried build legacy from workspace settings but failed to do so.
Multiple commands produce '/Users/saifubaid/Library/Developer/Xcode/DerivedData/antispam-bjwrxskogxnnophfhgkpyxxcqcuj/Build/Intermediates.noindex/ArchiveIntermediates/antispam/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
Target 'React-Core.common-AccessibilityResources' has create directory command with output '/Users/saifubaid/Library/Developer/Xcode/DerivedData/antispam-bjwrxskogxnnophfhgkpyxxcqcuj/Build/Intermediates.noindex/ArchiveIntermediates/antispam/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
Target 'React-Core.common-CoreModulesHeaders-AccessibilityResources' has create directory command with output '/Users/saifubaid/Library/Developer/Xcode/DerivedData/antispam-bjwrxskogxnnophfhgkpyxxcqcuj/Build/Intermediates.noindex/ArchiveIntermediates/antispam/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
stuck on it. tried almost every solution.
Multiple commands produce '/Users/shubhamnagota/dev/zest/zest-app/ios/DerivedData/zestapp/Build/Intermediates.noindex/ArchiveIntermediates/zestapp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
Click on Pods App
From the list remove React-Core-AccessibilityResources
Clean Project
Build Again
Archive.
Worked for me! :)
following is the error in xcode
I have also tried build legacy from workspace settings but failed to do so.
Multiple commands produce '/Users/saifubaid/Library/Developer/Xcode/DerivedData/antispam-bjwrxskogxnnophfhgkpyxxcqcuj/Build/Intermediates.noindex/ArchiveIntermediates/antispam/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
Target 'React-Core.common-AccessibilityResources' has create directory command with output '/Users/saifubaid/Library/Developer/Xcode/DerivedData/antispam-bjwrxskogxnnophfhgkpyxxcqcuj/Build/Intermediates.noindex/ArchiveIntermediates/antispam/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
Target 'React-Core.common-CoreModulesHeaders-AccessibilityResources' has create directory command with output '/Users/saifubaid/Library/Developer/Xcode/DerivedData/antispam-bjwrxskogxnnophfhgkpyxxcqcuj/Build/Intermediates.noindex/ArchiveIntermediates/antispam/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
stuck on it. tried almost every solution.
Multiple commands produce '/Users/shubhamnagota/dev/zest/zest-app/ios/DerivedData/zestapp/Build/Intermediates.noindex/ArchiveIntermediates/zestapp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
Click on Pods App
From the list remove React-Core-AccessibilityResources
Clean Project
Build Again
Archive.
Worked for me! :)
I'm having the same issue as this guy, this guy, and this guy (nota bene, I'm actually not sure if they're all guys, per se).
They all ended up finding their own solutions, but none of them apply to my issue. I'm using Xcode 6.1 in my iOS 8 app with an included extension. The app and the extension both rely on an included framework. When I try to submit the app to the Store, the validation warning I get is "ERROR ITMS-9000: Invalid bundle. The bundle at 'xxxxx.appex' contains disallowed file 'Frameworks'".
I can't even find a file called Frameworks. The shared framework is supposed to be saved at /Library/Frameworks, which is Apple's recommended save location. The project also uses Cocoapods, which strikes me as the only other possible culprit, since it has references in its configuration files to $FRAMEWORK_PATH (though the build folder doesn't include a file or folder with that name).
OK for future viewers here's the fix:
When you create your own iOS framework (I'm using Xcode 6.1) when you build it the final product contains a 'Frameworks' folder in the framework bundle itself. i.e. MyFramework.framework/Frameworks. This happens even if you don't specify a copy files/embed frameworks build phase.
What you have to do is to go into you framework bundle, find the empty frameworks folder and delete it. This should not affect your app's functionality in any way. Then build your app and check that the embedded framework doesn't have a Frameworks folder as planned.
Your archive should now not contain the offending folder and the error should be gone!
I changed build settings > Packaging > Define modules set to YES in my extension and watch app target. Works fine for me.
In my case the solution was the following :
Try to create the script there 'problematic target' -> Build Phases' then click on + and select New Run Script Phase, the run script should go after all others. Insert there :
cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"
if [[ -d "Frameworks" ]]; then
rm -fr Frameworks
fi
Then clean the project and try to create an archive once again. These answer was provided in the following issue :
https://github.com/CocoaPods/CocoaPods/issues/4203
I hope this help you.
Continuing to work with this, I noted that my Share Extension had an "Embed Frameworks" Build Phase, with the Destination set to the "Frameworks" directory. I changed it to "Shared Frameworks" and the error has gone away.
However, another error remains: "... contains disallowed nested bundles". I thought this was a sort of umbrella error warning as a result of the original. I'll open another question for that one.
Having a problem when building with xcodebuild. My project/app builds fine with the Xcode - gui. It simply isn't finding/building the libcryptopp library which is part of the build process.
The error is:
clang: error: no such file or directory: '/Users/builder/repo/ioskpay/xcode-cryptopp/cryptopp/build/Release-iphoneos/libcryptopp.a'
This particular file should be derived from another project inside the main app - xcodebuild simply isn't correctly pointing at the right file folder which should be:
~/Library/Developer/Xcode/DerivedData
Any ideas?
To fix this, go to your project settings, go to Targets and select your main project target. Then go to Build phases. Under Target dependencies add the static library project.
This way, when you compile the main project, the static library subproject gets compiled before the main project and your static library will be available.
I had the same problem, but for a resource file .m
I opened target -> build phases -> Compile sources
and I found the file the compiler was tell it can't find duplicated: one with strange icon and the other with a normal icon. I simply removed the one with strange icon and it worked. ( I added the file multiple times and I had a merge conflict before that which made something wrong in the project file)
For your case I think you need to remove the lib from target dependencies list and add it again. This may work for you.
In Xcode Version 9.2 (9C40b) this happened when I drug a bunch of files into the project, some of which were duplicate. Rather than simply not adding the duplicates, it added them again and only the name, not the path.
In Target > Build Phases > Compile Sources each of the duplicates showed with no "...in" after them. Each one caused the clang error.
After removing all of the duplicates that Xcode collected, the project compiled and ran.
It makes you use the Project Navigator instead of managing your source files in the Finder. Then the Project Navigator can't replace duplicates like any decent file management system (ahem Finder). 🤨
My xCode info is:
I faced similar errors during xcode building projects (native swift, flutter, react native, native script) in which I got error messages related to clang compilar. Errors like:
clang-4.0: error: no such file or directory: '/Users/xxxxxxxx/Library/Developer/Xcode/DerivedData/xxxxxxxxxxxxxxx/Index/Data Store'
clang-4.0: error: cannot specify -o when generating multiple output files
others
Despite of errors related with DerivedData for native apps can be fixed by deleting the directory and, eventually, restart xCode and even restart the machine... in this case, you will see that after deleting the directory and start building process again, the error comes back.
Then, is the moment of checking the clang installation by running clang --version. The normal output will be something like:
as you can see the InstalledDir is incorrect for xCode. In my case, some days ago I needed to install Anaconda app (R, Python, etc) and, now, I remember that I had to install some dependencies and one of them was clang and its installation was altered.
To fix this problem (in my case that I will not need anaconda any more): (edited)
1.- Delete anaconda and all its dependencies (I recommend to use App Cleaner).
2.- Re-install xCode
After reinstalling xCode, if you type again clang --version, you'll get this:
More info at: https://github.com/flutter/flutter/issues/32457#issuecomment-496161092
Hopefully, this info helps some else.
Best
Ok so by simply adding the correct -target -configuration and -scheme parameters I got this to run correctly. However due to my running this in Jenkins for autobuild purposes it still doesn't work as I'd like - getting stuck in exactly the same place. It's odd because I have the exact same code being built in another job that isn't having this problem. There is no rhyme or reason for it at this point. I will keep shooting rubber bands at it and update when I have an answer...
Sometimes Xcode performs weird.
You have to find that static library project e.g.. "filename.a" under 'Link Binary With Libraries' in Build Phase and then remove it and add it again.
I had the same problem while I was archiving my target. I removed the library and the build succeeded.
For me it was because I had removed a package or pod. I ran pod install and it fixed it
Look for the missing file in the Xcode project i.e the files may be deleted or miss placed.
add the missing files to the xcode, then everything will work fine.
Run this command :
$ conda deactivate
I can use the prebuilt framework provided on the plcrashreporter project page when compiling for the device, but not for the simulator. I have the same problem described here.
I assume the prebuilt framework does not support the simulator's architecture, so I downloaded out the plcrashreporter source. I opened the Xcode project and selected the CrashReporter-iOS-Simulator > iPhone 4.3 Simulator target. When I try to build the project, I get this error:
libtool: unknown option character `D' in: -D__IPHONE_OS_VERSION_MIN_REQUIRED=30000
I get the same error when I try to build most of the other targets (such as for device).
My next step was to try adding the source files to my project. I no longer have the aforementioned problem; however, I get this error when I try to compile:
fatal error: 'crash_report.pb-c.h' file not found [2]
#import "crash_report.pb-c.h"
^
1 error generated.
Command clang failed with exit code 1
The crash_report.pb-c.h file which is mentioned in the error message simply does not exist; I've searched the plcrashreporter source tree and the internet. Therefore, I have to assume that this file is supposed to be generated somehow, but I cannot figure out how.
(Commenting out the line in PLCrashReport.m on which crash_report.pb-c.h is included results in numerous other compilation errors.)
You are correct in that the file does not exist normally, nor does crash_report.pb-c.c exist, which will be your next error after this one.
The crash_report.pb.h and crash_report.pb.c files are generated at compile time through a build rule. You need to add a custom script to your build process to make them.
First, make sure you have protoc-c in the plcrashreporter folder of your project (plcrashreporter-1.0/Dependencies/protobuf-2.0.3/bin/protoc-c). They buried it deep. This is what your script will be running.
Then find your crash_report.proto file. This is the main input that protoc-c will be using to create your missing files. You can take this directory and put it manually into your script, OR you can make a rule to run the script on every *.proto file. I do the latter.
Then edit your build rules to include a script that runs protoc-c with the flag --c_out="${DERIVED_FILES_DIR}" and your crash_report.proto file as two inputs, this will output crash_report.pb-c.h and crash_report.pb-c.c into the same directory as where your crash_report.proto file is, which should already be accessible in your project.
The build rules in Xcode 4 (and above) are under your project's target's build rules tab. You add a build rule before all your other build rules. Here's what mine looks like in Xcode:
You'll probably have to fiddle with the directory