Skip to main content

Posts

Showing posts from November, 2017

Apple Push Notification Changes for iOS 11

Push Notification With the advent of iOS 11, Apple has introduced changes in the way they handle certain kinds of push messages. This was done to improve battery life, but comes at a cost of user experience that is likely to affect your app. What Apple has done is to implement a service called the “DuetActivitySchedulerDaemon” (DASD). Part of the job of this service is to measure how frequently your app is used. If your app is not used frequently, DASD may delay or discard push messages sent to your app which have the content-available flag set. On iOS 10, Apple acknowledged a defect where push notifications containing content-available would not be delivered after an app was force-closed and rebooted. Based on what Apple has delivered in iOS 11, we assume this defect will not be fixed. Until we have engineered solutions to work around this issue, be aware when deploying: silent (data) pushes in-app messages pushes with dynamic categories simple pushes which hav...

IOS 11 didRegisterForRemoteNotificationsWithDeviceToken not called

Push Notification #define SYSTEM_VERSION_GRATERTHAN_OR_EQUALTO(v)([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch]!= NSOrderedAscending) In AppDelegate class method didFinishLaunchingWithOptions you have to use Code -- if ( SYSTEM_VERSION_LESS_THAN( @"10.0" ) ) {        [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings                                                                  settingsForTypes:(UIUserNotificationTypeSound |                                                                                  UIUserNo...

How To Open WhatsApp App When User Click Mobile Number Button In Objective C

Open WhatsApp App When User Click Mobile Number Button - (IBAction)TapCallWhatsApp:(UIButton *)sender {         NSURL *whatsappURL = [NSURL URLWithString:[NSString                                                                        stringWithFormat:@"https://api.whatsapp.com/send?phone=%@",Your Number]];         if ([[UIApplication sharedApplication] canOpenURL: whatsappURL])            {                  [[UIApplication sharedApplication] openURL: whatsappURL];           }      else           {                 //Use form simulator...         ...

How To Create a PDF with Quartz 2D in iOS

Create a PDF with Quartz 2D This tutorial assumes you are familiar with the basic new features in iOS 5 such as Storyboards and ARC. If you are new to iOS 5. Getting Started Run Xcode and create a new project with the iOS\Application\Single View Application template. Enter PDFRenderer for the project name, choose iPhone for the Device Family, make sure Use Storyboard and Use Automatic Reference Counting are checked, and finish creating the project. We are going to use two screens in this project. The first will simply have a button that will show the PDF when tapped. The second screen will be the PDF itself. Select the MainStoryboard.storyboard file. In the main window, you will see a View Controller. We need this View Controller to be embedded in a Navigation Controller to start with, so click on the Editor Menu, then select Embed In/Navigation Controller. The View Controller now has a segue from the Navigation Controller. Now drag a UIButton from the objects tab to t...

How To Create Swappable Table View Cell to Display More Options

Swappable Table View Cell to Display More Options I thought it’s a great feature to provide additional options for manipulating a table record. However, as you know, Apple didn’t make this feature available to developers in iOS 7. You can only create the swipe-to-delete option in table cell. The More feature is only limited to the stock Mail app. I have no idea why Apple keeps such great feature to its own app. In this tutorial, I’ll use SWTableViewCell and see how to implement swipe-to-show-options feature in your app. SWTableViewCell is pretty to easy to use. If you understand how to implement UITableView, you shouldn’t have any problem with SWTableViewCell. On top of that, it supports utility buttons on both swipe directions. You’ll understand what it means in a minute. Let’s get started and build our demo app. Xcode Project Template for Demo App I encourage you to create the project from scratch. The demo app is simply a table view app showing a list of custom table c...

Using Gesture Recognisers to Handle Pinch, Rotate, Pan, Swipe and Tap Gestures

Gesture Recognisers to Handle Pinch, Rotate, Pan, Swipe and Tap Gestures A gesture recogniser is actually an object of the abstract class UIGestureRecogniser . Such an object is related to a view, and monitors for predefined gestures made on that view. Going one level deeper, I would say that gestures are actually touches and movements of one or more fingers that happen on a specific area of the screen, where a view of interest exists there. In the early versions of iOS SDK, gestures recognisers were not provided to developers, so implementing such ways of interaction required a lot of manual work. Thankfully, Apple wrapped up all that manual work and gave it to developers as a single tool, and that way working with gestures became a really easy part of the iOS programming.  The UIGestureRecogniser class as an abstract one, it can’t be used directly. There are specific              subclasses of it that are provided for usage, and each one ...