Xcode 11: Local Packages not finding sources files

I've tried to create a local package as shown in https://developer.apple.com/videos/play/wwdc2019/410


The package seems to be imported correctly, but the source files are not found.


// Lunch/Lunch/ContentView.swift
import SwiftUI
import FoodNStuff

struct ContentView : View {
    var body: some View {
        Text(LunchItem().text) // Use of unresolved identifier 'LunchItem'
    }
}


// Lunch/FoodNStuff/Sources/FoodNStuff/LunchItem.swift
import Foundation

struct LunchItem {
    var text = "Foo"
}


https://styrka.app/images/Screenshot%202019-06-08%20at%2020.04.25.png

https://styrka.app/images/Screenshot%202019-06-08%20at%2020.04.36.png

I'm using

Xcode Version 11.0 beta (11M336w)

macOS 10.15 Beta (19A471t)

Did you find an answer to this?

I'm having the same problem. Xcode complains that things models defined in the local package are undeclared types or unresolved identifiers but I can command+click on them, choose "Jump to definition," and am taken to the correct place.

I found my issue: I didn't set every struct, class, property, and method as `public` when needed so the code outside of the package wouldn't have access to those items.

Xcode 11: Local Packages not finding sources files
 
 
Q