IOS Framework Configuration Script

Source: Internet
Author: User

# Sets the target folders and the final framework product.

Fmk_name=hovnvoipengine

fmk_version=1.0


# 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


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

Wrk_dir=build

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

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


# Building both architectures.

Xcodebuild-configuration "Release" -target "${fmk_name}" -sdk Iphoneos

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


# cleaning the oldest.

if [-D "${install_dir}" ]

Then

rm-rf "${install_dir}"

Fi


# creates and renews the final product folder.

mkdir-p "${install_dir}"

mkdir-p "${install_dir}/versions"

mkdir-p "${install_dir}/versions/${fmk_version}"

mkdir-p "${install_dir}/versions/${fmk_version}/resources"

mkdir-p "${install_dir}/versions/${fmk_version}/headers"


# creates the internal links.

# It must uses relative path, otherwise won't work when the folder is copied/moved.

ln-s "${fmk_version}" "${install_dir}/versions/current"

ln-s "versions/current/headers" "${install_dir}/headers"

ln-s "versions/current/resources" "${install_dir}/resources"

ln-s "Versions/current/${fmk_name}" "${install_dir}/${fmk_name}"


# Copies The headers and resources files to the final product folder.

cp-r "${device_dir}/headers/" "${install_dir}/versions/${fmk_version}/headers/"

cp-r "${device_dir}/" "${install_dir}/versions/${fmk_version}/resources/"


# removes the binary and header from the Resources folder.

rm-r "${install_dir}/versions/${fmk_version}/resources/headers""${install_dir}/versions/${fmk _version}/resources/${fmk_name} "


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

lipo-create "${device_dir}/${fmk_name}""${simulator_dir}/${fmk_name}" -output "${ Install_dir}/versions/${fmk_version}/${fmk_name} "


rm-r "${wrk_dir}"

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.