0

I am using m1 mac machine, Now I am getting the below error.

Tried:

I have added erm64 and x86_64 in the Excluded Architechtures. But still it fails with the below error.

If I change the Build System to New Legacy Build(Deprecated) it not works. Deleted the derived data and cleaned the project and rerun the app it not works. Also created VALID_ARCHS and added arm64 and x86_64 for local build and archive build. (Now i have deleted this)

Build input file cannot be found in Xcode 12.5.1

error: Build input file cannot be found: '/Users/jesphin/Library/Developer/Xcode/DerivedData/app-acbwzzdkvazcpfbaiyudpfvlkwyv/Build/Products/Debug-iphonesimulator/App News.app/App News' (in target 'App' from project 'App')
sejn
  • 2,040
  • 6
  • 28
  • 82
  • try removing the space from your product name. It shouldn't contain any space. So you should use "AppNews" instead. – Ayan Sengupta Aug 17 '21 at 13:00
  • The above not worked. I also found a thing in my code, if i try to check the path of that .app file it shows App News.app in build/iphoneos. But the above shows a different path and it was in iphone-simulator. Also if I remove the Product Name it working fine. But here I can't able to build the file because the executable file not have the file name. – sejn Aug 18 '21 at 04:53
  • build/iphoneos or build/iphone-simulator depends on the run destination that you have chosen. So if a real device is chosen for run destination, it will build inside build/iphoneos or else it will choose build/iphone-simulator when a simulator destination is selected. This is the default behavior, however and can be fully overridden in your build settings. It's not possible to predict anything without knowing your complete build settings and complete project structure. – Ayan Sengupta Aug 18 '21 at 12:28
  • Two things you should consider: 1. Don't use legacy build system. 2. Double check if all files referenced inside "Compile Source" are actually in your project tree (no red/grayed out files) – Ayan Sengupta Aug 18 '21 at 12:37
  • I am running in the simulator as my destination – sejn Aug 18 '21 at 17:16
  • I have selected New Build system. Compile source has two greyed files. I have removed. – sejn Aug 19 '21 at 06:25
  • Did removing the files work? – Ayan Sengupta Aug 19 '21 at 21:15
  • No it not worked – sejn Aug 20 '21 at 05:48
  • Any update on this? – sejn Aug 25 '21 at 05:33
  • Like I said, it's impossible to predict anything without knowing the overall project structure and build settings. – Ayan Sengupta Aug 25 '21 at 05:58
  • What inputs are needed for you. – sejn Aug 25 '21 at 06:01
  • In build settings what need to be know? – sejn Aug 25 '21 at 06:01
  • I can't say. If you can create a cloned bare-bone project with the same settings that fails to build and share, that might help. Basically this can happen for numerous reasons. So frankly I don't any idea where to look into. Ideally I would have asked for the complete build output. But that's very difficult to share here. – Ayan Sengupta Aug 25 '21 at 06:09
  • 1
    Above got fixed for me. Added the answer below. Thanks @AyanSengupta – sejn Aug 27 '21 at 11:45

2 Answers2

0

I had exact same error message. I was able to run the project on simulator. But when I try to Product > Archive in order to submit to App Store Connect, I was given the error message.

For my case, removing extra folder that was not needed in "Development Assets" fixed the issue. I had the main folder of the app listed there for some odd reason. Deleted that and it allowed me to archive.

App > Targets > General

enter image description here

jonkimsr
  • 31
  • 1
  • 6
-1

The build cannot be found error resolved for me in mac m1 for my case.

Add arch in the Framework which shows the error in the xcode.

Build on simulator:

  1. Add arm64 in Exclude arch of the Target Add arm64 arm64e i386 x86_64 in valid archs of the target

  2. Add Valid_Archs as x86_64 in the framework which shown the error

    Archive Build:

  3. Add x86_64 in Exclude arch of the Target.

  4. Add arm64 arm64e i386 x86_64 in valid archs of the target.

  5. Add Valid_Archs as arm64 x86_64 in the framework which shown the error

sejn
  • 2,040
  • 6
  • 28
  • 82