简体   繁体   中英

Wrong info.plist?

I need to make a free variant of my project's target. I duplicated the target, gave it a unique name, and changed all occurrences of the old name to the new name in the new target. I've made sure to enter the correct name for the info.plist file under the new target's Build Settings in the Packaging section.

But when I edit the new target's schema and click the Build options, both the new target and the original one appear in the list of targets. I cannot uncheck the Test and Run boxes for the old target (which the Apple docs mention but do not explain).

My problem is that when I examine the info-plist settings for the new target at runtime (using NSBundle objectForInfoDictionaryKey) I see values from the original target, including the Bundle Name and Bundle Identifier. I would like the new target to use it's own info.plist only, and ignore the original info.plist.

What am I doing wrong?

I fixed this by going into Manage Schemas, deleting the schema that had been created for the new target, and then clicking Autocreate Schemas Now. This created one new schema for the new target and it contained only one target. At runtime, the new target now shows values from the new info.plist.

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