Questions tagged [xcode12]

This tag should only be used for questions specific to the usage and features of Xcode 12. Do not use this tag just because you are using Xcode to develop your app. General Xcode questions should use the non-version specific xcode tag. Use tags appropriate for the OS such as ios or macos.

Xcode 12 is year 2020 version of Apple's IDE. Made available in beta at the start of WWDC 2020 on June 22, 2020. This provides support for iOS 14, macOS 11, watchOS 7, and tvOS 14.

783 questions
876
votes
65 answers

Xcode building for iOS Simulator, but linking in an object file built for iOS, for architecture 'arm64'

I am trying to get a large (and working on Xcode 11!) project building in Xcode 12 (beta 5) to prepare for iOS 14. The codebase was previously in Objective-C, but now it contains both Objective-C and Swift, and uses pods that are Objective-C and/or…
btxios
  • 8,935
  • 3
  • 9
  • 7
352
votes
48 answers

Xcode error: Failed to prepare device for development

I have updated to Xcode 12.3 beta. device version is 14.2, but Xcode complaining: Errors were encountered while preparing your device for development. Please check the Devices and Simulators Window. Failed to prepare device for development iPhone…
Hashem Aboonajmi
  • 13,077
  • 8
  • 66
  • 75
187
votes
4 answers

Xcode 12.3: Building for iOS Simulator, but the linked and embedded framework was built for iOS + iOS Simulator

I have an app using a linked and embedded custom framework. The app built properly for iOS devices and simulators until Xcode 12.2. Starting from Xcode 12.3 however, I'm getting the following error: Building for iOS Simulator, but the linked and…
spassas
  • 4,778
  • 2
  • 31
  • 39
148
votes
12 answers

Initialize @StateObject with a parameter in SwiftUI

I would like to know if there is currently (at the time of asking, the first Xcode 12.0 Beta) a way to initialize a @StateObject with a parameter coming from an initializer. To be more specific, this snippet of code works fine: struct MyView: View…
Emilio Schepis
  • 1,677
  • 2
  • 9
  • 11
137
votes
7 answers

SwiftUI app life cycle iOS14 where to put AppDelegate code?

Now that AppDelegate and SceneDelegate are removed from SwiftUI, where do I put the code that I used to have in SceneDelegate and AppDelegate, Firebase config for ex? So I have this code currently in my AppDelegate: Where should I put this code…
M1X
  • 4,971
  • 10
  • 61
  • 123
123
votes
31 answers

'Build input file cannot be found' Swift 4.2, Xcode 10.0

I am getting the following error when building in Xcode 10.0 with swift 4.2:
Robbie Cronin
  • 1,557
  • 2
  • 10
  • 15
94
votes
10 answers

Slow app launch time after updating to iOS 14 and Xcode 12

I noticed that the launch time of my app has increased significantly (it takes a full minute now vs seconds before) since updating my device to iOS 14 and using Xcode 12. I tried several Xcode 12 betas and ran the app in the simulator with no…
CristianMoisei
  • 2,071
  • 2
  • 22
  • 28
55
votes
14 answers

ARCHS[@]: unbound variable in Xcode 12

Our iOS project is built successfully in Xcode 11. However, on Xcode 12, it shows an error like this: PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks…
Alex
  • 577
  • 1
  • 5
  • 3
53
votes
7 answers

SwiftUI | Using onDrag and onDrop to reorder Items within one single LazyGrid?

I was wondering if it is possible to use the View.onDrag and View.onDrop to add drag and drop reordering within one LazyGrid manually? Though I was able to make every Item draggable using onDrag, I have no idea how to implement the dropping…
Kai Zheng
  • 6,640
  • 7
  • 43
  • 66
53
votes
0 answers

SwiftUI warning: `Attempting -[UIContextMenuInteraction dismissMenu], when not in an active state`

Using Xcode 12 beta (12A6159) on macOS Catalina 10.15.5 (19F101) when I press "Back" button in NavigationView, navigating back from a pushed View, I see this warning in the console. [UIContextMenuInteraction] Attempting…
Sajjon
  • 8,938
  • 5
  • 60
  • 94
49
votes
6 answers

In Xcode 12, In Info.plist file column expanding or resizing to zoom not working

For more information please see in reference image
Jitendra Chauhan
  • 974
  • 8
  • 10
49
votes
5 answers

Xcode12 CoreNFC simulator library not loaded

Our app uses CoreNFC to scan NFC tags or you can use QR if NFC is not supported. This worked pretty well and we were able to run the app in the simulator for (ui) testing purposes. Until Xcode12 / iOS14 GM builds. In iOS13 (or lower) we wouldn't…
basvk
  • 4,437
  • 3
  • 29
  • 49
47
votes
6 answers

Get the current scroll position of a SwiftUI ScrollView

With the new ScrollViewReader, it seems possible to set the scroll offset programmatically. But I was wondering if it is also possible to get the current scroll position? It seems like the ScrollViewProxy only comes with the scrollTo method,…
Kai Zheng
  • 6,640
  • 7
  • 43
  • 66
46
votes
7 answers

Xcode 12 deployment target warnings when using CocoaPods

I get this warning on Xcode 12: The iOS Simulator deployment target IPHONEOS_DEPLOYMENT_TARGET is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99 How to support this version?
aturan23
  • 4,798
  • 4
  • 28
  • 52
42
votes
1 answer

Xcode 12 IPHONEOS_DEPLOYMENT_TARGET warning for SPM dependencies

After updating to Xcode 12, I've got lots of warnings for SPM dependencies (including RxSwift and Facebook). The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is…
abagmut
  • 911
  • 1
  • 10
  • 22
1
2 3
52 53