mod-pbxproj

A python module to manipulate XCode projects
授权协议 MIT License
开发语言 Python
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 胡云瀚
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

pbxproj

This module can read, modify, and write a .pbxproj file from an Xcode 4+ projects. The file is usually called project.pbxproj and can be found inside the .xcodeproj bundle. Because some task cannot be done by clicking on an UI or opening Xcode to do it for you, this python module lets you automate the modification process.

How to use it

The typical tasks with an Xcode project are adding files to the project and setting some standard compilation flags.It can be achieved with a simple snippet like this:

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()

That's it. More details about available API's visit the wiki.

Installation

For installation instructions visit the wiki

CLI

For instructions and commands available visit the wiki

Documentation

For general documentation, visit the wiki.For technical documentation, the public functions are documented and contains details about what is expected.

Reporting bugs

Did you find a bug? Too bad, but we want to help you, we need you to:

  • Check you are running python3 and installed the package using the pip3 command.
  • Provide as many details about the error you are having.
  • If possible provide a sample project.pbxproj to reproduce the steps
  • If possible, try the sequence of steps on Xcode and provide the project.pbxproj generated by Xcode.

We cannot help you if your issue is a title: "it does not work". Or if there is no sequence of steps to reproduce the error. Those kind of issues will be ignored or closed automatically.

Contributing

Do you want to fix an issue yourself? Great! some house rules:

  • Provide a description of what problem you are solving, what case was not being taking into account
  • Provide unit tests for the case you have fixed. Pull request without unit test or PRs that decrease the coverage will not be approved until this changes.
  • Adhere to the coding style and conventions of the project, for instance, target_name is used to specify the target across all functions that use this parameter. Changes will be requested on PRs that don't follow this.
  • Write descriptive commit messages.

License

This project is licensed using MIT license.

  • project.pbxproj介绍         project.pbxproj 文件被包含于 Xcode 工程文件 *.xcodeproj 之中,存储着 Xcode 工程的各项配置参数。它本质上是一种旧风格的 Property List 文件,历史可追溯到 NeXT 的 OpenStep。其可读性不如 xml 和 json,苹果却一直沿用至今,作为一家以创新闻名的公司可能这里剩下的就是情怀吧。

  • Python:修改XCode项目project.pbxproj文件插件 “mod-pbxproj” 插件地址:https://github.com/kronenthaler/mod-pbxproj 使用: from pbxproj import XcodeProject # open the project project = XcodeProject.load('myapp.xcodeproj/

  • 公司需要测试人员测试app,测试又是个程序小白,一点都不会,一天来找我安装80回app,尼玛。。。。。最后把老子逼急了,于是用python写了个脚本(我博客里面共享了这个脚本),在脚本中定义了几个变量,让他自己去修改那几个变量就可以了,修改好之后save一下,用AppleScript执行Python就行。为什么多加了个AppleScript???因为不用在命令行输入 python build.py

  • 最近在弄ios混淆,其中的一个核心就是处理ios的工程项目文件。尝试过使用mod_pbxproj这个开源的python库,感觉不好用,因此自己实现了一个能操作pbxproj文件的库。 github地址 https://github.com/gopep9/pbxtool

 相关资料
  • mod-groovy 是一个在 Apache HTTP 服务器上运行 Groovy 脚本的模块。

  • mod-xslt 是一个 Apache 的扩展模块,用 XSLT 样式单来实现将 XML 文件转换成 HTML 文档的功能。

  • Mod-Transf是一个基于XML与规则的转换语言。支持多种输入和输出模型包括:JMI, XML和对象图形。这种语言具有宣告式的语法,继承,自定义规则等特性。

  • Metamod 是一个插件/DLL 管理器,用于 Half-Life 引擎和 HL 游戏模块的中间,允许动态的加载和卸载模块的DLL插件,用来给 HL 服务器和游戏动态的删减功能。

  • mod_spdy 是用于 Apache HTTP 服务器的 SPDY 协议实现模块。

  • Centmin Mod 是 CentOS 上的 LNMP 一键安装工具,使用一个基于菜单的安装程序,如下图所示: 包含如下软件: Nginx 1.5.7 PHP 5.3.27 (php-fpm) MariaDB 5.5.34 MySQL performance fork PHP opcode cache: APC Cache 3.13, Xcache 2.01 Memcached Server 1