Only in Xcode8.3 get this error 'AppleMach-o Linker Error :Invalid bitcode signature;Linker command failed...' - bitcode

this error only happen in xcode8.3, in xcode8.2 and xcode7 it work fine

I had this error too and managed to "fix" it by making sure I was opening the .xcworkspace file rather than the .xcodeproj file. It was confusing because using the .xcodeproj had been working fine, then suddenly stopped - I am not sure if I hit "clean". In my project, I was referencing Pods which it was not building. Anyway it seems fine now! If anyone has a more deeper understanding of what is going on I would love to learn about it.

I had this error too!
First, this error may be caused by "Enable Bitcode" option in Build Settings. I turned it to NO, and it had been builded success.
There maybe some library that it has no bitcode in it in your project. If you Enable Bitcode of your project with that library, it would be builded failed.
I hope that would be useful for you.
To see more about bitcode of Apple:
App Thinning (iOS, tvOS, watchOS)

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).

Xamarin Forms error when compiling in release mode for Android - No resource found that matches the given name 'Base.V21.Widget.Design.AppBarLayout'

I am getting the following error when I attempt to compile in release mode to put my application in the Android App Store. I do not get the error when I compile for debug mode.
I have found references to similar errors. They seem to revolve around the android support services not matching the Android SDK. I am running on the Android 28 SDK. I have updated my google support libraries to the v28.0.0 in NuGet. I am running in macosx and am using vs mac.
I am quite at a loss on this issue. Any suggestions are appreciated.
TIA
...../obj/Release/lp/40/jl/res/values-v26/values-v26.xml(0,0): Error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Base.V21.Widget.Design.AppBarLayout'. (APT0000)....
Ok, I'm not sure that I have "solved" the problem completely, but I have at least solved it for the moment. I kept digging into the output and found a funny character in the custom proguard.cfg information in the build output. I opened the proguard.cfg file that I had created in notepadd++. Sure enough, notepadd++ is set to encode with the "UTF-8 with BOM" setting. I changed that, resaved, rebuilt, and no errors. I'm going to keep a watchful eye on this, but the problem for the moment is resolved. Thanks for everyone's input. It was much appreciated. :-)

Xcode internal errors when testing with swift

I started having peculiar problems when using XCode.
Whenever I try to write test with swift, XCode shows an internal error and all the code turns white.
This happens even if I remove the #testable annotation from the code.
I tried reinstalling XCode, but this did not help.
The code builds just fine so I don't have a clue where the problem might lie.
I'm unable to properly develop tests this way, my modules are not recognised, I have no error checking or code completion.
Here is a screenshot of how the problem looks:
Would love to get any guidance on this issue...
So I guess for now there is no good solution to this problem.
It seems to be caused by crashes of SourceKit.
Fortunately the problem is not solved (partially) on my end.
I decided to make this answer a compilation of different things to try when experiencing this:
Restart - try restarting both Xcode and the PC
Clean the project (shift-command-K)
Build your code, I noticed that sometimes it occurs when you just have unrelated build errors somewhere in your project - make sure it builds
Delete the DerivedData folder rm -Rf ~/Library/Developer/Xcode/DerivedData/, but you can also delete it from Xcode
Delete the cache rm -Rf ~/Library/Caches/com.apple.dt.Xcode - Currently this seems to help the most
I will edit and add more solutions if I find any

Packaging error when switching to arm64 (arm5 was OK)

I just plugged in a new iPhone 6, created a provisioning profile and then I launched the app I'm developing on the device. It compiled fine, but at linking stage it errored out with:
ProcessProductPackaging
...
error: class '(null)' of input object does not respond to either selector writeToFile:options:error: or writeToFile:atomically
I cannot find any information of what that is. I do not get any specific code reference to relate it to. Did anyone experience this?
Personally I was able to solve this issue by rebuilding the project a second time. I think I was only experiencing it after revoking and requesting a certificate.
Odd for it to jump at me and disappear though.
I just restarted Xcode then the error was disappeared
I've tried turning the "Automatically managed signing" off and on again, then the issue disappeared. Note: rebuilding didn't help for me, cleaning either.
I removed an external library and related code I had and it's now working.
I just changed some provisioning setting and then restarted the xcode afterwards the error was disappeared and archived and then uploaded successfully
Rebuilding the project does the job for me. Actually I was making changes in capabilities while Xcode was building that makes build failed.
The error occurred after I made manual changes to the Xcode .entitlements and Info.plist files: I removed some entries. None of the above mentioned solution attempts worked for me. Every try to create an archive failed.
The solution was to go to Xcode's Capabilities section and switched everything on and off again.
I had the same problem specifically on an App Extension we used for Push Notifications, and I was using Automatically manage signing but it seems the App Groups in capabilities were failing, so I just had to make sure the App Groups were retrieved correctly and this fix it.
Also if you have .entitlements files, and you have App Groups there, make sure they are the same you are using in the capabilities configuration.
Restarted XCode and enabled and disabled to Automatically manage signing

Installing and Using Pantomime Framework... Pantomime/Pantomime.h not found

I just downloaded and compiled Pantomime for SMTP use in my Cocoa Application. The first issue was that it is old... so I changed the build settings to use the most recent SDK as well as eliminate the old PPC build settings.
After those changes, everything compiled nicely (or at least appeared to do so.)
Next, I installed the Pantomime.framework into the /Library/Frameworks directory per Apple documentation recommendations.
Then, I imported the framework into my project under the Build Phases tab where it says "Link Binaries to Libraries".
So far everything seemed to work as it did with WebKit.framework, and ScriptingBridge.framework.
Finally, I added the following to my code:
#import <Pantomime/Pantomime.h>
I got as far as "Pa" when it auto completed the rest, so it apparently knows what I'm looking for. However, when I try to compile my code, I receive the following error:
Lexical or Preprocessor Issue "Pantomime/Pantomime.h" file not found.
All of the other frameworks seemed to work, but this one does not, and I really don't know why (I'm relatively new to working with frameworks.)
Anyone have any ideas on what I'm doing wrong here?
Thanks!
I've never used Pantomime, but this happens to me all the time with Xcode, so although I'm a newbie to development in general I'd wager it's just a bug with Xcode. Here's how I fix it:
In Xcode, hit command-1 to switch to the Navigator's file/folder view.
Reveal the Pantomime.h and .m files in the Finder, wherever you've stored them.
Drag them into the Navigator.
Xcode will prompt you to confirm adding again, and I usually leave it set as is to "copy files if needed".
Xcode will import. You should then delete the old references in the Navigator. It should work fine after that.
I have met this problem.
The solution is setting 'Build Settings' --> 'Header Search Path' Value where your pantomime is. Good luck!

Resources