简体   繁体   中英

How to change Swift header(“ProductModuleName-Swift.h”) Product name as product name changes dynamically

I am including the swift class inside objective-c class using the header #import "ProductModuleName-Swift.h" , where ProductModuleName is my application product name, hence it works fine!.

But the problem is, in my project i have an automation which will change the product name dynamically. I am having xcconfig file to override the build settings. In this case how to import the "ProductModuleName-Swift.h" dynamically as the product name changes from the automation

Please help!

found the solution!

I tried by changing in build settings "Objective - Generated Interface Header Name" to be constant rather than the dynamic then it is working irrespective of the product name.

say i changed that file name as "Test-Swift.h" in build setting and imported the same in my project. This works irrespective of the product name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM