rm -rf build.sh
mkdir -p NativeAPI.xcodeproj/xcshareddata
mkdir -p NativeAPI.xcodeproj/xcshareddata/xcschemes
echo '<?xml version="1.0" encoding="UTF-8"?><Scheme LastUpgradeVersion = "0900" version = "1.3"><BuildAction><BuildActionEntries><BuildActionEntry buildForArchiving = "YES"><BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "7949730E1A2DC9510086A81C" BuildableName = "com_1c_StepCounter_dynamic.bundle" BlueprintName = "NativeAPI_dynamic" ReferencedContainer = "container:NativeAPI.xcodeproj"></BuildableReference></BuildActionEntry></BuildActionEntries></BuildAction><LaunchAction><BuildableProductRunnable><BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "7949730E1A2DC9510086A81C" BuildableName = "com_1c_StepCounter_dynamic.bundle" BlueprintName = "NativeAPI_dynamic" ReferencedContainer = "container:NativeAPI.xcodeproj"></BuildableReference></BuildableProductRunnable></LaunchAction><ArchiveAction buildConfiguration = "Release"></ArchiveAction></Scheme>'>NativeAPI.xcodeproj/xcshareddata/xcschemes/releasedynamic.xcscheme
echo '<?xml version="1.0" encoding="UTF-8"?><Scheme LastUpgradeVersion = "0900" version = "1.3"><BuildAction><BuildActionEntries><BuildActionEntry buildForArchiving = "YES"><BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "7949730E1A2DC9510086A81C" BuildableName = "com_1c_StepCounter_static.bundle" BlueprintName = "NativeAPI_static" ReferencedContainer = "container:NativeAPI.xcodeproj"></BuildableReference></BuildActionEntry></BuildActionEntries></BuildAction><LaunchAction><BuildableProductRunnable><BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "7949730E1A2DC9510086A81C" BuildableName = "com_1c_StepCounter_static.bundle" BlueprintName = "NativeAPI_static" ReferencedContainer = "container:NativeAPI.xcodeproj"></BuildableReference></BuildableProductRunnable></LaunchAction><ArchiveAction buildConfiguration = "Release"></ArchiveAction></Scheme>'>NativeAPI.xcodeproj/xcshareddata/xcschemes/releasestatic.xcscheme

xcodebuild -project NativeAPI.xcodeproj -scheme releasedynamic build CODE_SIGN_IDENTITY="$1" CONFIGURATION_BUILD_DIR=build/dynamic
xcodebuild -project NativeAPI.xcodeproj -scheme releasestatic build CONFIGURATION_BUILD_DIR=build/static
