diff --git a/cue-ios/.gitignore b/cue-ios/.gitignore new file mode 100644 index 0000000..d5c2b7a --- /dev/null +++ b/cue-ios/.gitignore @@ -0,0 +1,6 @@ +*.xcodeproj +.swiftpm/ +.build/ +build/ +DerivedData/ +*.xcuserdata diff --git a/cue-ios/CueIOS/Assets.xcassets/AccentColor.colorset/Contents.json b/cue-ios/CueIOS/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/cue-ios/CueIOS/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/cue-ios/CueIOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/cue-ios/CueIOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..af638ef --- /dev/null +++ b/cue-ios/CueIOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "appicon-1024.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/cue-ios/CueIOS/Assets.xcassets/Contents.json b/cue-ios/CueIOS/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/cue-ios/CueIOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/cue-ios/CueIOS/CueIOS.entitlements b/cue-ios/CueIOS/CueIOS.entitlements new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/cue-ios/CueIOS/CueIOS.entitlements @@ -0,0 +1,5 @@ + + + + + diff --git a/cue-ios/Package.resolved b/cue-ios/Package.resolved new file mode 100644 index 0000000..318292a --- /dev/null +++ b/cue-ios/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "grdb.swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/groue/GRDB.swift.git", + "state" : { + "revision" : "36e30a6f1ef10e4194f6af0cff90888526f0c115", + "version" : "7.10.0" + } + } + ], + "version" : 2 +} diff --git a/cue-ios/build.sh b/cue-ios/build.sh new file mode 100755 index 0000000..3931b89 --- /dev/null +++ b/cue-ios/build.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "$0")" + +SVG_SRC="../cue/assets/cue.svg" +ICON_DIR="CueIOS/Assets.xcassets/AppIcon.appiconset" +BUILD_DIR="build" + +# Generate app icon from SVG +if [ -f "$SVG_SRC" ] && command -v rsvg-convert &>/dev/null; then + echo "Generating app icon from $SVG_SRC" + rsvg-convert -w 1024 -h 1024 "$SVG_SRC" -o /tmp/cue-icon-raw.png + if command -v magick &>/dev/null; then + magick /tmp/cue-icon-raw.png -filter Point -gravity center \ + -background none -extent 1024x1024 \ + "$ICON_DIR/appicon-1024.png" + else + cp /tmp/cue-icon-raw.png "$ICON_DIR/appicon-1024.png" + fi + rm -f /tmp/cue-icon-raw.png + echo "App icon generated" +elif [ ! -f "$ICON_DIR/appicon-1024.png" ]; then + echo "Warning: No app icon. Place appicon-1024.png in $ICON_DIR or install rsvg-convert." +fi + +# Regenerate xcodeproj if xcodegen available +if command -v xcodegen &>/dev/null; then + xcodegen generate --quiet +fi + +mkdir -p "$BUILD_DIR" + +# Build for iOS device (release) +xcodebuild \ + -project CueIOS.xcodeproj \ + -scheme CueIOS \ + -configuration Release \ + -sdk iphoneos \ + -derivedDataPath "$BUILD_DIR/DerivedData" \ + CODE_SIGN_IDENTITY="Apple Development" \ + CODE_SIGN_STYLE=Automatic \ + -quiet \ + build + +APP_PATH=$(find "$BUILD_DIR/DerivedData" -name "CueIOS.app" -type d | head -1) +if [ -n "$APP_PATH" ]; then + cp -R "$APP_PATH" "$BUILD_DIR/" + echo "Built: $BUILD_DIR/CueIOS.app" +else + echo "Build completed but .app not found in DerivedData" +fi diff --git a/cue-ios/project.yml b/cue-ios/project.yml new file mode 100644 index 0000000..3482eb8 --- /dev/null +++ b/cue-ios/project.yml @@ -0,0 +1,39 @@ +name: CueIOS +options: + bundleIdPrefix: org.elseif + deploymentTarget: + iOS: "17.0" + xcodeVersion: "16.0" + generateEmptyDirectories: true +packages: + GRDB: + url: https://github.com/groue/GRDB.swift + from: "7.0.0" +targets: + CueIOS: + type: application + platform: iOS + sources: + - path: CueIOS + excludes: + - Info.plist + settings: + base: + PRODUCT_BUNDLE_IDENTIFIER: org.elseif.cue + INFOPLIST_FILE: CueIOS/Info.plist + DEVELOPMENT_TEAM: "" + SWIFT_VERSION: "6.0" + CODE_SIGN_STYLE: Automatic + TARGETED_DEVICE_FAMILY: "1,2" + ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon + ENABLE_USER_SCRIPT_SANDBOXING: false + configs: + Debug: + DEBUG_INFORMATION_FORMAT: dwarf-with-dsym + SWIFT_OPTIMIZATION_LEVEL: -Onone + Release: + SWIFT_OPTIMIZATION_LEVEL: -O + dependencies: + - package: GRDB + entitlements: + path: CueIOS/CueIOS.entitlements