[CMake] [EXTERNAL]: CMake and Code Signing in XCode 8 for iOS projects

Parag Chandra parag at ionicsecurity.com
Mon Nov 21 10:01:44 EST 2016


Hi Frank,

I got curious about this myself, and it looks like the checkbox alters the following in the .pbxproj:

				TargetAttributes = {
					2BA1B86D1DE33AA300073B96 = {
						CreatedOnToolsVersion = 8.1;
						ProvisioningStyle = Manual;
					};
				};


With it  checked, “ProvisioningStyle = Automatic”. To the best of my knowledge, XCODE_ATTRIBUTE_* can only be used for items that show up with a corresponding “Declaration” field when viewed in Xcode’s Quick Help pane, e.g. “ARCHS” can be set via XCODE_ATTRIBUTE_ARCHS.

I had a similar problem targeting NaCl with the Visual Studio generator – there was a property in the .vcxproj file that I couldn’t access directly from CMake. I ended up writing a simple Python script to massage the generated vcxproj in order to give me the desired end result. Not a great solution, but it’s worked out pretty well for me because in practice I don’t run CMake directly on the cmd line. I drive it from a Gradle script which feeds it all the necessary cmd line args I need, so I just tacked on this bit of Python to the end of my Gradle script.

Hope this helps.

Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309
 

On 11/19/16, 3:56 PM, "CMake on behalf of Frank" <cmake-bounces at cmake.org on behalf of cmake at deinzer.biz> wrote:

    Hi all,
    
    CMake was able to configure automatic code signing for XCode <=7 and iOS 
    projects with a target property setting like
    
    set_target_properties(app PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY 
    "PROPER IDENTIFIER")
    
    XCode 8 changed the signing process. It now is required that the option 
    "Automatically manage signing" in the project settings "General tab -> 
    Signing" is checked. If I check this options manually for a cmake 
    generated project, signing works well. But I did not find a way to 
    enable this option from the cmake project by default. Can this be done 
    for cmake (>=3.7.0)?
    
    Thanks for any help,
    Frank
    -- 
    
    Powered by www.kitware.com
    
    Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
    
    Kitware offers various services to support the CMake community. For more information on each offering, please visit:
    
    CMake Support: http://cmake.org/cmake/help/support.html
    CMake Consulting: http://cmake.org/cmake/help/consulting.html
    CMake Training Courses: http://cmake.org/cmake/help/training.html
    
    Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
    
    Follow this link to subscribe/unsubscribe:
    http://public.kitware.com/mailman/listinfo/cmake
    



More information about the CMake mailing list