Xcode12 、真机iOS14状态下崩溃
a714857512 opened this issue · comments
a714857512 commented
Xcode12 、真机iOS14状态下崩溃在
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[[ECOCoreManager shared] sendPacketData:data type:type plugin:plugin toDevice:device];
});
//发送数据
- (void)plugin:(__kindof ECOBasePlugin *)plugin willSendData:(id)data type:(ECOPacketDataType)type toDevice:(ECOChannelDeviceInfo *)device {
// NSLog(@"<<[ECOPluginsManager] %@ plugin sendData:%@", plugin.pluginName, data);
//封装数据
if (!data) {
return;
}
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[[ECOCoreManager shared] sendPacketData:data type:type plugin:plugin toDevice:device];
});
}
陈爱彬 commented
Xcode12 、真机iOS14状态下崩溃在
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[[ECOCoreManager shared] sendPacketData:data type:type plugin:plugin toDevice:device];
});//发送数据
- (void)plugin:(__kindof ECOBasePlugin *)plugin willSendData:(id)data type:(ECOPacketDataType)type toDevice:(ECOChannelDeviceInfo *)device {
// NSLog(@"<<[ECOPluginsManager] %@ plugin sendData:%@", plugin.pluginName, data);
//封装数据
if (!data) {
return;
}
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[[ECOCoreManager shared] sendPacketData:data type:type plugin:plugin toDevice:device];
});
}
由于iOS14系统本地网络权限限制,需要在工程的Info.plist文件中添加NSLocalNetworkUsageDescription和NSBonjourServices配置。在Xcode中选中Info.plist文件,右键选择Open As Source Code,并添加如下内容
<key>NSLocalNetworkUsageDescription</key>
<string></string>
<key>NSBonjourServices</key>
<array>
<string>_ECHO._tcp</string>
</array>
也可更新到0.0.6的tag号来解决崩溃问题