Sha256: 19638373b4387669516c9df78a65f76759e02f4d0879338514660e051f2b7cc7

Contents?: true

Size: 1.41 KB

Versions: 15

Compression:

Stored size: 1.41 KB

Contents

#!/bin/bash
set -e

WORKING_DIR=$(pwd)

FRAMEWORK_FOLDER_NAME="XCFramework"

FRAMEWORK_NAME="{{PLUGIN_NAME}}"

FRAMEWORK_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/${FRAMEWORK_NAME}.xcframework"

BUILD_SCHEME="{{PLUGIN_NAME}}Framework"

SIMULATOR_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/simulator.xcarchive"

IOS_DEVICE_ARCHIVE_PATH="${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}/iOS.xcarchive"

rm -rf "${WORKING_DIR}/${FRAMEWORK_FOLDER_NAME}"
echo "Deleted ${FRAMEWORK_FOLDER_NAME}"
mkdir "${FRAMEWORK_FOLDER_NAME}"
echo "Created ${FRAMEWORK_FOLDER_NAME}"
echo "Archiving ${FRAMEWORK_NAME}"

xcodebuild -workspace "{{PLUGIN_NAME}}.xcworkspace" archive ONLY_ACTIVE_ARCH=NO ARCHS="x86_64 arm64 i386" -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS Simulator" -archivePath "${SIMULATOR_ARCHIVE_PATH}" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES

xcodebuild archive -workspace "{{PLUGIN_NAME}}.xcworkspace" -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS" -archivePath "${IOS_DEVICE_ARCHIVE_PATH}" -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES

xcodebuild -create-xcframework -framework ${SIMULATOR_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework -framework ${IOS_DEVICE_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework -output "${FRAMEWORK_PATH}"

rm -rf "${SIMULATOR_ARCHIVE_PATH}"
rm -rf "${IOS_DEVICE_ARCHIVE_PATH}"

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
gonative-cli-0.5.6 templates/plugins/ios/common/create-framework.sh.tpl
gonative-cli-0.5.5 templates/plugins/ios/common/create-framework.sh.tpl
gonative-cli-0.5.4 templates/plugins/ios/common/create-framework.sh.tpl
gonative-cli-0.5.3 templates/plugins/ios/common/create-framework.sh.tpl
gonative-cli-0.5.2 templates/plugins/ios/common/create-framework.sh.tpl
gonative-cli-0.5.0 templates/plugins/ios/common/create-framework.sh.tpl
gonative-cli-0.4.5 templates/plugins/ios/create-framework.sh.tpl
gonative-cli-0.4.4 templates/plugins/ios/create-framework.sh.tpl
gonative-cli-0.4.3 templates/plugins/ios/create-framework.sh.tpl
gonative-cli-0.4.2 templates/plugins/ios/create-framework.sh.tpl
gonative-cli-0.4.1 templates/plugins/ios/create-framework.sh.tpl
gonative-cli-0.4.0 templates/plugins/ios/create-framework.sh.tpl
gonative-cli-0.3.1 templates/plugins/ios/create-framework.sh.tpl
gonative-cli-0.3.0 templates/plugins/ios/create-framework.sh.tpl
gonative-cli-0.1.0 templates/plugins/ios/create-framework.sh.tpl