当前位置: 首页 > 工具软件 > mod-pbxproj > 使用案例 >

Python:修改XCode项目project.pbxproj文件插件 “mod-pbxproj”

洪光霁
2023-12-01

Python:修改XCode项目project.pbxproj文件插件 “mod-pbxproj”

插件地址:https://github.com/kronenthaler/mod-pbxproj

使用:

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's 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()
 类似资料: