MantisBT - CMake
View Issue Details
0014901CMakeCMakepublic2014-04-30 16:082014-11-03 08:37
Yasser Zabuair 
 
normalmajoralways
closedfixed 
Apple MacOS X10.4.10
CMake 2.8.12.2 
CMake 3.0CMake 3.0 
0014901: Adding an .xib to an XCode project does not work.
When an .xib resource is added to the project, the Xcode generator generates the project in such a way that XCode does not treat the project as an .xib:

The project.pbxproj uses an invalid field for an xib file. When the project is generated, the following is setup for the xib:
{isa = PBXFileReference; explicitFileType = "file.xib"; fileEncoding = 4; name = "TestView.xib"; path = "mpos_apps/ktciosapp/TestView.xib"; sourceTree = SOURCE_ROOT; };

The explicitFiletype is incorrect, it should be lastKnownFileType:

{isa = PBXFileReference; lastKnownFileType = "file.xib"; fileEncoding = 4; name = "TestView.xib"; path = "mpos_apps/ktciosapp/TestView.xib"; sourceTree = SOURCE_ROOT; };

The following is done to add the .xib:

file(GLOB xibFiles *.xib)
.
.
source_group("Resources" FILES ${xibFiles})
.
.
add_executable (${ProgramName} MACOSX_BUNDLE ${cppFiles} ${hFiles} ${mmFiles} ${xibFiles} )

set_target_properties(${ProgramName} PROPERTIES
                                     MACOSX_BUNDLE_GUI_IDENTIFIER "ca.kili.ktciosapp"
                                     RESOURCE "${xibFiles}"
                                     XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
                                     XCODE_ATTRIBUTE_INFOPLIST_PREPROCESS YES
)
This is for CMake 2.8.12.2 and XCode Version 5.1.1 (5B1008)
No tags attached.
Issue History
2014-04-30 16:08Yasser ZabuairNew Issue
2014-04-30 16:23Brad KingNote Added: 0035811
2014-04-30 18:00Yasser ZabuairNote Added: 0035812
2014-05-01 08:35Brad KingStatusnew => resolved
2014-05-01 08:35Brad KingResolutionopen => fixed
2014-05-01 08:35Brad KingFixed in Version => CMake 3.0
2014-05-01 08:35Brad KingTarget Version => CMake 3.0
2014-11-03 08:37Robert MaynardNote Added: 0037127
2014-11-03 08:37Robert MaynardStatusresolved => closed

Notes
(0035811)
Brad King   
2014-04-30 16:23   
This was fixed here:

 Xcode: Fix storyboard view
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ce02ebfd [^]

Please try a CMake 3.0 release candidate:

 http://www.cmake.org/files/v3.0/?C=M;O=D [^]
(0035812)
Yasser Zabuair   
2014-04-30 18:00   
- Thanks for the quick response.
- CMake 3.0 seems to have solved the problem.
- Feel free to close this issue.
(0037127)
Robert Maynard   
2014-11-03 08:37   
Closing resolved issues that have not been updated in more than 4 months.