IDataStore Swift

Hi

I have been following this example and refactoring to put in my own app.

My app is referencing BackendlessSwift and this article was referencing Backdendless in the pod, which I think is why my project is showing this error: cannot find IDataStore in scope at the following declarations?

private var messageStore: IDataStore!
private var messageStoreMap: IDataStore!

If that is the case how do I solve, what is the equivalent is using BackendlessSwift as the SDK and also what would would be equivalent where these are used later…

messageStore = Backendless.sharedInstance()?.data.of(MessageObject.self)
messageStoreMap = Backendless.sharedInstance()?.data.ofTable(“MessageObject”)

Many thanks

Mike

Hi, @mike-turner

Thanks for the message. Our IOS developer will look into the issue described above. Stay tuned to this thread.

Regards,
Marina

Thanks Marina,

Please correct if wrong, but looks like this is now DataStoreFactory

Hello @mike-turner,

Here’s what it looks like with Backendless-Swift:

private var messageStore: DataStoreFactory!
private var messageStoreMap: MapDrivenDataStore!

messageStore = Backendless.shared.data.of(MessageObject.self)
messageStoreMap = Backendless.shared.data.ofTable("MessageObject")

Regards,
Olha