ios Create new file and add to all target automatically

时间:2016-04-25 08:58:54

标签: ios xcode addtarget

Currently, I have 2 target like this.

enter image description here

When I create some file, it only choose 1 for default like this. I have to choose all target manually.

enter image description here

I afraid that developers might make some mistakes and don't add to app store version. Is there any way to automatically select both target? Or at least, by default, App Store version should be selected.

2 个答案:

答案 0 :(得分:2)

There's an Xcode plugin here that precisely does what you want.

答案 1 :(得分:0)

创建一个新文件并选择所有目标。 Xcode 会在创建后续文件时自动记住并选择这些目标。

File -> New -> File -> Swift file