首页 > 解决方案 > swift中的旧式功能警告

问题描述

我在我的测试项目中通过 pod 安装了解析库,安装后我收到了 2 个警告建议,都说:“这个旧式函数定义前面没有原型”

我不是目标 C 的专家,有什么想法可以解决这个警告吗?

第一个功能:

__attribute__ ((noinline)) void warnBlockingOperationOnMainThread() {
    NSLog(@"Warning: A long-running operation is being executed on the main thread. \n"
          " Break on warnBlockingOperationOnMainThread() to debug.");
}

第二个功能:


void PFOfflineStoreReplaceExisingObject() {}

- (NSString *)_generateKeyForClassName:(NSString *)className
                              objectId:(NSString *)objectId {
    return [NSString stringWithFormat:@"%@:%@", className, objectId];
}

谢谢

标签: swiftobjective-cparse-platform

解决方案


推荐阅读