Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6.1 different "deployment info" section for duplicated target

So, I have an universal project enter image description here

The "deployment info" section looks like this: enter image description here

I then duplicate the target enter image description here

I expect the two targets to be identical and in fact they seem the same in everything, but one detail is different in the duplicated one: enter image description here

the duplicated target has 2 tabs to choose different options for iPad and Iphone; this makes really sense because with universal I can choose the check different stuff. The original target seems to show only the iPhone options though. I know I can change iPad's options elsewhere but I can't understand why this is different

Now the question is: am I missing something? Are the targets really identical or am I doing something wrong? Is it an Xcode bug?

Everything works properly as it should, the targets are identical, but I am a little afraid there could be some problems in future.

Thank you very much!

like image 326
J.Williams Avatar asked Mar 01 '15 13:03

J.Williams


2 Answers

I found the attribute which affect the display behavior of Xcode deployment info:

In the PBXProject section of project.pbxproj file, there are lines looks like:

            TargetAttributes = {
                22CFA0081BE46E9A00A89E90 = {
                    CreatedOnToolsVersion = 7.2;
                };
            };

If this attribute exists in the project, the Xcode will not display "iPhone" and "iPad" buttons . Just remove these lines, then the buttons will show.

This should be a bug of Xcode7.2

like image 174
Dayong Xie Avatar answered Oct 16 '22 02:10

Dayong Xie


I found this same problem today in my project. But I needed a solution because it was not respecting my orientation settings on the original target when using an iPad.

I made a copy of the already duplicated target. This solution worked, but I abandoned it to limit my risk to our production build settings.

I ended up just modifying the appropriate ProjectX-Info.plist file Locating the "Supported Interface orientations (iPad)" key and adding all 4 orientations. (Replacing "ProjectX" with your Target)

I am using Xcode 7.0.1 (7A1001) and hope it is fixed in a future release

like image 2
Marty Cullen Avatar answered Oct 16 '22 02:10

Marty Cullen