我是Apple HomeKit和iOS开发的新手,我有一个UITableViewController尝试管理HMHomeManager的实例,但每次HMHomeManager实例初始化后,程序都会崩溃,信号为:SIGABRT。
界面:
#import <UIKit/UIKit.h>
#import <Homekit/HomeKit.h>
@interface ItemListTableViewController : UITableViewController <HMHomeManagerDelegate>
@property HMHomeManager* homeManager;
@end
然后我有了实施:
- (void)viewDidLoad {
[super viewDidLoad];
self.homeManager = [[HMHomeManager alloc] init];
self.homeManager.delegate = self;
}
当显示此视图时,程序与SIGABRT崩溃:
libsystem_kernel.dylib`__pthread_kill:
0x108277efc <+0>: movl $0x2000148, %eax ; imm = 0x2000148
0x108277f01 <+5>: movq %rcx, %r10
0x108277f04 <+8>: syscall
-> 0x108277f06 <+10>: jae 0x108277f10 ; <+20>
0x108277f08 <+12>: movq %rax, %rdi
0x108277f0b <+15>: jmp 0x1082727cd ; cerror_nocancel
0x108277f10 <+20>: retq
0x108277f11 <+21>: nop
0x108277f12 <+22>: nop
0x108277f13 <+23>: nop
非常感谢您的帮助!