How is Microsoft's iOS bridge IslandWood implemented? - ios

Microsoft's newly announced Project Islandwood is interesting, as it allows Objective-C code written for iOS to be repurposed into a Universal Windows app.
I couldn't find any information on the details, so:
Has Microsoft effectively implemented an iOS subsystem in Windows 10?
Is it built on existing software (e.g. the old OpenStep source code) or built from scratch?
Are all the various iOS frameworks - Core Data, Core Text, Core Graphics, OpenGl, etc - implemented?

It allows writing Universal Windows Apps in Objective-C using the normal Windows Runtime along with an iOS API compat layer.
Visual Studio 2015 has a language projection for Objective-C so that you can compile Objective-C into a Windows app. The most common iOS API (CoreGraphics, CoreText, OpenGL, etc.) are provided .
You can import an Xcode project into Visual Studio and then compile it as a Windows app.
See the Project Islandwood site at http://aka.ms/islandwood and the Build talk Compiling Objective-C Using the Visual Studio 2015 C++ Code Generation that Builds Windows, SQL, .Net, and Office for details. Jim Radigan talks about the Objective C code generation in the first half. Salmaan Ahmed starts talking specifically about Project Islandwood about 33 minutes in.

Related

How can I get started with Xamarin from Visual Studio 2013?

I want to port a Compact Framework/Windows CE app to Xamarin to create Android and IOS (and possibly Windows Phone) "versions." I reckon I need Windows 8 for Windows Phone (8) but for now I thought I could get started with Android and IOS in moving this prehistoric app into the 21st century.
According to this article, I first need "Project linker" and can NuGet it, but searching for it via Tools > Extensions and Updates in VS 2013 returns no search results.
That article says you need VS 2012 or better; the direct link to "Project Linker," though, says it supports VS 2010.
Where do I go from here?
UPDATE
I went here, and am in the processing of downloading.
UPDATE 2
Here, it says, "Modern Integrated Development Environment (IDE) – Xamarin uses Xamarin Studio on Mac OS X, and also Xamarin Studio or Visual Studio 2010 on Windows."
Yet in VS 2013, I do have project types now for Android and IOS*, so I reckon that's just a typo (hasn't been updated)?
although I don't have a Mac, so that is not possible for me right now; also, since I'm still on Windows 7 at work, Windows 8 Phone apps are not yet a possibility, either. So at present, Xamarin within Visual Studio is simply a replacement for Eclipse/Java in the creation of Android apps.
UPDATE 3
I've been waiting for something better than PhoneGap, and I think maybe I've found it. If MS were to buy this company and bake Xamarin into Visual Studio -- voila!/yowza/wow! The cats in Cupertino will have to reach for the Pepto-Bismol!
That's a bit outdated and there's a much better approach available today.
You can use Portable Class Libraries (PCL) to share code across project spanning iOS, Android, Windows (Phones) and even OSX.
See this article (and where it leads) for more details.
I certainly agree with #poupou that PCL's are the way to go (if possible). I would recommend James Montemagno's app on github. He just created this for channel9 using VS 2013. I just created a cross-platform app based off of this and it worked out well. I would only use the file-linking for the platform specific implementations with compiler directives. This can be seen in his ServiceRegistrar class in said app.
This SO answer actually explains how to get the 2012 Project Linker to work with 2013 if you still want to go that route and gives a link to the extension.
Also, you may want to check out MvvmCross. It is open-source, has a large user-base and following, and really helps with maximum code re-use. Best part, it uses PCLs and all of it's features (plugins) are available via nuget.
I would recommend reading the article #poupou posted, watching James' channel9 videos on his github page, and (if you want to check out mvvmcross) watch #slodge's N+1 videos on mvvmcross.

What Xamarin is actually doing when using an iOS build host?

I've noticed that there is a possibility in Xamarin to connect Visual Studio to an iOS build host.
What is this build host, is there any documentation about its architecture? What code does Xamarin.iOS send to this build host?
[Edit]
I want, as a personal project, make an iOS build host in Windows. I know that this can be achieved, and I'm sure that technically, I have all the needed tools to re-create one. My concerns is about the architecture of an original iOS build host. I want to know what is the communication between Xamarin and a iOS build host, and what is the build flow. And this is not documented.
A great explanation from here.
Xamarin.iOS compiles c# source code against a special subset of the
mono framework. This cut down version of the mono framework includes
additional libraries which allow access to iOS platform specific
features. The Xamarin.iOS compiler, smsc, takes source code and
compiles it into an intermediate language, ECMA CIL (common
intermediate language), however it does not produce ECMA ABI
compatible binaries unlike the normal mono compiler, gmcs or dmsc.
This means any 3rd party .Net libraries you want to include in your
application will need to be recompiled against the Xamarin.iOS subset
of the mono framework using smsc.
Once a Xamarin.iOS application has been compiled into CIL it needs to
be compiled again into native machine code that can run on an iOS
device. This process is carried out by the SDK tool ‘mtouch’, the
result of which is an application bundle that can be deployed to
either the iOS simulator or an actual iOS device, such as an iPhone or
iPad.
Due to restrictions placed by Apple, the iOS kernel will not allow
programs to generate code at runtime. This restriction has severe
implications for software systems that run inside a virtual machine
using just-in-time compilation. Just-in-time compilation takes the
intermediate code, for example mono CIL and compiles it at runtime
into machine code. This machine code is compatible for the device it
is running on at the time of execution.
To work around this restriction the mtouch tool compiles the CIL ahead
of time. A process that the mono team describe as AOT, ahead of time
compilation.
Some quotes from Xamarin docs:
Xamarin iOS for Visual Studio accomplishes an amazing feat: it lets
you create, build and debug iOS applications on a Windows computer
using the Visual Studio IDE. It cannot do this alone, however - iOS
applications cannot be created without Apple’s compiler, and they
cannot be deployed without Apple’s certificates and code-signing
tools. This means that your Xamarin iOS for Visual Studio installation
requires a connection to a networked Mac OS-X computer to perform
these tasks for you. Once configured, Xamarin’s tools will make the
process as seamless as possible.
Starting with Xamarin.iOS 4.0, there are two code generation backends
to Xamarin.iOS. The regular Mono code generation engine and one based
on the LLVM Optimizing Compiler. Each engine has its pros and cons.
Typically, during the development process, you will likely use the
Mono code generation engine as it will let you iterate quickly. For
release builds and AppStore deployment, you will want to switch to the
LLVM code generation engine.
Conclusion
So there is no way to make an iOS build host in Windows, as you said.
I guess Xamarin send to the build host the .Net assembly file (Orange part of the picture), to be compile into native ARM code using Apple llvm, and others tools like xcode-build to signed, link and build your application.

DirectX SDK / VS2013 SDK setup

I am a beginning programmer university student and I want to apply myself outside of class with a side project. I wanted to start programming some simple directX stuff in C++ for practice and preparation for future classes.
However, I have Visual Studios 2013 installed and the DirectX SDK June version installed, and I can't seem to find any directX templates in visual studios. In tutorials I have watched, when a person goes into visual studios 2013 and clicks on "Visual C++", they have a lot more templates show up, including DirectX ones.
What step am I missing to be able to see these things in my Visual Studios 2013 professional?
Thank you in advance for the help!
There is no built-in templates for desktop DirectX, since you have installed the DirectX SDK, I recommend you use the Samples/Demos from the SDK(you can find it from DirectX Sample Browser), there is a sample called Empty Project, you can install that sample and write your code based on it.
There are only templates for DirectX Windows Store Apps. I cannot remember if it ever was DirectX Desktop templates in Visual Studio.
On a picture here you can see two default DirectX Windows Store Apps templates and new templates which you can to download.
Probably, in your tutorial there are some home made templates, or those which can be fond on a web. You can easily make your own template too.
If you really want to learn program for Desktop (and as you are trying to use DirectX SDK it is probably what you want), just follow the code that you can find in books and tutorials. Also it is a good idea not to copy any code, but to start your own projects(s) which will develop as long as you will develop your knowledge.
Note, that DirectX SDK was deprecated a while ago (latest version is dating June 2010). You must use Windows SDK for any new code. Though, you can compile old samples (which requires stuff not present in new SDK) with DirectX SDK. You could find interesting some of Q&A on that topic:
DirectX SDK vs Windows SDK: which one to use?
Working with Direct X and VS2012
and this blog on MSDN by Chuck Walbourn - MSFT :
Where is the DirectX SDK?
Where is the DirectX SDK (2013 Edition)?
Living without D3DX
Happy coding! ;)

How to use Xamarin in Visual Studio and Mac in the same time

I have just developed and android app using eclipse and now I want to develope its IOS version. I want to use Visual Studio and C# (I feel pretty much comfortable in these environments).
I read that, to achieve this I can use Xamarine. Everything is OK with configuring Xamarine on Visual Studio and using it in Visual Studio (I understood this part). I couldnt understant the "mac" part. They are saying that in order to build this app I need a mac running in my local network. Unfortunately I have no idea about Mac. Instead of using it in a local network, could I just install it in a Virtual Machine in windows and configure it on that way that I can see this mac from Visual Studio (How can I do this ?! :S).
I am sorry if my question is unclear but I would be greateful if any of you helps me understand these issues and help me develop my first IOS app in Visual Studio.
If you are going to do iOS development using Xamarin you need a Mac. A Mac will always be required to submit the app to the app store, and the way Xamarin works, you need to use a Mac to create the UI for iOS apps as well.
To get the most of the Xamarin, you ideally would develop your base code using Xamarin and C#, then build separate UI's for both Android and iOS. While your UIs are separate, your base core code is all the same for both apps.
It really does not make sense to have a native Android app all in Java, and then write the entire iOS app in C#. Either stick to completely native apps for both platforms, or use a wrapper like Xamarin for both.
Xamarin.iOS for Visual Studio makes it possible to develop iOS
applications on Windows, but you will still need a Mac in order to
compile and run the code.
Today, Xamarin.iOS integration in Visual Studio is focused on enabling
developers to develop in C#. Xamarin developers who write Xamarin.iOS
applications on Windows typically hand-code their user interfaces—or
they will need to switch to the Mac to use Xcode (or a beta version of
Xamarin’s new iOS Designer) to interactively design an iOS user
interface layout.
"or use a wrapper like Xamarin for both"
I have discovered the term wrapping is not correct for this product.
Unlike other products (Corona, Phonegap, Titanium, ...) that wrap up in a common, genericized library, Xamarin compiles at core level with no penalty. It is 100% native. All functionality in all it's supported platforms is 100% available and not watered down.
Wrappers can be faster to program in, in theory, but when you factor in the time you will spend looking for workarounds for the one piece of functionality that is available natively but not in your wrapper library. When you factor in the constant bugs because wrapping for 3 or more platforms is a constantly moving target and you can't count on it working from day to day.
When you factor all those things in, writing native in c# for all platforms is the better option.
I tried them all, and xamarin was my last choice as I was distracted chasing that perfect golden goose wrapper product.

Translating a .NET DLL using Monodroid

I have written a networking library using C# and .NET. .NET/Mono developers can use the library to develop multiplayer applications.
I want to make the library available on the Android platform so that native Android developers can use the library. Is Monodroid (Mono for Android) capable of performing this translation and what is the best way to proceed?
Thanks.
If I'm understanding the question correctly, you are looking to build a DLL using Mono for Android that you give to Java developers to use? That's not currently possible since Mono for Android isn't simply translating from C# to Java. Mono for Android apps include the Mono runtime, and .NET code is run against that. It generates callable wrappers so that Mono and Dalvik (the Java virtual machine in Android) can talk to each other, but without the Mono runtime the DLL wouldn't be very useful.
If the developer is using Mono for Android to build the application, then they can use your DLL in the app.

Resources