Native C++ code coming to Windows Phone developers (eventually)

nativeaccess

On Microsoft’s Windows Phone User Voice site developers have been begging, pleading and threatening for the ability to user native code in Windows Phone 7 apps.  It seems Microsoft has decided to listen, but have not yet decided to what degree to grant developers the privilege to access the bare metal of the processor and hardware directly.

Cliff Simpkins Sr Product Manager, Windows Phone Developer has recently posted that “native (C++) is one item that is high on the radar” and asked it this was to “ build on top of third-party engines that use native (e.g., Unity, Unreal, and the many 2D engines out there)”  or  “reuse business logic (e.g., codecs, encryption libraries, etc.) but no need to render UI?”

There have been rising complaints by developers that they can not use popular graphics engines like the Unreal Engine or Unity Game Engine, used in thousands of iOS and Android apps to create very high end games, on Windows Phone 7. By allowing such access Microsoft would make porting such games extremely easy.

Cliff however warned “there is a variety of click-stops in ‘Native support’” and “dev team schedules are finite” so it is likely whatever Microsoft delivers will not satisfy all developers.

Native code has been excluded from 3rd party apps for stability and security reasons, but Microsoft has been using the feature more and more in Second Party apps ie Apps Microsoft codes themselves for 3rd parties, like the Spotify app or the Tango video calling app.

The Tango app however also provides a cautionary tale. The app was not universally compatible with all devices when it was released, and also caused bugs like sound being disables when the app was exited – a problem not possible with managed code. 

Do our readers look forward to this development or do you think it will make our (very stable) phones more buggy and unstable? Let us know below.

Via WPCentral.com

13

About Surur

Site Admin and Windows Phone enthusiast, he has been using Windows Mobile devices since before they were called PocketPC’s. He is currently sporting a HTC 7 Trophy.

  • freestaterocker

    I personally would like to see MS work with third party devs to develop native code that continues the stability WP already enjoys. It’s one of the stronger arguments for converting Android users.

  • http://www.facebook.com/imperialdynamics Imperial Dynamics

    Windows Phone should stay managed. We don’t want Windows Mobile all over again. Let the past behind

  • Anonymous

    C++ the way it is supported on Metro Apps is perfect. You have the same API as in .NET, but you can use the speed of C++ for the parts of you app that need it (or even use some of the C++ existing libraries).

    I don’t want Native Apps to have higher access to the system, however.

  • http://www.facebook.com/people/Milad-Bazzaz/100000479683479 Milad Bazzaz

    Microsoft should indeed give Devs SOME native access.

    If you don’t like those apps, you don’t have to support them. What they should do though is make it visible to the consumer whether it’s natively written or not. I also think unmanaged code can cause battery drain, eat resources and slow down the device. Not sure I like all that since I don’t really play much games on my device either.

  • http://twitter.com/counterblow the person

    Tango was a disaster.  Ended up almost every phone needed its own version.  Prime example of what happens when you start developing around hardware outside the standard spec.

    I think the ODMs should be given full access to a C API….not every dev on the planet.  Then those ODMs could go to developers who want access and provide apps for their phone.  This will create immense competition in the ODM space and develoeprs will be sought after that deliver the best exlusive apps.  I could see Nokia doing this, and they are already going down that road to a certain extent with the ESPN hub.

  • http://www.facebook.com/people/Sergey-Durnov/100000964100298 Sergey Durnov

    For game engines and codecs

  • http://twitter.com/aetelani Anssi Eteläniemi

    I would love to see Qt/QML there too. With proper library the code would be generally better.

  • http://twitter.com/jn1974 Jani Nevalainen

    Native access to everybody is like giving a loaded shotgun to a child – accident waiting to happen. We see where Android has gone, with lot of incompatibilities, malware and unstability (yes, I use Android phone and tablet beside my WP).

    Maybe a tight sandbox for algorithms etc, but _do not_ let people to fork around the system. I like to have one stable phone, which I don’t have to fear that the app I load from marketplace will steal my stuff or make expensive sms/phonecalls without my consent in the background.

  • Anonymous

    Why do people need native access. I’ve always programmed in low level assembly and c for years and years. I work on embedded systems all the time when every clock cycle is critical. But now we have fast hardware.

    When windows phone 7 came out, i picked up a tutorial on c# and within a matter of days, i was pumping out apps. I don’t get it. C# is so simple when you’re coming from the world of C/C++. Its practically the same, except better. Its so elegent and gets the job done quick, We have fast hardware now,and I would trade a small performance hit to get the job done much faster with cleaner,safer code.

    Fact is, once windows 8 is out, then it will benefit windows phone because these developers will then be forced to finally adapt. Gone will be the days of incompatibilities between architectures, crashes, etc..   

    • http://petebob796.pip.verisignlabs.com/ Pete

      I personally would prefer to leave it fully managed code however I think the point from some developers is they already have cross platform apps developed for iOS and Android especially games running on 3D engines built in C++. To port them to WP7 essentially means a re-write at the moment where as opening up native code access means these can come over easily.

  • http://www.facebook.com/nakellery Natasha E. Guilherme SeAmam

    Hi, this is one of the most important posts i have read in 2011! What MS could do is to provide access for basic IO (files, socket, char manipulation, memory allocation) and a way to let applications get access to the internals of a bitmap (565 or 888 rgb formats) that could be blitted to screen using a thin c# application. This way, complex programs could use WP. Just like its done in Android, where they released a small part of the api for native use but the vast majority is in Java.

  • Allen Pestaluky

    I’m scared of third party native C++ code running on my phone. :( I love the security and stability of fully managed third party code. So if you can throw in some type of CLI/C++ or something to allow for some easy portability, that would probably be best?

  • Joe Fitzpatrick

    There is still an amazing amount of confusion. The reasons that Android sucks have little to do with ‘native’. It is, by default, a very managed system. A Java VM, running inside a sandbox, on top of a unix clone…

    The NDK there runs natively compiled code, but still in a sandbox. Some of the better quality apps use it.

    iOS, on the other hand, is all natively compiled (all ‘NDK’), but, again, running in a sandbox…

    The reason that developers like me want native code is simple, Windows phones are about 1 to 1.7% of the market. Right now, today, I can write in C++ and OpenGL and have the same applications, with some tweaks and wrappers, run on iOS and Android, which gives me 90% of the handheld and tablet market. Windows, Mac, and Linux, which gives me 99% of the desktop market, and NAPI and ActiveX plug-in (plus nativeapp for Chrome), which gives me 95% of the browser market.

    Sure, we’d like to cover Windows phones, but you aren’t going to do a rewrite in another crappy psuedo language that is feature crappy for 1-2% of the market. Those of us that have been developing for decades know the score. Microsoft’s primary concerns are two fold, a) the underlying OS is kind of crap and not very robust against errant apps and b) the Microsoft MO has always been to try to grab the whole pie.

    Sometimes they are succesful. DirectX started waaaay behind OpenGL, it has actually surpassed OpenGL. And the more developers who switched, the bigger the advantage (OpenGL drivers are now the crappiest on Windows platforms). So they drew a lot of gaming to Windows and XBox.

    Internet Explorer was similar. They banked on MSN being an alternative to the internet, saw they couldn’t own that pie, so they set out to own the browser part of the pie so they could steer the infrastructure. It was chaos, with the IE team breaking the OS on a regular basis, but they proved that, given a massive enough pile of money and control of the dominent OS, an army of toe sucking monkeys can come from behind to knock off the key players.

    The moral of this is ‘user experience’ is just an excuse. iOS dominates the user experience/customer satisfaction on a platform that is ALL NDK. Android is a managed code setup and still sucks, and Microsoft just doesn’t have a robust sandboxing OS and wants to own the entire ecosystem.

Scan QR Codes, UPC, EAN, Code 39/128 or ITF barcodes on your Windows Phone 7 to find best prices online. Enjoy slots? Blackjack? Video Poker? Play Crazy Casino FREE! #1 FREE Solitaire on WP7 If your a fan of Pong then you will love this game. Heavenly Skies. Save the universe! Are you ready? A rewarding mix of match 3 and tetris gameplay Free, Live Tile support for Word Of The Day and so much more. Why NOT try it out? Set up reminders with only two taps. Supports also text reminders and voice reminders. Download the best puzzle game in WP7 Marketplace for FREE! Are you a good Alchemist ? Use your brain to discover Atomic Energy, Chuck Norris, Angry Birds and 1400 more ! Fun puzzle game with over 150 levels! Fully featured, beautifully designed WP7 YouTube app. u.n.i MEGA PACK (FREE), the ultimate addictive top GAMES bundle for Windows Phone 7! 7+ and growing! Highly addictive word game designed for adrenaline junkies. Practice locally, but then are you fast enough to compete online? Google RSS reader Windows Phone WP7 The smartest Google reader app. Air Soccer Tour Air Soccer Fever - Realtime Online Multiplayer casual soccer game for FREE Beat the Story Mode. When your done Bring your skill online. Rank up by winning online matches. Have 1 on 1's with anyone! Global Online Multiplayer! Newest devices leaks, online charts and ultimate performance benchmark for every Windows Phone. Every day, get great app deals from Windows Phone developers pushed to you! Quick Tiles, a fully featured live tile editor for Windows Phone. Great sports app for NFL, NBA, MLB, NHL. Pin scores/games to live tile on your home screen. MobileFax gives you the opportunity to send fax pages from your mobile phone anytime, anywhere ! WP7 Exclusive version of Hanging with Friends Fabulously fun, lovable, crazy! Bubble Pong Championship A remake of the classic snake game. The snake wants to grow so don't wait and help her!

Promote your app on WMPoweruser.com
Wholesale Cell Phones

Nokia LCD, Flex Cable,Wholesale phone partstrusted supplier.

Find the latest mobile phones at the cheapest prices at mobilephones.org.uk

Cell Phone Accessories

canon dslr cameras
See The Smartphone Database for the latest smartphone specs.

Windows Phone 7 Apps