Hacker News new | past | comments | ask | show | jobs | submit login
Compiling Objective-C Using Visual Studio 2015 [video] (msdn.com)
72 points by mpweiher on May 1, 2015 | hide | past | favorite | 23 comments



tl;dv:

- real ObjC compiler (clang) + runtime (unspecified)

- "modern" ObjC with ARC + Blocks

- C++ interop access to all Windows APIs

- C# integration "coming"

- Apps are full windows apps

- subset of iOS APIs

- OpenGL/ANGLE/CAEAGLLayer/EAGLContext, OpenAL, Sensor

- UIKit, CoreAnimation, CoreGraphics CoreText, "Touch"

- Nibs, Storyboards and Autolayout are supported

They don't claim or shoot for complete coverage or compatibility with a specific iOS version.

Swift is not there, dev said "coming", suit said "we have no comment" (the interaction between the young and slightly insecure program manager and the old and very comfortable dev. was fun to watch).

Project conversion is one-way and apparently one-time, which could be an issue. Dev immediately said "why not two-way, hey, that's a good idea, we'll do that". I think the suit was only half joking when he asked for the dev's mike to be cut...

I didn't quite get the philosophical musings about code generation. Huh?

Coroutines for C++ also looked quite neat, very light-weight/fast implementation (~cost of a function call).


> - real ObjC compiler (clang) + runtime (unspecified)

It seems Microsoft actually wrote their own Objective-C runtime. I mean otherwise the guy would have said "we ported Apple's runtime" or something like that. But he said "We are providing you with a great Objective-C runtime."

Crazy times.

EDIT: Definitely a new runtime written by Microsoft. The rest of the talk made that clear.


Crazy and awesome. From what I've seen it should be possible to create a fully-featured WinPhone app now with Objective-C code. Microsoft claims that they've ported a lot of the API's including the most important API's for gaming (OpenGL, OpenAL, etc...) but also (and this surprised me) CoreGraphics, CoreAnimation and (a large part of) UIKit and Foundation (must have been a crazy amount of work).

Microsoft looked at the API's that are most used by developers and implemented those first, but they will add more API's in the future.

A lot of stuff, like local notifications is directly mapped to WinPhone toasts. But at the same time you can directly use WinPhone API's from Objective-C, if you choose to.

And you can develop all using Visual Studio. This will be really interesting and fun.



I was really hoping to see more support for OS X API's, personally I'm a lot more interested in porting my Mac desktop app to Windows desktop than any iOS project.


I don't think they are interested in OS X APIs at all. It's not as if Windows doesn't have tons of native apps in the first place.

What they want is to offer a way to get the million of iOS apps into Windows Phone.


Agreed, sadly.


Microsoft would be stupid to not offer to port Cocoa apps.

How else are they supposed to convince developers such as myself to even consider buying a PC? With Apple dropping the ball with Yosemite, the opportunity is ripe for Microsoft to compete for quality devs and quality apps.


This sounds like reasoning from some parallel universe to me. First, Apple hasn't dropped any ball with Yosemite.

It's it's as good as it ever was. People have been complaining for every major release since 10.2 how the OS gotten more buggier, etc. Then a couple of point updates come and fix any major new bugs and the stop. Then, sometime around 10.x.6-8 a new version is relased and then they complain for the next release and remember the old one fodly. I have articles and blog posts with similar complaints from 10.5 and 10.7 and 10.8 and 10.9 with the same pattern. Even for 10.6, which was mostly a no-new-features release.

Second, even if they had, there's not much value in "offering to port Cocoa apps". Major apps are already cross platform (from Adobe stuff and Eclipse/Idea, to Cubase, Sublime Text and Mathematica, including Office, which MS itselfs makes anyway), and smaller Mac-Only apps don't have much to offer to Windows users, and wouldn't be much outside of the Mac ecosystem anyway.

You'd get what, Pixelmator and BBEdit? There are 4-5 established alternatives in Windows for each piece of Mac software.


This is a case of “works on my machine.” There are serious[1] documented[2] issues[3] with Yosemite[4] that were not there in the previous OS X release, and, after multiple point updates still haven not been fixed. Apple has dropped the ball. The general quality of the OS, apps, integration and fit and finish has decreased tremendously.

[1]: http://arstechnica.com/apple/2015/01/12/why-dns-in-os-x-10-1...

[2]: http://osxdaily.com/2015/04/06/windowserver-high-cpu-usage-m...

[3]: http://osxdaily.com/2015/04/10/fix-finder-problems-mac-os-x/

[4]: http://osxdaily.com/2015/04/17/fix-slow-folder-populating-cl...


>This is a case of “works on my machine.”

Nope, I even have had a couple of issues (wifi related) which were solved in .2 update. But I also know that I had this or that issue everytime since 10.2 when I started using the OS. I also know I had tons of issues in Linux (been using it since 1997) and Windows (since 3.1), and I'm also a programmer, so I don't have BS expectations from something as huge as a complete OS and apps distro.

So, it's mostly a case of "have been following this space since 2002, including reading most forums, trade mags and blogs, so have a feel for what people compain about."

>There are serious[1] documented[2] issues[3] with Yosemite[4] that were not there in the previous OS X release, and, after multiple point updates still haven not been fixed.

Nothing special about those issues you posted. I post below a list of issues for Mavericks (tried to find similar or even the same). I can find for you similar items even down to 10.2, including lamenting articles about "buggiest release ever", etc.

As for the "and after multiple point updates still haven not been fixed", first we're at 10.9.3. So multiple is just 3 releases. Usually we get up to 7 or 8. And some even carry over or get fixed in the next version, especially if they don't affect many people.

And before dismissing "works for me" casually because of some issues online, note that with a user base in the 100s of millions, even a bug affecting 0.1% (with some weirdo network setup, bad HD sectors, broken hardware, haxies etc), it will still be reported by tens of thousands and appear bigger than it is.

Kernel task high cpu in Mavericks: https://www.google.gr/search?q=kernel+process+high+cpu+maver...

Broken DNS resolution in Lion / Mavericks: http://www.makingitscale.com/2011/fix-for-broken-search-doma... http://www.eigenspace.org/2011/07/fixing-osx-lion-dns-search...

Mavericks Finder bugs: https://discussions.apple.com/thread/5467931?start=30&tstart... http://macperformanceguide.com/blog/2014/20140213_1-Maverick...

Mavericks Slow Finder: https://discussions.apple.com/thread/5505550?tstart=0 http://osxdaily.com/2013/11/13/fix-finder-slow-high-cpu-use-... http://www.tweaking4all.com/os-tips-and-tricks/macosx-tips-a... http://www.reddit.com/r/osx/comments/1pj5cc/finder_very_slow...

More bugs for Mavericks: http://www.wired.com/2013/10/mavericks-issues-and-fixes/ http://www.macworld.com/article/2059577/bugs-and-fixes-a-rou...

10.5 Finder Data Loss bug: http://www.macintouch.com/leopard/movebug.html


I've been a Mac user since OS 7. Don't reinvent history.

Since 10.0, OS X got progressively better with every release up to 10.4. After that things got progressively worse.

Your are only proving our point.


>I've been a Mac user since OS 7. Don't reinvent history.

Reinvent what?

>Since 10.0, OS X got progressively better with every release up to 10.4. After that things got progressively worse.

That things "got progressively worse" is just your opinion, not some general consensus. As I noted, others say 10.6 was the best. Others that 10.8 was the last great one. Others that 10.9 was just as good, but 10.10 blew it.

Heck, read Siracussa, for one, does he say that 10.4 was the pinaccle?


UIKit always felt like a grown up version of Cocoa to me. Whenever I go back to writing Mac apps, I wish it was more like iOS development.

Microsoft is now making it possible to turn iOS apps into desktop apps (as well as phone and tablet apps) which is actually pretty interesting.

It won't help as much for porting your current mac desktop app, but it certainly is an interesting idea.


> UIKit always felt like a grown up version of Cocoa to me.

Funny..to me it always feels like Cocoa's slightly disabled kid brother. Curious, what makes it feel "grown up" to you?


It's been awhile since I've done Cocoa, so the specifics are a bit fuzzy. Stuff like CGRectMake makes more sense than NSMakeRect.

I also enjoy the pre made view controllers.


That talk is interesting and it's be great to be able to build for iOS in VS, but other information that seems to be coming out around this is very confusing. This[1] blog post links to this MSDN article[2] which says "You can use Visual C++ for Cross-Platform Mobile Development to edit, debug and deploy iOS code to the iOS Simulator or to an iOS device, but because of licensing restrictions, the code must be built remotely on a Mac.".

[1] http://blogs.msdn.com/b/vcblog/archive/2015/04/29/what-s-new...

[2] https://msdn.microsoft.com/library/dn707598%28v=vs.140%29.as...


Ahh, after watching the entire talk now I get it. So this Obj-C+libraries is for bringing Obj-C apps to Windows, not really for building apps targeted at iOS.


I watch this and I can't help thinking, "Apple has won".


I think the reality is even more interesting than that: Apple has won, but MS is in the position of being able to do whatever they want, so they can chase after any developer audience they're looking to capture.

Thus, they're adding clang integration, and an objective c runtime, and a way to run 'universal' windows 10 apps on xbox one, a rearchitected browser with modern js (asm.js!) and modern platform features (webgl!) etc etc etc. They just want devs to put their applications on Microsoft platforms, they're letting go of the desire to control every part of the platform & developer experience.

Compare this with how Apple has been aggressively pruning and scoping down their dev tooling, it's a pretty interesting contrast. They insist on controlling everything from beginning to end, which results in problems like not being able to build executables that support older versions of OSX with the official toolchain.


You don't need to watch this video to know that Apple has won.

But what do you expect, everybody to pack up and go home?

I'm glad they are trying something/everything in order to bootstrap Windows.

Innovation happens when people are competing and fighting for the user's attention. Not when they are rolling in cash with no desire to do anything new.


Exactly. They won a few years ago.

At first Microsoft tried to copy exactly what Apple was doing and that didn't work. Now they're at least trying to compete with Apple in a way that leverages their advantages.


Someone has been porting my porridge!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: