I added a new schema on the console and added code to the existing app, but I could not get the data.
However, once I reinstalled the app, I was able to successfully retrieve the data.
Since the app has already been released, I would like to be able to successfully retrieve data without having to reinstall it, but what could be the cause of the problem?
sample code
var config = realmUser.flexibleSyncConfiguration(
initialSubscriptions: { subs in
// MARK: setup User Datas
if let _ = subs.first(named: "users") {
return
} else {
subs.append(QuerySubscription<Users>(name: "users"))
}
if let _ = subs.first(named: "new_data") {
return
} else {
subs.append(QuerySubscription<NewData>(name: "new_data"))
}
})
config.objectTypes = [
Users.self,
NewData.self
]
realm = try await Realm(configuration: config, actor: RealmActor.shared, downloadBeforeOpen: .always)