Get Updates By E-mail 

iOS Development Libraries

This category mainly features open source libraries for iOS development. Any library relevant for iOS developers can be posted here, that includes libraries specifically for game development on the iPhone and iPad.

If you would like to add a library please submit it here.

InAppPurchase – A Simple Swift Library For In-App Purchases With Support For iOS 11’s Promotion Features

  •  
  •  
  •  
  •  
  •  

InAppPurchase is an open source Swift library submitted by Jin Sasaki providing a simple syntax for In-App purchases with support for iOS 11’s new features for promoting in-app purchases.

This snippet from the readme shows the syntax for handling an in-app purchase with Store Kit:

let iap = InAppPurchase.default
iap.purchase(productIdentifier: "PRODUCT_ID", finishDeferredTransactionHandler: { (result) in
    // `finishDeferredTransactionHandler` is called if the payment had been deferred and then approved.
    // For example, the case that a child requests to purchase, and then the parent approves.

    switch result {
    case .success(let state):
        // Handle `InAppPurchase.PaymentState` if needed
    case .failure(let error):
        // Handle `InAppPurchase.Error` if needed
    }
}, handler: { (result) in
    // This handler is called if the payment purchased, restored, deferred or failed.

    switch result {
    case .success(let state):
        // Handle `InAppPurchase.PaymentState`
    case .failure(let error):
        // Handle `InAppPurchase.Error`
    }
})

You can find InAppPurchase on Github here.

A nice simple to use library for working with StoreKit.


  •  
  •  
  •  
  •  
  •  

ARKit-CoreLocation – A Library For Easily Using CoreLocation Location Data With ARKit

  •  
  •  
  •  
  •  
  •  

ARKit-CoreLocation from Andrew at Project Dent that integrates iOS 11’s augmented reality library ARKit, with CoreLocation for GPS based location data.

With ARKit you can easily place objects within an AR world using real-world coordinates, and an example using MapKit is included demonstrating this feature.

There is also functionality included for using CoreLocation to improve AR accuracy.

This animation from the readme shows the library in use:

ARKit-CoreLocation

You can find ARKit-CoreLocation on Github here.

A great library for working with ARKit.


  •  
  •  
  •  
  •  
  •  

ViewAnimator – Swift Library For Easily Creating Complex iOS User Interface Animations

  •  
  •  
  •  
  •  
  •  

ViewAnimator is an open source Swift library from Marcos Griselli that provides a nice simple way to create complex user interface animations on components that implement the Animatable interface such as UIStackView, UICollectionView, and UITableView.

As the readme states:

ViewAnimator is a library for building complex iOS UIView animations in an easy way. It provides one line animations for any view included the ones which contain other views like UITableView and UICollectionView with its cells or UIStackView with its arrangedSubviews.

This snippet shows some animation code with ViewAnimator showing off the simple syntax and chaining:

let fromAnimation = AnimationType.from(direction: .right, offset: 30.0)
let zoomAnimation = AnimationType.zoom(scale: 0.2)
let rotateAnimation = AnimationType.rotate(angle: CGFloat.pi/6)
collectionView.animateViews(animations: [zoomAnimation, rotateAnimation], duration: 0.5)
tableView.animateViews(animations: [fromAnimation, zoomAnimation], duration: 0.5)

 

This animation shows off a user interface created with ViewAnimator:

ViewAnimator

You can find ViewAnimator on Github here.

A nice up-to-date Swift based user interface animation library.


  •  
  •  
  •  
  •  
  •  

FaceCropper – A Library That Crops Out All Faces From A Given Image Using The iOS 11 Vision API

  •  
  •  
  •  
  •  
  •  

FaceCropper is an open source library that utilizes the new iOS 11 Vision API to automatically find images within a photo from Taejun Kim
.

FaceCropper will automatically create new images containing each face found within a given image.

This snippet shows basic usage of FaceCropper:

let image = UIImage(named: "image_contains_faces")
image.face.crop { result in
  switch result {
  case .success(let faces):
    // When the <code>Vision</code> successfully find faces, and <code>FaceCropper</code> cropped it.
    // <code>faces</code> argument is a collection of cropped images.
  case .notFound:
    // When the image doesn't contain any face, <code>result</code> will be <code>.notFound</code>.
  case .failure(let error):
    // When the any error occured, <code>result</code> will be <code>failure</code>.
  }
}

This image from the readme shows an image with faces extracted:

FaceCropper

You can find FaceCropper on Github here.

A nice example of using the new vision API.


  •  
  •  
  •  
  •  
  •  

Kuery – A Swift 4 Library For Better Core Data Queries Using Smart Keypaths

  •  
  •  
  •  
  •  
  •  

Kuery is an open source Swift library for Core Data from Kishikawa Katsumi that utilizes Swift 4’s Smart Keypaths.

With Kuery you have type safety, and code completion for your queries unlike when using NSPredicate directly.

These snippets from the readme show a couple of simple queries using NSPredicate:

NSPredicate(format: "name == %@", "Katsumi")
NSPredicate(format: "age > %@", 20)

These are the same queries with Kuery:

Query(Person.self).filter(\Person.name == "Katsumi")
Query(Person.self).filter(\Person.age > 20)

You can find Kuery on Github here.

A nice way to perform Core Data queries.


  •  
  •  
  •  
  •  
  •