Post

Replies

Boosts

Views

Activity

App Intent incorrectly parses milliliters as megaliters in the en-GB environment
Hello, I just discovered that on iOS 17.0 (release), if Measurement<UnitVolume> is used in App Intent, the system will incorrectly parse mL (milliliters) as megaliters. They differ by 9 orders of magnitude. This issue only occurs in the English + United Kingdom regional format. Sample code: https://github.com/gongzhang/AppIntentUnitVolumeBugUnderEnGB Screen recording: https://youtu.be/rMMAHOFpPXs
1
0
619
Sep ’23
Failed to preview iOS app due to RealityKitContent.rkassets (should be linked only on visionOS)
Hello! My app supports iOS and visionOS in a single target. But when I preview the app on iOS device/simulator, an error occurred: The RealityKitContent.rkassets is located in my RealityKitContent package that is linked on visionOS. It seems that Xcode Preview is ignoring the link settings and attempt to build RealityKitContent.rkassets on iOS. Reproduce Steps: Clone my demo project at https://github.com/gongzhang/rkassets-preview-issue-demo Build the app for iOS (success) Preview ContentView.swift (failed due to RealityKitContent.rkassets issue)
3
0
1.2k
Sep ’23
iOS 16.2 breaks ProgressView(timerInterval:countsDown:) on Dynamic Island or on Always-On Lock Screen
I used ProgressView to display a countdown progress bar in a Live Activity. However, I found that since iOS 16.2, ProgressView(timerInterval:countsDown:) does not update properly in the following situations. on Dynamic Island (either Expanded or CompactLeading/Trailing) on the Locked Screen, after the display is turned off (isLuminanceReduced == true) In these situations, the ProgressView for the countdown is always displayed at 100% and does not automatically update with the time. The problem only occurs in iOS 16.2. And it's confusing for users. Will it be fixed please?
1
2
2k
Aug ’23
How to implement Look-To-Dictate on visionOS?
Hello everyone! I noticed that the UISearchBar on visionOS automatically supports the Look-To-Dictate function. However, for a regular UITextView, I couldn't find the corresponding API. How can I make a UITextView support the Look-To-Dictate function? This is a great system feature. (I noticed there is a protocol called UILookToDictateCapable but no idea how to use it.)
1
0
806
Aug ’23
Xcode 15 beta 6: is xrOS no longer considered as iOS?
In Xcode 15 beta 6, I found that when building visionOS apps, #if os(iOS) is no longer considered part of the project. This behavior is different from beta 1 to beta 5. Is this intentional? This change has caused third-party dependencies that use #if os(iOS) and have not yet explicitly supported visionOS to fail to compile. Is there a way to switch back to the old behavior? After all, requiring all third-party dependencies to explicitly support visionOS is quite difficult.
3
0
1.5k
Aug ’23
Xcode 15 beta 5 error: Invalid Swift parseable output message (malformed JSON)
This is new in Xcode 15 beta 5. Command SwiftCompile emitted errors but did not return a nonzero exit code to indicate failure. error: Invalid Swift parseable output message (malformed JSON): `0` (in target 'HiCoffee' from project 'HiCoffee') error: Invalid Swift parseable output message (malformed JSON): `1` (in target 'HiCoffee' from project 'HiCoffee') error: Invalid Swift parseable output message (malformed JSON): `{ "kind": "finished", ` (in target 'HiCoffee' from project 'HiCoffee') "name": "compile", "pid": -1139, "process": { "real_pid": 95136 }, "exit-status": 0 } Command SwiftCompile emitted errors but did not return a nonzero exit code to indicate failure
7
2
1.6k
Aug ’23
AppShortcuts error: Command ValidateAppShortcutStringsMetadata emitted errors
In Xcode 15 beta 3 and beta 4, if you add a AppShortcuts.xcstrings catalog or legacy AppShortcuts.strings files to the project, the project will always fail to build due to the following error. error: Unable to call validation: The data couldn’t be read because it isn’t in the correct format. (in target 'LearnAppShortcuts' from project 'LearnAppShortcuts') Command ValidateAppShortcutStringsMetadata emitted errors but did not return a nonzero exit code to indicate failure The error seems related to a cli called ValidateAppShortcutStringsMetadata. Reproducing Steps (1) In Xcode 15 beta 3/4, create a new iOS app project. (2) Add an arbitrary AppIntent and AppShortcutsProvider. import AppIntents struct MyAction: AppIntent { static let title: LocalizedStringResource = "My Action" func perform() async throws -> some IntentResult { return .result() } } struct MyAppShortcts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut(intent: MyAction(), phrases: [ "Perform action with \(.applicationName)" ], shortTitle: "Perform My Action", systemImageName: "heart") } } (3) Create a new AppShortcuts.xcstrings catalog file and add it to the iOS target (4) Build the project. The string catalog will be updated as expected. However, the build will fail.
3
0
1.2k
Aug ’23
Xcode 15 + iOS 17 adds extra padding to widgets
Xcode 15 and iOS 17 now adds extra padding to widget content, which is inconsistent with iOS 16. Run on iOS 16: Same code run on iOS 17, with extra paddings: struct WidgetView : View { var entry: Provider.Entry var body: some View { LicenseView(entry: entry) .background(Color("WidgetBackground")) .modifier { if #available(iOS 17.0, *) { $0.containerBackground(for: .widget) { Color.white // to highlight the padding on iOS 17 } } else { $0 } } } }
4
6
7.6k
Jul ’23
NavigationStack on iOS 17: NavigationStack can't maintain cell selection effect and experiences jumping
When using NavigationStack and NavigationLink, even in very simple situations, the behavior is not normal. When tapping on a NavigationLink, the cell's selected state cannot be maintained. The selection effect is not visible when pushing and popping views. This makes it difficult for users to track their selected content and the current view. At the moment of tapping a NavigationLink, the scroll offset of the List jumps, which affects the experience very much. (Before tapping a cell, as long as the page is not at the top, it can be reproduced 100%)
1
1
1.2k
Jul ’23
Xcode 15 beta 5 + iOS 17 beta 4: AppShortcuts do not show up in Shortcuts app
In Xcode 15 beta 5 + iOS 17 beta 4, the AppShortcuts (or maybe Shortcuts app) is broken. The AppShortcuts defined in AppShortcutsProvider are not shown up in the Shortcuts app any more. Reproduce Code import SwiftUI import AppIntents @main struct LearnShortcutsApp: App { var body: some Scene { WindowGroup { Text("Hello, world!") } } } struct MyAction: AppIntent { static let title: LocalizedStringResource = "My Action" func perform() async throws -> some IntentResult { return .result() } } struct MyAppShortcts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut(intent: MyAction(), phrases: [ "Perform action with \(.applicationName)" ], shortTitle: "Perform My Action", systemImageName: "heart") } }
1
1
754
Jul ’23
Xcode 15 beta 5: watch face previews (accessoryRectangular/Circular) render multicolor face in tinted mode
In Xcode 15 beta 1 to 5, the watch face preview of accessoryRectangular and accessoryCircular are always rendered in tinted mode, even if you choose multicolor. (NOTE: Please don't ask me to provide diagnostic data for Preview. Because this issue is 100% reproducible.)
1
0
905
Jul ’23
visionOS: How to implement vibrancy text style using SwiftUI?
Hi, I'm trying to apply the Vibrancy text style to SwiftUI Text. However, I didn't find proper API to do this. As the session video wwdc2023-10076 said, vibrancy brightens foreground content that displays on top of a material and works by pulling light and color forward from what's behind it. However, when I set .secondary foreground style to a Text, it's just some graycolor with a constant alpha value. It there any other API to achieve the vibrancy style? Thanks!
1
0
1.4k
Jul ’23