#!/bin/sh

#  build.sh
#  LKF
#
#  Created by Alexander Holzer on 27.01.21.
#  Copyright © 2021 Alexander Holzer. All rights reserved.


current_path=$(pwd)
echo $current_path
xcodebuild archive -scheme lkfcm -sdk iphonesimulator -archivePath ~/Desktop/libcm-iphonesimulator.xcarchive SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild archive -scheme lkfcmMACOS -destination 'platform=macOS,arch=x86_64' -archivePath ~/Desktop/libcm-macOS.xcarchive SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild archive -scheme lkfcm -destination='iOS' -sdk iphoneos -archivePath ~/Desktop/libcm-iOS.xcarchive SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework -framework ~/Desktop/libcm-iOS.xcarchive/Products/Library/Frameworks/lkfcm.framework -framework ~/Desktop/libcm-macOS.xcarchive/Products/Library/Frameworks/lkfcm.framework -framework ~/Desktop/libcm-iphonesimulator.xcarchive/Products/Library/Frameworks/lkfcm.framework -output ~/Desktop/lkfcm.xcframework
