iOS and WP7/WP8 in SharePoint 2013

As you guys know I have decided to start delving into mobile development.  I bought a Macbook Air a few months back and I am now getting an HTC 8x.  Here are some things that I have learned in my attempts to play with both technologies with Office 365/SharePoint 2013:

  • WP8/WP7
    • Microsoft has created templates for Windows Phone 7 and Visual Studio 2010: http://www.microsoft.com/en-us/download/details.aspx?id=30476.
      Note that these templates were not created for Visual Studio 2012 and will not work in concurrency with the Windows Phone 8 and Windows Phone 7 Templates created for Visual Studio 2012.  DO NOT install them if you want to get the 2012 SDK and Templates.
    • There are Windows Phone 8 and Windows Phone 7 Templates for Visual Studio 2012: http://www.microsoft.com/en-us/download/details.aspx?id=35471
      Make sure you have Windows 8 Pro installed, because the virtual phone component requires Hyper-V.  Also, these templates do not include any special SharePoint templates or dlls.  You must copy the Microsoft.SharePoint.Client.Phone and Microsoft.SharePoint.Client.Phone.Runtime from the following directory: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\ClientBin
      You need an on-prem install of 2013 or you need to copy from the first set of templates the mobile dlls.  I would recommend creating some type of virtual machine with one set of templates installed if you are going to try and get both versions of templates and extract the dlls somehow.
    • Read this blog post: http://deviantpoint.com/post/2012/07/27/Building-Windows-Phone-apps-with-SharePoint-2013.aspx
      Don Kirkham sent me this blog post link to SharePoint 2013 and WP8.  The jist of it is with Office 365 and claims there is an authenticator class.  This class handles the rTFA and FedAuth tokens that you need to talk to Office 365.  So when you reference the above two dlls you can authenticate much easier than Android or iOS. 
    • Once your app is done you need to pay $99 to get it in the store…The virtual components are essentially free.  There is a code you can get from MSDN to bypass this payment on the ultimate version.  I am not sure if you can get the code from a lower version…
  • iOS
    • You need an Apple computer or a Hackintosh, because as far as I know you cannot build an app on a virtual machine and upload it to the store.  Apple may have changed there requirements, but the rules used to not allow virtualization and OSX.
    • Download XCode from the ITunes store or grab MonoTouch from http://www.xamarin.com.
      If you get MonoTouch you have to pay an additional fee to be able to upload your applications to the store.  It is around $300, which is expensive.  Personally I’d rather learn Objective-C and not pay the money.  I will be posting about MonoTouch, however, in the future and how it works versus XCode with SharePoint 2013 and development in general.
    • Buy “iOS Programming: The Big Nerd Ranch Guide” on Amazon or another bookstore.  If you google or bing Aaron Hillegass he actually owns a big nerd ranch and teaches iOS classes that are comparable to Critical Path Training in the SharePoint realm.  If you have the money drop it down for a class in one of the cities.  I hear it’s totally worth it.
    • Now that you know Objective-C read this article on MSDN on JSON and REST in SharePoint 2013: http://msdn.microsoft.com/en-us/library/fp142385.aspx
      This article is the best oAuth, REST, and SharePoint 2013 article out there.  It gives you all the header and call information that the RESTful webservices need in SharePoint 2013.  It is the best documentation I could find on MSDN.
    • Read this blog post from James Love and download his code file from GIT: http://e-junkie-chronicles.blogspot.com/2012/12/sharepoint-2013-rest-api-in-ios.html
      James Love wrote a wrapper that does the Authenticator bits to get the rTFA and FedAuth tokens for claims and pass them into the REST calls.  You must do a call to the authentication wrapper and get a set of tokens per call.  You cannot cheat and use the same tokens.  If you think you can grab the tokens from a webservice call and copy and paste think again it’s per application.
    • Once you have written an app in iOS you have to pay another $99 to apple to register a certificate and get your application in the store.

So essentially what have I learned from all this research and pain…Basically there are a lot of inconsistencies in the Windows Phone Development Platform on what is where and on what version of Visual Studio.  There is also an inconsistency on what you can install together.  I am a little disappointed that the templates for SharePoint 2013 only exist in Visual Studio 2010 and work with Windows Phone 7 only.  I would expect there to be a consistent set of templates for Visual Studio 2012 since all the other SharePoint 2013 templates are in Visual Studio 2012.  I am hoping in the future there is an SDK for 2012 where I don’t have to copy and paste dlls from the ClientBin directory.  Also, there is no official MSDN documentation on SharePoint 2013 and Windows Phone 8.  Everything is Windows Phone 7 documentation and mainly using Visual Studio 2010.

iOS, obviously, is not easy to work with trying to get data into an application from SharePoint 2013, especially not in a claims environment like Office 365.  The other caveat is that you need to learn a new language or you have to pay a ton of money for MonoTouch that you might not readily have available.  The upside is that if you live in the U.S. and plan to sell an application you might be able to write it off in the future on your taxes as a business expense.  The downside is without any type of SOAP wrapper we would have a lot more more pain working with iOS (thanks James Love), because this entire claims process is almost a telepathic link to the SharePoint Product Team.  There is absolutely no documentation on MSDN aside from two sentences potentially that iOS and Android works with the REST webservices.  I am hoping the mobile documentation in general gets better.

So where do we stand with each version of mobile technology and developing applications…We obviously have a way to create applications with each version of mobile technology.  I am hoping with this blog post people will reference it and create applications knowing the pros and cons for each system.  I am not telling anyone to go with either mobile technology yet.  I think that Windows Phone is in its infancy and will provide us a more robust development platform in the future.  iOS, however, is pretty mature and I am hoping the SharePoint Product Team creates some MSDN Documentation that will provide us with a better mobile story.  For now at least we have something and it works.  I will be traveling to SharePoint Saturdays, code camps, and user groups in the future.  If you are interested in hearing my talks on iOS, Windows Phone, and SharePoint 2013 hit me up through the contact form.  For now I hope this helped the two of you out there who read my blog.

Print | posted on Wednesday, January 16, 2013 10:43 PM

Feedback

No comments posted yet.

Your comment:





 
 

Copyright © MOSSLover

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski