开发者

Can you prevent Xcode from substituting text in a project template?

开发者 https://www.devze.com 2023-01-23 11:20 出处:网络
I have a project template called Foo. Xcode is replacing all the files and tokenizing all the ___P开发者_运维技巧ROJECTNAME___ and ___PROJECTNAMEASIDENTIFIER___ inside the files. In one of the source

I have a project template called Foo. Xcode is replacing all the files and tokenizing all the ___P开发者_运维技巧ROJECTNAME___ and ___PROJECTNAMEASIDENTIFIER___ inside the files. In one of the source files I have

FooObject *foo = [FooObject fooWithName:@"foo"];

Xcode is replacing Foo in FooObject to the newly named project:

MyNewProjectObject *foo = [MyNewProjectObject fooWithName:@"foo"];

Is there a way that I can prevent this?

Thanks,

Chris


After lots of futzing around I believe the answer is to make your template project name unique enough that it doesn't match any of your class names.

0

精彩评论

暂无评论...
验证码 换一张
取 消