In this bizarro world we live in, Microsoft has rebuilt essentially the exact same thing and has released it as MIT-licensed open source.
I was really overwhelmed with joy, when I saw how one can add say middle-wheel support to a whole system, without recompiling, or doing some low-level drivers, hacking, etc. - but by just extending it with OO - this is the code I'm talking about - http://www.rubicode.com/Software/Legacy.html#RCWinMouseWheel
It's probably not safe to do things like this nowadays (security), but I still like the whole idea of one being able to replace classes with others without recompiling everything from scratch.
I remember using it as my email client for a while, on Windows NT.
Compare: https://github.com/Microsoft/WinObjC/blob/106d8b2738101872a1... and https://github.com/steipete/PSTCollectionView/blob/master/PS...
Edit: They added the license https://github.com/Microsoft/WinObjC/commit/611e9e5a4b837360...
And also apologized:
In the source file referenced, the PSTCollectionView strings are all ifdef'd out. Lawyers would be required to tell if text not used in the software is part of the software.
They could still attribute this guy, but they included it in a public repo so they should either delete or acknowledge this guy.
Edit: It isn't commented out but it's in a compile if statement that shouldn't execute.
But that's not what I'm talking about. Here they've literally replaced all type declarations with `id` (not just return types where you'd normally see `instancetype`). Seems odd.
I'm not saying they wouldn't (or even shouldn't, since they lost the case), but I'd be amused as all get out. And it'd prove what we all know deep down: Google's position will always be whatever is the best position for Google.
Looking a little deeper, it's missing some things... KVC/KVO are entirely absent. libdispatch looks to be pretty broken. NSNull is wrong in about 3 ways. There are several classes which are just stubs. Most of the NSLock subclasses are missing.
It's a good start, but I don't see it becoming the ObjC standard library by any stretch of the imagination.
I am surprised they didn't use any of Apple's open source code, such as libdispatch or CoreFoundation.
Is it still policy for Apple to require XCode and therefore force you into buying Apple hardware (one way or another) in order to deploy to the App Store?
So you can actually just send the code developed on your windows box off to a third party build server, which will be an actual registered mac - you get the compiled binary back and then submit that to the app store, no worries.
I'm not sure if the rules around this have changed but IIRC from a couple of years ago when I last checked, this is what Adobe were doing with their phonegap build server - you send them up your phonegap project which can be written on anything (windows, linux, etc), they compile it to apps for various platforms and send you back those binaries, you then just submit these to the various platform app stores. Again, IIRC, this included iOS apps.
Looking to the future, there's React Native.
Android is another:
The other two are for web apps, and legacy win32 apps.
They all take different apporaches. So this one for iOS is a recompile and modify approach, Android is more of an Android SubSystem within the OS approach (like the old Unix subsystem that they had)
The problem is not the syntax support. The ObjC runtime had many changes to it done internally over obscure flags to support Swift and other compiler features. These are not readily documented on Apple open sources. (Perhaps more documentation exists in LLVM.) Once the runtime contains ABI changes, it makes it difficult to port apps that (ab)use the runtime. Not a problem for some apps, but a big problem for others.
Couldn't find their implementation of objc_msgSend, interestingly...
"(we’re not open sourcing the compiler)"
Guess I'm gonna hold off this until the final version is released.
Reminds me about the whole Visual J embrace-and-extend thing in the old MSJava debacle.
Very interesting stuff, diving into the Frameworks directory in the repo.
https://channel9.msdn.com/Events/Build/2015/3-610 (start at 35 mins)
It's an interesting (and funny) video. Some things Microsoft _might_ work on are:
- Swift support might be on the roadmap
- Export (changes) to Xcode project might be on the roadmap
- There's interop between ObjC and C++ / C# using some sort of event system.
- Visual Studio 2015 has autocomplete and syntax colouring for ObjC
RE: The project itself: looks like they're still working on getting it to work on ARM, which is strange considering that iOS is ARM...
I'd imagine if you are a mac developer then the price of Win10 is practically insignificant compared to what you are used to paying for OSX stuff.
I'm used to paying $0 for the OS X stuff needed to do development. This includes the Enterprise Professional Plus Home edition of both OS X and Xcode. In the lifetime of my Mac I have upgraded the OS 2 times and soon 3 for $0. So $307 is a bit significant for Windows 10 Pro (need BitLocker = Home is no go).
If you could have done the same on your Windows platform then please give me your Windows stuff contact person as he is clearly much cheaper than the ones I usually deal with.
But just for being in the Apple is ripping you off mode I did pay a bit more for the initial purchase of the hardware (around $205 more in todays prices than a comparable Dell XPS 13).
My day job is doing software management on the Windows platform so I'm fully aware of the licensing cost here. Including the price of operating a Windows developer above Visual Studio community level with their VS Pro/Enterprise editions, MSDN subscriptions, Team Foundation servers, and $2,500 HP workstation laptops (initial consumer price for lowest configuration). Seeing these prices almost causes a heart attack each time...
But it was mostly an example. I already have all the Windows versions I want available through work.
Yes everything is expensive here... :/
Why is that strange? That iOS also runs on ARM doesn't help them very much for running stuff on ARM-based windows devices.
To use WinObjC, there are a few requirements. You need:
Visual Studio 2015 with Windows developer tools. Visual Studio 2015 Community is available for free here. Select (at least) the following components during installation:
I'd love to get Mac Apps on Windows.
Let's say I want to see the Rendered XAML template of a standard UIButton?
AFAIK we ended up with C# because MS created a very nice Java IDE, started to fork it, developers vested in that IDE got mad at Sun Microsystems (developers & owners of Java standard), Sun sued MS, MS was told to cut it out, MS mutated Java into C#.
Let's hope this doesn't turn into MS trying to rip iOS developers/users away from Apple as done many times before.
In order to compete, Microsoft now has to play on, and support, platforms which it does not, and never will, control.
It's taking a while for me to adjust (16 years?), but I have to say - I really like this new Microsoft, and I'm looking forward to the great things that they are going to do now that they are no longer the Monopolistic behemoth that they were for so many years.
That's where Microsoft is now with their mobile OS, and it's nearly exactly the same playbook: developer mindshare and one-way compatibility to make their lousy offer become less lousy.
Given that some XAML-in-UIKit stuff is discussed somewhere else here, they may already work on extending beyond iOS, probably hoping to keep Apple busy with eternal catch-up (since they're said to have cross licensing agreements, patent wars are likely out of the question here).
The war is over because Microsoft no longer has a monopoly they can leverage to do this again.
Microsoft is not, and will not be a force in the mobile phone world for the foreseeable future.
Re: "probably hoping to keep Apple busy with eternal catch-up"
You've got the causation going the wrong direction - Apple doesn't have to catch up to Microsoft any more, it's Microsoft that has to play catch up with Apple.
I can't describe it any better than Benedict Evans did, so I'll just share his analysis: http://ben-evans.com/benedictevans/2015/7/8/capitulation
They're still a force on the desktop and the Universal App model of Windows 10 will help translating that elsewhere.
> Microsoft is not, and will not be a force in the mobile phone world for the foreseeable future.
WinPhone sales catch up with iOS in some European countries. They have attractive offers at the low end to rival Android in less wealthy regions. I wouldn't discount them yet.
> You've got the causation going the wrong direction - Apple doesn't have to catch up to Microsoft any more, it's Microsoft that has to play catch up with Apple.
For now. Just like they had to with HTML on IE4 and Java for a while. At some point, they built a "better HTML than HTML" (XMLHttpRequest still survives) and a "better Java than Java" (at least they saw it that way, and it was enough of a threat that Sun took the legal route, which both Apple and Google can't easily take in this case).
They need the apps, so they provide enough support to make it work. I suppose that through a mixture of superior tools (MSVC), marketing aid ($$$) and Embrace&Extend (P/Invoke, XAML-in-UIKit) they will try to make those apps work better on Windows than on other platforms, no matter if they're written in C#, Java or ObjC/Swift.
Sound familiar to me. Microsoft is the most dangerous when they're hungry, and they certainly are.
The desktop is increasingly becoming less relevant. It won't go away, but mobile platforms are where the revenue and activity is.
Re: "WinPhone sales catch up with IOS" - That battle is over. It's not even up for debate. There was a reason why Nadella has terminated the Windows "Services and Devices Business." and fired most of the Windows Phone engineers - and that's because Microsoft has been thoroughly and completed defeated by Android and iPhone.
There are going to be lots of places where Windows Phone will still be used, and, in fact, even be a popular choice. But there are also places in the world where Blackberry Phones are still used. But in all the key (and profit generating markets) - Android and Apple have carried the day handily.
By the way - I'm not saying the Microsoft isn't dangerous - they are wicked smart, have tons of cash, and have demonstrated that they are willing to make a significant adjustment to strategy "Devices and Services" to "Mobile first, Cloud First" and fire their CEO to do so.
What I am saying is that Microsoft is no longer in a position to "Embrace, Extend, Extinguish." as Microsoft no longer has the market power to extend important standards and have others adopt those extensions as people are increasingly less likely to be using one of their products, and, more importantly, are increasingly no longer required to use one of their products to get their job done.
To bring this conversation back to the beginning Microsoft has released a translation/recompilation layer that will let people who have written applications for iOS, quickly recompile them and release them for Windows, without having to write much, if any, new code. The objective is to have people write apps for Windows 10 and iOS using this mechanism, because currently, effectively 0% of people are writing first class apps for windows phone (there are, as always, small exceptions, but windows phone basically gets the dregs).
The problem with this strategy, is that now Microsoft is playing on Apples platform - and this further reduces the incentive for people to write native Windows phone Apps. Effectively, this is Microsoft giving up and saying, "If you won't write apps for our platform, as least we can emulate other ones and run those apps."
edit: also I think embrance,extend,extinguish wont work anymore in the dev space because Microsoft no longer have the monopoly on dev desktops and probably never will again - far from it infact.
Its more like they're trying to re-capture dev interest because very few decent websites are built/run on windows (other than StackExchange) and not much app development is happening on windows, etc etc.
I'm not sure that's true. The Sun vs. MS litigation ocurred on 2001 (https://en.wikipedia.org/wiki/Visual_J%2B%2B#Sun.27s_litigat...)
On the other hand, C# first appeared in 2000
I'd imagine it's a similar story for a lot of us out there, just different apps, libraries, dev tools, etc, luring us back and forth between the various operating systems. I wonder if I could be lured back to the MS side?!