Xcode 12 Problems: "Build input file cannot be found "- Building for release on a react native app - react-native

When I try to do an archive build for "any iOS device", I receive this error:
Build input file cannot be found: '/Users/.../Library/Developer/Xcode/DerivedData/[app]-czrkuohjfzuzxxfobfoyptxhyoyo/Build/Intermediates.noindex/ArchiveIntermediates/[app]/InstallationBuildProductsLocation/Applications/[Product Name].app/[Product Name]'
I received this same error when building for an iOS simulator, but this post fixed it - Problems after upgrading to Xcode 12:ld: building for iOS Simulator, but linking in dylib built for iOS, architecture arm64.
I am also receiving a warning concerning the architectures that may or may not be relatable to the error:
None of the architectures in ARCHS (arm64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64, armv7s, armv7) which is not in EXCLUDED_ARCHS (arm64).

Build for "Any iOS Device" (for example, "Archive" because you want to upload to AppStore):
Delete arm64 from "Excluded Architectures"
Delete x86_64 from VALID_ARCHS
Add arm64 to VALID_ARCHS
All this changes on both "Build Settings", project and target. And if you want to build for simulator do the inverse path:
Add arm64 to "Excluded Architectures"
Delete arm64 from VALID_ARCHS
Add x86_64 to VALID_ARCHS
That works for me.

So I had the exact same issue. After updating to Xcode 12 I had originally set both my project and target 's 'Excluded Architecture' to arm64 in order to run on Simulator. But, as you mention, that blocks anything from working on Release / Real device. All I had to do was switch to 'Any iOS Simulator SDK = arm64' instead of all of them, see screen shot below:
link to screenshot

This error started happening for me with a SwiftUI app. I didn't need the file for my project, but the settings were set to generate a file anyways. What worked for me was to go into Project Navigator --> App Target --> Build Settings --> Packaging and delete the value (file name) for the Info.plist File key.

This problem wasted a lot of my time after upgrading to xcode 12, using React Native 0.63. Excluding architectures did not work for me.
Symptoms: "build input file could not be found..." when running on device in debug AND release. Simulator worked fine.
To Fix: Editor > Validate Settings... > Perform Changes
Now my app builds fine on device.

I know this question has been answered but this piece of information may help someone: This kind of error may also be produced if you have no node_modules folder e.g. you have deleted it and forgot to re-create it

Related

eas ios build fails with error you must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE)

I'm trying to build my react-native expo (46) app with an eas build and get this error:
ld: '/Users/expo/Library/Developer/Xcode/DerivedData/.../FBAEMKit.framework/FBAEMKit' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '/Users/expo/Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../FBAEMKit.framework/FBAEMKit' for architecture arm64
saying that I must enable Xcode setting ENABLE_BITCODE.
Is there any way to give this settinh in eas.json or app.json?
As stated in the comments by #brentvatne it's a problem with FBAEMKit that is used by react-native-fbsdk-next (I use the version 11.0.1)
I was able to get rid of the problem adding
"bitcode": "Debug"
in app.json under in the ios part.
(Please note that my IDE gave me an error but it was still valid and I'm now able to build my app)

xcode the file couldn't be opened because you don’t have permission to view it

I have an Xcode project with Cocoa Pods installed which I added a tvOS single view app target. I shared with the tvOS target all the pod installed.
When I build and run my iOS target everything is ok, but when I run the tvOS target I get this error
"ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
So after searching on the web I found a solution to this error. If I go to the Build Settings for the tvOS target and under Valid Architectures I remove arm64 and type armv7 the error disappears but then when i run the project i get this:
So if I leave the arm64 I get the first error, if I remove it I get the other one...
Someone knows how can I fix it?

xcode 8.3 framework not found FileProvider for architecture armv7

When I'm using xcode 9 beta 6 building a react-native project, it works fine.
But after I change to xcode 8.3, it builds failed, and shows me these information:
ld: framework not found FileProvider for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Apple Mach-O Linker (ld) Error Group
: Linker command failed with exit code 1 (use -v to see invocation)
How could I do if I use xcode 8.3 to develop ? I'm not able to use xcode 9 because of this: Xcode was crashed after adding ART.xcodeproj into Library
Thanks to all bros : )
FileProvide framework is only available in Xcode 9. You need to download and install Xcode 9 manually if you want to continue working on Xcode 8 environment,
I get this error too after updating my framework via cocoapods:
ld: framework not found FileProvider for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You need to copy the FileProvider framework from Xcode 9 into the directory of Xcode 8.
Download the Xcode 9 release version here.
After install, go to Application folder, right click on the Xcode9.app, select Show Package Contents.
Go to this directory:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/
Copy the FileProvider.framework, and paste into the same directory of Xcode8.app.
Restart your Xcode8, clean your project and rebuild it.
One way to fix this is to go to:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/
and put FileProvider.framework to your project (such as copy, paste, then drag and drop to Project's Frameworks Group).
Then wait until XCode 9 is released and remove it.
Edit: There is a problem with this approach though, the app ran on iOS < 11 will crash because the binary for FileProvider won't be found.
To work around this problem:
add FileProvider.framework to your project on XCode 8.x
link binary with libraries
then unlink it.
the project should build without problem now.
And when you build with simulator, you should copy the FileProvider.framework into
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/
I also have this problem, and I solved it by clean and rebuild project.
Try to restart your computer and clean derived data.

Works on Simulator, fails on device: error: WatchKit App doesn't contain any WatchKit Extensions

I am seeing the following error when trying to run a project on a real device, in the simulator it runs fine.
error: WatchKit App doesn't contain any WatchKit Extensions. Verify that the value of NSExtensionPointIdentifier in your WatchKit Extension's Info.plist is set to com.apple.watchkit
Things which may or may not be relevant
I am using cocoa pods in both the watch and main app target
The project is mostly objective-c but has a few swift files
Xcode 8.1 (8B62)
Device Software Versions: iOS 10.1.1 & WatchOS 3.1
Deployment Info > Deployment Target: iOS 10.0 watchOS 3.0
Things I’ve tried
I have checked several times that all the correct files belong to the watch target. I may have missed something here, but I assume it wouldn’t run on the simulator if this was the case
Bundle identifiers
main app’s identifier: < app id >
watch app’s bundle identifier: < app id >.watchkit
watch app’s WKCompanionAppBundleIdentifier: < app id >
watch extension’s bundle identifier: < app id >.watchkit.extension
watch extension’s NSExtension>NSExtensionAttributes>WKAppBundleIdentifier: < app id >.watchkit
NSExtension>NSExtensionPointIdentifier: com.apple.watchkit
WKWatchKitApp is set to YES in both the Watch Extension and the Watch App
I have removed and re-added the .appex from Build Phases>Embed App Extensions
Ensuring Mach-O Type is set to executable in all targets
Re-installing pods as described in this answer
Clearing derived data
Clearing build folder
Restarting Xcode
I tried an archive and this failed with the same error
In lieu of an answer, advice on debugging / troubleshooting this would be appreciated too.
I've seen this intermittently, but usually rebuilding a second time fixed it. I've never got to the bottom of why.
I've always assumed it's a bug in Xcode.
Sorry can't be more help, but you're not alone in seeing this.
I encountered this error, with 3 other errors.
Turned out the problem is that Valid Architectures is set incorrectly. Under Build Settings, make sure Valid Architectures includes i386 and armv7k.
Once that is fixed, the watch extension will be build, and all errors gone.

Xcode doesn't create iOS .app release file (products). How to fix this?

I've updated to the latest version of Xcode 4.5.1 and I have some troubles. When I build debug version of the project and run it on iOS simulator everything works just fine. But when I switched to release flavour in project schema and build project nothing happened. I mean project runs on simulator, but Build folder of my project remains empty.
I tried to follow this advice
Why doesn't Xcode 4 create any products?
but in the created folder DerivedData there are only logs and indexes folders and no .app files.
So the question is: How to get executable on real iOS6 device .app file in Xcode 4.5.1? I'm really a newbie and the delivery/deployment process in iOS is unknown to me.
Change your choice of deployment devices to an actual iOS device (don't use the simulator). After that, execute an "Archive" build (Product -> Archive). This option will be grayed out if you don't choose to deploy to an actual iOS device.