From 303c9cc4ca880eba345108ea36bd1c2fff0f5f39 Mon Sep 17 00:00:00 2001 From: "eric.marchand" Date: Mon, 16 Sep 2024 10:43:49 +0200 Subject: [PATCH] Fix if building for real device, there is no app (only ipa and xarchive) Do not even try to get default app path for simu if exporting archive --- Project/Sources/Classes/MobileProjectIOS.4dm | 11 +++++++---- Project/Sources/Methods/Xcode.4dm | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Project/Sources/Classes/MobileProjectIOS.4dm b/Project/Sources/Classes/MobileProjectIOS.4dm index b5e1ac5b..42c12ecd 100644 --- a/Project/Sources/Classes/MobileProjectIOS.4dm +++ b/Project/Sources/Classes/MobileProjectIOS.4dm @@ -173,12 +173,15 @@ Function build()->$result : Object If ($result.app=Null:C1517) var $pathname : 4D:C1709.Folder - $pathname:=Folder:C1567(This:C1470.input.path; fk platform path:K87:2).folder("build/Build/Products/Debug-iphonesimulator/"+This:C1470._schemeName+".app") - - If ($pathname.exists) + If ($result.exportPath=Null:C1517) - $result.app:=$pathname.path + $pathname:=Folder:C1567(This:C1470.input.path; fk platform path:K87:2).folder("build/Build/Products/Debug-iphonesimulator/"+This:C1470._schemeName+".app") + If ($pathname.exists) + + $result.app:=$pathname.path + + End if End if End if diff --git a/Project/Sources/Methods/Xcode.4dm b/Project/Sources/Methods/Xcode.4dm index 960bde10..fbe2fee0 100644 --- a/Project/Sources/Methods/Xcode.4dm +++ b/Project/Sources/Methods/Xcode.4dm @@ -1150,7 +1150,7 @@ Case of End if // remove some trailing data like -infoplist-subpath Info.plist - If (Position:C15(".app "; $Obj_result.app)>0) // XXX: last pos + If (Position:C15(".app "; String:C10($Obj_result.app))>0) // XXX: last pos $Obj_result.app:=Substring:C12($Obj_result.app; 1; Position:C15(".app "; $Obj_result.app)+3)