"Build input file cannot be found:" - when running: xcodebuild - swift

error:
Build input file cannot be found: *(this contains the folder and
project info) *.../build/Debug-iphoneos/StaffIS.app/StaffIS'. Did you
forget to declare this file as an output of a script phase or custom
build rule which produces it? (in target 'StaffIS' from project
'StaffIS')
Then it complains that:
The following build commands failed: ExtractAppIntentsMetadata (in
target 'StaffIS' from project 'StaffIS') CopySwiftLibs *(this
contains the folder and project info) *
/build/Debug-iphoneos/StaffIS.app (in target 'StaffIS' from project
'StaffIS') (2 failures)
It compiles just fine in Xcode, never an issue. I don't see any StaffIS files in the project, it is the project name however.
I simply want to run a command-line build without failure.

Related

Getting 'Multiple commands produce' error with duplicate output file warning in Xcode 13.0

I am getting below multiple commands produce error while running the application in Xcode 13.0.
Multiple commands produce '/Users/XYZ/Library/Developer/Xcode/DerivedData/AppName-dsntzothkrspqbfirwzgyvntjirn/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/GoogleAppMeasurement/AdIdSupport/GoogleAppMeasurement.framework':
1) That command depends on command in Target 'GoogleAppMeasurement' (project 'Pods'): script phase “[CP] Copy XCFrameworks”
2) That command depends on command in Target 'GoogleAppMeasurement-AdIdSupport' (project 'Pods'): script phase “[CP] Copy XCFrameworks”
And also getting duplicate output file warning as mentioned below: -
duplicate output file '/Users/XYZ/Library/Developer/Xcode/DerivedData/AppName-dsntzothkrspqbfirwzgyvntjirn/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/GoogleAppMeasurement/AdIdSupport/GoogleAppMeasurement.framework' on task: PhaseScriptExecution [CP] Copy XCFrameworks /Users/asif.raza/Library/Developer/Xcode/DerivedData/AppName-dsntzothkrspqbfirwzgyvntjirn/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleAppMeasurement-AdIdSupport.build/Script-CAAD1E7A7F15E98CC87B30D71A33FD1C.sh
Could someone please help me out to resolve this issue?
Thanks in advance.
Solution found: After removing below ‘Pods_AppName.framework’ from ‘Link Binary With Libraries’ in Build Phases as showing disabled. Removed all derived data then Clean Build folder and and run.

pod trunk push - error: Unexpected duplicate tasks

I'm trying to create a new cocoapod which I built.
I've tried everything I know, playing with the build settings, playing with build phases and even starting a fresh new empty project - nothing helped, and I keep getting the following errors:
error: Unexpected duplicate tasks:
1) Target 'IdFramework' (project 'Pods') has copy command from '/var/folders/j7/zvtf1r056n37blpr07lwpg_80000gr/T/CocoaPods-Lint-20210520-91577-hknniq-IdFramework/Pods/IdFramework/IdFramework/Info.plist' to '/Users/{username}/Library/Developer/Xcode/DerivedData/App-bmefgfaejhpjtdfjtbeehlmhmllt/Build/Products/Release-iphonesimulator/IdFramework/IdFramework.framework/Info.plist'
2) Target 'IdFramework' (project 'Pods') has copy command from '/var/folders/j7/zvtf1r056n37blpr07lwpg_80000gr/T/CocoaPods-Lint-20210520-91577-hknniq-IdFramework/Pods/IdFramework/IdFramework/Info.plist' to '/Users/{username}/Library/Developer/Xcode/DerivedData/App-bmefgfaejhpjtdfjtbeehlmhmllt/Build/Products/Release-iphonesimulator/IdFramework/IdFramework.framework/Info.plist'
warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
warning: duplicate output file '/Users/{username}/Library/Developer/Xcode/DerivedData/App-bmefgfaejhpjtdfjtbeehlmhmllt/Build/Products/Release-iphonesimulator/IdFramework/IdFramework.framework/Info.plist' on task: ProcessInfoPlistFile /Users/{username}/Library/Developer/Xcode/DerivedData/App-bmefgfaejhpjtdfjtbeehlmhmllt/Build/Products/Release-iphonesimulator/IdFramework/IdFramework.framework/Info.plist /var/folders/j7/zvtf1r056n37blpr07lwpg_80000gr/T/CocoaPods-Lint-20210520-91577-hknniq-IdFramework/Pods/Target Support Files/IdFramework/IdFramework-Info.plist (in target 'IdFramework' from project 'Pods')
** BUILD FAILED **
I checked again and again, and there's nothing under Copy Bundle Resources - In fact the project gets compiled fine in XCode. I also tried to use the Legacy Build System - without success.
I'm using the latest version of cocoapods, with XCode 12.1.
What can possibly be the issue?

xcodebuild command crashed from extension assets

When I run a build using fastlane or xcodebuild, I get an error:
"The following build commands failed:
Compile As set Catalog /Users/admin/Library/Developer/Xcode/DerivedData/.../Intermediate Build Files Path/UninstalledProducts/iphoneos/LotteriesWidget.appex .../ LotteriesWidget/Resources/Assets.xcassets"
Assets.xcassets Location set in "Relative to Group", changing this setting produces no results.
This error exists if Assets.xcassets are Copy Bundle Resources for my Today Extension. If you move them to the application target, the build and archiving succeeds, but the resources are not displayed.
How can I fix this ?

Create NSManagedObject Subclass... make a new Error in my project

i want to add a class for my entity by Editor\Create NSManagedObject Subclass... menu . but when i added it , the project made an error , this is the message:
Multiple commands produce '/Users/mohsenkhodadadzadeh/Library/Developer/Xcode/DerivedData/walk-fcnteanemrfigmfaalqkvwigvwqc/Build/Intermediates.noindex/walk.build/Debug-iphonesimulator/walk.build/Objects-normal/x86_64/WalkEntity+CoreDataProperties.o':
1) Target 'walk' (project 'walk') has compile command for Swift source files
2) Target 'walk' (project 'walk') has compile command for Swift source files
Multiple commands produce '/Users/mohsenkhodadadzadeh/Library/Developer/Xcode/DerivedData/walk-fcnteanemrfigmfaalqkvwigvwqc/Build/Intermediates.noindex/walk.build/Debug-iphonesimulator/walk.build/Objects-normal/x86_64/WalkEntity+CoreDataClass.o':
1) Target 'walk' (project 'walk') has compile command for Swift source files
2) Target 'walk' (project 'walk') has compile command for Swift source files
i changed that build system to Legacy Build system in File->Project settings . but it diden't work yet
this project made with xcode9 and i develope it with xcode 10 now
Select the xcdatamodeld file in the project navigator, select the entity and press ⌥⌘3 – in Xcode 13 ⌥⌘4 – to show the Data Model Inspector.
If you created the class manually the Codegen popup must be set to Manual/None otherwise the class file is created implicitly.
In Xcode 11
1.Remove info list from Build Phases > Copy Bundle Resources
2.Remove Created Subclass from Build Phases > Compile Sources
Than Run if its not working use legacy build settings
From: File > Project Settings > build settings > legacy build settings

VSTS - build definition error in solution file

This is probably something simple that I am doing wrong as I am new to VSTS.
I have uploaded my existing .NET website project to VSTS and when I run a build definition in VSTS, I get an error in the solution file.
I can see what the problem is....the solution file has the pathway of the project on my PC in it...which is stored in inetpub/wwwroot/VSProjects on my PC.
Is there something simple I am missing to avoid this? There is probably a certain way that a .net website should be uploaded to vsts to avoid this pathway error?
Thanks for any help...
Here are the build solution log errors -
2018-01-19T16:34:14.3619604Z C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /PropertyRegister -p ..\..\..\..\..\..\inetpub\wwwroot\VSProjects\PropertyRegister\ -u -f PrecompiledWeb\PropertyRegister\
2018-01-19T16:34:16.1411730Z ##[error]ASPNETCOMPILER(0,0): Error 1003: The directory 'd:\inetpub\wwwroot\VSProjects\PropertyRegister\' doesn't exist.
2018-01-19T16:34:16.1419278Z ASPNETCOMPILER : error 1003: The directory 'd:\inetpub\wwwroot\VSProjects\PropertyRegister\' doesn't exist. [d:\a\3\s\PropertyRegister\PropertyRegister.metaproj]
2018-01-19T16:34:16.1806460Z Done Building Project "d:\a\3\s\PropertyRegister\PropertyRegister.metaproj" (default targets) -- FAILED.
2018-01-19T16:34:16.1818301Z Done Building Project "d:\a\3\s\PropertyRegister\PropertyRegister.sln" (default targets) -- FAILED.
2018-01-19T16:34:16.1837158Z
2018-01-19T16:34:16.1837587Z Build FAILED.
2018-01-19T16:34:16.1873374Z
2018-01-19T16:34:16.1882800Z "d:\a\3\s\PropertyRegister\PropertyRegister.sln" (default target) (1) ->
2018-01-19T16:34:16.1884216Z (ValidateProjects target) ->
2018-01-19T16:34:16.1885795Z d:\a\3\s\PropertyRegister\PropertyRegister.sln.metaproj : warning MSB4121: The project configuration for project "PropertyRegister" was not specified in the solution file for the solution configuration "Release|Any CPU". [d:\a\3\s\PropertyRegister\PropertyRegister.sln]
2018-01-19T16:34:16.1886267Z
In VS Build task, you should specify the publishproj file instead of sln in Solution option of the VS Build task for your website project.
You can specify the detail relative path for the publishproj file or use wildcards to match the website project you want to build as below examples: