Category: iOS Tutorials at AppCoda

Displaying Facebook Ads in Your iOS Apps

Not so long time ago I was asked to integrate Facebook ads in a project. Without having done so before, I prepared myself for a potentially long process, even a little bit painful, and then I got started searching the docs. Against my initial thoughts though, I went through the docs pretty fast, and after a few minutes I had my first Facebook ads up and running! Facebook ads consist of a nice way to embed advertisements in your apps...

Creating Gradient Colors Using CAGradientLayer

Every developer always uses color combinations along with images to produce a good-looking result when creating an app, trying always to achieve the best user experience possible. Sometimes, however, something more might be needed; simple colors might not be good enough for the best outcome in certain cases, but gradient colors could become the perfect fit. I had personally a few times only the opportunity to create gradient colors, and the last time I did so I considered to be...

How to Generate PDF using HTML Templates and UIPrintPageRenderer in iOS

Have you ever been asked to create PDF documents with content straight from your app? Have you ever even thought how to do that, if you’ve never done it before? Well, beginning the post by setting questions is a bit of unorthodox way to start, but the above summarise what I’m about to talk in this text. The idea of creating a PDF document in an iOS app looks quite often like the road through hell, but it doesn’t have...

Documenting Your Swift Code in Xcode Using Markdown

Amongst all the features Xcode 7 incorporates, there is one that admittedly distinguishes; that is the new revolutionary, much better way to write code documentation. With the introduction of Xcode 7, developers can use the powerful Markdown syntax to apply rich text formatting to the text of their documentation, which in combination to specific keywords that indicate special parts (like parameters, function results, etc) can result to an amazing outcome. The new Markdown-enabled documentation style, as the new one has...

Using Quick Look Framework for Previewing Documents

Several treasures like not so well-known frameworks and libraries can be found in the iOS SDK. Most of them can be proved to be real gems and truly useful tools, saving you from hours of extra work. One of them is the Quick Look Framework, and even if you’ve never used it before, it’s easy to understand what’s all about just from its name; it provides previewing capabilities for documents that an app handles. Like most people, I wasn’t aware...

Managing SQLite Database with SwiftyDB

Choosing a way for storing data permanently is something that is always needed when developing applications. There are various options we can pick from: To create single files, to use CoreData or create a SQLite database. The last option includes some extra hassle as the database must be created first, and all tables and fields to be already defined before an app uses them. Furthermore, and from the programming point of view, it’s not that easy to manage a SQLite...

Swift Tutorial: Building an iOS Chat App Using Socket.IO

iOS apps exist in millions out there, and most of them communicate with servers to exchange data. In their majority, the server implements and provides RESTful APIs that apps can use for the communication. When an app needs to send data to the server, or fetch from it, it makes the proper request and after a while the data has been returned. That happens several times during the app runtime period. The above covers the most use cases, but not...

A Beginner’s Guide to Push Notifications in Swift

“Push Notifications? Ohh, no!”. Yes, that’s the first thing that was coming to my mind when I was called to implement push notifications in an iOS app, and I’m pretty confident that it has been coming to yours as well. And not because it’s difficult to use push notifications, it’s just all that series of steps required prior to even be able to test a single push notification and cause eventually a huge confusion to almost all developers. But, let’s...

Integrating LinkedIn Sign In with iOS Apps Using OAuth 2.0

Social networks are part of our everyday life since a long time ago. Social networks are also part of our programming life, as the majority of the apps must interact somehow with them and send or receive data regarding users. In most cases, users are required to get connected somehow to each social network, and authorize the app so it makes requests on their behalf. There are many such networks out there, with Facebook and Twitter being the most used,...

How To Use Core Spotlight Framework in iOS 9

Every new iOS version brings along both new “goodies” and advancements to existing technologies for all developers around the globe. Obviously, the latest version, iOS 9, could not just stay out of this tradition, so once again developers have new frameworks and APIs at their disposal that let them leverage their applications to even higher levels. One of those is the Core Spotlight framework that contains some new great APIs that just wait for developers to put them in action....