Plugin-Schleife stuerzte ab: addSourceFile setzt eine Gruppe "Plugins" voraus
Erster Lauf der neuen Schleife auf einem Mac. Sie brach ab mit "TypeError: Cannot read properties of null (reading 'path')" in correctForPluginsPath - addSourceFile() ohne Gruppe geht intern ueber addPluginFile, und das sucht eine Projektgruppe namens "Plugins". Ein Capacitor-Projekt hat die nicht, pbxGroupByName liefert null. Die Gruppe wird jetzt angelegt, falls sie fehlt. Sie ist reine Ablage im Navigator. Belegt am neu erzeugten Projekt: beide Plugin-Dateien mit Pfad App/<name>.swift in der Sources-Phase des App-Ziels, neben AppDelegate und SceneDelegate.
This commit is contained in:
@@ -142,7 +142,19 @@ projekt.parseSync()
|
|||||||
`addSourceFile` ohne Gruppe hängt die Datei an die ERSTE Sources-Phase des
|
`addSourceFile` ohne Gruppe hängt die Datei an die ERSTE Sources-Phase des
|
||||||
Projekts, und das ist die des App-Ziels - genau die richtige. (Mit Gruppe
|
Projekts, und das ist die des App-Ziels - genau die richtige. (Mit Gruppe
|
||||||
landete die Datei nur im Navigator; daran ist am 02.09.2026 die Erweiterung
|
landete die Datei nur im Navigator; daran ist am 02.09.2026 die Erweiterung
|
||||||
ohne Programm entstanden, siehe unten.) */
|
ohne Programm entstanden, siehe unten.)
|
||||||
|
|
||||||
|
Ohne Gruppe geht `addSourceFile` intern über `addPluginFile`, und das legt
|
||||||
|
die Datei in eine Projektgruppe namens "Plugins". Ein Capacitor-Projekt hat
|
||||||
|
die nicht, `pbxGroupByName` liefert null, und das Skript stirbt mit
|
||||||
|
"Cannot read properties of null (reading 'path')" (03.09.2026). Die Gruppe
|
||||||
|
wird deshalb angelegt, falls sie fehlt - sie ist reine Ablage im Navigator
|
||||||
|
und ändert am Bau nichts. */
|
||||||
|
if (!projekt.pbxGroupByName("Plugins")) {
|
||||||
|
projekt.addPbxGroup([], "Plugins", '""')
|
||||||
|
melden("Projektgruppe Plugins angelegt (von addSourceFile vorausgesetzt)")
|
||||||
|
}
|
||||||
|
|
||||||
let pluginsGeaendert = false
|
let pluginsGeaendert = false
|
||||||
for (const datei of PLUGIN_DATEIEN) {
|
for (const datei of PLUGIN_DATEIEN) {
|
||||||
if (JSON.stringify(projekt.pbxSourcesBuildPhaseObj()).includes(datei)) {
|
if (JSON.stringify(projekt.pbxSourcesBuildPhaseObj()).includes(datei)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user