Create hello-platform for iOS (#11)

Co-authored-by: Михаил Капелько <kornerr@gmail.com>
This commit is contained in:
kornerr authored and Михаил Капелько committed 2026-11-01 07:19:54 +01:00
1 parent 1aa218d0bb
commit cf79e89dc4
18 files changed
+288 -57

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash -e
SDIR=$(cd "$(dirname "$0")" ; pwd -P)
T=$SDIR/step
TARGET=hello-platform
STEP=0
source $T/generateDialect $TARGET
source $T/prepareIOS $TARGET
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash -e
TARGET=$1
STEP=$((STEP+1))
echo -e "\n> > > > Step №$STEP. Generate Xcode project for '$TARGET' iOS"
cd $SDIR/../ver-ios
xcodegen
@@ -0,0 +1 @@
../../../../../../res/AppIcon.png
@@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "AppIcon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
+29
View File
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>hello-platform</string>
<key>CFBundleDisplayName</key>
<string>hello-platform</string>
<key>CFBundleIdentifier</key>
<string>org.opengamestudio.hello-platform</string>
<key>CFBundleExecutable</key>
<string>hello-platform</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>UILaunchScreen</key>
<dict/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
</dict>
</plist>
+15
View File
@@ -0,0 +1,15 @@
name: hello-platform
options:
bundleIdPrefix: org.opengamestudio
targets:
hello-platform:
type: application
platform: iOS
deploymentTarget: "15.0"
sources:
- path: Assets.xcassets
- path: src
settings:
base:
INFOPLIST_FILE: Info.plist
PRODUCT_BUNDLE_IDENTIFIER: org.opengamestudio.hello-platform
@@ -0,0 +1,12 @@
import SwiftUI
@main
struct HPApp: App {
@UIApplicationDelegateAdaptor(HPAppDelegate.self) private var appDelegate
var body: some Scene {
WindowGroup {
HPView(appDelegate.hpVM)
}
}
}
@@ -0,0 +1,18 @@
import UIKit
final class HPAppDelegate:
NSObject,
UIApplicationDelegate
{
let hp = HPComponent()
let hpVM = HPVM()
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
otherSetupConsoleLogging(hp.ctrl, "HP")
hp.setup()
return true
}
}
+1
View File
@@ -0,0 +1 @@
../../ver-mac/src/dialect.swift
+1
View File
@@ -0,0 +1 @@
../../../../../components/hp/hp.swift
+1
View File
@@ -0,0 +1 @@
../../../../../components/hp/hpVM.swift
@@ -0,0 +1 @@
../../../../../../components/hp/ios/view/HPView.swift
+1
View File
@@ -0,0 +1 @@
../../../../../components/other/other.swift