xcode11

SwiftUI List Background color [duplicate]

喜欢而已 提交于 2020-05-16 04:04:57
问题 This question already has answers here : SwiftUI List color background (7 answers) Closed 7 months ago . I am trying on setting a view background color to black with the following code struct RuleList: View {[![enter image description here][1]][1] private var presenter: ConfigurationPresenter? @ObservedObject private var viewModel: RowListViewModel init(presenter: ConfigurationPresenter?, viewModel: RowListViewModel) { self.presenter = presenter self.viewModel = viewModel } var body: some

Getting currently focused UIScene when multiple connected scenes are active in foreground

拜拜、爱过 提交于 2020-05-15 03:45:10
问题 I have a problem getting the current UIScene when multiple scenes are connected. Specifically, my app (iOS 13) supports multiple windows on the iPad. When I have two windows side by side and I access the apps connected scenes (with UIApplication.shared.connectedScenes ), all of them have the activationState set to .foregroundActive . But I am actually only interacting with one of them. I found some code here on stackoverflow to retrieve the current key window (can't remember who it was that

“Cannot Preview in this file - Failed to launch [App Name]”

对着背影说爱祢 提交于 2020-05-14 18:46:06
问题 I am trying to play around with swiftUI in Xcode 11 and macOS Catalina. BUT After creating a new Project, there is a boiler plate code with a Text that says hello World. I want to have a live preview of this simple welcome message in the canvas by the side of the code. When i hit the resume button : It says : Cannot Preview in this file - Failed to launch [App Name] I've tried hitting the diagnostic button that generated a report to send it to APPLE saying: [FailedToLaunchError(url: file://

SwiftUI - how to add a Scenekit Scene

泄露秘密 提交于 2020-05-10 03:38:25
问题 How can I add a Scenekit Scene to a SwiftUI view? I tried the following Hello World, using the standard Ship Scene example... import SwiftUI import SceneKit struct SwiftUIView : View { var body: some View { ship() Text("hello World") } But it didn't work: 回答1: In order for this to work, your SwiftUI View must conform to UIViewRepresentable . There's more info about that in Apple's tutorial: Interfacing with UIKit. import SwiftUI struct SwiftUIView : UIViewRepresentable { func makeUIView

Missing TestSummeries.plist file in DerivedData

岁酱吖の 提交于 2020-04-30 01:36:23
问题 I am running unit tests on iOS 13.0 device by using xcode 11 beta. After the test execution it should generate a testsummeries.plist file inside /Users/YourUsername/Library/Developer/Xcode/DerivedData/XXX/Logs/Test/xxx.xcresult for the corresponding test case. But it is only generating data folder and info.plist file inside .xcresult. So i am not able get my report of the test cases that i have executed In Xcode 10 it was working properly and with each test run i was able to see my test

Missing TestSummeries.plist file in DerivedData

大城市里の小女人 提交于 2020-04-30 01:30:12
问题 I am running unit tests on iOS 13.0 device by using xcode 11 beta. After the test execution it should generate a testsummeries.plist file inside /Users/YourUsername/Library/Developer/Xcode/DerivedData/XXX/Logs/Test/xxx.xcresult for the corresponding test case. But it is only generating data folder and info.plist file inside .xcresult. So i am not able get my report of the test cases that i have executed In Xcode 10 it was working properly and with each test run i was able to see my test

ASAuthorizationAppleIDRequest with name and mail scope returns nil values

喜欢而已 提交于 2020-04-29 07:05:18
问题 I'm implementing Sign in with Apple and noticed that the email and fullName properties of the returned ASAuthorizationAppleIDCredential are only filled on the very first Sign-In for this Apple ID. On all subsequent Sign-Ins those properties are nil. Is this a bug on iOS 13 or expected behaviour? Here is the code I'm using to start the request: @available(iOS 13.0, *) dynamic private func signInWithAppleClicked() { let request = ASAuthorizationAppleIDProvider().createRequest() request

ASAuthorizationAppleIDRequest with name and mail scope returns nil values

孤人 提交于 2020-04-29 07:05:17
问题 I'm implementing Sign in with Apple and noticed that the email and fullName properties of the returned ASAuthorizationAppleIDCredential are only filled on the very first Sign-In for this Apple ID. On all subsequent Sign-Ins those properties are nil. Is this a bug on iOS 13 or expected behaviour? Here is the code I'm using to start the request: @available(iOS 13.0, *) dynamic private func signInWithAppleClicked() { let request = ASAuthorizationAppleIDProvider().createRequest() request

Is it possible to install Xcode 11 on High Sierra (10.13.6)?

落花浮王杯 提交于 2020-04-28 04:21:10
问题 I have a Mac early 2011 running MacOS high sierra 10.13.6. My Mac can't upgrade to higher MacOS versions. I need to install XCode 11 to take advantage of SwiftUI. This answer worked for XCode 10.2 but didn't work for XCode 11. So can I install XCode11 on MacOS high sierra 10.13.6? 回答1: From Xcode 11 Release Notes: Xcode 11 requires a Mac running macOS 10.14.3 or later. So you cannot install Xcode 11 on macOS 10.13.6 回答2: Upgrade old macbook pro using this patch http://dosdude1.com/mojave/.

Programmatically detect Tab Bar or TabView height in SwiftUI

家住魔仙堡 提交于 2020-04-26 06:32:45
问题 I have a SwiftUI app that will have a floating podcast player, similar to the Apple Music player that sits just above the Tab Bar and persists across all tabs and views while the player is running. I have not figured out a good way to position the player so that it is flush above the Tab Bar, since the Tab Bar height changes based on device. The main issue I've found is just how I have to position the player in an overlay or ZStack in the root view of my app, instead of within the TabView