markbattistella / PhraseKit

PhraseKit is a Swift package that generates random, human-readable phrases using customizable word combinations. Perfect for creating unique filenames, usernames, session IDs, and more. Easily extensible with custom word lists and combination logic.
MIT License
1 stars 0 forks source link

Always returns nil? #34

Closed joegrist closed 2 weeks ago

joegrist commented 2 weeks ago

Confused why I only get nil. Do the JSON word lists need to be linked into the build somehow? Sorry if this is a dumb question.

import SwiftUI
import PhraseKit

struct Random: View {

    var body: some View {

        let generator = PhraseGenerator()
        print(generator.generatePhrase(wordCount: .three)) // <---- "nil"
        ...
markbattistella commented 2 weeks ago

@joegrist - thanks for raising that! I've fixed it. When I was building in the word validator/profanity exclusion list, I updated the JSON modelling, but forgot to update the Bundle decoding for the new model.

Should all be working now, I tested it on my end :)

joegrist commented 2 weeks ago

Fabulous, verified, works great now. Thanks!