Hello.
I'm working on an app which works on multiple platforms (iOS, macOS, watchOS, tvOS). It builds and runs fine on the simulator and a real device but when trying to create a Product > Archive on macOS, it fails.
Here's the error message I get:
Build target RailBoardMac
Project RailBoard | Configuration Debug | Destination Any Mac | SDK macOS 15.1
Link RailBoardMac (x86_64) 0.3 seconds
Could not parse or use implicit file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/SwiftUlCore.framework/
Versions/A/SwiftUlCore.tbd': cannot link directly with 'SwiftUlCore' because product being built is not an allowed client of it
less
Undefined symbol: _main
× Linker command failed with exit code 1 (use -v to see invocation)
Build failed 20/09/2024,
I know this used to work. I must have changed something somewhere and it no longer does.
I'd be grateful for any assistance.
Post
Replies
Boosts
Views
Activity
Hello,
I'm trying to write a swiftui-based train departure board app and I'm calling an API to return data in JSON format. That's all working fine and the data is correctly being returned into the following structure:
struct Response: Codable {
let location: Location
let services: [RailService]?
}
struct Location: Codable {
let name: String?
let tiploc: String?
}
struct RailService: Codable {
let locationDetail: LocationDetail?
let serviceUid : String?
let runDate, trainIdentity, runningIdentity: String?
let atocName: String?
}
struct LocationDetail: Codable {
let description: String?
let gbttBookedArrival, gbttBookedDeparture: String?
let origin, destination: [Destination]?
let isCall, isPublicCall: Bool?
let realtimeArrival: String?
let realtimeArrivalActual: Bool?
let realtimeDeparture: String?
let realtimeDepartureActual: Bool?
let platform : String?
let platformConfirmed : Bool?
let platformChanged : Bool?
let serviceLocation : String?
let cancelReasonCode : String?
let cancelReasonShortText: String?
let cancelReasonLongText : String?
}
struct Destination: Codable {
let description: String?
let workingTime, publicTime: String?
}
My question is, I'd like to display the array 'services' of type RailService in a swiftui view but it's not Identifiable. How can display each element of the array and its items in swiftui?
Many thanks.