Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BlahBird

macrumors newbie
Original poster
Apr 7, 2016
8
0
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?
 

Sciuriware

macrumors 6502a
Jan 4, 2014
595
99
Gelderland
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?
And how about applications on all versions of MSWindows and all LUNIX derivates? Then macOS is a small problem!
;JOOP!
 

Senor Cuete

macrumors 6502
Nov 9, 2011
423
30
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.
 
Last edited:

960design

macrumors 68040
Apr 17, 2012
3,700
1,569
Destin, FL
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.
 

Senor Cuete

macrumors 6502
Nov 9, 2011
423
30
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.

Whoopie dink, you're really awesome. How does this help the OP?
 

960design

macrumors 68040
Apr 17, 2012
3,700
1,569
Destin, FL
Whoopie dink, you're really awesome. How does this help the OP?
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.
Whoopie dink, you're really awesome.
Thanks for noticing, I lay it on pretty thick.


PPPS. I have never cried.
 

BlahBird

macrumors newbie
Original poster
Apr 7, 2016
8
0
I decided to use a stand alone LLDB, but I am still finding out... hopefully there is a better way.
 

Zazoh

macrumors 65832
Jan 4, 2009
1,504
1,094
San Antonio, Texas
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.
 
  • Like
Reactions: Canubis
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.