iOS-App kompiliert erstmals: Info.plist gesichert und zwei Build-Fehler behoben
Die App war bisher nie durch einen Compiler gelaufen. Mit Xcode 26.6 baut sie jetzt fehler- und warnungsfrei gegen das iOS-16-Deployment-Target. Info.plist: Der "info:"-Block in project.yml hat die handgepflegte Sources/Info.plist bei jedem "xcodegen generate" ueberschrieben und dabei Schluessel verloren, die nur in der Datei standen - insbesondere NSAppTransportSecurity/NSAllowsLocalNetworking. Ohne diese Ausnahme haette die App den Server im Heimnetz per http:// ueberhaupt nicht erreichen koennen. Die Datei ist jetzt die einzige Quelle: project.yml verweist nur noch per INFOPLIST_FILE darauf und nimmt sie aus den Sources heraus. Die Bundle-Keys, die vorher nur die erzeugte Fassung hatte (CFBundleExecutable, CFBundleIdentifier, CFBundlePackageType ...), stehen nun in der Datei selbst. ProductViews: onChange(of:) wurde in der zweiwertigen iOS-17-Form verwendet und war damit ein harter Fehler - auf die einwertige Form umgestellt. ProjectGoodApp: application(_:performActionFor:) als async-Fassung reicht das nicht-Sendable UIApplicationShortcutItem ueber eine Actor-Grenze. Das ist heute eine Warnung und im Swift-6-Sprachmodus ein Fehler; jetzt die Variante mit Completion-Handler. Der dritte Verdacht hat sich nicht bestaetigt: AudioServicesPlaySystemSound in ScannerView uebersetzt ohne zusaetzliches "import AudioToolbox", weil AVFoundation es bereits mitbringt. Deshalb dort keine Aenderung. Das erzeugte ProjectGood.xcodeproj wandert in .gitignore, da project.yml es vollstaendig beschreibt. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,20 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- Von Xcode aus den Build-Einstellungen gefuellt -->
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Project-Good</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
|
||||
@@ -30,7 +30,7 @@ struct ProductSearchView: View {
|
||||
.searchable(text: $query, prompt: "Artikel suchen")
|
||||
.onSubmit(of: .search) { Task { await search() } }
|
||||
.task { await search() }
|
||||
.onChange(of: query) { _, _ in Task { await search() } }
|
||||
.onChange(of: query) { _ in Task { await search() } }
|
||||
.navigationTitle("Artikel suchen")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
|
||||
@@ -61,9 +61,13 @@ final class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
return true
|
||||
}
|
||||
|
||||
// Bewusst die Variante mit Completion-Handler: Bei der async-Fassung muesste
|
||||
// das nicht-Sendable UIApplicationShortcutItem ueber eine Actor-Grenze
|
||||
// gereicht werden (Warnung heute, Fehler im Swift-6-Sprachmodus).
|
||||
func application(_ application: UIApplication,
|
||||
performActionFor shortcutItem: UIApplicationShortcutItem) async -> Bool {
|
||||
performActionFor shortcutItem: UIApplicationShortcutItem,
|
||||
completionHandler: @escaping (Bool) -> Void) {
|
||||
NotificationCenter.default.post(name: AppDelegate.shortcutNotification, object: shortcutItem.type)
|
||||
return true
|
||||
completionHandler(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,29 +13,17 @@ targets:
|
||||
ProjectGood:
|
||||
type: application
|
||||
platform: iOS
|
||||
# Info.plist wird bewusst NICHT aus dieser Datei erzeugt, sondern unveraendert
|
||||
# aus Sources/Info.plist uebernommen. Ein "info:"-Block hier wuerde die Datei
|
||||
# bei jedem "xcodegen generate" ueberschreiben und dabei Schluessel verlieren,
|
||||
# die nur dort stehen (z. B. NSAppTransportSecurity fuer das HTTP-Heimnetz).
|
||||
sources:
|
||||
- path: Sources
|
||||
info:
|
||||
path: Sources/Info.plist
|
||||
properties:
|
||||
CFBundleDisplayName: Project-Good
|
||||
CFBundleShortVersionString: "1.0"
|
||||
CFBundleVersion: "1"
|
||||
UILaunchScreen: {}
|
||||
NSCameraUsageDescription: >-
|
||||
Die Kamera wird zum Scannen von Barcodes beim Ein- und Auslagern verwendet.
|
||||
UIApplicationShortcutItems:
|
||||
- UIApplicationShortcutItemType: com.scarriffle.projectgood.checkin
|
||||
UIApplicationShortcutItemTitle: Einlagern
|
||||
UIApplicationShortcutItemIconType: UIApplicationShortcutIconTypeAdd
|
||||
- UIApplicationShortcutItemType: com.scarriffle.projectgood.checkout
|
||||
UIApplicationShortcutItemTitle: Auslagern
|
||||
UIApplicationShortcutItemIconType: UIApplicationShortcutIconTypeRemove
|
||||
CFBundleURLTypes:
|
||||
- CFBundleURLName: com.scarriffle.projectgood
|
||||
CFBundleURLSchemes: [projectgood]
|
||||
excludes:
|
||||
- Info.plist
|
||||
settings:
|
||||
base:
|
||||
INFOPLIST_FILE: Sources/Info.plist
|
||||
PRODUCT_BUNDLE_IDENTIFIER: com.scarriffle.projectgood
|
||||
MARKETING_VERSION: "1.0"
|
||||
TARGETED_DEVICE_FAMILY: "1,2"
|
||||
|
||||
Reference in New Issue
Block a user