1

I have a unique issue, where Xcode picks up the wrong info.plist file when compiling. I have two targets, one is in the release version and the other is in the beta configuration(scheme). We have different files in the app bundle, which are used based on the target and also the build configuration.

When I am running the beta configuration, it runs fine, but when I try to run the release version of the application, xcode still picks up the beta build configurations.

I have tried various ways to change the plist file, deleted the files,added them again, edited the build phases, edited the build settings in the copy bundle resources. Closed xcode and also the simulators. I donot know what I am missing in these.

I have also made sure only one info.plist file is associated with one target. The targets shows the correct info while checking, can you please help me with this. The problem occurred during merging of two code versions.

Update:

I went ahead and deleted the info.plist file, which shows up in both the targets, but all I receive is an error while compiling info.plist utility error. It is pointing the plist file, which I deleted. The info, build settings, show the correct plist files

Update 2

I went ahead and also changed the files, changed build settings, packaging files, but still the target picks up the other file. Any way to fix this?

Community
  • 1
  • 1
Dheeraj Jami
  • 190
  • 2
  • 14
  • 1
    I know you say you have checked the build settings, but just to be sure... you have set the plist under "Info.plist File" in "Packaging" _in the correct target_? – Gary Riches Feb 09 '15 at 17:05
  • I have done that, but still the same issue. I went ahead and deleted the info.plist file, which shows up in both the targets, but all I receive is an error while compiling info.plist utility error. It is pointing the plist file, which I deleted. The info, build settings, show the correct plist files – Dheeraj Jami Feb 09 '15 at 17:37
  • I went ahead and also changed the files, changed build settings, packaging files, but still the target picks up the other file. Any way to fix this? – Dheeraj Jami Feb 09 '15 at 18:08
  • You need to clean the caches between builds, as I explain here: http://stackoverflow.com/a/6247073/341994 – matt Feb 09 '15 at 18:14
  • @matt I have done the cleaning, removed the files from the directory, but doesnt help. I always do the reset content and settings but always the same issue. – Dheeraj Jami Feb 09 '15 at 18:20

3 Answers3

1

It happened to me today and at nothing written here helped

  • the settings ARE ok but resetting it didn't help
  • the cache cleaning didn't help

BUT what helped is:

  • recreating the scheme with 100% the same settings :) it works fine now
Daij-Djan
  • 49,552
  • 17
  • 113
  • 135
1

You don't have to clear any cache, just edit the scheme of the new target and change the run executable in the info tab to the new executable target.

rockdaswift
  • 9,613
  • 5
  • 40
  • 46
0

I have fixed this problem by using the plist file irrespective of the configuration. So, irrespective of the target if a corresponding scheme had beta configuration I will use one plist file, if the other target is the release version so I will use another plist file.

Dheeraj Jami
  • 190
  • 2
  • 14