Hi all,
has anybody tried out the new Journaling Suggestions API yet in Xcode 15.1 beta (15C5042i) / iOS 17.2 beta?
As documented in https://developer.apple.com/documentation/JournalingSuggestions, the new App Capability / entitlement com.apple.developer.journal.allow is avail to select in Xcode 15.1 beta2, but in the code editor, there is not SuggestionsPicker SwiftUI view imported / available.
Do you know how to get this to work and build the demo app from the documentation?
Thanks!!
The SwiftUI view is named JournalingSuggestionsPicker, not SuggestionsPicker, as stated in documentation.
The following code compiles in Xcode 15.1 Beta 2 for the device running iOS 17.2 Public Beta:
import JournalingSuggestions
import SwiftUI
@available(iOS 17.2, *)
struct TestView: View {
var body: some View {
JournalingSuggestionsPicker {
Text("See recent events")
} onCompletion: { suggestion in
print("\(suggestion)")
}
}
}