This commit is contained in:
Wojtek Mach 2023-06-16 14:39:49 +02:00
parent 8f37dce0e4
commit 2affc059a1
4 changed files with 60 additions and 3 deletions

View file

@ -13,6 +13,7 @@
2E7CBC1E2A3B3343001253E3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E7CBC0C2A3B3340001253E3 /* ContentView.swift */; }; 2E7CBC1E2A3B3343001253E3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E7CBC0C2A3B3340001253E3 /* ContentView.swift */; };
2E7CBC1F2A3B3343001253E3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2E7CBC0D2A3B3343001253E3 /* Assets.xcassets */; }; 2E7CBC1F2A3B3343001253E3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2E7CBC0D2A3B3343001253E3 /* Assets.xcassets */; };
2E7CBC202A3B3343001253E3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2E7CBC0D2A3B3343001253E3 /* Assets.xcassets */; }; 2E7CBC202A3B3343001253E3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2E7CBC0D2A3B3343001253E3 /* Assets.xcassets */; };
2E951DDB2A3B507700C64042 /* ElixirKit in Frameworks */ = {isa = PBXBuildFile; productRef = 2E951DDA2A3B507700C64042 /* ElixirKit */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
@ -22,6 +23,7 @@
2E7CBC122A3B3343001253E3 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 2E7CBC122A3B3343001253E3 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
2E7CBC182A3B3343001253E3 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 2E7CBC182A3B3343001253E3 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
2E7CBC1A2A3B3343001253E3 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = "<group>"; }; 2E7CBC1A2A3B3343001253E3 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = "<group>"; };
2E951DD82A3B502900C64042 /* elixirkit_swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = elixirkit_swift; path = ../../../elixirkit_swift; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -36,6 +38,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
2E951DDB2A3B507700C64042 /* ElixirKit in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -45,9 +48,11 @@
2E7CBC052A3B3340001253E3 = { 2E7CBC052A3B3340001253E3 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
2E951DD72A3B502900C64042 /* Packages */,
2E7CBC0A2A3B3340001253E3 /* Shared */, 2E7CBC0A2A3B3340001253E3 /* Shared */,
2E7CBC192A3B3343001253E3 /* macOS */, 2E7CBC192A3B3343001253E3 /* macOS */,
2E7CBC132A3B3343001253E3 /* Products */, 2E7CBC132A3B3343001253E3 /* Products */,
2E951DD92A3B507700C64042 /* Frameworks */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -78,6 +83,21 @@
path = macOS; path = macOS;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
2E951DD72A3B502900C64042 /* Packages */ = {
isa = PBXGroup;
children = (
2E951DD82A3B502900C64042 /* elixirkit_swift */,
);
name = Packages;
sourceTree = "<group>";
};
2E951DD92A3B507700C64042 /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
@ -112,6 +132,9 @@
dependencies = ( dependencies = (
); );
name = "Demo (macOS)"; name = "Demo (macOS)";
packageProductDependencies = (
2E951DDA2A3B507700C64042 /* ElixirKit */,
);
productName = "Demo (macOS)"; productName = "Demo (macOS)";
productReference = 2E7CBC182A3B3343001253E3 /* Demo.app */; productReference = 2E7CBC182A3B3343001253E3 /* Demo.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
@ -124,7 +147,7 @@
attributes = { attributes = {
BuildIndependentTargetsInParallel = 1; BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1320; LastSwiftUpdateCheck = 1320;
LastUpgradeCheck = 1320; LastUpgradeCheck = 1430;
TargetAttributes = { TargetAttributes = {
2E7CBC112A3B3343001253E3 = { 2E7CBC112A3B3343001253E3 = {
CreatedOnToolsVersion = 13.2.1; CreatedOnToolsVersion = 13.2.1;
@ -175,6 +198,7 @@
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
2E24F3522A3B3CFD0056A207 /* ShellScript */ = { 2E24F3522A3B3CFD0056A207 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
@ -248,6 +272,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
@ -307,6 +332,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO; ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
@ -393,6 +419,7 @@
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = ""; INFOPLIST_KEY_NSHumanReadableCopyright = "";
@ -419,6 +446,7 @@
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = ""; INFOPLIST_KEY_NSHumanReadableCopyright = "";
@ -467,6 +495,13 @@
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
/* End XCConfigurationList section */ /* End XCConfigurationList section */
/* Begin XCSwiftPackageProductDependency section */
2E951DDA2A3B507700C64042 /* ElixirKit */ = {
isa = XCSwiftPackageProductDependency;
productName = ElixirKit;
};
/* End XCSwiftPackageProductDependency section */
}; };
rootObject = 2E7CBC062A3B3340001253E3 /* Project object */; rootObject = 2E7CBC062A3B3340001253E3 /* Project object */;
} }

View file

@ -1,7 +1,17 @@
import SwiftUI import SwiftUI
import ElixirKit
@main @main
struct DemoApp: App { struct DemoApp: App {
init() {
ElixirKit.API.start(
name: "demo",
readyHandler: {
// ElixirKit.API.publish("log", "Hello from SwiftUI!")
}
)
}
var body: some Scene { var body: some Scene {
WindowGroup { WindowGroup {
ContentView() ContentView()

View file

@ -1,4 +1,14 @@
#!/bin/sh #!/bin/sh
set -euo pipefail set -euo pipefail
(cd ../.. && mix release --overwrite) # this script is executed by Xcode.
if ! which elixir; then
if [ -d /opt/homebrew/opt/asdf ]; then
. /opt/homebrew/opt/asdf/libexec/asdf.sh
fi
fi
app_dir=$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME
resources_dir=$app_dir/Contents/Resources
(cd ../.. && mix release --overwrite --path=$resources_dir/rel)

View file

@ -9,4 +9,6 @@ mkdir -p tmp
xcodebuild -configuration "$configuration" -scheme "$scheme" -destination "$destination" -showBuildSettings -json > tmp/build.json xcodebuild -configuration "$configuration" -scheme "$scheme" -destination "$destination" -showBuildSettings -json > tmp/build.json
app_dir=`cat tmp/build.json | jq --raw-output '.[0].buildSettings.CODESIGNING_FOLDER_PATH'` app_dir=`cat tmp/build.json | jq --raw-output '.[0].buildSettings.CODESIGNING_FOLDER_PATH'`
open -W --stdout=`tty` --stderr=`tty` $app_dir xcodebuild -configuration "$configuration" -scheme "$scheme" -destination "$destination"
# open -W --stdout=`tty` --stderr=`tty` $app_dir