iOS Development Series-shell script compiler SDK

Source: Internet
Author: User

Static Library shell scripts
#!/bin/bash# to build target name target_name= "Htkit" #编译模式 Release, debugbuild_model=release# gets the current path of the project project_path=$ ( PWD) #编译文件路径buildPath =${project_path}/build# Export the SDK address exportsdkpath=~/desktop/${target_name}-sdk/${build_model}if [ ! -D $exportSdkPath]; Thenmkdir-p $exportSdkPath; fi# real-Machine SDK path iphoneos_path=${buildpath}/${build_model}-iphoneos/lib${target_name}.a# Emulator SDK path simulator_path=${buildpath}/${build_model}-iphonesimulator/lib${target_name}.a# Merge SDK path merge_path=${ Exportsdkpath}/lib${target_name}.a#build before clean xcodebuild-target ${target_name} clean# simulator Buildxcodebuild- Target ${target_name}-configuration ${build_model}-sdk iphonesimulator# real machine buildxcodebuild-target ${target_Name}- Configuration ${build_model}-sdk iphoneos# copy header file to destination folder Cp-r ${buildpath}/${build_model}-iphoneos/include/${target_ Name} ${exportsdkpath} #合并模拟器和真机. A package Lipo-create ${iphoneos_path} ${simulator_path}-output ${merge_path} #压缩合并后的文件 # Compressed file name package_date= ' Date ' +%y-%m-%d-day%x ' sdk_zip_name=lib${target_name}_${build_model}_${package_date}.zip# jump to the output path of the SDK CD ${exportsdkpath} #压缩sdk输出路径下的所有文件zip-R ~/desktop/${target_name}-sdk/${sdk_zip_ Name}./* #打开合并后的sdk所在路径open ${exportsdkpath} #删除build文件if [-D ${buildpath}]; THENRM-RF ${buildpath}fi

iOS Development Series-shell script compilation SDK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.