Begin working on settings app UI/content

This commit is contained in:
Elizabeth Cray 2025-01-08 23:34:42 -05:00
parent 3b67a18a63
commit 1e4f0606a3
5 changed files with 324 additions and 6 deletions

View File

@ -6,6 +6,10 @@
objectVersion = 77;
objects = {
/* Begin PBXBuildFile section */
6E189DCB2D2E460600303762 /* awkbd.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 6E189DC42D2E460600303762 /* awkbd.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
6E189DA42D2E44ED00303762 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
@ -21,14 +25,46 @@
remoteGlobalIDString = 6E189D922D2E44EB00303762;
remoteInfo = AllenWrench;
};
6E189DC92D2E460600303762 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6E189D8B2D2E44EB00303762 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 6E189DC32D2E460600303762;
remoteInfo = awkbd;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
6E189DD02D2E460600303762 /* Embed Foundation Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
6E189DCB2D2E460600303762 /* awkbd.appex in Embed Foundation Extensions */,
);
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
6E189D932D2E44EB00303762 /* AllenWrench.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AllenWrench.app; sourceTree = BUILT_PRODUCTS_DIR; };
6E189DA32D2E44ED00303762 /* AllenWrenchTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AllenWrenchTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6E189DAD2D2E44ED00303762 /* AllenWrenchUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AllenWrenchUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6E189DC42D2E460600303762 /* awkbd.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = awkbd.appex; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
6E189DCC2D2E460600303762 /* Exceptions for "awkbd" folder in "awkbd" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
);
target = 6E189DC32D2E460600303762 /* awkbd */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
6E189D952D2E44EB00303762 /* AllenWrench */ = {
isa = PBXFileSystemSynchronizedRootGroup;
@ -45,6 +81,14 @@
path = AllenWrenchUITests;
sourceTree = "<group>";
};
6E189DC52D2E460600303762 /* awkbd */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
6E189DCC2D2E460600303762 /* Exceptions for "awkbd" folder in "awkbd" target */,
);
path = awkbd;
sourceTree = "<group>";
};
/* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */
@ -69,6 +113,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
6E189DC12D2E460600303762 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@ -78,6 +129,7 @@
6E189D952D2E44EB00303762 /* AllenWrench */,
6E189DA62D2E44ED00303762 /* AllenWrenchTests */,
6E189DB02D2E44ED00303762 /* AllenWrenchUITests */,
6E189DC52D2E460600303762 /* awkbd */,
6E189D942D2E44EB00303762 /* Products */,
);
sourceTree = "<group>";
@ -88,6 +140,7 @@
6E189D932D2E44EB00303762 /* AllenWrench.app */,
6E189DA32D2E44ED00303762 /* AllenWrenchTests.xctest */,
6E189DAD2D2E44ED00303762 /* AllenWrenchUITests.xctest */,
6E189DC42D2E460600303762 /* awkbd.appex */,
);
name = Products;
sourceTree = "<group>";
@ -102,10 +155,12 @@
6E189D8F2D2E44EB00303762 /* Sources */,
6E189D902D2E44EB00303762 /* Frameworks */,
6E189D912D2E44EB00303762 /* Resources */,
6E189DD02D2E460600303762 /* Embed Foundation Extensions */,
);
buildRules = (
);
dependencies = (
6E189DCA2D2E460600303762 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
6E189D952D2E44EB00303762 /* AllenWrench */,
@ -163,6 +218,28 @@
productReference = 6E189DAD2D2E44ED00303762 /* AllenWrenchUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
6E189DC32D2E460600303762 /* awkbd */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6E189DCD2D2E460600303762 /* Build configuration list for PBXNativeTarget "awkbd" */;
buildPhases = (
6E189DC02D2E460600303762 /* Sources */,
6E189DC12D2E460600303762 /* Frameworks */,
6E189DC22D2E460600303762 /* Resources */,
);
buildRules = (
);
dependencies = (
);
fileSystemSynchronizedGroups = (
6E189DC52D2E460600303762 /* awkbd */,
);
name = awkbd;
packageProductDependencies = (
);
productName = awkbd;
productReference = 6E189DC42D2E460600303762 /* awkbd.appex */;
productType = "com.apple.product-type.app-extension";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@ -172,6 +249,7 @@
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1620;
LastUpgradeCheck = 1620;
ORGANIZATIONNAME = Cray;
TargetAttributes = {
6E189D922D2E44EB00303762 = {
CreatedOnToolsVersion = 16.2;
@ -184,6 +262,9 @@
CreatedOnToolsVersion = 16.2;
TestTargetID = 6E189D922D2E44EB00303762;
};
6E189DC32D2E460600303762 = {
CreatedOnToolsVersion = 16.2;
};
};
};
buildConfigurationList = 6E189D8E2D2E44EB00303762 /* Build configuration list for PBXProject "AllenWrench" */;
@ -203,6 +284,7 @@
6E189D922D2E44EB00303762 /* AllenWrench */,
6E189DA22D2E44ED00303762 /* AllenWrenchTests */,
6E189DAC2D2E44ED00303762 /* AllenWrenchUITests */,
6E189DC32D2E460600303762 /* awkbd */,
);
};
/* End PBXProject section */
@ -229,6 +311,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
6E189DC22D2E460600303762 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@ -253,6 +342,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
6E189DC02D2E460600303762 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
@ -266,6 +362,11 @@
target = 6E189D922D2E44EB00303762 /* AllenWrench */;
targetProxy = 6E189DAE2D2E44ED00303762 /* PBXContainerItemProxy */;
};
6E189DCA2D2E460600303762 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 6E189DC32D2E460600303762 /* awkbd */;
targetProxy = 6E189DC92D2E460600303762 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
@ -399,11 +500,13 @@
DEVELOPMENT_TEAM = W9ASV855X5;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -411,6 +514,9 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = lgbt.cray.AllenWrench;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@ -428,11 +534,13 @@
DEVELOPMENT_TEAM = W9ASV855X5;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -440,6 +548,9 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = lgbt.cray.AllenWrench;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@ -458,6 +569,9 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = lgbt.cray.AllenWrenchTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@ -477,6 +591,9 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = lgbt.cray.AllenWrenchTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@ -494,6 +611,9 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = lgbt.cray.AllenWrenchUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@ -511,6 +631,9 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = lgbt.cray.AllenWrenchUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@ -518,6 +641,64 @@
};
name = Release;
};
6E189DCE2D2E460600303762 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = W9ASV855X5;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = awkbd/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "HexCorp Keyboard";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = lgbt.cray.AllenWrench.awkbd;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
6E189DCF2D2E460600303762 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = W9ASV855X5;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = awkbd/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "HexCorp Keyboard";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = lgbt.cray.AllenWrench.awkbd;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -557,6 +738,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6E189DCD2D2E460600303762 /* Build configuration list for PBXNativeTarget "awkbd" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6E189DCE2D2E460600303762 /* Debug */,
6E189DCF2D2E460600303762 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 6E189D8B2D2E44EB00303762 /* Project object */;

View File

@ -9,6 +9,11 @@
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>awkbd.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

View File

@ -7,17 +7,56 @@
import SwiftUI
struct ContentView: View {
@State var whatever: Bool = false
@State var droneId: String = ""
@State var dronePrefix: String = ""
var body: some View {
NavigationView {
Form {
Section(header: Text("Content Settings"), content: {
HStack{
Text("Drone ID")
TextField("Drone ID", text: $droneId).multilineTextAlignment(.trailing)
}
HStack{
Text("Prefix")
TextField("Drone Prefix", text: $dronePrefix).multilineTextAlignment(.trailing)
}
})
Section(header: Text("Behavior"), content: {
HStack {
Toggle(isOn: $whatever) {
Text("Automatic Send?")
}
}
})
Section(header: Text("About"), content: {
HStack{
Spacer()
VStack{
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.padding()
Text("A keyboard for drones, by a drone")
Link(destination: URL(string: "https://git.corrupt.link/liz/allenwrench")!){
HStack{
Image(systemName: "text.document")
Text("View Source Code")
}
}
Text("©2025 Elizabeth Cray").foregroundStyle(.secondary)
}
Spacer()
}
})
}
.navigationTitle("Allen Wrench")
}
}
}
#Preview {
ContentView()

24
awkbd/Info.plist Normal file
View File

@ -0,0 +1,24 @@
<?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>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>IsASCIICapable</key>
<true/>
<key>PrefersRightToLeft</key>
<false/>
<key>PrimaryLanguage</key>
<string>en-US</string>
<key>RequestsOpenAccess</key>
<false/>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.keyboard-service</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).KeyboardViewController</string>
</dict>
</dict>
</plist>

View File

@ -0,0 +1,60 @@
//
// KeyboardViewController.swift
// awkbd
//
// Created by Elizabeth Cray on 1/8/25.
//
import UIKit
class KeyboardViewController: UIInputViewController {
@IBOutlet var nextKeyboardButton: UIButton!
override func updateViewConstraints() {
super.updateViewConstraints()
// Add custom view sizing constraints here
}
override func viewDidLoad() {
super.viewDidLoad()
// Perform custom UI setup here
self.nextKeyboardButton = UIButton(type: .system)
self.nextKeyboardButton.setTitle(NSLocalizedString("Next Keyboard", comment: "Title for 'Next Keyboard' button"), for: [])
self.nextKeyboardButton.sizeToFit()
self.nextKeyboardButton.translatesAutoresizingMaskIntoConstraints = false
self.nextKeyboardButton.addTarget(self, action: #selector(handleInputModeList(from:with:)), for: .allTouchEvents)
self.view.addSubview(self.nextKeyboardButton)
self.nextKeyboardButton.leftAnchor.constraint(equalTo: self.view.leftAnchor).isActive = true
self.nextKeyboardButton.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
}
override func viewWillLayoutSubviews() {
self.nextKeyboardButton.isHidden = !self.needsInputModeSwitchKey
super.viewWillLayoutSubviews()
}
override func textWillChange(_ textInput: UITextInput?) {
// The app is about to change the document's contents. Perform any preparation here.
}
override func textDidChange(_ textInput: UITextInput?) {
// The app has just changed the document's contents, the document context has been updated.
var textColor: UIColor
let proxy = self.textDocumentProxy
if proxy.keyboardAppearance == UIKeyboardAppearance.dark {
textColor = UIColor.white
} else {
textColor = UIColor.black
}
self.nextKeyboardButton.setTitleColor(textColor, for: [])
}
}