Hacking the SDK value

  1. 3 weeks ago

    Sam R

    Nov 18 Pre-Release Testers, Xojo Pro, Third Party Store Hengchun, Pingtung, Taiwan

    tl;dr: Does anyone know of a good reason as to why altering the SDK value of a Mach-O file is not a good idea.

    I finally upgraded my development machine to macOS 10.14.6 (after several false starts, it claims it needed macOS 10.11.6, which I was running). Took about 4 hours to install.

    The 2018r3 Xojo IDE just looks wrong on Mojave, if I switch between Light & Dark mode, I lose half the text in the IDE (because the IDE adjusts the text colors to enter dark mode, but not back again).

    So I tried 2019r1.1 again. I had already tried it and reverted because it causes problems with one of my apps, but as I don't use that function in my other apps, I thought I'd be safe.

    Sadly not, after about 15 minutes of use, I determined that there appears to be at least something wrong with how I convert Xojo doubles to NSNumbers as all graphics functions that do any kind of radial processing, are very very wrong. There's other visual issues with my apps.

    This could take me a long time to figure out if there is a single root cause, or if there are multiple issues in the pipeline, maybe Apple changed something with CIKL, I don't know.

    The version built with 2018r3 works as I would expect it to do.

    The most obvious change is the SDK value in the Mach-O binary, App Wrapper knows where this is and could potentially set it back to 10.9 (which 2018r3) uses. However before I embark on this adventure, I wonder if anyone knows of a good reason as to why I shouldn't.

    Actually using 10.14.6 instead of just for testing, man it's a buggy experience. System Preferences window jumps around when changing panels, controls appear disconnected from their pane and unusable (like half way up the window, with the top half just missing). How on earth did something so critical get pass QA testing?

    Where has the sharing options for Facebook, Twitter & Flickr gone. My most used social media options gone, so now I need to write my own.

    It also took me about 20 minutes to remove the plethora of iOS apps that I don't want or need from the machine. Not to mention that simply booting the machine consumes 12GB of 16GB of RAM, with about 500 little apps all running in the background. Just how many copies of mdworker actually need to be running, 8 seems excessive for a machine with a single user.

    Man Apple have fallen far from the tree.

  2. Norman P

    Nov 18 Pre-Release Testers, Xojo Pro under a bus

    odd
    I see none of this using 10.14.6

    Now are you talking about altering the SDK version in the PLIST ?
    That one I do not believe is _quite_ as critical as the load commands BUT it is still used by the system and hacking it to a lower value may give you issues since the Xojo runtime & frameworks ARE built against that SDK version and not a lower / older one
    API's may have chnaged etc and the SDK value is, afaik, used to know that

    If you JUST updated mdworker will run for a pile of time until the "meta data" (md) is collected once again in the the system meta data store for spotlight
    Once thats done then it will pretty much go away except for short bursts

  3. Philip C

    Nov 18 Pre-Release Testers, Xojo Pro Cooroy, QLD, Australia

    Silly question.
    Did you run Disk utility and first aid after installing?
    Phil

  4. Sam R

    Nov 18 Pre-Release Testers, Xojo Pro, Third Party Store Hengchun, Pingtung, Taiwan

    @Norman P Now are you talking about altering the SDK version in the PLIST ?
    That one I do not believe is _quite_ as critical as the load commands BUT it is still used by the system and hacking it to a lower value may give you issues since the Xojo runtime & frameworks ARE built against that SDK version and not a lower / older one
    API's may have chnaged etc and the SDK value is, afaik, used to know that

    I'm talking about modifying the one within the Mach-O binary. I know where it is and how it's formatted, so I can. However I am worried about the potential side effects.

    I can live with a copy of Xojo that doesn't quite work right as it doesn't actually prevent me from working. However I suspect that I am going to have to "move backwards forwards" at some point, and seeing my application go wonky in ways I didn't expect doesn't inspire me with confidence, I am not blaming Xojo here as I know it's not their fault.

    As always I have soo much to do already; and having to take the time out diagnose and solve problems that were not there before, just royally aggravates me.

    As for a poor experience with Mojave, meh, I wasn't expecting it to be as good as we used to get, just surprised that there is still a lot of minor issues in what's the final release of Mojave.

    Most surprised to find that [NSGraphicsContext setPatternPhaze:] is now flipped for a flipped NSView. I'd spent ages figuring out how to scroll a background image with a scrollview, only to find all that was wasted on newer OSes. I need to figure out when this behavior changed so I can adapt it accordingly. Its for a prototype interface that I'm currently designing, so it doesn't affect any current shipping apps.

  5. Sam R

    Nov 18 Pre-Release Testers, Xojo Pro, Third Party Store Hengchun, Pingtung, Taiwan
    Edited 3 weeks ago

    @Philip C Silly question.
    Did you run Disk utility and first aid after installing?

    Not a silly question, my whole upgrade plan was borked because I couldn't do it the way I wanted.

    I've just run it and it says that I need to boot into recovery mode to fix multiple issues detected with my disk, which were not there before I upgraded.

    Edit: Booted into Single user mode. It failed to fix a "directory valence check: directory (0xc0043) mchildren does not match drec count (8)"

    Off to figure out what this means.

  6. Norman P

    Nov 18 Pre-Release Testers, Xojo Pro under a bus

    @Sam R I'm talking about modifying the one within the Mach-O binary. I know where it is and how it's formatted, so I can. However I am worried about the potential side effects.

    Yeah I would not change that
    That would be ripe for causing "undesirable" effects since the SDK that things WERE actually built with may not in fact deploy back as far as you modify that value to
    It would definitely be the whole "You're on your own here" with no recourse in terms of reporting bugs etc

  7. Sam R

    Nov 18 Pre-Release Testers, Xojo Pro, Third Party Store Hengchun, Pingtung, Taiwan

    @Norman P Yeah I would not change that
    That would be ripe for causing "undesirable" effects since the SDK that things WERE actually built with may not in fact deploy back as far as you modify that value to
    It would definitely be the whole "You're on your own here" with no recourse in terms of reporting bugs etc

    Got it; trouble is while I’m reading your response I’m thinking, I’m already getting undesirable results. The results of my app built with 2018r3, I’m happy with but built with 2019r1.1 look terrible, my guess is the values are way bigger than they should be.

    Looks like I have to spend more time fixing my app that wasn’t broken, but now is thanks to Apple.

    I wonder what exactly changed between the 10.9 SDK to the 10.14 SDK that could affect my app so significantly. It also worries me about prior OS versions as I’m sure fixing it for 10.14, will break it on older OSes.

    I wonder if anyone there in a position of power actually cares about the Mac or the developer experience any more. My guess is that there isn’t.

  8. Norman P

    Nov 18 Pre-Release Testers, Xojo Pro under a bus

    well the update from 10.9 to 10.14 moved about 5-6 years worth of api's so a LOT changed

  9. Jeff T

    Nov 18 Pre-Release Testers Midlands of England, Europe

    I see none of this using 10.14.6

    Same here.
    That's my setup on an MBP, using Xojo 2018 r3, and it's all stable.

    I have to spend more time fixing my app that wasn’t broken, but now is thanks to Apple

    Amen to that

  10. Sam R

    Nov 19 Pre-Release Testers, Xojo Pro, Third Party Store Hengchun, Pingtung, Taiwan

    For the time being; I’ll stick with 2018r3. Maybe at some point in the next 6 months I can figure out exactly what broke (apart from my soul).

  11. Tim J

    Nov 19 Pre-Release Testers N. Phoenix, AZ

    One things that we learned in our lab was that updating more than one macOS version at a time is a recipe for disaster. We now go version by version or perform a backup with BRU and then do a clean install.

or Sign Up to reply!