How do you all manage to debug your apps for all different versions of macOS?

Discussion in 'Mac Programming' started by BlahBird, Nov 16, 2016.

  1. BlahBird macrumors newbie

    BlahBird

    Joined:
    Apr 7, 2016
    #1
    I am indie app developer and poor. therefore I only have one Mac.
    I am a pretty newbie regarding to programming.

    I need to debug my Cocoa app on different versions of OS X. I use macOS sierra(10.12) on my iMac, and I have installed El cap(10.11) on Vmware. Also i am going to install 10.10 as well
    Xcode 8.1 is running on Sierra and I have no idea to target the El Cap on vmware. How can i let Xcode connect with the one on virtual machine so that the app launches on El Cap on vmware?

    I am doing this because I really need to debug without copying the code to El cap, Yosemite and the ones in the future.
    My app was written in Swift 3 and Xcode 8 and I cannot use any of them on Yosemite. After my app was crashed at start in testing, I had to install Xcode 7.2 and convert all my code to Swift 1.x (Or 2.x whatever) for debugging on Yosemite. (the crash occurred on Yosemite because I did not override the nibName variable by the way). And at some point I had to switch back to Swift 3. I did this via multi-booting over and over.
    macOS, Swift and Xcode will be upgraded again in the future so I need a solution before going further.

    I hoped there's a way to debug like we do in iOS programming. but maybe not in virtual machines.
    The only way I found was using a standalone LLDB to get logs in Terminal in VM by copying and paste and launching the product file from the build folder.
    I still don't know how to use a standalone LLDB that's something I have to learn new.
    That might be enough to debug by printing lots of text lines in terminal.
    but I am not familiar with those kinds of things.
    Is there anyway to let Xcode targeting the one in VM?

    I Also failed to get an LLDB remote server in VM. I found some articles for jailbroken iOS devices or kernel(I don't know what kernel is) but not for Cocoa apps.
    Does anyone have a solution for this?
     
  2. cqexbesd macrumors regular

    Joined:
    Jun 4, 2009
    Location:
    Germany
    #2
  3. Sciuriware macrumors 6502

    Sciuriware

    Joined:
    Jan 4, 2014
    Location:
    Gelderland
    #3
    And how about applications on all versions of MSWindows and all LUNIX derivates? Then macOS is a small problem!
    ;JOOP!
     
  4. Senor Cuete, Nov 18, 2016
    Last edited: Nov 18, 2016

    Senor Cuete macrumors regular

    Joined:
    Nov 9, 2011
    #4
    Archive your product and export it as an unsigned Mac App and test it on your OSes.

    Set the build settings for whatever your minimum OS is and develop it for this. It will run on the later versions. The compiler option to look for deprecated methods and objects should be set to yes. I still sell a Mac App that targets OS 10.6 because I think that it was the last good OS X and the people who are still running it are lucky.
     
  5. 960design macrumors 68030

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #5
    I cry, alot.

    Actually, I develop non platform specific code. aka, web applications that play nicely in any browser. From Kindle to your smartTV. Just have to throw in a bit of responsive design and design a solid UI.
     
  6. Senor Cuete macrumors regular

    Joined:
    Nov 9, 2011
    #6
    Whoopie dink, you're really awesome. How does this help the OP?
     
  7. 960design macrumors 68030

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #7
    Sorry, I should have specifically addressed the issue. You are correct.

    To the OP:
    You are doing it wrong. Learn to write agnostic code. Deploy to all devices. Hope this helps.

    To sassy man:
    There is no answer to his question. You cannot test on what you do not have. I was offering a solution for his limited means.
    I write Swift 3 daily, currently within Sierra OS and test deploy it on Mac Mini's running Yosemite ( soon to end of cycle that OS, and El Capitan ).

    PS.
    Code:
    protocol GetMawrComputersDelegate: class{
      func testCodeOnSierraOSDidSucceed(_ computer: GetMawrComputers, mini: BuyMore )
      func testCodeOnElCapitanDidSucceed(_ computer: GetMawrComputers, mini: BuyMore )
      func testCodeOnYosemiteDidSucceed(_ computer: GetMawrComputers, min: BuyMore )
    }

    PPS.
    Thanks for noticing, I lay it on pretty thick.


    PPPS. I have never cried.
     
  8. BlahBird thread starter macrumors newbie

    BlahBird

    Joined:
    Apr 7, 2016
    #8
    I decided to use a stand alone LLDB, but I am still finding out... hopefully there is a better way.
     
  9. Zazoh macrumors 6502a

    Zazoh

    Joined:
    Jan 4, 2009
    Location:
    San Antonio, Texas
    #9
    Another option is to enlist some "Testers." I've found, that if you have a website, through social media, or a forum, and ask folks to Test, you'll get some volunteers.
     

Share This Page