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 :)
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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
}
}
}
}
Hello!
I can't preview the SwiftUI views of watchOS target in Xcode 15 beta 1, when the containing iOS app has a SPM dependency. Reproducing steps:
Create a new watchOS app project (with a companion iOS app) in Xcode 15.
Both iOS and watchOS ContentView can be previewed at this step.
Add a Swift package to the iOS target (the package should be an iOS-specific package, not a watchOS one, for example, https://github.com/siteline/SwiftUI-Introspect)
After you add the static library to iOS target, the watchOS preview no longer work anymore.
If you check the error message, you can find the Xcode preview attempt to build the iOS package against watchOS SDK.
Hello,
When I turn on tinted mode on iOS 18, I noticed that the emojis in the widgets are not rendered properly. The widget in the following screenshot is the template project created by Xcode 16.
Hello,
I'm unable to run any test cases in Xcode 16 with the iOS 18 simulator.
Steps to Reproduce:
Create a new iOS project in Xcode 16 using the default iOS app template with the testing option checked.
Run any test or UI test case by clicking the "Play" icon in the Test navigator.
Xcode gets stuck at the "Testing" state indefinitely.
Environment:
macOS 15 beta 8
Xcode 16 beta 6
iOS 18 beta 7 simulator
WCSession.isComplicationEnabled() always returns false on iOS 15.4/15.4.1.
I can't install the beta profile for macOS 13 RC. Is anyone else having the same problem?
Hello!
I found that on the latest macOS 13 Ventura, my iOS app (iOS-App-On-Mac-With-M1/M2-Chip) is not able to restore IAP purchases or refresh receipt anymore.
When using SKReceiptRefreshRequest() to refresh the IAP receipt, I got following error.
Error Domain=SKErrorDomain
Code=0 "An unknown error occurred"
UserInfo={
NSLocalizedDescription=An unknown error occurred,
NSUnderlyingError=0x1330c1840 {
Error Domain=ASDErrorDomain Code=500 "(null)" UserInfo={
NSUnderlyingError=0x13338ebf0 {
Error Domain=NSCocoaErrorDomain
Code=513 "You don’t have permission to save the file “receipt” in the folder “StoreKit”." UserInfo={
NSFilePath=/Users/***/Library/Containers/EC7E888F-3388-418A-92C5-9CBDDC4A1846/Data/StoreKit/receipt,
NSUnderlyingError=0x13333a790 {
Error Domain=NSPOSIXErrorDomain
Code=1 "Operation not permitted"
}
}
}
}
}
}
It seems that the receipt cannot be refreshed due to a file permission issue.
Also, the SKPaymentQueue.default().restoreCompletedTransactions() function does not get the purchases properly (but also does not report an error).
This issue only appears in my iOS app on macOS 13 Ventura.
I found that in Xcode 14.2 (Swift 5.7), the compiler is unable to check the API availability of PropertyWrappers. For example, SwiftUI.StateObject was introduced in iOS 14, but when compiling for iOS 13, the compiler doesn't give an error. This leads to runtime dylib errors.
struct ContentView: View {
class Data: ObservableObject {}
@StateObject private var data = Data() // 🤔️ No compiler error when targeting iOS 13
var body: some View {
Text("Hello")
}
}
The app will crash on iOS 13.
dyld: lazy symbol binding failed: Symbol not found: _$s7SwiftUI11StateObjectV12wrappedValueACyxGxyXA_tcfC
However, when we use StateObject in a regular statement, the compiler gives an error as expected. This is the correct behavior.
init() {
_data = StateObject(wrappedValue: Data()) // 'StateObject' is only available in iOS 14.0 or newer
}
So, it seems that the availability check for PropertyWrappers is not working.
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")
}
}
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%)
Hello,
I noticed that the layout of compact Dynamic Island on iOS 17 is incorrect. The edge of the circle shape is unable to be aligned with the edge of Dynamic Island.
However, the layout in Xcode Preview is just perfect. And this is also the same layout on previous iOS 16:
If you try to workaround the issue by adding an offset to the view, it will be cropped by a misaligned circle.
Hello!
The WidgetBundleBuilder always crash on iOS 17 if there is a #available(iOS 18.0, *) check in the WidgetBundle body.
I remember there was a compiler bug (something related to type hoisting) in the past, but that was fixed. This time the bug seems to be in the implementation of the result build itself.
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
Xcode 15.3 AppIntentsSSUTraining warning: missing the definition of locale # variables.1.definitions
Hello!
I've noticed that adding localizations for AppShortcuts triggers the following warnings in Xcode 15.3:
warning: missing the definition of zh-Hans # variables.1.definitions
warning: missing the definition of zh-Hans # variables.2.definitions
This occurs with both legacy strings files and String Catalogs.
Example project: https://github.com/gongzhang/AppShortcutsLocalizationWarningExample