【问题标题】:Private api CTGetSignalStrength() not working on Xcode 7.3私有 api CTGetSignalStrength() 不适用于 Xcode 7.3
【发布时间】:2016-04-04 06:01:46
【问题描述】:
NSString * CTSIMSupportGetSIMStatus();
int CTGetSignalStrength();

在 swift 中使用桥接头在 xcode 7.3 上给出编译错误,它在以前的版本上运行良好。

【问题讨论】:

标签: ios iphone-privateapi bridging-header xcode7.3 swift2.2


【解决方案1】:

定义你自己的objective-c方法

+ (int)getSignalStrength {
     return CTGetSignalStrength();
}

并在那里调用 c 样式方法,就像在 xcode7.3 中,objective-c 类中的 c 样式方法不调用一样。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-16
    • 2022-06-30
    • 1970-01-01
    相关资源
    最近更新 更多