Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Xamarin 4.x Cross-Platform Application Development
Xamarin 4.x Cross-Platform Application Development

Xamarin 4.x Cross-Platform Application Development: Develop powerful cross-platform applications with Xamarin , Third Edition

Arrow left icon
Profile Icon Peppers
Arrow right icon
zł197.99
Paperback Dec 2016 292 pages 3rd Edition
eBook
zł39.99 zł158.99
Paperback
zł197.99
Subscription
Free Trial
Arrow left icon
Profile Icon Peppers
Arrow right icon
zł197.99
Paperback Dec 2016 292 pages 3rd Edition
eBook
zł39.99 zł158.99
Paperback
zł197.99
Subscription
Free Trial
eBook
zł39.99 zł158.99
Paperback
zł197.99
Subscription
Free Trial

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Xamarin 4.x Cross-Platform Application Development

Chapter 1. Xamarin Setup

If you are reading this book, you probably already have a deep love for C#, .NET, and tools like Microsoft Visual Studio. Mobile development with the native SDKs seems daunting when you think about the work of learning a new platform, a new IDE, new application models, and perhaps a programming language or two. Xamarin aims to delight .NET developers with the tools for developing native iOS, Android, and Mac applications in C#.

There are many advantages of choosing Xamarin to develop mobile applications instead of Java on Android and Objective-C/Swift on iOS. You can share code between both of these platforms and you can be more productive by taking advantage of the advanced language features of C# and the .NET base class libraries. Alternatively, you would have to write an entire application, twice, for both Android and iOS.

In comparison with other techniques for developing cross-platform applications with JavaScript and HTML, Xamarin has some distinct advantages. C# is generally more performant than JavaScript, and Xamarin gives developers direct access to the native APIs on each platform. This allows Xamarin applications to have a native look and perform in a manner similar to their Java or Objective-C counterparts. Xamarin's tooling works by compiling your C# into a native ARM executable that can be packaged as an iOS or Android application. It bundles a stripped-down version of the Mono runtime with your application that only includes the features of the base class libraries your app uses.

In this chapter, we'll set up everything you need to get started on developing with Xamarin. By the end of this chapter, we'll have all the proper SDKs and tools installed, and all the developer accounts needed for app-store submission.

In this chapter, we will cover:

  • An introduction to Xamarin tools and technology
  • Installing Xcode, Apple's IDE
  • Setting up all Xamarin tools and software
  • Connecting Visual Studio to a Mac
  • Setting up the Android emulator
  • Enrolling in the iOS developer program
  • Registering for Google Play

Understanding Xamarin

Xamarin has developed three core products for developing cross-platform applications: Xamarin Studio, Xamarin.iOS, and Xamarin.Android. Xamarin Studio is a C# IDE, while Xamarin.iOS and Xamarin.Android are the core tooling that enable C# applications to run on iOS and Android, respectively. These tools allow developers to leverage the native libraries on iOS and Android, and are built on the Mono runtime.

Mono, an open source implementation of C# and the .NET framework, was originally developed by Novell to be used on Linux operating systems. Since iOS and Android are similarly based on Linux, Novell was able to develop MonoTouch and Mono for Android as products to target the new mobile platforms. Shortly after their release, a larger company acquired Novell, and the Mono team left to form a new company aimed primarily at mobile development. Xamarin was founded to focus on these tools for developing with C# on iOS and Android.

Getting a development machine ready for cross-platform application development can take some time. And to make matters worse, Apple and Google both have their own requirements for development on their respective platforms. If you plan on developing on Windows with Visual Studio, your setup will be a bit different than on Mac OS X. Keep in mind that iOS development on Windows requires a Mac on your local network. Let's go over what needs to be installed on your machine.

The building blocks for Xamarin development on Mac OS X are as follows:

  • Xcode: Apple's core IDE for developing iOS and Mac applications in Objective-C
  • The Mono runtime for Mac: This is required for compiling and running C# programs on OS X
  • Java: This is the core runtime for running Java applications on OS X
  • Android SDK: This contains Google's standard SDK, device drivers, and emulators for native Android development
  • Xamarin.iOS: This is Xamarin's core product for iOS development
  • Xamarin.Android: This is Xamarin's core product for Android development

The required software for Xamarin development on Windows are as follows:

  • Visual Studio or Xamarin Studio: Either IDE will work for Xamarin development on Windows.
  • .NET Framework 4.5 or later: This comes with Visual Studio or recent versions of Windows.
  • Java: This is the core runtime for running Java applications on Windows.
  • Android SDK: This contains Google's standard SDK, device drivers, and emulators for native Android development.
  • A Mac on your local network set up for Xamarin.iOS development: Apple requires iOS development to be done on OS X as part of their licensing agreement. A Mac will need to be set up for Xamarin.iOS development as listed above.
  • Xamarin for Windows: This is Xamarin's core product for Windows; it includes both Xamarin.Android and Xamarin.iOS.

Each of these will take some time to download and install. If you can access a fast Internet connection, it will help speed up the installation and setup process. With everything ready to go, let's move ahead step by step and, hopefully, we can skip a few dead ends you might otherwise run into.

Installing Xcode

To make things progress more smoothly, let's start off by installing Xcode for Mac. Along with Apple's IDE, it will also install the most commonly-used developer tools on the Mac. Make sure you have at least OS X 10.10 (Yosemite), and locate Xcode in the App Store, as shown in the following screenshot:

Installing Xcode

This will take quite some time to download and install. I'd recommend taking the time to enjoy a nice cup of coffee or working on another project side-by-side.

Installing Xcode installs the iOS SDK, which is a requirement for iOS development in general. As a restriction from Apple, the iOS SDK can only run on a Mac. Xamarin has done everything possible to make sure they follow Apple's guidelines for iOS, such as dynamic code generation. Xamarin's tools also leverage features of Xcode wherever possible to avoid reinventing the wheel.

Installing Xamarin on Mac OS X

After installing Xcode, there are several other dependencies that need to be installed, prior to developing with Xamarin's tooling. Luckily, Xamarin has improved the experience by creating a simple all-in-one installer.

Install Xamarin by performing the following steps:

  1. Go to http://xamarin.com and click on the large Download Xamarin button.
  2. Fill out some basic information about yourself and click Download Xamarin Studio for OS X.
  3. Download XamarinInstaller.dmg and mount the disk image.
  4. Launch the Xamarin.app and accept any OS X security warnings that appear.
  5. Progress through the installer; the default options will work fine. You can optionally install Xamarin.Mac, but that topic is not covered in this book.

The Xamarin installer will download and install prerequisites such as the Mono runtime, Java, the Android SDK (including the Android emulator and tools), and everything else you need to be up and running.

You will end up with something similar to what is shown in the following screenshot, and we can move on to conquer bigger topics in cross-platform development:

Installing Xamarin on Mac OS X

Setting up the Android emulator

The Android emulator has historically been known to be sluggish compared to developing on a physical device. To help solve this issue, Google has produced an x86 emulator that supports hardware acceleration on desktop computers. It isn't installed by default in the Android Virtual Device (AVD) Manager, so let's set that up.

The x86 Android emulator can be installed by performing the following steps:

  1. Open Xamarin Studio.
  2. Launch Tools | Open Android SDK Manager....
  3. Scroll down to Extras; install Intel x86 Emulator Accelerator (HAXM Installer).
  4. Scroll to Android 6.0 (API 23); install Intel x86 Atom System Image.
  5. Optionally, install any other packages you are interested in. At the minimum, make sure you have everything that the Android SDK Manager selects for you to install by default.
  6. Close the Android SDK Manager and navigate to your Android SDK directory, by default located at ~/Library/Developer/Xamarin/android-sdk-macosx.
  7. Navigate to extras/intel/Hardware_Accelerated_Execution_Manager and launch IntelHAXM_6.0.3.dmg to install the HAXM driver.
  8. Switch back to Xamarin Studio and launch Tools | Open Google Emulator Manager....
  9. Click on Create....
  10. Enter an AVD name of your choice, such as x86 Emulator.
  11. Pick a generic device that will be appropriately sized for your display, such as the Nexus 5.
  12. As CPU/ABI, make sure you select an option that supports Intel Atom (x86).
  13. After creating the device, go ahead and click on Start... to make sure the emulator runs properly.

Tip

These instructions should be very similar on Windows. By default, the Android SDK is installed at C:\Program Files (x86)\Android\android-sdk on Windows. Likewise, the HAXM installer is named intelhaxm-android.exe on Windows.

The emulator will take some time to start up, so it is a good idea to leave the emulator running while working on an Android project. Xamarin is using the standard Android tools here, so even Java developers feel the pain of the sluggish emulator. If everything starts properly, you will see an Android boot screen followed by a virtual Android device ready for deploying applications from Xamarin Studio, as shown in the following screenshot:

Setting up the Android emulator

There are many options out there for Android emulators, such as Genymotion or Visual Studio Android Emulator. Using Xamarin will not limit your choices in Android emulators, so feel free to experiment if the default Android emulator isn't working for you.

Installing Xamarin on Windows

Since Microsoft acquired Xamarin in 2016, Xamarin is included with any edition of Visual Studio. The editions are as follows:

  • Visual Studio Community: This is a free version available to anyone. There are restrictions for using this edition for companies.
  • Visual Studio Professional: This is the general edition companies should use. On the Visual Studio side, it includes features for Team Foundation Server.
  • Visual Studio Enterprise: Contains additional features in both Visual Studio and Xamarin. Xamarin features include embedded assemblies, the live Xamarin Inspector, and the Xamarin profiler.

When first setting up a Windows PC for Xamarin development, there are two choices to consider. If you already have Visual Studio, then you can merely use the Xamarin installer to add the necessary Visual Studio extensions and item templates to your existing installation. If you do not have Visual Studio installed yet, then there is simply an option in the Visual Studio 2015 installer for installing Xamarin.

If you want to install from the Visual Studio installer:

  1. Download your desired version of Visual Studio from https://www.visualstudio.com/downloads/.
  2. Run the Visual Studio installer.
  3. Under Cross Platform Mobile Development, make sure to select C#/.NET (Xamarin v4.1.0) (the version number will change according to the version you use). This should automatically select the Android SDK and other components you will need for Xamarin development.
  4. You may also choose to install other useful tools such as Microsoft Web Developer Tools or Universal Windows App Development tools for targeting Windows 10.

Your installer should look something like this before you click Next:

Installing Xamarin on Windows

The second option for installing Xamarin is from Xamarin's website:

  1. Download the Xamarin installer for Windows from https://xamarin.com/download.
  2. Run XamarinInstaller.exe, which will download and install all required components on your PC.

The Xamarin installer is a very similar experience to what you see on Mac OS X, and should be very straightforward. It will add Xamarin to an existing Visual Studio installation if needed and install Xamarin Studio.

Connecting Visual Studio to a Mac for iOS development

iOS development requires Xcode running on Mac OS X. Luckily, Xamarin has made remote development possible from a Windows PC.

To connect your PC to a Mac:

  1. First open or create a Xamarin.iOS project.
  2. Visual Studio will automatically prompt Xamarin Mac Agent Instructions.
  3. Follow the detailed instructions and screenshots in Visual Studio to enable remote login on your Mac.
  4. A Xamarin Mac Agent dialog should appear with your Mac's address listed.
  5. Click Connect... and enter your username and password for your Mac.

When connected, you should see something like the following screenshot:

Connecting Visual Studio to a Mac for iOS development

Once connected, you can simply press the play button to debug your project against the iOS simulator or an iOS device of your choice. All the features in Visual Studio you expect will also work with iOS development: break points, mouse-over evaluation, add watch, and so on.

Enrolling in the iOS developer program

To deploy to an iOS device, Apple requires membership to its iOS Developer Program. Membership is $99 USD per year and gives you access to deploy 200 devices for development purposes. You also get access to test servers for implementing more advanced iOS features such as in-app purchases, push notifications, and iOS Game Center. Testing your Xamarin.iOS applications on a physical device is important, so I recommend that you get an account prior to starting iOS development. Performance is very different in a simulator running on your desktop versus a real mobile device. There are also a few Xamarin-specific optimizations that only occur when running on a real device. We'll fully cover the reasons for testing your apps on devices in later chapters.

Tip

Since iOS 9, Apple has created a way to sideload apps from iOS devices from any Apple ID. It is recommended only to be used for testing purposes on a few devices, and there is no way to test advanced features such as in-app purchases or push notifications. If you are just toying with iOS, however; it is a good way to get started without paying the $99 developer fee.

Signing up for the iOS developer program can be performed through the following steps:

  1. Go to https://developer.apple.com/programs/ios.
  2. Click on Enroll.
  3. Sign in with an existing iTunes account or create a new one. This can't be changed later, so choose the one that is appropriate for your company.
  4. Enroll either as an individual or a company. Both are priced at $99, but registering as a company will require paperwork to be faxed to Apple with the assistance of your company's accountant.
  5. Review the developer agreement.
  6. Fill out Apple's survey for developers.
  7. Purchase the $99 developer registration.
  8. Wait for a confirmation e-mail.

You should receive an e-mail that looks something like the following screenshot within two business days:

Enrolling in the iOS developer program

From here, you can continue setting up your account:

  1. Either click on Log in now from the e-mail you received or go to https://itunesconnect.apple.com.
  2. Log in with your iTunes account.
  3. Agree to any additional agreements that appear on the home page of your dashboard.
  4. From the iTunes Connect dashboard, go to Agreements, Tax, and Banking.
  5. In this section, you will see three columns, for Contact Info, Bank Info, and Tax Info.
  6. Fill out the appropriate information for your account in all of these sections. Assistance from an accountant will most likely be needed for a company account.

When all is said and done, your Agreements, Tax, and Banking section should look something like the following screenshot:

Enrolling in the iOS developer program

With your iOS developer account successfully registered, you will now be able to deploy to iOS devices and publish your apps to the Apple App Store.

Registering as a Google Play developer

Unlike iOS, deploying your applications to Android devices is free and only requires a few changes in your device settings. A Google Play developer account has only a one-time fee of $25 and doesn't have to be renewed each year. However, just like iOS, you will need a Google Play account to develop in-app purchases, push notifications, or Google Play Game Services. I would recommend setting up an account ahead of time if you inevitably plan on submitting an app to Google Play or need to implement one of these features.

To register as a developer for Google Play, perform the following steps:

  1. Go to https://play.google.com/apps/publish.
  2. Log in with an existing Google account, or create a new one. This can't be changed later, so choose the one that is appropriate for your company, if needed.
  3. Accept the agreement and enter your credit card information.
  4. Choose a developer name and enter other important information for your account. Again, choose names appropriate for your company to be seen by users in the app store.

If you get everything filled out correctly, you will end up with the following Google Play Developer Console:

Registering as a Google Play developer

If you plan on selling paid apps or in-app purchases, at this point, I would recommend setting up your Google Merchant Account. This will enable Google to pay you the proceeds toward your app sales by applying the appropriate tax laws in your country. If setting this up for your company, I would recommend getting the assistance of your company's accountant or bookkeeper.

The following are the steps to set up a Google Merchant Account:

  1. Click on the set up a merchant account button.
  2. Log in with your Google account a second time.
  3. Fill out the appropriate information for selling apps: address, phone number, tax information, and a display name to appear on your customers' credit card bills.

When done, you will notice that the help tip for setting up a merchant account is now missing from the developer console, as shown in the following screenshot:

Registering as a Google Play developer

At this point, one would think our account would be fully set up, but there is one more crucial step prior to being able to sell apps: we have to enter the banking information.

Setting up banking for your Google Merchant Account can be performed with the following steps:

  1. Go back to the Google Play Developer Console at https://play.google.com/apps/publish.
  2. Click on the Financial Reports section.
  3. Click on the small link titled Visit your merchant account for details.
  4. You should see a warning indicating that you do not have a bank account set up. Click on the Specify a Bank Account link to get started.
  5. Enter your banking information. Again, a company accountant might be needed.
  6. In a few days, look for a small deposit in your account from Google.
  7. Confirm the amount by going to http://checkout.google.com/sell.
  8. Click on the Settings tab, then Financials.
  9. Next, click on Verify Account.
  10. Enter the amount that appeared in your bank account and click on Verify deposit.

Your Google Merchant Account is also the place where you can cancel or refund customer orders. Google Play is different from the iOS App Store in that all customer issues are directed to the developers.

Summary

In this chapter, we discussed Xamarin's core products for developing Android and iOS applications in C# whether you are using Mac OS X or a Windows PC. We installed Xcode and then ran the Xamarin all-in-one installer, which installs Java, the Android SDK, Xamarin Studio, Xamarin.iOS, and Xamarin.Android. On Windows, we set up Xamarin for use inside Visual Studio and connected a Mac on our local network for iOS development. We set up the x86 Android emulator for a faster, more fluid experience when debugging applications. Finally, we set up iOS and Google Play developer accounts for distributing our applications.

In this chapter, you should have acquired everything you need to get started on building cross-platform applications with Xamarin. Your development computer should be ready to go and you should have all the native SDKs installed and ready for creating the next great app to take the world by storm.

The concepts in this chapter will set us up for more advanced topics, which will require the proper software installed as well as developer accounts with Apple and Google. We will be deploying applications to real devices and implementing more advanced features such as push notifications. In the following chapter, we'll create our first iOS and Android application and cover the basics of each platform.

Left arrow icon Right arrow icon

Key benefits

  • Write native cross-platform applications with Xamarin
  • Design user interfaces that can be shared across Android, iOS, and Windows Phone using Xamarin.Forms
  • Practical cross-platform development strategies

Description

Xamarin is a leading cross-platform application development tool used by top companies such as Coca-Cola, Honeywell, and Alaska Airlines to build apps. Version 4 features significant updates to the platform including the release of Xamarin.Forms 2.0 and improvements have been made to the iOS and Android designers. Xamarin was acquired by Microsoft so it is now a part of the Visual Studio family. This book will show you how to build applications for iOS, Android, and Windows. You will be walked through the process of creating an application that comes complete with a back-end web service and native features such as GPS location, camera, push notifications, and other core features. Additionally, you’ll learn how to use external libraries with Xamarin and Xamarin.Forms to create user interfaces. This book also provides instructions for Visual Studio and Windows. This edition has been updated with new screenshots and detailed steps to provide you with a holistic overview of the new features in Xamarin 4.

Who is this book for?

If you are a developer with experience in C# and are just getting into mobile development, this is the book for you. This book will give you a head start with cross-platform development and will be the most useful to developers who have experience with desktop applications or the web.

What you will learn

  • Apple's MVC design pattern
  • The Android activity lifecycle
  • Share C# code across platforms and call native Objective-C or Java libraries from C#
  • Create a real web service back end in Windows Azure using SQL Azure as database storage
  • Set up third-party libraries such as NuGet and Objective Sharpie in many different ways, and port a desktop .NET library to Xamarin
  • Use Xamarin.Mobile for camera, contacts, and location
Estimated delivery fee Deliver to Poland

Premium delivery 7 - 10 business days

zł110.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 26, 2016
Length: 292 pages
Edition : 3rd
Language : English
ISBN-13 : 9781786465412
Vendor :
Microsoft
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Poland

Premium delivery 7 - 10 business days

zł110.95
(Includes tracking information)

Product Details

Publication date : Dec 26, 2016
Length: 292 pages
Edition : 3rd
Language : English
ISBN-13 : 9781786465412
Vendor :
Microsoft
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 848.97
Xamarin: Cross-Platform Mobile Application Development
zł403.99
Xamarin Blueprints
zł246.99
Xamarin 4.x Cross-Platform Application Development
zł197.99
Total 848.97 Stars icon
Banner background image

Table of Contents

12 Chapters
1. Xamarin Setup Chevron down icon Chevron up icon
2. Hello, Platforms! Chevron down icon Chevron up icon
3. Code Sharing Between iOS and Android Chevron down icon Chevron up icon
4. XamSnap - A Cross-Platform App Chevron down icon Chevron up icon
5. XamSnap for iOS Chevron down icon Chevron up icon
6. XamSnap for Android Chevron down icon Chevron up icon
7. Deploying and Testing on Devices Chevron down icon Chevron up icon
8. Contacts, Camera, and Location Chevron down icon Chevron up icon
9. Web Services with Push Notifications Chevron down icon Chevron up icon
10. Third-Party Libraries Chevron down icon Chevron up icon
11. Xamarin.Forms Chevron down icon Chevron up icon
12. App Store Submission Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela