As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Swift newbie here and I've been having a problem for hours that's absolutely doing my head in. I have the code below, and I'm trying to store a UIImage in the Kinvey backend. I've followed instructions from other users who had a similar problem, but nothing's working for me.
"picture" :*not allowing me to select KCSFileStoreCollectionName*
]
}
}
The problem is, I am trying to store the value 'KCSFileStoreCollectionName' in the dictionary returned by kinveyPropertyToCollectionMapping(), but 'KCSFileStoreCollectionName' is coming up as an 'unresolved identifier' in Xcode. I've had a look at the Kinvey KCSFileStore.h file, and I can clearly see 'KCSFileStoreCollectionName' has been declared as a global variable.
@interface KCSCollection (KCSFileStore)
/** Constant to represent the File metadata collection */
/** Helper method to access the file store metadata. Objects will be `KCSFile` type. */
+ (instancetype) fileMetadataCollection;
@end
However, for some reason Xcode isn't picking it up. I downloaded the Relational-Data example from here, and also tried to set the 'KCSFileStoreCollectionName' property, but still having the same issue. Please any help with this would be appreciated!
Best Answer
P
Pranav J
said
over 7 years ago
Toby,
I have sent this to the development team to look at.
Meanwhile, as a workaround, can you try using “_blob” instead of KCSFileStoreCollectionName? Let me know if it works for you.
Tobi Adewuyi
Hi!
Swift newbie here and I've been having a problem for hours that's absolutely doing my head in. I have the code below, and I'm trying to store a UIImage in the Kinvey backend. I've followed instructions from other users who had a similar problem, but nothing's working for me.
import Foundation
class Test: NSObject {
var userID: String?
var entityId: String?
var picture: UIImage?
var metadata: KCSMetadata?
internal override func hostToKinveyPropertyMapping() -> [NSObject : AnyObject]! {
return [
"entityId" : KCSEntityKeyId,
"userID" : "userID",
"picture":"picture",
"metadata": KCSEntityKeyMetadata
]
}
internal class override func kinveyPropertyToCollectionMapping() -> [NSObject : AnyObject]! {
return [
"picture" :*not allowing me to select KCSFileStoreCollectionName*
]
}
}
The problem is, I am trying to store the value 'KCSFileStoreCollectionName' in the dictionary returned by kinveyPropertyToCollectionMapping(), but 'KCSFileStoreCollectionName' is coming up as an 'unresolved identifier' in Xcode. I've had a look at the Kinvey KCSFileStore.h file, and I can clearly see 'KCSFileStoreCollectionName' has been declared as a global variable.
@interface KCSCollection (KCSFileStore)
/** Constant to represent the File metadata collection */
FOUNDATION_EXPORT NSString* const KCSFileStoreCollectionName;
/** Helper method to access the file store metadata. Objects will be `KCSFile` type. */
+ (instancetype) fileMetadataCollection;
@end
However, for some reason Xcode isn't picking it up. I downloaded the Relational-Data example from here, and also tried to set the 'KCSFileStoreCollectionName' property, but still having the same issue. Please any help with this would be appreciated!
I have sent this to the development team to look at.
Meanwhile, as a workaround, can you try using “_blob” instead of KCSFileStoreCollectionName? Let me know if it works for you.
internal class override func kinveyPropertyToCollectionMapping() -> [NSObject : AnyObject]! {
return [
"picture” :”_blob"
]
}
Thanks,
Pranav
Kinvey Support
1 person has this question
Pranav J
I have sent this to the development team to look at.
Meanwhile, as a workaround, can you try using “_blob” instead of KCSFileStoreCollectionName? Let me know if it works for you.
internal class override func kinveyPropertyToCollectionMapping() -> [NSObject : AnyObject]! {
return [
"picture” :”_blob"
]
}
Thanks,
Pranav
Kinvey Support
-
Why do I get "Undefined symbols" errors when building with KinveyKit?
-
How do I register push tokens?
-
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
-
How can I assign additional properties to users?
-
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
-
Authorization Token Invalid or Expired
-
BOOL and how it is stored in the database.
-
Offline saving throwing errors
-
Custom endpoint not able to form request object
-
Security through business logic
See all 437 topics