Search code examples
iosbackendkinvey

iOS - Kinvey: Substituting 'resourceId' (deprecated)


I have an app which uses the method resourceId from kinvey's framework. It now says that it's deprecated, and I can't find another method to replace it with. Here's that part of the code:

KCSResourceResponse* obj = (KCSResourceResponse*)objectsOrNil[0];
self.mealModel.imageURL = [obj resourceId];

What should I replace it with?


Solution

  • If you are using KinveyKit 1.18.0 or later, you should use the KCSFileStore API rather than the ResourceService API. The return object will be a KCSFile, which you can use the fileId property instead.