Post not yet marked as solved
When I run the code below, the trace, "Called", is shown 3-4 times initially. If I click on a color row, the trace shows 9 times. Why is that?
If I comment out the line, @Environment(\.dismiss) private var dismiss, the trace shows only 1 time, as expected.
I've read a number of reports regarding dismiss() which seems to be very brittle. It often causes an infinite loop. But I need to dismiss a view. Its older counterpart, @Environment(\.presentationMode), seems to cause infinite loop at times. Are there other ways to dismiss a view without suffering these issues?
struct TestNavigationLink: View {
@Environment(\.dismiss) private var dismiss
var body: some View {
let _ = print("Called")
NavigationStack {
List {
NavigationLink("Mint") { ColorDetail(color: .mint) }
}
.navigationTitle("Colors")
}
} // body
struct ColorDetail: View {
var color: Color
var body: some View {
color.navigationTitle(color.description)
}
}
}
Post not yet marked as solved
This is related to feedback submitted at https://feedbackassistant.apple.com.
Post not yet marked as solved
I'm not able to follow this documentation to get the same screen as shown. I've set the content type and keyboard type as suggested. Not sure what else I'm missing? Is there full example code for it? Thank you.
Xcode: Version 15.2 (15C500b)
I encounter this error even with a Hello world app that I created from scratch using Xcode -> File -> New -> Project.
Below are the errors
Asset validation failed
Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'alodotad.test-1'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7. (ID: b9c6bcae-6ea1-4343-b173-e2c3c71f2ec9)
Asset validation failed
Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface (ID: 02055686-c98c-4823-8041-9a77e46af895)
I then made changes to include the key CFBundleIconName in Info.plist, and that my AppIcon file has 120x120.png icon. What else do I need to check?
I've gone thru many posts regarding the same error, and I'm still unable to fix it. Thank you for your help.
Post not yet marked as solved
I only see the output from the XCTest itself.
Xcode: Version 15.2 (15C500b)
I have a workspace with a Hello-world project. The Start icon is disabled. When I try to create a new scheme (Product -> Scheme -> New Scheme), the Target field shows None.
May I ask how I get the Start icon active, so I can build/run the project in the workspace?
Xcode Version 15.0 (15A240d)
Thank you.
Post not yet marked as solved
My app will require user's login. I'd like it to use face ID, and fallback on other things like password. Is there a reusable Swift module/package for that? Thank you.
Post not yet marked as solved
My enrollment has been completed. However, when I open the app, click on the “Account” option, the app grays out the “Enroll now” option, instead of saying something like “(Already) Enrolled”. I find that confusing. Please consider updating that. Thank you.
I'd like to learn and try things out without the need to have access to my Apple device. Currently, I'm regularly on a Windows machine, and I find it a bit inconvenient to switch my work setup/environment; I'd like to have access to Swift and SwiftUI at my fingertips.