Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

port an iOS (iPhone) app to mac?

Is there a preferred way to go about this?

The app in question is not too large . . . single-player game that I wrote over the course of a couple of months.

EDIT: I should add that I have no experience with mac development . . . outside of what comes naturally with being an iOS developer.

EDIT: Classes heavily used in the game: subclasses of NSObject, UIView, and UIViewController. I don't know much about NSView, but I'm pretty sure all the UIView stuff will work in that class. Also some use of UITableViewController. I do also have Game Center, but I can leave that part out for now. There is no multi-touch.

EDIT: My graphics is all stuff that is in the QuartzCore and CoreGraphics frameworks. I do have a moderate view hierarchy.

EDIT: If you are doing such a port, you may also be interested in the issue of memory management

like image 378
William Jockusch Avatar asked Jan 02 '11 18:01

William Jockusch


People also ask

How do I transfer an app from my iPhone to my Mac?

On your Mac, click the "Device" button above the sidebar of the iTunes window in the iTunes software. Select "File Sharing" from the drop-down menu. From the list on the left, choose the app to which you want to transfer a file. Begin transferring files from your iPhone to your Mac.

Can I run an iPhone app on my Mac?

In the Mac App Store, iPhone and iPad apps that work on Mac computers with Apple silicon are labeled with Designed for iPhone or Designed for iPad. Any iPhone or iPad apps you purchase that work on your Mac with Apple silicon are shown when you view your purchased apps in the App Store.


2 Answers

  1. There's no easy way. It's that simple. Depressingly, you simply have to become good at programming the Mac.

  2. "I'm pretty sure all the UIView stuff will work in that class" -- unfortunately, no. Everything is different that enough you have to work hard.

It's not a fun gig. Make sure you really, really think it's worth it financially.

Apart from anything else, be aware of the "sibling views don't work on OSX" problem if you stack up a lot of views in your iOS app. Essentially, you will have to change to using layers (instead of simply views) on the Mac if you rely on nested hierarchies of views here and there on the phone!

Click this link: Is there a proper way to handle overlapping NSView siblings? for the gory details on that particular problem!

like image 193
Fattie Avatar answered Oct 11 '22 11:10

Fattie


http://chameleonproject.org/ UIKit for Mac from Iconfactory is worth checking out.

"Chameleon is a work in progress. The framework currently implements about 60% of UIKit after nine months of work."

https://github.com/BigZaphod/Chameleon

like image 37
Lloyd Dewolf Avatar answered Oct 11 '22 12:10

Lloyd Dewolf