美文网首页
Clang Objective-C 转换成C++

Clang Objective-C 转换成C++

作者: Cofey_c | 来源:发表于2019-04-03 17:47 被阅读0次
    1. 指定真机
    xcrun -sdk iphoneos clang -rewrite-objc xxxx.m
    
    1. 指定模拟器
    xcrun -sdk iphonesimulator clang -rewrite-objc xxxx.m
    
    1. 指定SDK版本
      (1) 查看当前机器已安装的 SDK
    xcodebuild -showsdks
    
    // 结果
    iOS SDKs:
        iOS 12.1                        -sdk iphoneos12.1
    
    iOS Simulator SDKs:
        Simulator - iOS 12.1            -sdk iphonesimulator12.1
    
    macOS SDKs:
        macOS 10.14                     -sdk macosx10.14
    
    tvOS SDKs:
        tvOS 12.1                       -sdk appletvos12.1
    
    tvOS Simulator SDKs:
        Simulator - tvOS 12.1           -sdk appletvsimulator12.1
    
    watchOS SDKs:
        watchOS 5.1                     -sdk watchos5.1
    
    watchOS Simulator SDKs:
        Simulator - watchOS 5.1         -sdk watchsimulator5.1
    
    

    (2) 指定版本

    xcrun -sdk iphonesimulator12.1 clang -rewrite-objc xxxx.m
    

    相关文章

      网友评论

          本文标题:Clang Objective-C 转换成C++

          本文链接:https://www.haomeiwen.com/subject/hkazbqtx.html