Xcode 11 GM Seed 2 freezes while building workspace/project - ios

I have recently downloaded new Xcode 11 GM Seed 2 so that i can update my project to support Dark mode. (I am already on MacOS Catalina latest beta version-19A558d).
I have my project(workspace with pods) working 100% fine with Xcode 10.2. When I have started building same project with newly installed Xcode 11 GM Seed 2, It randomly freeze while building with title Building X of Y tasks. It randomly stops building any file at anytime. As per my different observations, It stops building while it is building library from my Pods.
I have already tried cleaning, manually deleting derived data files. Also, i have tried by reinstalling Xcode. Also restarted Mac to give try. All trial get failed. If anyone faced same issue and know the solution, please post here.

Disable the Swift Optimizer for SwiftSoup:

I were trying all day hard to solve this issue. Finally issue get resolved.
Actually i tried to build/compile the app via Terminal. Then i found that it got struck/freezed while compiling the files from installed 3rd party libraries from pods. The 3rd party library named SwiftSoup was making problem. Then i removed that pod, and commented out the code related to that. And tried compiling/building the app again. And It worked successfully this time.
UPDATE:
I followed #Paul's Answer, that works without removing pod, keeping same pod and code working. Just need to update settings as described by him. But make sure, that you need to change this setting every time you update your pods.

Related

Building/archiving for release hangs indefinitely in Xcode 11

I'm trying to release an iOS app - it builds fine on simulator or device in Xcode 11, and can be archived fine in Xcode 10, but when I try to archive it for release in the App Store the build hangs indefinitely. I hit Product > Archive, it completes 3960 out of 4040 steps, and then hangs in indefinitely at the stage of "Archiving Firebase/Firestore". This is happening on 4 different Xcode 11 versions - 3,6,7 and most recently the GM that was released earlier today.
I've tried flipping a bunch of the build settings - the Optimization flags, incremental/whole modules, enabling Bitcode, exclusive memory, and have also reinstalled Xcode with different 11 versions a few times. I've also tried this with various versions of cocoapods, including the Firebase/Firestore pod that is being compiled when the build hangs (i.e., I've used an old version and tried updating to the latest version of the pod) Nothing I've done has worked. Does anyone have any advice for other things I could try to stop this from hanging?
#leonluc-dev tracked this infinite loop down to a Swift compiler bug building the SwiftSoup CocoaPod.
Full description here.
See this answer for a screen shot of disabling optimization of Swift Soup to work around.
It seems to be a bug with Xcode 11. I reported the issue to the Firebase team over here:
https://github.com/firebase/firebase-ios-sdk/issues/3884#issuecomment-533663539
and I also reported the issue to Apple using feedback assistant (bug FB7303206). I'll update this answer when Apple responds.
If you're also using Firebase Crashlytics, moving
"${PODS_ROOT}/FirebaseCrashlytics/run"
after
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols"
in your Run Script phase should solve the issue.

What's wrong with my Xcode 8? I cant even compile new project?

I have two Xcode in my computer. Xcode 7 and Xcode 8. I work with Xcode 7 a lot because some projects cannot be migrated successfully into Swift 3, and I don't have enough time to go over every errors. But when I have new project, I use Xcode 8.
I remember that I have successfully using Xcode 8 to create a project without problem in the past. Today, I create open that project again in Xcode 8, but there are hundreds of errors. I tried to create new project, and compile. I also get lots of errors. Why is this happened?
EDIT: Anyway, it's resolved now, after I reinstall the Xcode. But that doesn't addressing the problem at all. But I can't reproduce it again now.
Your project is successfully running in my x-code.
Sometimes, x-code issues may be you face like this one. Now you re-installed the x-code so your project is running properly.
When you want to migrate project from swift old version to updated then you face this kind of issues.

Xcode 8 no longer builds to device

I'm currently running Xcode 8.1 beta and have a stable release of Xcode 8 installed as well.Out of nowhere, without modifying any code inside the project, I am unable to build my project and run on a device.iOS version is 10.1 beta but the issue was not present when originally working with this version. Xcode 8 and 8.1 are experiencing the same issue and I previously did not have a problem running the project on a physical device.The provisioning profiles were up to date and I created new ones throughout the troubleshooting process.I have also gone through the basic troubleshooting options (restart the machine, restart the device, cleaned project, tried different lightning cable/USB port, reinstalled Xcode, and deleted Xcode preference files).The project builds and runs very quickly to the simulator and when attempting to run on the device I received no errors.When trying to run on a device, the build goes through the first tenth of the process and just sits there until I cancel it. I've even created new test projects to test against a known good and the issue persists.If anyone has experienced, a similar issue your insight would be greatly appreciated.
I was facing the same issue but installed latest Xcode 8.1 and issue got resolved
When you have multiple versions of Xcode installed the command line tools loses track of which Xcode to run. Make sure that this is set. Having multiple versions has always been troublesome for me.
The issue ended up being with a large number of dictionaries. The compiler was attempting to go through a rather large number of dictionaries and was unable to complete. I restructured my data model and the issue was resolved.

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.

Errors while compiling an old project in newer version of Xcode

I've an old project to start work on it. Client told that it was completed in 2012, and may be with v.4.3 or some older version of Xcode. It was only targeted for iOS v.6 and previous versions. Now client wants to make some upgrades and make it compatible for all iOS devices having iOS v.7 and/or above.
I'm running Xcode v.6.3 with iOS v.8
When I firstly open up the project and run – I got too many error (actually those should be come as warnings and not errors) from GPUImage framework. I solved it one-by-one. After solved those errors, when I run it again, I failed-up with few more error of SDKs not found. I can confirm that all SDKs are added properly. And its never changed, after the project was created. However its giving me errors.
Is there something that we've to setup when we run an old project (in latest Xcode and current iOS target)? Do we need to change architectures? Header search paths?
Note, all SDKs and app source code was on Github and added as submodules to the app. I have successfully cloned it in my Mac.
Please ask me if you want more information on this.
The following steps could solve your problem. I am not 100% sure but it worked for me once. Worth a shot.
1) Go to Build Phases and remove the FacebookSDK.framework
2) Clean
3) Link back the FacebookSDK.framework to your project
4) Clean and Run

Resources