我该如何解决这个错误?
2016-08-30 09:14:55.856 BBS[476:159483] -[MosquittoClient initWithClientId:]: unrecognized selector sent to instance 0x15e3ba60 2016-08-30 09:14:55.859 BBS[476:159483] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'-[MosquittoClient initWithClientId:]: unrecognized selector sent to instance 0x15e3ba60' *** First throw call stack: (0x21d19b0b 0x214d6dff 0x21d1f455 0x21d1d0ab 0x21c47298 0xaeec8 0xaedb8 0xae484 0xae570 0x2632a6a1 0x2632a631 0x2631256b 0x26329f51 0x26329bbf 0x26322547 0x262f2dd5 0x262f1379 0x21cdb9e7 0x21cdb5d7 0x21cd993f 0x21c281c9 0x21c27fbd 0x23244af9 0x2635b435 0xaf8e8 0x218d4873 ) libc++abi.dylib:以 NSException 类型的未捕获异常终止
仅供参考:我有一个使用 Mosquitto 库的项目,它正在运行。但是,当我将原始源代码复制到另一台 Mac 进行分发或创建新项目并将 Mosquitto 库集成到其中时,会出现错误。
client = MosquittoClient(clientId: "client1") <-- Line that causes the error
client?.delegate = self
client?.port = 1883
client?.host = "someIPAddress"
client?.connect()