In my project I get the following error:
Error list:
BullsEyePlus Group
Swift Compiler Error Group
/BullsEyePlus/BullsEyePlus/ContentView.swift:33:38: Use of unresolved identifier ‘BullsEyeGame’
BullsEyePlus WatchKit Extension Group
Swift Compiler Error Group
/ BullsEyePlus / BullsEyePlus WatchKit Extension / ContentView.swift: 33: 38: Use of unresolved identifier ‘BullsEyeGame’
After looking at the module of the game after clean, it looks like this:
import Combine
import Foundation
import SwiftOnoneSupport
If we build the bottom of the final, look inside the Game module
import Combine
import Foundation
import SwiftOnoneSupport
public class BullsEyeGame: ObservableObject {
// skip
}
It is different as above.
Why am I not created like a folder under final?
Why? “Use of unresolved identifier ‘BullsEyeGame’” Don’t know if you get this error?
please please! …
thank!
hi Hye Gon! if you’ve copied the project to another directory, you have to also copy the packages folder, to keep the directory structure the same. The project uses the Game package’s relative path, so it expects to find it in packages/Game, alongside the BullsEyePlus folder.
Hi … audrey.
The project only copied the project provided by ray to BullsEyePlus.
The package was created and included in the BullsEyePlus project.
Currently my folder structure is
hi Hye Gon, those error messages don’t make sense, so restarting Xcode might help. Or restart your Mac. Also try deleting the Derived Data folder.
when the only error is a missing module for Game, you can usually get rid of it by just building the project. But those two WatchKit errors don’t make sense if you haven’t changed anything.
I guess you changed the bundle ID and signed with your team?
I was getting the exact same errors as hyegon. The problem was my BullsEyeGame.swift file was in the wrong folder in the Game package. I had to move it one level down in the directory structure from:
packages/Game/Sources/BullsEyeGame.swift
to
packages/Game/Sources/Game/BullsEyeGame.swift
Moving the file to the correct folder allowed me to build and continue.