iOS Dynamic Library compositing package (real machine & emulator) script

Source: Internet
Author: User

# Sets the target folders and the final framework product.

# Set destination folder and dynamic library

Fmk_name=${project_name}

# Install Dir'll is the final output to the framework.

# The following line create it at the root folder of the current project.

# install_dir=${srcroot}/products/${fmk_name}.framework--- original path

# Specify the final generated dynamic library path

install_dir=${srcroot}/products/${fmk_name}.framework--- Original Path

# working dir would be a deleted after the framework creation.

# The path of the Dynamic Library original real machine and the emulator package

Wrk_dir=build

Device_dir=${wrk_dir}/release-iphoneos/${fmk_name}.framework

Simulator_dir=${wrk_dir}/release-iphonesimulator/${fmk_name}.framework

#-configuration ${configuration}

# Clean and Building both architectures.

# compile real machine and emulator dynamic library

Xcodebuild-configuration "Release" -target "${fmk_name}" -sdk iphoneos Clean build

Xcodebuild-configuration "Release" -target "${fmk_name}" -sdk iphonesimulator Clean build

# cleaning the oldest.

If [-D "${install_dir}" ]

Then

RM-RF "${install_dir}"

Fi

Mkdir-p "${install_dir}"

Cp-r "${device_dir}/" " ${install_dir}/"

# Uses The Lipo Tool to merge both binary files (i386 + armv6/armv7) into one Universal final product.

# Crafting Package

Lipo-create "${device_dir}/${fmk_name}" " ${simulator_dir}/${fmk_name}" -output "${install _dir}/${fmk_name} "

Rm-r "${wrk_dir}"

iOS Dynamic Library compositing package (real machine & emulator) script

Related Article

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.