Book Image

Xamarin Mobile Application Development for iOS

By : Paul F. Johnson
Book Image

Xamarin Mobile Application Development for iOS

By: Paul F. Johnson

Overview of this book

<p>Before the release of monotouch, development on iOS was purely in Objective C. There was nothing wrong with that except for one thing – it’s very unpleasant to write code in! The release of Xamarin changed all of that, and with it brought cross-platform development to the mobile world.<br /><br />Xamarin Mobile Application Development for iOS is not just your normal everyday book on iOS app development. Everything is written for a point and not for effect, and therefore you will learn everything you need to know quickly and efficiently without getting bogged down in needless information. The code has been taken from fully tested apps, so you can just drop it into your code and it will work out of the box.<br /><br />In this clear and informative guide, you will be taken on a whirlwind tour of iOS application development with Xamarin, from setting up a development environment on your PC or Mac to testing and distribution through the Apple Store with plenty of practical examples along the way.</p> <p>The book begins by discussing the installation of the IDE (for both PC and Mac) as well as how to set up your PC so it can be used to develop for iOS. From there, successive chapters cover the user interface, views, view controllers, customisation of controls, animation, events and event handling, getting the most from your app using threading, creating your own settings system, the internal database system and LINQ, sending texts, making calls, taking photos, videos, and audio recordings as well as using the mapping system. The book culminates by showing you how to test your app using testflight and finally how to release your app on the Apple Store. It is an all-encompassing book that leaves nothing out.</p>
Table of Contents (22 chapters)
Xamarin Mobile Application Development for iOS
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Making a phone call


This may sound daft. Why would you want to write code to make a phone call? In true developer tradition, the answer is why not? It is important to note that a string number is just that. It cannot contain spaces, hyphens, brackets, or the plus sign (+); it can only contain numbers.

private void callNumber(string number) {
  string phoneURLString = string.Format("tel:{0}", number);
  NSUrl phoneURL = new NSUrl(phoneURLString);
  UIApplication.SharedApplication.OpenUrl(phoneURL);
}

Moving on...