Running Swift 4 code on Xcode 8.3 - issue with Xcode Snapshot - ios

I am facing issues with XCode snapshot.
Actually I have Xcode 8.3.3, but I need to run Swift 4 project on it. Upgrading OSX and Xcode version is not an option for me.
I followed the accepted answer from here: Is it possible to compile Swift 4 on Xcode 8.x?
I downloaded Xcode snapshot (latest, 30th Dec release of toolchain) from https://swift.org/download/#snapshots
and made the required settings of toolchain. However, I am encountering a strange issue.
Again, to resolve this, I tried the accepted answer on link Could not build Objective-C module '_SwiftUIKitOverlayShims'
however, even this does not seem to work. Please suggest where I am going wrong.

Related

Anyone facing Xcode crash with building with Xcode 12?

Our app was building fine till Xcode 12 beta 2. But since beta 3 all the Xcode version just crashes whenever I try to build the project. Not able to build for simulator as well as devices. I saw similar issue discussed on swift forum where, recommended setting is to remove valid_arch. I tried that solution, but it doesn't work for me.
Spent more than 2 weeks behind this. It will great help if anyone can help here.

Xcode 11 (beta 4) can't compile my otherwise compiling project (under beta 3, 2 and 1): unrecognized compilation parameter -fstack-protector-all

It's july and, probably as many developers in the iOS departments of many companies, our company is also testing the different betas of Xcode 11 whenever they get released in the Apple developer portal.
We're dealing with a somehow big solution made up of many pods, internal pods, sub-projects, etc...
Xcode 10.2.1 can compile it perfectly.
Xcode 11 beta 1 can also compile it (after some Realm issue solvable via Podfile and branching to some Realm fix branch)
Xcode 11 beta 2 can compile and test our complex solution without problem
Xcode 11 beta 3 can compile and test our complex solution wihtout problem
Xcode 11 beta 4 can't even compile just a silly Swift file pertaining to any given module.
What's the error Xcode gives? Something really strange as far as I understand:
<unknown>:0: error: unknown argument: '-fstack-protector-all'
Command CompileSwiftSources failed with a nonzero exit code
We've read the Xcode 11 beta 4 release notes from Apple, and we haven't found any known issue related with this command line compiling parameter. We've also tried to see if any other known issue may be side related to this error, and as far as we understand, we haven't found anything either.
If we don't touch our project (that means our code, our .project files, etc...), we uninstall Xcode 11 beta 4, and then we restore beta 2 (and or beta 3), we can compile (and thus testing afterwards) our solution without any problem again.
If we carefully uninstall beta 2 (and or beta 3) to reinstall beta 4 again, we're faced again with that strange and simple error.
So our question is:
-Is it a known fact? Has Xcode 11 beta 4 (Swift (?)) compiler(s) ceased recognizing this '-fstack-protector-all' parameter ?
Any hint about what can be causing this? We're carefully checking Xcode "command line tools" are pointing to the correct version every reinstall of Xcode.
Greetings and thanks.
I've read the apple release notes for that problem and can't find anything too.
I would suggest to wait, till the release date of XCode 11. Till that, you can use the running beta versions.
You can also use Apples Bug Reporting for that.
Well, I just installed beta 5, and the problem just disappeared... Our complex solution builds from scratch again... 🤷🏻‍♂
Our team was afraid it might be some other thing... But luckily this time, beta 4 won't get any QA round, and will be completely skipped.

How to open a Xcode 11 Beta 4 project in Xcode 10?

I worked on a project in Xcode 11 Beta 4 and then downgraded to Xcode 10 and can't open the project.
I want to submit my app to the app store, but I kept getting error messages in Xcode 11 beta 4. I'm a beginner and I know I tampered with the build settings trying to make it work. I deleted Xcode 11 and downloaded Xcode 10 to try and archive through that, but now I can't even open the project with Xcode 10.
I started the project on Xcode 9, I believe. I tried archiving, but there was an "SDK Version Issue", something with the old iOS. So I updated my Mac's operating system, and replaced Xcode 9 with Xcode 11 beta. That came with many more errors trying to archive, and I changed architectures and proxies and all that. So I deleted Xcode 11 and tried Xcode 10 but I can't open the project.
It says:
"cannot be opened because it is in a future Xcode project file format. Adjust the project format using a compatible version of Xcode to allow it to be opened by this version of Xcode."
How do I solve the problem?
You are probably getting a ton of Swift errors. The release notes for beta 4 acknowledge this is an issue.
The official workaround is to a custom build setting with the name LD_VERIFY_BITCODE, and set it to NO.
Just remember to remove when issue is resolved!
If problem still persists for XCode 11 beta 4, then try setting "Library Search Paths" to :
$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
Credit: https://stackoverflow.com/a/57126566/5576675
I update Xcode to 14.1, and fix this Hundreds of compile errors.
You can try to update newest xcode.

Can't build iOS app with Mapbox

I do all steps from Mapbox integration tutorial (https://www.mapbox.com/install/), which BTW, doesn't work. Then I try to find some answers here. So, my problem is:
At this point I don't know why it's not working or what I am missing.
I try do new project step by step from Mapbox tutorial many times, it doesn't work. Xcode version is 8.1
Because of comment #jmkiley I did update MacOS and then Xcode and problem disappear. Maybe I did not notice the min. requirements
The tutorial (if I still see good) never writed, that you need to have specific version of Xcode. I think its support at least last version. I used Xcode version 9.+ but should work with now current version 10.+ too. Of course specific Xcode version need specific macOS version.
Error above is not very useful for get what the real problem is.
I found question, where autor use Xcode 8 but with macOS Siera so maybe is more important version of macOS than Xcode, but that is only hypotesis

Xcode 7 ValidateEmbeddedBinary error Could not read data in foo-WatchKit-App.app

I am trying to do a full build on an iOS App with a WatchKit App as well.
When compiling the full project for Archive I am seeing the following
ValidateEmbeddedBinary DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/BuildProductsPath/Release-iphoneos/lifa93.app/Watch/lifa93-WatchKit-App.app
cd /Users/lordandrei/Projects/git/X7/lifa93
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-embeddedBinaryValidationUtility /Users/lordandrei/Projects/git/X7/lifa93/DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/BuildProductsPath/Release-iphoneos/lifa93.app/Watch/lifa93-WatchKit-App.app -signing-cert *9F…FB* -info-plist-path /Users/lordandrei/Projects/git/X7/lifa93/DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/InstallationBuildProductsLocation/Applications/lifa93.app/Info.plist
error: warning: Could not read data in /Users/lordandrei/Projects/git/X7/lifa93/DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/BuildProductsPath/Release-iphoneos/lifa93.app/Watch/lifa93-WatchKit-App.app
I have tried:
toggling between Debug and Release
toggling No Install and No Validate.
revoking and replacing all profiles (Signing, adhoc, dist)
So far nothing has made a dent.
Suggestions welcome as I am in a holding pattern trying to build.
Xcode: Version 7.0 beta 3 (7A152u)
iOS: 9.0 beta 3 (13A4293g)
Radar: 21975256
I had this issue when I was trying to build to my iPhone 6+ and Watch. I had just re-installed Xcode 7 Beta because I accidentally deleted one of the needed frameworks. I tried building several times and received the same "Could not read data..." error. I finally built to the simulator successfully, AND THEN built to both devices and it worked.
My issue now is that builds to Apple Watch seem to take forever to run or pass "Attaching...".
I don't know exact reason of your problem, but I created new project that includes WatchKit App target as well. And it works fine, no problems with building process.
I am using Xcode 7 beta (7A120f).
That's why I propose 3 potential ways to resolve the issue:
1. Create new new project from scratch and migrate source and resource files from your current project to new one. I had similar problems (it wasn't related to WatchKit app) previously and this trick helped me.
2. Install latest version of Xcode. Xcode 7 beta 4 is released on 21st of July.
3. Install Xcode (7A120f). This is version that I am using, you are using different one. I don't think that it will help, but who knows.

Resources