I am building an iMessage Extension in Xcode using Amplify as my backend. I already have a cross-platform React Native app using the same Amplify backend. I have already created the Xcode repo for an App with an iMessage Extension as a target as well. I added all the package dependencies and pulled my backend environment. I then ran the command to add the models. I added the iMessage Extension as a target for the AmplifyModels.swift file.
In updating those files, I do not get any errors for either file but do get errors for each model type in the AmplifyModels.swift file. Here is the code for the AmplifyModels.swift file:
// swiftlint:disable all
import Amplify
import Foundation
// Contains the set of classes that conforms to the Model protocol.
final public class AmplifyModels: AmplifyModelRegistration {
public let version: String = "aaa9d5f7fc8695eb8cfd51fd2ac2f739"
public func registerModels(registry: ModelRegistry.Type) {
ModelRegistry.register(modelType: User.self)
ModelRegistry.register(modelType: ContactList.self)
ModelRegistry.register(modelType: Contact.self)
ModelRegistry.register(modelType: Group.self)
ModelRegistry.register(modelType: Event.self)
ModelRegistry.register(modelType: Rsvp.self)
ModelRegistry.register(modelType: StoreVersion.self)
ModelRegistry.register(modelType: GroupUser.self)
}
}
I get the following errors:
Cannot find 'User' in scope
Cannot find 'ContactList' in scope
Cannot find 'Contact' in scope
Cannot find 'Group' in scope
Cannot find 'Event' in scope
Cannot find 'Rsvp' in scope
Cannot find 'StoreVersion' in scope
Cannot find 'GroupUser' in scope.