Journaling Suggestions not avail in Xcode 15.1 beta (15C5042i)?

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!!

Answered by Serzhas in 771063022

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)")
        }
    }
}

Hi @thorfox, it is not available for simulators, try it out on a physical device running iOS 17.2!

Accepted Answer

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)")
        }
    }
}

Hi @Serzhas, hi @sha921 , THANKS a lot! Now I got it working - both with using a physical iOS 17.2 device and using the correct name of the view! Thanks for your fast help!

iOS 17.2 beta is not getting downloaded in Xcode 15.1 beta 2 any solution ?

Journaling Suggestions not avail in Xcode 15.1 beta (15C5042i)?
 
 
Q