Jump to content
Sign in to follow this  
Rollo62

Using a prior iOS or macOS SDK with Delphi

Recommended Posts

@Dave Nottage

Hi Dave,

 

thanks for your nice article about a major problem in the Apple environment.
Yes, Apple always keeps us busy with such unnecessary work.

 

Since I had fallen into such nasty boobie trap in some older version before, I changed my way howto deal with these updates.

So I may provide another (pseudo)-solution to this topic:


Solution 3: ( prerequisites before starting any update )

  • Use your XCode environment for development in a VM virtual machine, like VmWare Fusion
  • Make a backup of your VM image, BEFORE any update of the VM
    (if you prefer snapshots, thats fine too, if you cleanup later, but I prefer to make complete, FULL clones of the whole VM)
  • In the VM backup also the current SDK's are backed up of course, if you ever need them again later
  • With these FULL clones you can switch fast and easy between older and newer XCode, SDK and PAServer setups

 

That doesn't solve the basic problem, of course,

but makes it much easier to handle different SDK environments, in case of any "crash" might happen wit the new version.

 

 

Edited by Rollo62
  • Like 1

Share this post


Link to post

Maybe somewhat related to this, I just fell (again) into the other Apple trap.

 

By leaving aside the working XCode VM, only for some days/weeks, to test and prepare Android.

 

Today I try moving back to the current system (same VM, same XCode, sam OS 10.15.5, same iPhone (13.5), etc.

The iPhone is suddenly no more detected by XCode, even that iPhone is connected to the VM and listed in the USB.

(usualy restart, reboot OS and Phone already done).

 

image.thumb.png.199732d2edfa6768c2731ccf0b5556d3.png

 

I had similar cases before, where current, working setups ( of the former versions ),

suddenly disappear to function with XCode and RadStudio.

And yes, IT IS NOT A DELPHI ISSUE.


The general recommendation to this is, to update to the latest versions (at least thats what Apple says ).

If I do that, then I'm back to entry 1. of this thread, and the new versions cause other issues.

 

So at the moment I try to install the new OS 10.15.6 only, with the hope that this might be sufficient to detect iPhone again.

 

This is typical Apple, to me it looks like a modern way of planned obsolescense, which is absolutely annoying.

I only can say, if I wouldn't have to provide iOS solutions, I would recommend to everybody to stay away from Apple purchases.

Usually I'm quite neutral, but Apple already costs me days of my lifetime, for their daily nonsenses.

 

Go and better buy Android products :classic_cheerleader:

 

 

 

 

 

Edited by Rollo62

Share this post


Link to post

Nope: An update to Macos 10.15.6 doesn't solve it.

So maybe I'm foreced to update XCode and/or iOS too, but I try to keep it at the moment,

maybe there is another idea howto make XCode detecting my phone again.

 

Updating iOS to 13.6 will also break my XCode connection, and I cannot debug SDK 13.5 there.

Edited by Rollo62

Share this post


Link to post

@Dave Nottage

Regarding the iOS13.6 SDK, with XCode 11.6, I'm not sure what is missing there.

I just checked the XCode package content, looks like this, seems OK to me at first sight

image.thumb.png.41bfb10503fa1f8313fe6d78a755cc50.png

 

The /System folder is not "empty", but I have not checked out the SDK in my projects yet.

 

Edited by Rollo62

Share this post


Link to post
3 hours ago, Rollo62 said:

The /System folder is not "empty"

As per the article: "The /usr/lib/system folder underneath simply does not exist"

Share this post


Link to post

So could you fix it ?

I just made a normal XCode update to SDK13.6, did you do this update via command line ?

 

Have you checked if XCode is veryfied ?

Like that, or

 

Quote

/usr/bin/xcodebuild -version
Quote

E.g.


cd /Applications
xattr -d com.apple.quarantine Xcode.app

or

 

Verifies that the Xcode installation is properly signed by Apple


fastlane run verify_xcode

 

Edited by Rollo62

Share this post


Link to post
47 minutes ago, Rollo62 said:

I just made a normal XCode update to SDK13.6, did you do this update via command line ?

My Xcode was updated to 11.6 via the App Store app on my Mac. It includes the iOS 13.6 SDK. 

48 minutes ago, Rollo62 said:

fastlane run verify_xcode

fastlane verified Xcode as OK.

54 minutes ago, Rollo62 said:

So could you fix it ?

Not as yet

Share this post


Link to post

Strange, I think I did the same here in my VM.
But as you know I have other issues, VM cannot find my devices anymore, only a real Mac on XCode 11.6 can still do.

I assume you did already XCode cleanup complete and reinstall.

 

Edit:

Something like this

or that.

Edited by Rollo62

Share this post


Link to post

@Dave Nottage

Maybe this is a hint

Quote

Remove the files at ~/Library/Caches/com.apple.dt.Xcode is basically clearing the cache.

You can delete anything under /Library/Developer/ directory, such as CommandLineTools and CoreSimulator,

 

except PrivateFrameworks subfolder.
This might cause your newly installed Xcode to crash until you put it back.

 

Share this post


Link to post
47 minutes ago, Rollo62 said:

Strange, I think I did the same here in my VM.

Are you saying that the /usr/lib/system folder exists in your iOS 13.6 SDK? i.e. the full path:

 

  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneIS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/system

 

51 minutes ago, Rollo62 said:

I assume you did already XCode cleanup complete and reinstall.

No, I did a normal upgrade. Why would I need to completely uninstall?

Share this post


Link to post

@Dave Nottage

Yes, I've took that picture from Finder, in the post above.

It exists in the iPhoneOS.sdk path, as well as in the iPhoneOS13.6.sdk path.

 

Quote

No, I did a normal upgrade. Why would I need to completely uninstall?

Also I did a normal update via AppStore, to get that picture incl. /System.

But maybe in case of somethings wrong, I considered a full clean, I did some times before.

Was not necessary this time.

 

 

 

 

Edited by Rollo62

Share this post


Link to post
Just now, Rollo62 said:

Yes, I've took that picture from Finder, in the post above

The picture does not show the folder that I am asking about. Please read my answers carefully.

Share this post


Link to post

@Dave Nottage

Sorry, I've tried do read as carefully as possible, I'm working on other issues too.
I have seen the libSystem, not /system, you'right the /system folder is missing here too.
While I can see the /system in iPhoneOS.sdk 13.5 latest.

 

From this post, it seems to be stubs for iOS, and the real libCache is needed for Macos only.
That Macos folder is still there in my SDK:

Quote

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/system

Maybe not a good idea to use the Macos folder instead, the question would be who needs and links to libCache.

 


Clarifications:
1. From your blog

Quote

/Applications/Xcode/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.SDK
I assume a typo

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.SDK

2. From your last post before

Quote

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneIS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/system 
I assume a typo

 


 

 

Share this post


Link to post
31 minutes ago, Rollo62 said:

I assume a typo

Yes, in both cases, and thanks!

 

32 minutes ago, Rollo62 said:

I've tried do read as carefully as possible

I need to write more carefully 😉

 

Thanks for your input. I hope to have an answer in the next couple of days or so.

Share this post


Link to post

Hi,

 

I like your approach (I'm a heavy user of VMware Fusion myself)

 

With VMware Fusion 11.5.x there's a number of issues when it comes to connecting via USB.

This basically has to do with Fusion's 11.5.x use of kernel extensions.
Make sure that the usb arbitrator is running.

eg.

ps ax | grep "vmware-usb"

should show you vmware-usbarbitrator

If it doesn't then your install is broken and I suggest to download the full installer from https://www.vmware.com/go/downloadfusion drag the current VMware Fusion install to the bin, reboot your host and install VMware Fusion again. The rebooting would make sure that no kernel extensions are still in use.

 

If vmware-usbarbitrator is already running then I might have a suggestion for editing your .vmx file, but let's take it one step at a time.

 

Also note that the next version of VMware Fusion (currently available as a tech preview) uses the native USB stack from Catalina / Big Sur and no longer requires a kernel extension for this feature.

Share this post


Link to post

@wva

Thanks for the hints.

Indeed this command doesn't show the "usbarbritator".

 

But that is missing also in earlier VM's, which is still working perfectly fine with my USB devices.

Anyway, I will try to re-install the VmWare.

 

What I don't get is your note "... download the full installer ...".

When I make a normal update, via the check for updates, do I get a different installer then ?

I've never had seen any difference there.

 

 

 

Share this post


Link to post

@wva

Now re-installed all that, but still no luck.

XCode doesn't recognize my device.

 

The command shows

Quote

username@Rollos-Mac ~ % ps ax | grep "vmware-usb"
  520 s000  S+     0:00.00 grep vmware-usb

which should be OK I guess.

 

51 minutes ago, Rollo62 said:

@wva

Thanks for the hints.

Indeed this command doesn't show the "usbarbritator". 

I think that I did this on Windows VM, so I'm not sure how this was before re-install.

Sorry, too many VM's running, and too late in the evening :classic_blush:

Anyway, I did the complete clean install.

 

If you have still some tips what to change in the .vmx file, would be great.

Otherwise I have to move to real hardware now, as VM debug is broken.

 

 

 

Edited by Rollo62

Share this post


Link to post

The usb-arbitrator is a service running at the host, not in a VM.

 

Also make sure you are at the very latest.

The update should be a different installer yes. It wasn't when going from 11.0 to 11.5, but after that it's a different process to update versus the full installer.

Make sure to install 11.5.6 and not an earlier version.

Edited by wva
more details

Share this post


Link to post

@Rollo62

Hi, i have the same issue in my VM's using Xcode, devices are shown by System Report, but Xcode and Finder can’t see them.

 

Did you find solution for this problem ?

Share this post


Link to post

Not yet working , but I haven't tried again.

Im working on a real Mac Machine right now,

But Ive downloaded VMware 12 already, and will try soon.

 

Sometimes such issues disappear suddenly, I hope...

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×