Git Product home page Git Product logo

xcode_shell's Introduction

Note

Highly suggest you use fastlane instead of this project.

If you want to publish ipa to fir, use official project fir-cli instead of this project. Script ipa-publish-fir is deprecated.

Introduce


This repository contains a series of useful shell scripts which can help you to work effectively when programming for iOS platform. ####Include:

  • build .ipa package
  • publish .ipa file to fir.im or your own server
  • send email

Necessary


  • Mac OS X
  • "Command Line Tools" of xcode
  • ruby with "json" package installed

Detail


##1.compile and package xcode project or workspace

You can do this by using "ipa-build" shell script.

This ipa-build script is created to compile the xcode project and package the project to an ipa file.

####Usage:

building xcode project

ipa-build <project directory> [-c <project configuration>] [-o <ipa output directory>] [-t <target name>] [-n]

building xcode workspace

ipa-build  <workspace directory> -w -s <schemeName> [-c <project configuration>] [-n]

####Options:

-c NAME		the configuration of project used to compile.Default is Release
-o PATH		output path for ipa file(must be a directory)
-t NAME		the target which should be compiled
-w			build xcode workspace	
-s NAME		the schemal to be used for compiling
-n			clean the project before compling

####Example:

build project
If you have an iOS project in the path ~/iphone, and the ipa-build script is put in the path ~/xcode-shell.You want to build this project with 'Release' configuration.Just using script like this:

cd ~/iphone
~/xcode-shell/ipa-build .

If you want to assign specific configuration or target, you can add relevant options to the command.

build workspace

If ~/iphone is a xcode workspace and the scheme used for compile named 'test'.The ipa-build script is put in the path ~/xcode-shell.Using script like this:

cd ~/iphone
~/xcode-shell/ipa-build . -w -s test

You can also assign a specific configuration by using -c option.

Note:If script executed successfully,an ipa file is created in the path: <project path>/build/ipa-build.

##2.compile project used CocoaPods

CocoaPods is an Objective-C library manager.If you use it in your iOS project.You can also use 'ipa-build' script to build by assign workspace and scheme, or you can use the 'cocoapods-build' to build it more easily.

####Usage:

cocoapods-build <cococapods project path> [<build configuration>] 

####Example:

cd ~/iphone
~/xcode-shell/cocoapods-build . Debug

##3.publish project

###ipa-publish ####Configure You must configure the script before using at the first time. Open it in any text editor and input you own configurations. Such as ftp address, app download url, email sender and email receiver. After that you can run this script to publish app to your own server. Note that installing app from your own server should respect the protocol named "itms-services". To learn more about "itms-services" you can click blog Wireless AdHoc Distribution(English) or blog ios实现itms-services协议企业内发布或者越狱发布(中文).

####Usage:

ipa-publish <project root path> [y <should send notification email>]

####Examples:

~/xcode-shell/ipa-publish . y   #publish and send email
~/xcode-shell/ipa-publish .     #just publish

###ipa-publish-fir This script is similar to "ipa-publish". Both of them are using to publish app to somewhere. But this script will publish app to fir.im. So it is more easier to use, as you don't need a special server and FTP. You can use it without any configration, unless you want to send email to notify somebody.

####Configure If you want to send email to notify somebody. Open the script, and changed the value of "email_reciver". This field may contain one or more than one emails.

####Usage:

ipa-publish-fir [-d directory>] [-e] [-l number] [-m message]

####Options:

-d path		the root directory of project
-e			send email after publishing
-l number	limit of git log, which will be used as change log.
-m message	used as chang log

####Examples:

~/xcode-shell/ipa-publish-fir -d . -el20 -m "haha"	#Publish and send email. The change log on fir and in email will be "haha"+<last 20 logs of git>
~/xcode-shell/ipa-publish-fir -d .     			#just publish

##4.add @2x suffix to image files

When programming for retina device of iOS,the image file you used should add the suffix of @2x. Using the script "add2x" can help you do this automaticly.

add2x: add suffix of @2x to all the image files(just png and jpg file) .This script work in the current directory.

Usage:

  1. go to the directory which contains images should be added suffix.
  2. execute the add2x script.

note: There is a bug of this script.If your image file name contains blank spaces, script can not work correctly.

xcode_shell's People

Contributors

elisaday avatar shannonchou avatar webfrogs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xcode_shell's Issues

路径空格问题

程序中用到很多路径的变量,如果director里有空格就会报错,请加上引号

停在 "ONLY_ACTIVE_ARCH = NO" 不动

非常棒的项目, 感谢.

试用过程中出现一个问题, 会卡在 "ONLY_ACTIVE_ARCH = NO" 不动, 不知道是否是环境问题, 希望能给予一些帮助, 谢谢.

执行:

~/xcode_shell/cocoapods-build . Debug

Log:

Build settings from command line:
CONFIGURATION_BUILD_DIR = /Users/xxx/builds/0c5e0783/0/xxx/xxx-iOS/build/Debug-iphoneos
ONLY_ACTIVE_ARCH = NO

./cocoapods-build . Release wrong

The following build commands failed:
CompileC /Users/gitburning/Library/Developer/Xcode/DerivedData/LingDiApp-entpsiisisurszfnszbjhllsgfef/Build/Intermediates/LingDiApp.build/Release-iphoneos/LingDiApp.build/Objects-normal/armv7/BaseViewModel.o LingDiApp/Function/BaseViewModel/BaseViewModel.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

I build project wrong with use './cocoapods-build . Release',,, can you help me?

solve custom configuration name can not make a ipa

i define a build config named ‘ad-hoc’,and run the script but can not
get a ipa at directory ipa-build .and after check ,i find if i change
the appdirname use my way ,it will generate a ipa.

change this:

build文件夹路径

build_path=${project_path}/build

生成的app文件目录

appdirname=Release-iphoneos
if [ $build_config = Debug ];then
appdirname=Debug-iphoneos
fi
if [ $build_config = Distribute ];then
appdirname=Distribute-iphoneos

fi

to

appdirname=${build_config}-iphoneos

自动与手动包 相差3~5M

你好!
我使用ipa-build生成出来的包,比手动生成出来的包。大3~5M,是设置错误还是需要调整代码

Duplicate target

Hi,

I need to create a duplicate target and rename it and rename the plist associated with it. How can I do it ??

"CFBundleShortVersionString", Does Not Exist

bash ipa-build /Users/xiakejie/cocoapods/testp -w -s Pods [-c Debug] [-n]

怎么报
Print: Entry, "CFBundleShortVersionString", Does Not Exist
Print: Entry, "CFBundleVersion", Does Not Exist
Print: Entry, "CFBundleDisplayName", Does Not Exist
File Doesn't Exist, Will Create: /Users/xiakejie/cocoapods/testp/build/Release-iphoneos/.app/Info.plist__File Doesn't Exist, Will Create: /Users/xiakejie/cocoapods/testp/build/Release-iphoneos/.app/Info.plist_Release_File Doesn't Exist, Will Create: /Users/xiakejie/cocoapods/testp/build/Release-iphoneos/*.app/Info.plist_20141219
怎么解决

如果工程用的是cocopads管理的 那么运行buld就会报错

如我的项目名字是GYBaseDemo然后报错结果是
The following build commands failed:
Ld build/GYNewDemo.build/Release-iphoneos/GYNewDemo.build/Objects-normal/armv7/GYNewDemo normal armv7
Ld build/GYNewDemo.build/Release-iphoneos/GYNewDemo.build/Objects-normal/arm64/GYNewDemo normal arm64
请问如何解决

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.