diff --git a/src/pandios/.gitignore b/src/pandios/.gitignore index d3c16d21..1bad9862 100644 --- a/src/pandios/.gitignore +++ b/src/pandios/.gitignore @@ -1 +1,2 @@ -libAlber.dylib \ No newline at end of file +libAlber.dylib +Alber/Headers/ios_driver.h \ No newline at end of file diff --git a/src/pandios/Pandios.xcodeproj/project.pbxproj b/src/pandios/Pandios.xcodeproj/project.pbxproj index f5eb144d..3ad0b5db 100644 --- a/src/pandios/Pandios.xcodeproj/project.pbxproj +++ b/src/pandios/Pandios.xcodeproj/project.pbxproj @@ -409,9 +409,11 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Pandios/Preview Content\""; + DEVELOPMENT_TEAM = 877A43U8RR; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; @@ -430,6 +432,7 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = Alber.Pandios; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_INCLUDE_PATHS = "$(PROJECT_DIR)/Alber"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -444,9 +447,11 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Pandios/Preview Content\""; + DEVELOPMENT_TEAM = 877A43U8RR; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; @@ -465,6 +470,7 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = Alber.Pandios; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_INCLUDE_PATHS = "$(PROJECT_DIR)/Alber"; SWIFT_VERSION = 5.0; diff --git a/src/pandios/Pandios.xcodeproj/project.xcworkspace/xcuserdata/giorgos.xcuserdatad/UserInterfaceState.xcuserstate b/src/pandios/Pandios.xcodeproj/project.xcworkspace/xcuserdata/giorgos.xcuserdatad/UserInterfaceState.xcuserstate index 360ae4af..43042697 100644 Binary files a/src/pandios/Pandios.xcodeproj/project.xcworkspace/xcuserdata/giorgos.xcuserdatad/UserInterfaceState.xcuserstate and b/src/pandios/Pandios.xcodeproj/project.xcworkspace/xcuserdata/giorgos.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/src/pandios/build.sh b/src/pandios/build.sh new file mode 100755 index 00000000..4f13ddbc --- /dev/null +++ b/src/pandios/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +ARCH=arm64 +CONFIGURATION=Release +SDK=iphonesimulator18.2 + +runSimulator=false + +# Go to the parent directory and build the emulator core +cd ../.. +cmake -B build -DENABLE_VULKAN=OFF -DBUILD_HYDRA_CORE=ON -DCMAKE_TOOLCHAIN_FILE=third_party/ios_toolchain/ios.toolchain.cmake -DPLATFORM=SIMULATORARM64 -DDEPLOYMENT_TARGET="13.0" +cmake --build build + +# Copy the bridging header from the emulator source to the Swift interop module folder +cp ./include/ios_driver.h ./src/pandios/Alber/Headers/ios_driver.h + +# Come back to the iOS directory, build the SwiftUI xcode project and link them together +cd src/pandios +xcodebuild build -configuration ${CONFIGURATION} -sdk ${SDK} -arch ${ARCH} + +# To run the app in the simulator: + +# Boot the iPhone, install the app on the iphone, then open the sim & launch the app +if [ "$runSimulator" = true ] ; then + xcrun simctl boot "iPhone 16" + xcrun simctl install "iPhone 16" "build/Release-iphonesimulator/Pandios.app" + open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app + xcrun simctl launch booted "Alber.Pandios" +fi \ No newline at end of file