Xcode 12 update breaks Pods and Products - xcode

I just updated Xcode to version 12. When I open up a previously working project I now get an error No such module 'GRDB'. I have tried deintegrating and reinstalling the Pods, cleaning the build folder, and restarting Xcode. Additionally, when I look under my Pods the Products and Frameworks are colored red (view picture).

One observation: This issue only appears when building for the Simulator, building for the device works fine.
I go to build settings and find the problem my Architectures is arm64:
and I change to Standard architectures for every target in my Pods project :

I came across a "solution". I am not sure why this fixed the problem but when I was running into build issues, I was building for an iOS simulator. If I change the build to "Any iOS Device (arm64)" or to my iPhone then the issue goes away.

Related

Executable Not Found. xxx.app is not a valid path to an executable file

Details
Executable Not Found
Domain: DVTMachOErrorDomain
Code: 5
Recovery Suggestion: /Users/riber/Library/Developer/Xcode/DerivedData/digitalCurrency-hiyiyrokjaydkiagjimlwohehrtu/Build/Products/Debug-iphonesimulator/digitalCurrency.app is not a valid path to an executable file. Please rebuild the project to ensure that all required executables are created. Check your project settings to ensure that a valid executable will be built.
System Information
macOS Version 11.4 (Build 20F71)
Xcode 12.5 (18205) (Build 12E262)
Timestamp: 2021-06-11T16:34:20+08:00
Check if all files are available.
Targets -> Build Phases -> Compile Sources
If you see faint files, then they need to be removed or added.
Under "Build Settings" - "Architectures" check that you don't have "arm64" excluded under "Excluded architectures" for release, as all new iOS devices use this architecture.
I'm also get the same error. Let me share how I fix it.
I write cpp code on vscode.
I deleted a .cpp/.h file that I didn't need anymore a few days ago.
Everything nice and happy when I working on vscode.
".app is not a valid path" appeared when i switched back to the xcode to verification function.
I was confused.
(I don't immediately remember my delete operation a few days ago)
The key isn't the dialog showed "Executable Not Found",
Switch to "Issue Navigator" and drag to the bottom...
Now the ERROR shows up in front of U:
Finally the solution is :
TARGETS -> Select your ‘Target' -> Build Phases -> Compile Sources :
Select the ".cpp" file that had been delete, then "Remove Items" by click the second "-" button in the lower left corner.
I fixed it by adding x86_64 to VALID_ARCHS. Build Setting search "VALID_ARCHS",check the x86_64 is there or not, add and run.It worked with me .
resolve it using pod install.
as Frank said, I also use RN in my app.
I have tried clean derived data & even reboot, still happening
Check the Executable File in the Info(.plist). It should be named the same as your Product in Products
I have this issue on a react native application and I can resolve it reinstalling cocoaPods.
pod install
Inside the ios folder on your react native project.
Check if you have any other info.plist-s added to project.
I had similar issue when I added some pod sources (MKStoreKit) to the project - it had several info plists for different platforms which interfered with original one. Deleting wrong info plists solved the issue.
I have to delete the 'DerivedData' folder:
$ rm -Rf ~/Library/Developer/Xcode/DerivedData
EDIT: I've found a solution...
The problem in my case was because of project configurations and Pods. In the long life of my project the configuration files for the schemes changed and Xcode, using the new build system, did not like.
To fix it, just go to the Project -> Info tab. Under Configurations change the Based on Configuration value of the Targets and set them to None. Please note that I've changed only the Targets.
Now close Xcode and launch pod install from the Terminal.
reopen Xcode and launch your project.
Old answer:
I may have found a workaround to this issue... not a solution but a workaround.
I have to work on a not really recent project that was built using the Legacy System that, as you may know, is deprecated now.
While I was using Xcode 12 everything was fine. Then I installed the Xcode 13 GM and I upgrated the project to the new building system and I started to experience this issue. I have the same problem with any Xcode 13.x version. With the betas I had not, as far as I can remember.
The strange thing is that "sometimes" (I could not reproduce it sorry), the new build system worked... but just for a while.
The building phase succeeds but then, then the app is installed on simulator OR on a real device, I have that annoying message that we know...
This morning I may have find a solution...
In Xcode go to File -> Workspace Settings, keep the Legacy Build System and check the box "Do not show a diagnostic issue about build system deprecation"
Now the app builds and can be installed.
Honestly I don't know it is an Xcode bug or not... maybe it is.
if you are using git, there's huge chance there might be conflict in .pbxproj due to multiple people adding stuffs together. During the resolution xcode might try to recover those 'lost references' it got confused and unable to resolve the once there references. find those 'recovered references' in project explorer and remove them if they are invalid
Had the same issue. I deleted the simulators and added them again.
Please make sure that your runner isn't missing AppDelegate.swift or Runner-Bridging-Header.h file.
In my case, my AppDelegate.swift file and Runner-Bridging-Header.h files were deleted, so I copy and paste both the files in ios>Runner folder again from some other project (usually both of these files are same in all projects, just need to add the code lines for firebase configurations).

PODs Failing to compile after xcode update

I just updated my xcode to Version 10.1 (10B61). After doing so, my pods don't work. See below error messages. Aside from PKHUD, the error messages don't provide suggestions as to how to fix this issue. Per online sources, I've updated my OS to High Sierra 10.13.6. Any suggestions on how to get the app to compile? It was working before the update.
On Xcode, select the Pods project and on the left panel select the frameworks that are causing the issue. On Build Settings, browse for Swift and make sure you have correctly set the version you have installed of those frameworks.
You can check that framework is fine after you tweak that value by compiling the framework after selecting it.
Just run cmd+B to compile and check if it build successfully. If you don't see the framework on the list just go to manage schemes and add it.

A valid provisioning profile for this executable was not found IOS 12 but launches still in IOS 11, xcode 10

this is driving me insane. I updated my device to IOS 12, and my xcode to v10. when I try to test it, it gives me the error stated in the heading.
then I inserted another device that uses ios 11 still, and in that device it launches with no problems.
Image of error
please help guys. I have already tried deleting the everything from provisional Profiles and downloading manual profiles from xcode, it still gives me this error on ios 12.
I was having a similar issue, and it started when I updated my Xcode 9 to Xcode 10.
The same error:
A valid provisioning profile for this executable was not found.
However, it fails to build on a device that runs on iOS 11. I can build on a simulator or even archive and deploy to AppStore, no matter the iOS version I set on the deployment target.
I was reading the update notes for the Xcode 10 and noticed the following:
Build Performance
New build system improves performance and is enabled by default for all projects
I was ready to downgrade my Xcode, but as a last resort I went to "File/Project Settings" and selected "Legacy Build System" from the dropdown.
Now it builds with no issues.
And yes, I'm using the Ionic3 framework too.

Xcode 4 - Error Starting Executable

I've been working on a project in Xcode 3.2.5 and today I tried migrating it up to Xcode 4.0. It compiles just fine; I can navigate to and execute the .app without a hitch (as expected). The only thing that is screwy is the fact that Xcode cannot launch the application, and displays the following error when it tries:
"Error starting executable. No executable file specified. Use the "file" or "exec-file" command" (image not available)
I've scoured the Project and Xcode settings and have been googling for half the day, but all I can find are dead ends and people bashing other people about breaking Apple NDA. FYI Xcode 4 has been released, and is no longer under NDA.
Should I just start a new project and copy in my source? Sounds wrong to me, but brute force works when brute force works.
Thanks in advance
At a guess, the schemes it set up for you based on your v3 targets and build settings might not be quite right. From the schemes menu, choose to edit the current scheme, then select the Run action from the list and make sure the appropriate exectuable is selected.
I ran into the same issue this question came up so I spent my time identifying the issue, reproducing the issue, narrowing it down and explaining as best I could how to not make it happen - as well as the general frustration that comes with an issue like this (it hit me on 2 different versions of Xcode in 2 weeks).
If you're going to delete my post then at least take the time to try and answer the question as I had tried to do.
Now, on to the reply that actually tells how this issue may be created and how to avoid that.
I JUST had this happen creating an app for iOS. Why? I renamed my target executable.
Just tested this by checking out a new copy of the source and rebuilding.
The app ran fine on my device.
Went in to Xcode 4.2, renamed the target. Ran the app. "Error starting Executable..."
I changed the filename back. Same error.
Cleaned and ran the app again and it launched.
Renamed the app, cleaned and ran it again. Not so much luck.
Don't rename your app by renaming the target.
This is such a stupid limitation. Apple lets you rename your target app, but by doing so, this prevents your app from launching on the device.
EDIT: I haven't checked in any code, but now I can't check out and build and run any app without this happening. How do you get the device/xCode out of this state once you've gotten it in to it?
Even the app now crashes on launch at int retVal = UIApplicationMain(argc, argv, nil, nil);
This is in Xcode 4.2 on Snow Leopard, but I got into the same state with Xcode 3 on another Machine last week.
Edit 2: Rebooted the device, rebooted my Mac. Built and ran in the simulator first, then on the Gen4 iPod touch. It works.
I had this issue when migrating a project from Xcode 4 to 4.1, and it ended up being due to the Target's "Product Name" being different in the debug and release configurations. A holdover from when I changed the name of the product many versions ago. So check that...
I've downgraded Xcode from 4.2 to 4.1 only to encounter an error at build and run on device: "Error starting executable. Don't know how to run ...". I've cleaned the project (Xcode > Project > Clean) and cleaned the build folder (Xcode > Project > (hold option key) Clean Build Folder). After that I had to build again and it built okay on iPod touch 4g running iOS 5.
Well, it sure sounds like a whole family of bugs behind that error message!
I got the error after loading up an Xcode 3 project under 4.2.x for the first time.
None of the above tips worked for me, however what I eventually did was switching from GDB to LLDB.
That fixed it.
It looked like the new path to the executable wasn't properly recognized by GDB (i.e. once locally at PROJECT/build/Debug/... in Xcode3 but now in the usual temp. folder location with Xcode 4 it was still looking for the executable in the build folder relative to the project sources)
I duplicated the target and rename the copied on to different name, I got this error message. What I did is to clean the project, exit Xcode, restart the Xcode, then it can run on my device.

Getting "Missing SDK in target picChoice: iphoneos4.0" error when building a test release of my app in Xcode 4, pvw 5

I have opened a functioning Xcode 3x project in Xcode 4.0 pvw 5 and am getting the following error whei I try to build a debug version of the app: "Missing SDK in target picChoice: iphoneos4.0"
I am trying to find where and how to remedy this, and I am coming up with bupkus.
I apologize if this is not very clear, but I am rather flummoxed by Xcode 4 so far....
Your problem was probably that Xcode 4 only came with SDK 4.2, and the project pointed to 4.0.
It's pretty common!
The solution is to go to the project info | Build settings | Base SDK and setting it to "Latest iOS" so that you don't have to touch it for future updates.
When you close the window, you'll have to switch config from debug to release or distribution and back so that it updates and Xcode removes the "Missing SDK" problem.
I just wanted to put the full answer up here to help others who have the same problem ;)
Ok...I resolved this, but I did not properly track HOW I resolved it....
I think my Target's Base SDK was not set, and I set it to: Latest iOS (iOS 4.2)....
I think that's how I did it....
But, now it builds with no errors and loads onto my iPhone as expected.
That is exactly what you needed to do. Xcode 4 introduced the Latest iOS. If you wish to test the app for older versions, select target > summary > deployment target and set that to an older iOS version and then in simulator you will see more version options available to you.

Resources