
Compiling Objective-C Using Visual Studio 2015 [video] - mpweiher
http://channel9.msdn.com/events/Build/2015/3-610
======
mpweiher
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).

~~~
copx
> \- 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.

~~~
wsc981
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.

------
jdmoreira
[https://dev.windows.com/en-US/uwp-bridges/project-
islandwood](https://dev.windows.com/en-US/uwp-bridges/project-islandwood)

------
discohead
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.

~~~
coldtea
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.

~~~
itistoday2
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.

~~~
coldtea
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.

~~~
mightykan
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...](http://arstechnica.com/apple/2015/01/12/why-dns-in-
os-x-10-10-is-broken-and-what-you-can-do-to-fix-it/)

[2]: [http://osxdaily.com/2015/04/06/windowserver-high-cpu-
usage-m...](http://osxdaily.com/2015/04/06/windowserver-high-cpu-usage-mac-
os-x/)

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

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

~~~
coldtea
> _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...](https://www.google.gr/search?q=kernel+process+high+cpu+mavericks&oq=kernel+process+high+cpu+mavericks&aqs=chrome..69i57.7454j0j7&sourceid=chrome&es_sm=119&ie=UTF-8)

Broken DNS resolution in Lion / Mavericks:
[http://www.makingitscale.com/2011/fix-for-broken-search-
doma...](http://www.makingitscale.com/2011/fix-for-broken-search-domain-
resolution-in-osx-lion.html) [http://www.eigenspace.org/2011/07/fixing-osx-
lion-dns-search...](http://www.eigenspace.org/2011/07/fixing-osx-lion-dns-
search-domains/)

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

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

More bugs for Mavericks: [http://www.wired.com/2013/10/mavericks-issues-and-
fixes/](http://www.wired.com/2013/10/mavericks-issues-and-fixes/)
[http://www.macworld.com/article/2059577/bugs-and-fixes-a-
rou...](http://www.macworld.com/article/2059577/bugs-and-fixes-a-roundup-of-
mavericks-troubleshooting-tips.html)

10.5 Finder Data Loss bug:
[http://www.macintouch.com/leopard/movebug.html](http://www.macintouch.com/leopard/movebug.html)

~~~
itistoday2
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.

~~~
coldtea
> _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?

------
bananaboy
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...](http://blogs.msdn.com/b/vcblog/archive/2015/04/29/what-s-new-with-c-
cross-platform-development-with-vs-2015-rc.aspx)

[2]
[https://msdn.microsoft.com/library/dn707598%28v=vs.140%29.as...](https://msdn.microsoft.com/library/dn707598%28v=vs.140%29.aspx?f=255&MSPPError=-2147217396)

~~~
bananaboy
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.

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

~~~
kevingadd
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.

------
malkia
Someone has been porting my porridge!

