Rollo62 533 Posted April 23 (edited) Hi there, sorry for the little joke in the title, but what currently makes me headaches is the fact that after May will be broken. I used iOS as stable debugging platform for many years now, which seems to breakdown hard in a few days. The alternative Android was never that stable for debugging over the same many years, getting better now, but no replacement. The big problem now is, that Apple seems to enfore the use of their latest tools after 01.05.2024, which would make the use of XCode 14.3.1 for releases impossible. For the possible XCode changes and reasons I figured out the following possible facts for my record. Perhaps they were not all correct, maybe only a few, so please feel free to correct me, if you have more insights into the XCode ecosystem. In general, there seems to be a huge change in the new XCode debugging system. Overview of the changes seen in XCode 15: Topic Old (Xcode 14.3.1) New (Xcode 15) Comments Debugging platform partly still 32-bit using 64-bit only The new debugging platform seems to remove older 32-bit code internally completely. Debugging Framework GDB-based LLDB-based New debugging framework based on LLDB, incompatible with older GDB-based framework. Edit: LLDB-ready https://docwiki.embarcadero.com/RADStudio/Alexandria/en/LLDB_Debuggers Debugging Libraries libgcc.dylib, libc++.dylib, New debugging libraries, incompatible with the older libraries used by D12.1. libstdc++.dylib libc++abi.dylib Edit: LLDB-ready https://docwiki.embarcadero.com/RADStudio/Alexandria/en/LLDB_Debuggers Symbolication Manual Automatic Xcode 15 introduces automatic symbolication, incompatible with manual symbolication used by D12.1. Debugging Protocol GDB protocol LLDB protocol New debugging protocol, incompatible with the older GDB protocol used by D12.1. Edit: LLDB-ready https://docwiki.embarcadero.com/RADStudio/Alexandria/en/LLDB_Debuggers Breakpoint Handling Software breakpoints Hardware breakpoints Uses hardware breakpoints, incompatible with the software breakpoints used by D12.1. Debug Information STABS debug format DWARF debug format New debug information format, incompatible with the older STABS format used by D12.1. Edit: LLDB-ready https://docwiki.embarcadero.com/RADStudio/Alexandria/en/LLDB_Debuggers I would like to know if this huge XCode change is really upcoming soon, and what can we do about it in the near future? Is there any workaround in sight? I'm afraid, that we have to wait for the next Delphi Update or Patch, which maybe changes a lot of the internals ( libraries, PAServer, workflows, ... ). Are there any news from Embarcadero, about this topic, so that we could see any light in the tunnel? Would be great if there is a way, to make XCode 15 compatible with Delphi, or vice versa. My considerations so far: - Use Android for Debugging, even if it not that stable. Perhaps there are ways to improve Android debugging too. - Forget Mobile debugging, rely only on Logging ( the worst case for me ). - Still use XCode 14.3.1 for debugging, while releasing under XCode 15. This is problematic, because I think XCode 14.3.1 dosen't allow to use iOS 17.4, and perhaps two versions cannot switch easily on the macOS host. Are there any tested workflows, like xcode-select --switch /Applications/Xcode14.app/Contents/Developer and xcode-select --switch /Applications/Xcode15.app/Contents/Developer ? That also means, we would possibly need two sorts of devices with iOS 16.x ( DEBUG + Log ) and iOS 17.4 ( RELEASE + Log ) for proper tests ( Permanent upgrade / downgrade is not an option ). - Embarcadero already had worked out a stable Update 2, to simply make iOS 17.4 debuggable and testable. ( The best case for me ). - Any smart hack, to make XCode 14.3.1 producing releases still? Perhaps, setting a build-ID could do the job, but I'm completely unsure about that. When Apple finds such hacks, this may also be considered as infringement and lead in blocking the app in the store, which could be even harder. - Other ideas / news / thoughs, are there any ? Edit: See above table, it seems that Delphi >= Alexandria can already make use of LLDB debugging system: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/LLDB_Debuggers Edited April 24 by Rollo62 Share this post Link to post
Dave Nottage 553 Posted April 23 12 hours ago, Rollo62 said: Would be great if there is a way, to make XCode 15 compatible with Delphi, or vice versa. Delphi can already use Xcode 15. The biggest issue at the moment is debugging with iOS 17 (or higher) devices, which is a problem regardless of Xcode version. Debugging on devices with iOS 16.x still works using Xcode 15. A secondary issue is this one: a problem if your app needs to link to 3rd party binaries that were built with Xcode 14 or higher. 2 Share this post Link to post
Rollo62 533 Posted April 24 7 hours ago, Dave Nottage said: Delphi can already use Xcode 15. The biggest issue at the moment is debugging with iOS 17 (or higher) devices, which is a problem regardless of Xcode version. Debugging on devices with iOS 16.x still works using Xcode 15. A secondary issue is this one: a problem if your app needs to link to 3rd party binaries that were built with Xcode 14 or higher. Thanks for clarification, I assumed that XCode 15 won't support or can handle older iOS 16.x SDKs any longer. If XCode 15 is bundled with and hardly enforces SDK 17.4, or not allow to load or use SDK 16.x and longer, then this won't help either. Can you confirm that XCode 15 can still be used for debugging same as XCode 14.3.1, under iOS 16.x, without too much trickery ? The older SDK will have to be hooked into XCode manually, with all possible incompatibilities. If would expect something like this: Quote Integration of an older SDK in Xcode 15: - Obtaining the older SDK: Older iOS SDKs are not directly available through official channels. They must be extracted from an older Xcode version. - Extracting the SDK: Navigate to the Xcode app in the Finder (right-click and select “Show package contents”). Find the SDK folder, typically in the path (Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/). Copy the desired SDK folder (e.g. iPhoneOS16.74.sdk). - Add the SDK to Xcode 15: Go to the corresponding directory (Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/). Paste the copied SDK folder here. Boot XCode. - Macos Delphi Scratch-Dir, remove the scratch directory and its entry - Delphi SdkManager, check für SDK and "Update local cache" Ok, I found this, which states that Delphi already supports the newer LLDB debugging system, perhaps since Alexandria, and that should be a good thing. https://docwiki.embarcadero.com/RADStudio/Alexandria/en/LLDB_Debuggers I will update my table above accordingly. Are there any official notes about whats changed internally and whats currently still possible? I must confess, that I had not followed the WWDC videos, because lack of time, would be great to find some official statements about these changes and roadmaps. Share this post Link to post
Dave Nottage 553 Posted April 24 Just now, Rollo62 said: I assumed that XCode 15 won't support or can handle older iOS 16.x SDKs any longer. Xcode 15 doesn't have iOS 16.x SDKs, no.. but that does not mean you cannot debug iOS 16 (or earlier) devices. 1 minute ago, Rollo62 said: Can you confirm that XCode 15 can still be used for debugging same as XCode 14.3.1, under iOS 16.x, without too much trickery ? With no "trickery" whatsoever. iOS 16.x devices do not have the new debugging support introduced in iOS 17, and Xcode 15 handles that. 7 minutes ago, Rollo62 said: The older SDK will have to be hooked into XCode manually, with all possible incompatibilities. Not sure what you mean by "manually". The only "incompatibilities" are if you attempt to use features in code available in the newer SDK on a device with an older OS (when the feature is not available in that older OS). 9 minutes ago, Rollo62 said: Older iOS SDKs are not directly available through official channels. They must be extracted from an older Xcode version. That's true, however you can import an iOS 17.x SDK from Xcode 15, build your app against it, and It will happily run on an iOS 16.x device (as long as you do not attempt to use features from a newer OS, as mentioned above), and you can use the debugger with Delphi. As I mentioned earlier, it's debugging with an iOS 17.x device that is the major issue right now. Share this post Link to post
Rollo62 533 Posted April 24 (edited) Dear Dave, thanks for giving me a little relief on the upcoming forced upgrade. With "manually" hooking the older SDK, I mean the formerly needed manual copy and past from old XCode SDK into new XCode SDK's PackageContent. Is this not necessary too, which means that XCode 15 still offers 16.7.7 SDK without much hazzle? Please note: My main goal was not loosing the debugging ability. This would require from my understanding an XCode iOS 16.7.7 SDK and an iOS 16.x device. When using iOS 17.x SDK, I'm in danger to loose debugging option, right? Nevertheless, I will try to install XCode 15, but want to do that as safely as possible, to avoid destroying my current, well-working workstation setup. Here I've made a little "actipn plan", how to keep old and new XCode safely side-by-side. This is hopefully complete and let me switch safely between old and new. without and negative impact. Here I've tried to separate XCode 1431 and 1520 as much as possible. Maybe thats helpful for other too, I will check that soon and get back if something turns out terrible wrong: Quote 1. Before Installation: - Macos: Delete Delphi 'Scratch-Dir 2. XCode: - Ensure separate versions - XCode 14.3.1 - Duplicate DerivedData ( BACKUP ) Macos: cp -R ~/Library/Developer/Xcode/DerivedData ~/Library/Developer/Xcode/DerivedData_1431 - Duplicate Archives ( BACKUP ) Macos: cp -R ~/Library/Developer/Xcode/Archives ~/Library/Developer/Xcode/Archives_1431 Macos: Check success by: ls ~/Library/Developer/Xcode/ - Duplicate XCode.plist ( BACKUP ) Macos: cp ~/Library/Preferences/com.apple.dt.Xcode.plist ~/Library/Preferences/com.apple.dt.Xcode_1431.plist Macos: Check success by: ls ~/Library/Preferences/*Xcode*.plist - XCode: Point to new, DerivedData_1431 folder # XCode/Settings/Locations/Derived Data/ choose from "Default" to "Custom" # XCode Enter new folder location, addinf _1431, to ....../Developer/Xcode/DerivedData_1431 # Check success: Press the small icon right after the path, to open in Finder. - XCode: Point to new, Archives_1431 folder # XCode/Settings/Locations/Archives/ choose from "Default" to "Custom" # XCode Enter new folder location, addinf _1431, to ....../Developer/Xcode/Archives_1431 # Check success: Press the small icon right after the path, to open in Finder. - Check if all changes still behave properly, restart XCode, PAServer, Delphi, Open project, try build & run, check provisioning Check XCode version: xcode-select -p Set if needed: : sudo xcode-select -s /Applications/Xcode_1431.app - Rename XCode.app to XCode_1431 # After renaming under XCode/Settings/Locations/CommanDLine Tools, the selection of the correct command line tools needs to be done again, requiring another password entry, but then is pointing to the changes XCode_1431.app. 3. XCode: - Ensure separate versions - XCode 15.x - Setup as usual Check XCode version: xcode-select -p Set if needed: : sudo xcode-select -s /Applications/Xcode.app - Check if all changes still behave properly, restart XCode, PAServer, Delphi, Open project, try build & run, check provisioning 4. XCode: - Ensure separate versions - XCode 15.2 - Duplicate DerivedData ( BACKUP ) Macos: cp -R ~/Library/Developer/Xcode/DerivedData ~/Library/Developer/Xcode/DerivedData_1520 - Duplicate Archives ( BACKUP ) Macos: cp -R ~/Library/Developer/Xcode/Archives ~/Library/Developer/Xcode/Archives_1520 Macos: Check success by: ls ~/Library/Developer/Xcode/ - Duplicate XCode.plist ( BACKUP ) Macos: cp ~/Library/Preferences/com.apple.dt.Xcode.plist ~/Library/Preferences/com.apple.dt.Xcode_1520.plist Macos: Check success by: ls ~/Library/Preferences/*Xcode*.plist - XCode: Point to new, DerivedData_1520 folder # XCode/Settings/Locations/Derived Data/ choose from "Default" to "Custom" # XCode Enter new folder location, addinf _1520, to ....../Developer/Xcode/DerivedData_1520 # Check success: Press the small icon right after the path, to open in Finder. - XCode: Point to new, Archives_1520 folder # XCode/Settings/Locations/Archives/ choose from "Default" to "Custom" # XCode Enter new folder location, addinf _1520, to ....../Developer/Xcode/Archives_1520 # Check success: Press the small icon right after the path, to open in Finder. - Check if all changes still behave properly, restart XCode, PAServer, Delphi, Open project, try build & run, check provisioning Check XCode version: xcode-select -p Set if needed: : sudo xcode-select -s /Applications/Xcode_1520.app - Rename XCode.app to XCode_1520 5. Switching between XCode_!431 and XCode_1520 - Set : sudo xcode-select -s /Applications/Xcode_1431.app sudo xcode-select -s /Applications/Xcode_1520.app Check : xcode-select -p Restore: cp ~/Library/Preferences/com.apple.dt.Xcode_1431.plist ~/Library/Preferences/com.apple.dt.Xcode.plist cp ~/Library/Preferences/com.apple.dt.Xcode_1520.plist ~/Library/Preferences/com.apple.dt.Xcode.plist Edited April 24 by Rollo62 Share this post Link to post
Rollo62 533 Posted April 24 (edited) @Dave Nottage Thanks for giving hope and pointing to the right direction, as always As expected. simply starting and debugging an iOS 16.7.5 device with SDK 17.4 fails, with the following message: Starting the Debug Build without debugger ( Ctrl+Shift+F9 ) works well, start and seems OK so far. After a few more steps, I could really debug again on XCode 15.3 + iOS Device 16.7.5 + iOS SDK 17.4. Edit: Worth to mention: Running on MacBook Pro Intel: MacosOS Sonoma 14.4.1; Parallels Desktop 19.3.0 Here is the whole process is documented: Quote Update XCode 15.3: - XCode 15.3 with SDK iOS 17.4: Compilation OK - App is deployed to device iOS 16.7.5: Can be started there, seems to be running OK. - Problem trying debugging within IDE: Debugging message in PaServer: ">iOS-Ausgabe: dyld[4221]: Library not loaded: @loader_path/python3.10/Python Referenced from: <402E8408-6EBB-39CB-BB4F-9E0365D28396> /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/liblldb.15.0.7.dylib Reason: tried: '/Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python' (no such file), '/usr/local/lib/Python' (no such file), '/usr/lib/Python' (no such file, not in dyld cache) " - Python-Version 3.10 seems not available for the symbolic link of PaServer Situation: "$ python3 --version Python 3.9.6 $ which python3 /usr/bin/python3 $ python3 -c "import sys; print(sys.exec_prefix)" /Applications/Xcode_1530.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9 $ python3 -c "import os; import sys; print(os.path.join(sys.exec_prefix, 'lib', 'libpython3.10.dylib'))" /Applications/Xcode_1530.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/libpython3.10.dylib " - Install Python 3.10: brew install python@3.10 - ensure python3.10 links correctly: python3.10 --version which python3.10 Result: Python is installed $ python3 --version Python 3.9.6 $ which python3.10 /usr/local/bin/python3.10 - Identify correct path to libpython3.10.dylib: python3.10 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))" - Can vary, use this too: find /usr/local -name 'libpython3.10.dylib' Results: "$ python3.10 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))" /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib $ find /usr/local -name 'libpython3.10.dylib' /usr/local/Cellar/python@3.10/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib /usr/local/Cellar/python@3.10/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin/libpython3.10.dylib " - Create the correct symbolic link for PaServer: There are two paths, use the more general: sudo mkdir -p /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10 sudo ln -s /usr/local/Cellar/python@3.10/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python Results: "$ sudo ln -s /usr/local/Cellar/python@3.10/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python ln: /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python: File exists " - It seems already existing link: Check where it points to: ls -l /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python - If the link doesn'T point to the correct libpython3.10.dylib, delete and recreate: sudo rm /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python sudo ln -s /usr/local/Cellar/python@3.10/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python Results: "$ ls -l /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python lrwxr-xr-x 1 root staff 87 Mar 18 18:35 /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python -> /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Python3 " - Remove the existing symlink: sudo rm /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python - Create the new: symlink: sudo ln -s /usr/local/Cellar/python@3.10/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python - Restart PAServer: Results: "$ sudo rm /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python Password: $ sudo ln -s /usr/local/Cellar/python@3.10/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib /Applications/PAServer-23.0.app/Contents/MacOS/lldb/lib/python3.10/Python" No failures. Restart PaServer with error: "Last login: Wed Apr 24 18:14:37 on ttys000 /Applications/PAServer-23.0.app/Contents/MacOS/paserver -port=64211 The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050. $ /Applications/PAServer-23.0.app/Contents/MacOS/paserver -port=64211 Platform Assistant Server Version 14.1.13.8 Copyright (c) 2009-2024 Embarcadero Technologies, Inc. EIdCouldNotBindSocket: Socket konnte nicht gebunden werden." " - Check occupied ports „EIdCouldNotBindSocket: Socket konnte nicht gebunden werden“ lead to Port (64211) is occupied. Check the port: sudo lsof -i :64211 Result: Several processes still running "$ sudo lsof -i :64211 Password: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME iosinstal 3921 rowa 5u IPv4 0x6bc8063830379fa9 0t0 TCP *:64211 (LISTEN) iosinstal 3921 rowa 6u IPv6 0x6bc8062500cb5ae9 0t0 TCP *:64211 (LISTEN) iosinstal 3921 rowa 7u IPv4 0x6bc8063830377169 0t0 TCP rowa-macbook-pro-5.fritz.box:64211->plsmb02-alex-p02.fritz.box:49975 (CLOSED) " - Kill the running processes b< PID: sudo kill -9 3921 - Restart PaServer Result: - PaServer start without failure: OK - Delphi App, no Debugging, starts via IDE: OK - Delphi App, with Debugging, starts via IDE heraus and is able to debug: OK - Case solved: XCode 15.3 + iOS 16.7.5 + iOS SDK 17.4 = Debugging possible I hope that can help another poor guy, who is getting crazy from the mysterious Apple moves. Edited April 25 by Rollo62 2 Share this post Link to post
David Schwartz 426 Posted April 25 (edited) There's also the problem that XCode upgrades may be required that cannot be installed without upgrading the OS. I stopped upgrading my MacOS a while back b/c it seemed like each time it would lock me out of apps that cost me a lot to update themselves to continue using -- if that was even an option. I have a 2014 Mac MIni running Mojave b/c there are several 32-bit apps that I use but can't update, and the next OS doesn't support any 32-bit apps. I have another one (2018) that's running Catalina and I won't update it either b/c of other things that break and will be expensive to update -- no free updates for these things. This is the machine I use to do my Delphi work on, inside of a VirtualBox VM, and now I can't even upgrade that to the latest version, although they seem to be supporting older versions pretty well. And with the switch to M-series chips, there's a BUNCH of apps I can no longer upgrade b/c they ALL require the latest version of the OS to run. XCode updates all seem to be tied to a specific version of the OS, and they don't maintain backward compatibility for older versions when they add new features to it. Which is why I'm mainly interested in working with TMS WEB Core to build web apps that run inside of web browsers and are not dependent on hardware or OS issues. Edited April 25 by David Schwartz Share this post Link to post
Rollo62 533 Posted April 26 (edited) 9 hours ago, David Schwartz said: There's also the problem that XCode upgrades may be required that cannot be installed without upgrading the OS. Yes, that is another strategy of Apple to block unwanted, external development systems. My older MacBook Pro 2013 stucks on, I guess Catalina, which makes it completely unusable for development. The same happens now with Sonoma and older versions all the time. This is why I decided not to purchase the most capable, expensive Mac any longer, but looking for the cheapest version instead. Windows machines for the same money can do much more, more reliable and lasting much longer. Unfortunately also Microsoft is on the track of the business model of Apple now, more and more. Don't understand me wrong, cutting old tails from time to time is not a bad thing in general. But doing so in a too frequent manner is just kind of fraud. Still I'm more fond of the Windows ecosystem, the Macos ecosystem is more and more a no-go, for several lock-in syndrom reasons. Sooner or later, I think the Linux ecosystem will be the solution out of both booby traps, but unfortunately still is not ready yet for Delphi devvelopers. Edited April 26 by Rollo62 Share this post Link to post
David Schwartz 426 Posted April 27 On 4/25/2024 at 10:20 PM, Rollo62 said: Still I'm more fond of the Windows ecosystem, the Macos ecosystem is more and more a no-go, for several lock-in syndrom reasons. Sooner or later, I think the Linux ecosystem will be the solution out of both booby traps, but unfortunately still is not ready yet for Delphi devvelopers. This is exactly why I've chosen to go with TMS WEB Core as it runs in pretty much any web browser. It does not lock you into any particular hardware or OS version. If you need something specific, you can get a cheap machine and use it to build a REST service that the web app can call directly, or indirectly through your app's main service. There's also Crossover, which is a WINE-based containerized solution for running a Windows app in other environments that looks and runs as a native app. It's ok for one-offs, but publishers will need to see if its cost justifies the results. Share this post Link to post
Rollo62 533 Posted June 12 (edited) I was trying to find some more insights, since my debugging at XCode 15.4 is currently broken. Here is what I have found so far, perhaps there are more tips to workaround somehow. Due to the fact that it worked for a while at least release & run from the IDE, but now suddenly seems to be broken for no reason, I had to look into this again. My setup: Macbook Intel Macos Sonoma 14.4.1 (23E224) XCode 15.4 (15F31d) - Multiple installations XCode 14.3.1, but the XCode 15.4 is the active selected, by xcode-select - All tools running Delphi RAD Studio 12.1 Patch 1 PAServer 14.1.14.0 Situation: Compile & Linking OK Run & Debug on device: Not OK ( Please do not propose using simulators, I'm looking for a workaround on device level ) XCode 15.4 - Seems to have only Python3.9 shipped within its PackageContent "/Applications/Xcode_1540.app/Contents/Developer/usr/bin" Python3.10 - Has to be installed manually, will land into User folders: /usr/local/bin/python@3.10 and /usr/local/opt/python@3.10/bin - Can be linked by SymLinks to PAServer PAServer - Seems to use Python3.10 internally - Seems to use llvm, lldb internally LLVM ( seems to be required by PAServer - iosinstall) - When installed by bew, it seems to depend on Python3.12, installs Python3.12 too. - Can be linked by SymLinks to be globally available Python3.12 ( seems to be required by llvm ) - Can be linked by SymLinks to be globally available ( but this is maybe the issue in PAServer, linking to Py3.10 and Py3.12 at the same time ) Problem: Signing: Seems OK via PAServer so far Launching: Seems not possible to launch the app via Delphi - Launch by: ""/Applications/PAServer-23.0.app/Contents/MacOS/iosinstall" -W -i bba94cfcbb26d9ff31774ac97d06e929f954993d0 -L -z "/usr/local/bin/lldb" -q -b "/Users/currentuser/PAServer/scratch-dir/currentuser-MB02_Rx1200_Athens/MyApp.app" Quote Options: -W: This option tells iosinstall to build the project in Release mode (instead of Debug mode). -i bba94cfcbb26d9ff31774ac97d06e929f954993d0: This specifies the UUID of the device to install the app on. The long string is the device's unique identifier found in the XCode Devices window/Identifier label. -L: This option tells iosinstall to use the specified lldb tool (instead of the default one). -z "/usr/local/opt/llvm/bin/lldb": This specifies the path to the lldb tool. -q: This option tells iosinstall to run in quiet mode (less output). -b "/Users/currentuser/PAServer/scratch-dir/currentuser-MB02_Rx1200_Athens/MyApp.app": This specifies the path to the app bundle (.app directory) to install on the device. Deployment - The app can be deleted, this commands seems to deploy and try to run it. - The app runs shortly, then crashes - When running the same, uploaded app manually, by double-click: The add starts and runs fine, only the iosinstall crashes Log and Eventlog - The command above returns like this Quote Handling device type: 1 Already found device? 0 Hardware Model: D221AP Device Name: iPhoneX von Demo Model Name: iPhone X SDK Name: iphoneos Architecture Name: arm64 Product Version: 16.7.7 Build Version: 20H330 App path: /private/var/containers/Bundle/Application/42F4F99E-AD80-4AD4-8000-80FE4849DBDC/MyApp.app Hardware Model: D221AP Device Name: iPhoneX von Demo Model Name: iPhone X SDK Name: iphoneos Architecture Name: arm64 Product Version: 16.7.7 Build Version: 20H330 Device Class: iPhone build: 20H330 version: 16.7.7 Found Xcode developer dir /Applications/Xcode_1540.app/Contents/Developer version: 16.7 version: 16.6 version: 16.5 version: 16.4 DeviceSupport directory '/Applications/Xcode_1540.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.4/DeveloperDiskImage.dmg' was located. It took 6.00 seconds Developer disk image: /Applications/Xcode_1540.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.4/DeveloperDiskImage.dmg Device Class: iPhone build: 20H330 version: 16.7.7 DeviceSupport directory '/Users//Library/Developer/Xcode/iOS DeviceSupport/iPhone10,6 16.7.7 (20H330)/Symbols' was located. It took 2.00 seconds Device Class: iPhone build: 20H330 version: 16.7.7 DeviceSupport directory '/Users//Library/Developer/Xcode/iOS DeviceSupport/iPhone10,6 16.7.7 (20H330)/Symbols' was located. It took 2.00 seconds Waiting for child [Child: 95265][Parent: 95145] pid=95265 (lldb) command source -s 0 '/tmp/1DDD1BAF-76F6-4031-ACBA-33772F88260F/fruitstrap-lldb-prep-cmds-bba94cfcbb26d9ff31774ac97d06e929f954993d0' Executing commands in '/tmp/1DDD1BAF-76F6-4031-ACBA-33772F88260F/fruitstrap-lldb-prep-cmds-bba94cfcbb26d9ff31774ac97d06e929f954993d0'. (lldb) platform select remote-'ios' --sysroot '/Users//Library/Developer/Xcode/iOS DeviceSupport/iPhone10,6 16.7.7 (20H330)/Symbols' Platform: remote-ios Connected: no Sysroot: /Users//Library/Developer/Xcode/iOS DeviceSupport/iPhone10,6 16.7.7 (20H330)/Symbols SDK Path: "/Users//Library/Developer/Xcode/iOS DeviceSupport/iPhone10,6 16.7.7 (20H330)/Symbols" (lldb) target create "/Users//PAServer/scratch-dir/-MB02_Rx1200_Athens/MyApp.app" Current executable set to '/Users//PAServer/scratch-dir/-MB02_Rx1200_Athens/MyApp.app' (arm64). (lldb) script fruitstrap_device_app="/private/var/containers/Bundle/Application/42F4F99E-AD80-4AD4-8000-80FE4849DBDC/MyApp.app" (lldb) script fruitstrap_connect_url="connect://127.0.0.1:50083" (lldb) script fruitstrap_output_path="" (lldb) script fruitstrap_error_path="" (lldb) target modules search-paths add /usr "/Users//Library/Developer/Xcode/iOS DeviceSupport/iPhone10,6 16.7.7 (20H330)/Symbols/usr" /System "/Users//Library/Developer/Xcode/iOS DeviceSupport/iPhone10,6 16.7.7 (20H330)/Symbols/System" "/private/var/containers/Bundle/Application/42F4F99E-AD80-4AD4-8000-80FE4849DBDC" "/Users//PAServer/scratch-dir/-MB02_Rx1200_Athens" "/var/containers/Bundle/Application/42F4F99E-AD80-4AD4-8000-80FE4849DBDC" "/Users//PAServer/scratch-dir/-MB02_Rx1200_Athens" /Developer "/Users//Library/Developer/Xcode/iOS DeviceSupport/iPhone10,6 16.7.7 (20H330)/Symbols/Developer" (lldb) command script import "/tmp/1DDD1BAF-76F6-4031-ACBA-33772F88260F/fruitstrap_bba94cfcbb26d9ff31774ac97d06e929f954993d0.py" (lldb) command script add -f fruitstrap_bba94cfcbb26d9ff31774ac97d06e929f954993d0.connect_command connect (lldb) command script add -s asynchronous -f fruitstrap_bba94cfcbb26d9ff31774ac97d06e929f954993d0.prerun_command prerun (lldb) command script add -s asynchronous -f fruitstrap_bba94cfcbb26d9ff31774ac97d06e929f954993d0.run_command run (lldb) command script add -s asynchronous -f fruitstrap_bba94cfcbb26d9ff31774ac97d06e929f954993d0.autoexit_command autoexit (lldb) command script add -s asynchronous -f fruitstrap_bba94cfcbb26d9ff31774ac97d06e929f954993d0.safequit_command safequit (lldb) connect (lldb) run success (lldb) safequit Application has not been launched - The Eventlog looks like this Quote {"app_name":"MyApp","timestamp":"2024-06-12 16:55:22.00 +0200","app_version":"2.8.45","slice_uuid":"af7a4df6-5e8c-3a5c-9425-c8eacce84fe6","build_version":"2.8.45","platform":"0","bundleID":"com.MyCompany.MyApp","share_with_app_devs":"0","is_first_party":"0","bug_type":"309","os_version":"iPhone OS 16.7.7 (20H330)","roots_installed":"0","name":"MyApp","incident_id":"A72803A1-6A07-4F52-9B96-D8EBDCEC906D"} { "uptime": 3800000, "procRole": "Foreground", "version": 2, "userID": 501, "deployVersion": 210, "modelCode": "iPhone10,6", "coalitionID": 659, "osVersion": { "isEmbedded": true, "train": "iPhone OS 16.7.7", "releaseType": "User", "build": "20H330" }, "captureTime": "2024-06-12 16:55:22.7027 +0200", "incident": "A72803A1-6A07-4F52-9B96-D8EBDCEC906D", "pid": 15923, "cpuType": "ARM-64", "roots_installed": 0, "bug_type": "309", "procLaunch": "2024-06-12 16:55:22.4956 +0200", "procStartAbsTime": 92786458569798, "procExitAbsTime": 92786463483940, "procName": "MyApp", "procPath": "/private/var/containers/Bundle/Application/42F4F99E-AD80-4AD4-8000-80FE4849DBDC/MyApp.app/MyApp", "bundleInfo": { "CFBundleShortVersionString": "2.8.45", "CFBundleVersion": "2.8.45", "CFBundleIdentifier": "com.MyCompany.MyApp" }, "storeInfo": { "deviceIdentifierForVendor": "F36B7140-E8FE-4E5E-8F04-ED30E7C64119", "thirdParty": true }, "parentProc": "Exited process", "parentPid": 15922, "coalitionName": "com.MyCompany.MyApp", "crashReporterKey": "c8c8393fd7df324cd4a973f7eac8186d052f886e", "wasUnlockedSinceBoot": 1, "isLocked": 0, "codeSigningID": "com.MyCompany.MyApp", "codeSigningTeamID": "HAPO4MNY", "codeSigningFlags": 838868996, "codeSigningValidationCategory": 3, "codeSigningTrustLevel": 0, "basebandVersion": "6.01.01", "exception": { "codes": "0x0000000000000001, 0x0000000106c391f0", "rawCodes": [ 1, 4408447472 ], "type": "EXC_BREAKPOINT", "signal": "SIGTRAP" }, "termination": { "flags": 0, "code": 5, "namespace": "SIGNAL", "indicator": "Trace/BPT trap: 5", "byProc": "exc handler", "byPid": 15923 }, "os_fault": { "process": "MyApp" }, "faultingThread": 0, "threads": [ { "triggered": true, "id": 11098591, "threadState": { "x": [ { "value": 3 }, { "value": 1 }, { "value": 6167279912 }, { "value": 0 }, { "value": 8201301184 }, { "value": 368 }, { "value": 0 }, { "value": 0 }, { "value": 4408447472, "symbolLocation": 0, "symbol": "lldb_image_notifier" }, { "value": 8201301640 }, { "value": 0 }, { "value": 7170856022 }, { "value": 101 }, { "value": 115 }, { "value": 333088 }, { "value": 0 }, { "value": 336 }, { "value": 0 }, { "value": 0 }, { "value": 6167280296 }, { "value": 4408213504 }, { "value": 7170359296 }, { "value": 4408786944, "symbolLocation": 0, "symbol": "dyld_all_image_infos" }, { "value": 6167279840 }, { "value": 7170818926 }, { "value": 1 }, { "value": 0 }, { "value": 0 }, { "value": 0 } ], "flavor": "ARM_THREAD_STATE64", "lr": { "value": 7170440732 }, "cpsr": { "value": 1073741824 }, "fp": { "value": 6167280272 }, "sp": { "value": 6167279648 }, "esr": { "value": 4060086272, "description": "(Breakpoint) brk 0" }, "pc": { "value": 4408447472, "matchesCrashFrame": 1 }, "far": { "value": 0 } }, "frames": [ { "imageOffset": 233968, "symbol": "lldb_image_notifier", "symbolLocation": 0, "imageIndex": 0 }, { "imageOffset": 7170440732, "imageIndex": 2 } ] } ], "usedImages": [ { "source": "P", "arch": "arm64", "base": 4408213504, "size": 524288, "uuid": "8ae431a3-d41e-3037-ae7d-4baff09896dc", "path": "", "name": "" }, { "source": "P", "arch": "arm64", "base": 4299603968, "size": 33439744, "uuid": "af7a4df6-5e8c-3a5c-9425-c8eacce84fe6", "path": "", "name": "" }, { "size": 0, "source": "A", "base": 0, "uuid": "00000000-0000-0000-0000-000000000000" } ], "legacyInfo": { "threadTriggered": {} }, "logWritingSignature": "587236926da1318cc208597f7178c7c32d927518", "trialInfo": { "rollouts": [ { "rolloutId": "6425c75e4327780c10cc4252", "factorPackIds": { "SIRI_HOME_AUTOMATION_INTENT_SELECTION_CACHE": "642600a457e7664b1698eb32" }, "deploymentId": 240000004 }, { "rolloutId": "5fb4245a1bbfe8005e33a1e1", "factorPackIds": {}, "deploymentId": 240000021 } ], "experiments": [ { "treatmentId": "58416e4a-282b-40bd-b2d7-82e1caa8fdf1", "experimentId": "620ebc346508065773aa3ef8", "deploymentId": 400000036 }, { "treatmentId": "3dff9c91-a8fb-424e-a656-c8d6e6037574", "experimentId": "662152ede2d11d1408c4db33", "deploymentId": 400000014 } ] }, "reportNotes": [ "dyld_process_snapshot_get_shared_cache failed" ] } So the root cause seems to be the "iosinstall" command, IMHO. Maybe more specifically the usage of Python3.10 and Python3.12 within the same PAServer package, calling iosinstall and lldb and others. I have tried a few tests and still I'm not really clear why this not simply runs, no matter what Python library involved. Why does XCode 154. only include Python3.12? Why does llvm depends on Python3.12 (there seems no easy way to downfrade this, ate least not with brew and pip3) Is there any known workaround at the time now, what needs to be done? Apple development again causes my days or fumbling, instead of easy click-and-run. Why seems Python stuff so sensitive on versioning, are these known issues? Mybe some Python experts may lead to some easy tools or ideas to solve it. Edited June 12 by Rollo62 Share this post Link to post
Rollo62 533 Posted July 1 (edited) I still have not a smooth workflow under iOS, as before. With the injection of the current lldb SymLink into the PAServer package, I could at least start an app on a device. It behaves as follows: Compile and RunNoDebug - Deploy and Launch after compile - iOS app gets loaded - After deployment, the app tries to start but immediately fails (due to missing debug support) - The app pops up shortly, then crashes immediately - At least I can start the app manually Compile and RunWithDebug - Deploy and Launch after compile - After deployment, the process stucks (due to missing lldb), PaServer messages look as below Quote > Befehlszeile: "/usr/bin/otool" -l "/Users/username/PAServer/scratch-dir/username-Athens/TstApp.app/TstApp" >Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'lldb' //<= lldb is available unter the terminal path, but cannot be seen here Traceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'run_one_line' is not defined ... - The problem is, that the IDE crashes too and must be restarted, same as PaServer. The PaServer process seems to continue even after close. - I used to kill all PaServer processes ( can be more than one ), by shell command, but thats an ugly solution. - I've found a possible solution by PaServer command s ( stop server = kill the process ) and restart PaServer again - But that doesn't prevent the IDE crash. It is really a messy workflow now, if pressing the wrong button it crashes, debugging is no longer possible. XCode_1540, RadStudio 12.1 Upd 1 Does this behave now same on all machines, or is it only here? I really hope for a fix, that bring back normal debugging soon, I hope by patch of IDE & PaServer. Is there anything I still can improve by myself? Edited July 1 by Rollo62 1 Share this post Link to post
Marlon Nardi 0 Posted October 11 Unbelievable, I thought that after updating to Delphi 12.2 this problem would be solved, and yet it continues. Share this post Link to post