How to modify SWIFT_MODULE_NAME?

前端 未结 4 1199
灰色年华
灰色年华 2020-11-27 07:14

The title says it all. I\'ve searched in the build settings for SWIFT_MODULE_NAME, and nothing came up. I\'ve also searched online, and there are references

4条回答
  •  时光说笑
    2020-11-27 07:43

    The module name comes from the Product Module Name build setting:

    The SWIFT_MODULE_NAME setting is apparently hidden, but you can see its derivation by looking at Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/XCLanguageSupport.xcplugin/Contents/Resources/Swift.xcspec:

    ...
    {
        Name = "SWIFT_MODULE_NAME";
        Type = String;
        DefaultValue = "$(PRODUCT_MODULE_NAME)";
        CommandLineArgs = (
            "-module-name",
            "$(value)",
        );
    },
    ...
    

提交回复
热议问题