我已经安装了
Realm
有了豆荚,一切都符合了。我甚至有两个的子类
RLMObjects
用于将自定义类对象保存到领域默认空间的。
@interface RLNotification : RLMObject
- (instancetype)initWithNotification:(KANotification *)notification;
@property NSString *docID, *userID, *username;
@property NSInteger time, type;
@end
@interface RLProfilePicture : RLMObject
- (instancetype)initWithImage:(UIImage *)image;
@property (nonatomic) NSString *userID;
@property (nonatomic) NSData *imageData;
@property NSInteger timeLastUpdated;
@end
问题
但当我要用这些的时候
任何
类,例如:
NSLog(@"test: %@", [RLNotification allObjects]);
RLNotification *noti = RLNotification.new;
noti.userID = @"hey";
noti.username = @"nope!";
[RLMRealm.defaultRealm addObject:noti];
NSLog(@"test2: %@", [RLNotification allObjects]);
我收到这个警告…
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_RLNotification", referenced from:
objc-class-ref in AnyClassName.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我到底做错了什么/需要改变什么?…