Build input file cannot be found on Xcode13.1
Asked Answered
L

3

8

Question for Building

I'm using m1 mac machine. I trying to run my app no my device. But somehow an error message appeared saying, "Build input files cannot be found".

Detailed:

CopySwiftLibs /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app (in target 'finwork' from project 'finwork')
    cd /Users/evanlu/Desktop/rebackup/finwork
    export CODESIGN_ALLOCATE\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    export DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer
    export SDKROOT\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk
    builtin-swiftStdLibTool --copy --verbose --sign 22FE53F897AFEB6A2955A6C7BCB17C806EDD894A --scan-executable /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/finwork --scan-folder /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/Frameworks --scan-folder /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/PlugIns --scan-folder /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/Pods_finwork.framework --platform iphoneos --toolchain /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain --destination /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/Frameworks --strip-bitcode --strip-bitcode-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip --emit-dependency-info /Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Intermediates.noindex/finwork.build/Debug-iphoneos/finwork.build/SwiftStdLibToolInputDependencies.dep --filter-for-swift-os

error: Build input file cannot be found: '/Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/finwork' (in target 'finwork' from project 'finwork')

https://static.mcmap.net/file/mcmap/ZG-AbGLDKwfpKnMxcF_AZVLQamyA/TghJ9.jpg

And when I using Simulator. It can’t find my pod plugin.

/Users/evanlu/Desktop/rebackup/finwork/finwork/Database/FirestoreDatabase.swift:9:8: No such module 'FirebaseCore'

These are what I have been tried.

1.Clear build folder.

2.Re-install and Update podfile.

3.Check Compile Source make sure there’s not no red or grayed out files.

4.Check I didn’t using legacy build system.

5.Tracking the path

(/Users/evanlu/Library/Developer/Xcode/DerivedData/finwork-dbwrwhkrmlwsysdijoivlfbkytnc/Build/Products/Debug-iphoneos/finwork.app/finwork).

It say "finwork.app is damaged and can’t be opened" and I check brew inside, there's no finwork file inside.

6.I try to changing Build Settings to EXCLUDED_ARCHS = arm64 ,ONLY_ACTIVE_ARCH:YES It still unworkable.

Here’s my podfile:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'finwork' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!
  #use_modular_headers!
  #use_frameworks! :linkage => :static
    pod 'GoogleMaps'

    pod 'SwiftyStarRatingView'

    pod 'Firebase/Analytics'
    pod 'Firebase/Auth'
    pod 'Firebase/Storage'
    pod 'FirebaseUI/Storage'
    #pod 'FirebaseUI'
    #pod 'FirebaseUI', '>= 10.0.2'
    #pod 'GoogleSignIn'
    pod 'Firebase/Database'
    pod 'Firebase/Firestore'
    pod 'FirebaseFirestoreSwift'

    #pod 'BoringSSL-GRPC', '= 0.0.3', :modular_headers => false
    #pod 'gRPC-Core', '= 1.21.0', :modular_headers => false
    pod 'SideMenu'

    #pod 'FBSDKLoginKit'

    post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
        config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
    end
end

Complement:

The Simulator was work in the beginning but device not.

When I running on my iPhone it show me Command PhaseScriptExecution failed with a nonzero exit code. https://static.mcmap.net/file/mcmap/ZG-AbGLDKwfpKnMxcF_AZVLQamyA/ZMwVl.jpg So I changing my build setting including set EXCLUDED_ARCHS = arm64 、Deleted VALID_ARCHS、 tried to set up ONLY_ACTIVE_ARCH to yes and no (neither of them working). Then it return me No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=arm64 arm64e i386 x86_64, EXCLUDED_ARCHS=( arm64 )). After this I keep my build setting ONLY_ACTIVE_ARCH = NO , EXCLUDED_ARCHS = arm64 and Clear build folder + Re-install podfile. It started say Library not loaded: @rpath/FBLPromises.framework/FBLPromises. To solve this I change the developer account. And then It trun me into this position.

Build settings :

https://static.mcmap.net/file/mcmap/ZG-AbGLDKwfpKnMxcF_AZVLQamyA/tBIaJ.jpg

Any suggest will be helpful, Or on less tell me how did I massacred my Project. Thank you for taking your time!

Update : I just Clear build folder a few times and running by Simulator now it also showing me Build input file cannot be found. But Weirdly, I didn’t do anything to solve No such module 'FirebaseCore' https://static.mcmap.net/file/mcmap/ZG-AbGLDKwfpKnMxcF_AZVLQamyA/5kJBr.jpg

Ledda answered 8/2, 2022 at 16:27 Comment(11)
Well, how did you massacre your project? If it was working before and is not working now, what did you change?Pharisaic
@Pharisaic I was tested on Simulator befor. it's going well. But recently I need to using googlemap kit on my app. And It’s seem cannot running on Simulator. So likewise I trying to figure out on Stack. So this is the nightmare beginning. First , I running on my iphone but it didn’t work .It show me that "Command PhaseScriptExecution failed with a nonzero exit code". So I started changing my build setting Including set excluded arch、delete valid arch、trun build active architecture only to yes and no. I cannot remember all the adjust I did. But haply between these options. Hope helpfully.Ledda
Don't tell me in a comment. Edit your question to include relevant information.Pharisaic
@Pharisaic Sorry for the inconvenienc. I already adding a Complement on my question. This is first time I posting on this platform. So, If anything need to be improved. Please let me know.Ledda
Another useful point might be that when you get Command PhaseScriptExecution failed with a nonzero exit code, the build log contains more information that tells you what the actual problem was.Pharisaic
It said unbound variable. So I according this to delete my VALID_ARCHS setting. I didn’t sure this work. But at least it showing me another issue.Ledda
I already add detailed image on my question. But,Honestly I don't really understand what does message mean.Ledda
@EvanLu Is this issue resolved? If so, please tell how you did it.Lohengrin
@HongLy I unloaded CocoaPod and reinstalled, and it resolved.Ledda
did you find this solution? if yes please tell me i need thatHaulm
@Amin Rezaew As I say befor. I deleted my CocoaPod and reinstalled.Ledda
G
2

Do you want to try the same method as the image below?

Build Settings -> Architectures -> Excluded Architectures, arm64.

enter image description here

I don't know if it'll help, but I hope it'll be solved.

Geminius answered 9/2, 2022 at 13:45 Comment(2)
My Excluded Architectures is same with you. And I keep this option for a while. I can understanding the Architectures might be the solution. But I can’t getting how this work. I already add my build settings image on my question. Hope this can help to provide more clue.Ledda
So you have to exclude "arm64" architecture from the build ?Griffith
C
1

If you are ARCHIVING, and nothing else worked for you:

Make sure you REMOVE arm64 under Build Settings -> Architectures -> Release

Canine answered 23/8, 2022 at 16:16 Comment(0)
G
0

I had the same problem and solved it by going in :

build phase > pre build >

And the adding output files (input for you ?).

Griffith answered 30/9, 2022 at 23:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.