Install xcode "install setup" from terminal?

Anyway, can I change the setting in xcode without opening xcode? I have an automated xcodebuild / xcrun process, but I need to change the value 1:

Goals> Select Goal> Build Settings> Code Signing Rule Resource Path Add: $ (SDKROOT) /ResourceRules.plist

I cannot find the file where I can put this line ...

+6
source share
2 answers

What you can do is run:

xcodebuild -target <target> -configuration <configuration> -showBuildSettings 

This command shows all the parameters that were filled in to transmit the target and configuration. Find the name of the key containing $(SDKROOT)/ResourceRules.plist (call him THE_KEY), and then try:

 xcodebuild -target <target> -configuration <configuration> THE_KEY=<new_value> 

Do not guarantee that it will work.

+8
source

You can try pbxproj . This is a python module that helps you manage Xcode projects using the command line.

Your issue may be https://github.com/kronenthaler/mod-pbxproj/wiki/flags#add-code-sign

You can pip install pbxproj have it.

And here is an example presented in the official repo:

 from pbxproj import XcodeProject # open the project project = XcodeProject.load('myapp.xcodeproj/project.pbxproj') # add a file to it, force=false to not add it if it already in the project project.add_file('MyClass.swift', force=False) # set a Other Linker Flags project.add_other_ldflags('-ObjC') # save the project, otherwise your changes won't be picked up by Xcode project.save() 
0
source

Source: https://habr.com/ru/post/912627/


All Articles