Posts

Post not yet marked as solved
1 Replies
353 Views
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
Posted
by Gong.
Last updated
.
Post not yet marked as solved
0 Replies
575 Views
My app features two kinds of widgets, let's call them kind A and kind B. I have both A and B widgets on my Home Screen. When I tap the button on widget A (associated with App Intent), I expect widget B to also reload. However, if you call WidgetCenter.shared.reloadAllTimelines() inside the perform() method of the AppIntent, the timeline of widget B does not reload immediately. This issue only occurs on a physical device and is not consistently reproducible. On a simulator, however, widget B reloads as expected. FB13152293
Posted
by Gong.
Last updated
.
Post not yet marked as solved
3 Replies
606 Views
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)
Posted
by Gong.
Last updated
.
Post not yet marked as solved
1 Replies
1.5k Views
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?
Posted
by Gong.
Last updated
.
Post not yet marked as solved
3 Replies
1.1k Views
Hello, The new mental health features in iOS 17 allow users to log their momentary emotions and daily moods, see valuable insights, and easily access assessments and resources. Does anyone know if HealthKit in iOS 17 provides an API for accessing these records? Thanks :)
Posted
by Gong.
Last updated
.
Post not yet marked as solved
1 Replies
480 Views
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.)
Posted
by Gong.
Last updated
.
Post marked as solved
2 Replies
974 Views
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.
Posted
by Gong.
Last updated
.
Post marked as solved
7 Replies
865 Views
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
Posted
by Gong.
Last updated
.
Post not yet marked as solved
3 Replies
748 Views
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.
Posted
by Gong.
Last updated
.
Post marked as solved
4 Replies
4.7k Views
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 } } } }
Posted
by Gong.
Last updated
.
Post not yet marked as solved
1 Replies
822 Views
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%)
Posted
by Gong.
Last updated
.
Post not yet marked as solved
1 Replies
495 Views
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") } }
Posted
by Gong.
Last updated
.
Post not yet marked as solved
1 Replies
571 Views
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.)
Posted
by Gong.
Last updated
.