TipKit not working on Xcode 15.4 beta for iOS 17

656 views Asked by At

I am trying to experiment with Apple's new feature called TipKit and create sample Tips for my app prior to iOS 17 release this fall. However, I am unable to compile the program.

I downloaded Xcode 15.4 beta and I tried creating a struct using the sample code found from https://developer.apple.com/videos/play/wwdc2023/10229/?time=323:

struct FavoriteBackyardTip: Tip {

    var title: Text {
        Text("Save as a Favorite")
    }
    
    var message: Text {
        Text("Your favorite backyards always appear at the top of the list.")
    }
}

The compiler immediately does not recognize the Tip class and throws an error. I need to subclass Tip in SwiftUI just like I would with View if I were creating a normal view. I am under the impression TipKit has not been added to Xcode 15.4 beta and that I need to wait. If it has not been added, when will it be added? When is the next beta release planned for? It is also possible I am missing an import statement, although I did try and was unable to find anything (I assume that I won't need an import).

Has anyone else been able to successfully test out a Tip for their app?

Additionally, I want to integrate TipKit with UIKit and wondered if that is possible, and if so, how to do it.

Any information on TipKit would be appreciated!

2

There are 2 answers

0
Javier Galera On

UPDATE: TipKit is now available with Xcode 15 beta 5, as stated in the release notes.

For now TipKit is not available for use, so it is not included in Xcode. You will need to wait until they include it in future Xcode betas, so stay tuned for the release notes as we don't have any clue about when it will be available.

Answering your question about using TipKit in UIKit, yeah, you will be able to do so, as Apple staff officially confirmed this in their forums here.

0
Stuart Breckenridge On

As Javier says, TipKit is available in Xcode 15 beta 5. However, there is no revised sample code, and the implementation has changed since the WWDC session.

I've created a sample app here which shows how to implement it.