Multiple Managed Object Contexts with Core Data Tutorial

If you are a developer developing applications for iOS or macOS, you might know what is NSManagedObjectContext and the use of it. NSManagedObjectContext is a single “Object Space” via which we communicate with the persistent container ( Sqlite ). You have to see the Apple Documentation on NSManagedObjectContext which will give you a proper understanding of it.

An instance of NSManagedObjectContext represents a single “object space” or scratch pad in an application. Its primary responsibility is to manage a collection of managed objects. These objects form a group of related model objects that represent an internally consistent view of one or more persistent stores. A single managed object instance exists in one and only one context, but multiple copies of an object can exist in different contexts. Thus object uniquing is scoped to a particular context.

Continue reading Multiple Managed Object Contexts with Core Data Tutorial

How Apple Push Notification works?

Apple launched the Apple Push Notification Service [ APNs ] in June 2009, that was the first push service. It was a major breakthrough, App Publishers really loved it because of direct reach to the user and simplicity of the service. Apple have revolutionised the entire system in the past years. They oversaw technology and made it available to the App Developers very early.

Continue reading How Apple Push Notification works?

Playing with MacBook Pro touch bar

The New MacBook Pro, it is awesome. Most of the people were giving out bad reviews on it, but I personally like the Touch Bar. That’s why I came up with this tutorial. It is very easy to understand the concepts of creating a touch bar app, it is pretty straight forward, I mean you can build a simple app for touch bar in less than 15 minutes.

Continue reading Playing with MacBook Pro touch bar

Building your own JSON Mapper

I have always thought of building my own JSON Mapper, but I thought that I was a beginner at what I do. But my mind was pushing me to give it a try ? Ok then,  I thought, it’s been a long time, let’s give it a try.

Hello Everyone, W are gonna build a very simple JSON Mapper here, later you can use the knowledge you have gained to build a complete JSON Mapper. Let’s start then?

Continue reading Building your own JSON Mapper

Apple Maps Flyover Animation

So before we dive into the Flyover part, there is something we have to setup. So that the MapView will work correctly when we run the app. Nothing to worry here, I will guide you properly through each and every step.

If you are too lazy to read this tutorial, scroll down to the bottom, I have mentioned a link to Github repo which contains the full project. But I strongly recommend you to read this tutorial, it is really important to me to get your comments & suggestions.

Continue reading Apple Maps Flyover Animation

Reordering UITableViewCells using UILongPressGestureRecognizer

Yeah, well we all know how to reorder UITableView using default table view editing mode. It’s quite easy. We have to enable the table views editing and couple of delegate methods which helps cells move from one index path to the other. So, why this post when we can do reordering this way, well by default iOS provides a hamburger menu on the right side of the table view, if you are building a classy product it is not a user friendly approach to keep the menu always, it’s just so explicit. And thats obviously a bad, so what if the user can long press on the UITableViewCell and move around though the table view and leave it wherever he/she like. That’s what we are gonna solve today.

Continue reading Reordering UITableViewCells using UILongPressGestureRecognizer

Protocols in Swift Standard Library : Swift 2

_Incrementable

This is a protocol which we do not use often in our code, Apple explicitly tells developers that  Do not use it directly in our code. Which means that this is a protocol which helps Swift Standarad Library to do something which we don’t have to worry about.

Still I will tell you how to conform to this protocol, But it so hard for me to give a proper example which solves our day to day coding problems. If someone know something about this, please feel to free to comment about it, that would be really great.

Continue reading Protocols in Swift Standard Library : Swift 2

I’m not a fan of ‘if let’

Yeah It is true that I am not a big fan of if let being said that, I am not a big fan of optionals. Yeah I rarely use optionals in my projects unless there is really a need for optional.

I can check whether a value is optional or not by if let condition, Actually I can check multiple optionals in a single if let condition. But really sometimes I didn’t want to write that unwanted else part of the if let . And I could see that I have to write else part in each if let to deal with the nil scenario of that value.

Continue reading I’m not a fan of ‘if let’

Managing Multiple GitHub Accounts

I was using a Macbook Pro 128GB, somehow ran into storage problems, My computer literally started complaining that system is currently running on swap space, your startup disk is full. So I have decided to delete all unwanted softwares and applications from system. I have deleted all applications and deleted most of the folders and files from Library folder. Which gave me around 90 GB free space. Isn’t that so cool? Yeah it is. This was done in a weekend, And started working as usual on Monday morning. Then the unexpected problems came…

I have deleted most of the Terminal tools, CocoaPods, Git Accounts and so much more. So I was struggling set it up from the beginning, because I have deleted all related tools. So I thought of writing an article on setting up multiple git accounts locally, so that even I can take a look at it if something like this happens in future. Otherwise it would be a painful task to find the corresponding commands and tutorials to setup everything from the beginning.

Continue reading Managing Multiple GitHub Accounts

Swift types and meta types

We usually don’t use types and meta types in Swift, but sometimes we do. Swift Programming Language provides some ways to get type name out of a Class/Struct or from an Instance. It’s just so easy, we have to just call one keyword, and we get the corresponding type. Let’s see some examples, without examples it’s so hard to understand these concepts. Continue reading Swift types and meta types

Turning off Internet connectivity in your Simulator

Ever thought of turning off Internet in your iOS simulator to test some edge cases?. I usually test my projects using simulator a lot. And it really irritated sometimes when I don’t have my iPhone near to me. Let me tell you how I managed to get no Internet connectivity in iOS simulator while there is a proper working Internet connection in Operating System.

Continue reading Turning off Internet connectivity in your Simulator

Printing Pyramids and Triangles


*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * * * *
* * * * * * * *
* * * * * * * * *
* * * * * * * * * *

I know you all have created programs for these kind of pyramids long back, by using C++ or Java or C. Isn’t it fun to write programs like by understanding the programming concepts? Yes it is. I am going to explain to you guys how these kind of pyramids can be created in Swift, and how we can use Functional Programming to make it even shorter. Okay, Let’s jump in.

Continue reading Printing Pyramids and Triangles

Multipeer Connectivity – Sharing Custom Classes

This tutorial covers the basics on Multipeer Connectivity Framework and connection between nearby iOS devices. I will guide you through each and every step for successfully connecting two devices using this framework and sharing files each other.

I hope that you have a basic understanding on Xcode and iOS Application Development. Using Multipeer framework we can search for nearby iOS devices using Wi-Fi and bluetooth networks. We can send message based data, streaming data and also resources ( such as files ).

Continue reading Multipeer Connectivity – Sharing Custom Classes

PERK Hackathon : Winner :)

It was really super happy moments for me in the hackathon. Me and my cousin attended this hackathon together and won it. Even got an offer letter from PERK, which I declined later. I was really happy that I could build two different apps in one night. One app uses AppsaholicSDK, and the other one was a PERK version of Flappy Bird. Totally nailed it anyway :).

 

 

Angel Hack Chennai : Third Place ?

I am a fan of AngelHack, they organize hackathons better than any other organizers. It was really super happy moments for me in the hackathon. Even we got Third Place in the hackathon, if i would have got Second Place, I could have gone to Silicon Valley, I missed it. Its okay  I know that I will win AngelHack soon :).

AngelHack Chennai was awesome.

Continue reading Angel Hack Chennai : Third Place ?

Submitting your WatchOS App

You guys will be wondering about, how to provision an Apple Watch app. Yes it was painful task for me when i started to archive it. But later solved it, after a long time digging deep posts in search engines. Actually its very simple. Lets take a look at bundle identifiers,

Product -> com.yourCompanyName.ProductName

WatchApp -> om.yourCompanyName.ProductName.watchkitapp

WatchKitExtension -> com.yourCompanyName.ProductName.watchkitextension

Continue reading Submitting your WatchOS App