Posts

Post marked as solved
19 Replies
44k Views
Using Xcode 12.2, the specific error is "building for iOS Simulator, but linking in object file built for iOS, file '.../FIRAnalyticsConnector' for architecture arm64". I've seen reports of this as an Xcode 12/Cocoapods issue that my project didn't have with 12.1 or 12.0. It only popped up when trying to build on my new M1 MacBook Air and Xcode 12. I've tried everything that's been reported to fix it, no dice. 1) I've tried "pod install" & "pod update" with a Rosetta2 version of Terminal. Both complete without error, but Xcode still can't build. 2) I've set excluded architectures to "Arm64" on the project, target and pod project. 3) I've added x8664 and i386 to Architectures for project, target and pod project. 4) I've set all configurations to "Build Active Architecture Only" to Yes. 5) I've even created (and deleted) a "VALIDARCHS" user defined setting with the proper architectures to all three projects. 6) I've cleaned build folder many times and deleted derived data folder completely, and restarted Xcode. Still I get that same error. I can build to device, which I guess is my only choice at the moment. Anything else I can try?
Posted
by RandyHill.
Last updated
.
Post not yet marked as solved
10 Replies
6.3k Views
At a previous job where we had very slow build times (like way slower than you even expect Swift code to build :), we found that excluding certain files from AV scanning substantially reduced build times. Unfortunately I wasn't part of the process with IT so I don't know which files were excluded.Now at my new company we've installed the same AV solution, Sophos. Since we've done that it appears my compile times have increased, but I didn't benchmark so I don't know by how much. I have noticed that building a small IPA takes 10 minutes on my top of the line 2017 MBP, and that definitely seems way slower (spends forever generating bitcode). So it's on me to figure out what files to exclude that will help restore my compile times, without introducing a dangerous vector onto my machine. So I'm lookin for advice from anyone who has thought about or done this.First, I believe that all of the writing XCode does when building/compiling is within the DerivedData directory, so that's the obvious target to exclude from AV scanning. But am I right, is there any other directories where a lot of writing occurs during builds that I should consider? Secondly, I believe that DerivedData is safe to exclude, because it's built from source, and both the source and XCode (and it's tools) will be AV scanned. So even if by unlikely chance a virus was able to get onto my Mac and infect the DerivedData folder without being detected anywhere else, the build products in DerivedData are frequently updated from new builds which should overwrite and replace any infected files every new build, so there should be almost no risk. But am I being cavalier about the risk of a built product getting infected and distributed before it's replaced by a new build?Lastly, any other advice about solving this problem is appreciated.thanks,*****
Posted
by RandyHill.
Last updated
.
Post not yet marked as solved
1 Replies
1.1k Views
I'm trying to load JSON from somewhere other than my bundle, but it's not working. I can't get debugger breakpoints to work, print() doesn't work (swift), even NSLog doesn't work (doesn't even go to Console).Is there any way to be able to debug the ActionRequestHandler in the extension?
Posted
by RandyHill.
Last updated
.
Post not yet marked as solved
1 Replies
561 Views
This has happened twice in the last few days. While working in SwiftUI projects I will start getting lengthy spinners, that eventually become infinite spinners and I have to force-quit Xcode. Cleaning and rebuilding project, even deleting entire Derived Data, even restarting Xcode clean without any projects after rebooting Mac still presents the infinite spinner. My only solution that has worked been to delete all Xcode preferences and delete XCuserData from within my projects. I'm building on an 16 Gb M1 MacBook Air, so wondering if some SwiftUI Xcode tool has an Apple Silicon bug causing the prefs to get corrupted. Anyone else having similar problems, and if so are you on Intel or Apple Silicon?
Posted
by RandyHill.
Last updated
.
Post not yet marked as solved
1 Replies
3.1k Views
I'm building a pretty standard iOS app, 64 bit, etc. I was able to turn on Thread Sanitizer in one of my Xcode Schemes (my background app scheme), but now I can't turn it on in my dev scheme. I've turned off all the other debug settings in the scheme, cleaned the project and restarted Xcode, no luck. Any suggestions?
Posted
by RandyHill.
Last updated
.