Coder Social home page Coder Social logo

commandlinepackaging's Introduction

命令行编译打包

主要步骤

  1. 清理
xcodebuild clean -workspace YourProjectName.xcworkspace -scheme YourProjectName -configuration Release
  1. 编译
xcodebuild -workspace YourProjectName.xcworkspace -scheme YourProjectName -archivePath build/YourProjectName.xcarchive archive
  1. 打包
xcodebuild -exportArchive -archivePath build/YourProjectName.xcarchive -exportPath build -exportOptionsPlist export.plist

其他注意事项

第三步打包需要有个export.plist文件才能打包成功

export.plist文件代码如下:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>compileBitcode</key>
	<false/>
	<key>method</key>
	<string>ad-hoc</string>
	<key>provisioningProfiles</key>
	<dict>
		<key>llqqb.borrowMoney</key>
		<string>yxbAdHoc</string>
	</dict>
	<key>signingCertificate</key>
	<string>iPhone Distribution</string>
	<key>signingStyle</key>
	<string>automatic</string>
	<key>stripSwiftSymbols</key>
	<true/>
	<key>teamID</key>
	<string>5J784PXPGS</string>
	<key>thinning</key>
	<string>&lt;none&gt;</string>
</dict>
</plist>

export.plist需要你自己配置的信息:

  • method: 打的包的类型(development, ad-hoc, app-store, enterprise
  • provisionProfiles: 项目的包名和对应ProvisionProfiles文件名
  • signingCertificate: 是否是开发环境还是生产环境
  • teamID: TeamID(通过AppleDeveloper查看)

commandlinepackaging's People

Contributors

spikeroog avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

hangzhoumiantao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.