[Issue => Fix] Stuck at Authenticating with the iTunes Store

Jul 03 2015

Many a times, while pushing the iOS app to Apple App Store, when we use Application loader, we get stuck at message ‘Authenticating with the iTunes Store.

Quickest fix for this is to copy ‘Application Loader’ app from ‘Applications’ to desktop, and simultaneously running both ‘Application Loader’ apps, one from ‘Applications’ folder and one from desktop to publish to app store. This works like charm every time.

Hope that helps!

No responses yet

[Error->Fix] MetadataException: Unable to load the specified metadata resource

Jun 23 2015

Sometimes if we change the database connectionstring or copied database settings, when we compile we get this error

MetadataException: Unable to load the specified metadata resource

Simplest possible fix is in web.config, in connectionstring property you will see something like this..

connectionString=”metadata=res:///<modelname>.csdl|res:///<modelname>.ssdl|res://*/<modelname>.msl;

Simply change it to

connectionString=”metadata=res://*/;

Hope that helps!

No responses yet

[Error->Fix] Azure Web deployment task failed ERROR_FILE_IN_USE

Jun 23 2015

Sometimes we are greeted with the following error when we are publishing websites/API service projects to Azure.

Web deployment task failed. (Web Deploy cannot modify the file ‘<project>’ on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.)

Quick fix is find a pubxml file under properties folder. Under   <PropertyGroup> add the following line.

<EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>

Hope that helps!

No responses yet

Wearables, Wearables, Wearables…

Apr 01 2015

Hot buzzword of the day is Wearables. Lot of us when we hear this word, we think of Apple Watch or Android Wear or Microsoft Band or Google Glass or Fitbit for that matter. But history of wearables dates back to 1961!

In 1961, a MIT Professor, Edward Thorp, whom we call Father of Wearables, created and successfully used a first wearable computer to cheat at Roulette which gave them 44% edge over the game :) Since then, we had calculator watches (how many of you remember Casio watches ;) ), digital hearing aids, Nike+, Go Pros, Fitbits and similar clones.

Then came Google Glass, with an open SDK that allowed Android developers to write code on. Xamarin also had a component for that. Fitbit also has an API that one can consume in apps. Then came slew of Android Wear Watches, coolest one being Moto 360. Some exciting news about new watches are making rounds.. watch out! (pun intended)

Microsoft released Microsoft Band, a cool band that looks more like a Fitbit but a way cooler, and as a surprise they made it work with all leading phone OS platforms, and they released SDK that will work with iOS, Android and Windows Phone too! And very soon Cortona which used to work only in Windows Phone, will work on iOS and Android, which will open up more avenues for apps to integrate voice in their apps.

Then came a much awaited big announcement from Apple, Apple Watch! WatchKit was in preview from quite some time, recently went live, and though Apple Watch is yet to be released, there are slew of applications ready for it! Xamarin has a full fledged support for Watch Kit!

Now coming to interesting part.. how to code for Microsoft Band, Google Android Wear and Apple Watch sharing almost 60-90% of code.. yes that is possible with Xamarin using C#!!!

Come and learn more about Xamarin and how to code for Wearables in our upcoming XHackers sessionWearables Day! See you all there!

No responses yet

iBeacon potential implementations

Mar 28 2015

Imagine you walk in to Starbucks and your app pings you saying, hey try ‘Try your regular Caramel Latte with Chicken wrap today and get 20% off bill’

Imagine you walk in to airport terminal to board and your phone automatically bring boarding pass on to your phone’s screen.

Imagine you have ‘Bring milk’ in your to do list and when you are in Walmart, and beacon in Walmart suggests you an offer ‘$2.19 for 2% fat, 2 gallons as special deal just to you’

Now imagine a world where every beacon that helps you build such scenarios as part of a global registry and each beacon has a unique metadata associated with it in that global registry, to store both public (imagine information about tourist places) and private (Starbucks, Airports, Stores, Offices, etc) and which app to open or which website to open. And that global registry has an API to give access to that metadata and showcase unique thing about that specific place, thing or event or whatever is associated with that beacon. 

Now imagine a generic app to trigger specific apps ( Starbucks app, Office login apps, Airlines app, Store apps etc,) or webpages (wikipedia links) based on stored credentials on the app and the beacon information from global registry.

These are two sided implementations.. on server, given a loyalty card info on phone, combined with beacon metadata, phone can ping the server for a specific deal that is customized for that specific user. On client, it is a simple app that talks to global registry and goes to corresponding service implementers to fetch relevant data for that place, thing or event!

Ok.. Can it be done? Why not, using iBeacons from providers like Estimote, MobStac, BKON and others, cross platform mobile apps that share almost 90% codebase and all written in C# using Xamarin and Azure IoT Services combined with the latest Azure App Service, world is your playground.

No responses yet

NDepend.. a tool that we can always depend on for static code analysis

May 19 2014

How often you feel that your code is suddenly slow compared to couple of days before after some code is being added? After a while do you feel a need of cleaning up code because of lot of trial and errors, and don’t know which code is safe to delete? Do you feel some functions are too big to manage? Are you feeling overwhelmed by number of data model classes you have added and need a way to visualize the dependencies between these models quite often? Answer to many questions like these and more is a simple and very efficient tool call NDepend. I have been using NDepend from its version 2 in early 2005, and with every release they never seize to surprise me! Latest version 5 is one of the best one so far :) Some cool features include more than 150 code rules that check your code quality, can scan up to 10000 lines of code per second, adds no code to your code, integrated with Visual Studio, provides some beautiful actionable metrics, reports and graphs that will make it easy to fix the code quickly. It can also compare builds,  do code diffs, detect cyclic dependencies. It can give you metrics based on application, assembly, namespaces, types, methods and fields. If you haven’t tried it yet, you should head over to NDepend website and start a trial and get amazed how you code can be analyzed:)

No responses yet

XHackers:Bangalore – Hands on Labs for Xamarin iOS

May 19 2014

On 19th April, we conducted a Hands on Labs for Xamarin iOS. Most of the attendees were from ASP.Net or WPF background. So, we decided to take a simple application of calculating Auto Fare in Bangalore which we did during 5th April Hands on Labs for Xamarin Android and use the same PCL in iOS app.

Code built during the event is uploaded to XHackers GitHub a/c for reference.

Attendees were able to follow through the lab, and reproduced the results and won some cool goodies. Due to complex publishing cycle, we demoed the procedure to publish the app to iTunes store.

On 21st June, on the month of Xamarin turning 3, we will be having an event showcasing new features and demos with lots of food and food for thought. Don’t miss this event, as we are giving away a book, couple of T Shirts and some goodies.

Way to go XHackers :)

No responses yet

XHackers:Bangalore – Hands on Labs for Xamarin Android

Apr 07 2014

On  5th April, we conducted a Hands on Labs for Xamarin Android. Most of the attendees were from ASP.Net or WPF background. So, we decided to take a simple application of calculating Auto Fare in Bangalore.

We first did a WPF application that does the calculation. Later we discussed how to extract the business logic and use PCL [Portable Class Library] to host it. Later, we started an Android project and used PCL to demonstrate code reuse. Code built during the event is uploaded to XHackers GitHub a/c for reference.

Attendees were able to follow through the lab, and reproduced the results and won some cool goodies. Few people were able to publish the app to stores.

On 19th April, we will be conducting Hands on Labs for Xamarin iOS. Don’t miss this event, as we are giving away a book, couple of T Shirts and some goodies.

Way to go XHackers :)

No responses yet

Recommended Architecture for Mobile Apps

Apr 07 2014

Lets assume app needs an external database, either hosted on cloud or on premise.

Build 2 sets of REST APIs, one for Authentication and another for actual app logic talking to your database. Also host them on different server instances if possible. If attacker is trying to break the authentication server and creates DDOS attack, your app logic server is not compromised. Also make sure every REST call for the app logic is validated by a token generated after authentication

Your client side UI can be very simple. If it is web application, you can go with simple HTML, jQuery with extensive use of Templates, and client side validations. No server side code cris-crossing your HTML and jQuery calls to REST APIs for data. This also helps in packaging the same HTML, JS, CSS in phonegap apps for any targeted mobile platform.

Your client can also be a native Windows app, Web app, Windows Phone App, iOS app or Android App. All of them will just have UI related code and all of them talk to REST APIs for data. This makes the UI/UX designers to actually work without worrying too much about server side coding.

If you architecture is based on Microsoft .Net platform, you can use Portable Class Library [PCL] to encompass your REST calls to easily usable function calls. And your Windows app, Web app, Windows Phone App, iOS using Xamarin and Android using Xamarin can all call the same PCL library for data access.

Do let me know if there are better alternatives.

Hope it helps :)

No responses yet

Android on Xamarin for Windows / ASP.Net developers – III

Mar 26 2014

In most of the Windows / ASP.Net applications, if we have to send a parameter from master page to detail page, we have several ways of doing it, like Query string, POST parameters, session state, database, static class with static variable etc. In Xamarin, we can still do database and static class approach. Most commonly used approach is using PutExtra

var detailActivity= new Intent (this, typeof(DetailActivity));
       detailActivity.PutExtra ("MyData", "Data from MasterActivity");
       StartActivity (detailActivity);

On the receiving detail page you can access the Value as below

string text = Intent.GetStringExtra ("MyData") ?? "Data not available";

Hope that helps :) Watch out for more soon!

[amazon_carousel widget_type="SearchAndAdd" width="500" height="200" title="" market_place="US" shuffle_products="False" show_border="False" keywords="xamarin" browse_node="" search_index="Books" /]

No responses yet

Older posts »