/AirKit

This is sugar framework that contains many different extensions for native Swift and iOS frameworks

Primary LanguageSwiftMIT LicenseMIT

🍃 AirKit

Many extensions to speed up your coding time!

Languages Platforms CocoaPods GitHub

This is sugar framework that contains many different extensions for native Swift and iOS frameworks

🔮 Features

AirKit is a modular framework, so this is easy to use only the needed module.

Extensions for Swift

  • Extensions for primitive values (Bool, Int, Double, String, etc.);
  • Extensions for collections (Sequence, Collections, etc.);
  • Extensions for Comparable;
  • Extensions for Optional;
  • Extensions for Result;
  • Extensions for Codable and KeyedDecodingContainer;
  • Extensions for KeyPath;
  • Extensions for Mirror;
  • Once - class than manages only one execution block of code;

Extensions for Foundation

  • Extensions for NSAttributedString;
  • Extensions for Calendar, Date, DateFormatter, TimeInterval and TimeZone;
  • Extensions for URL, URLComponents and URLRequest;
  • Extensions for UserDefaults and FileManagers;
  • Extensions for NumberFormatter;
  • Extensions for Data;
  • Extensions for Bundle;
  • Extensions for Locale;
  • Extensions for DispatchQueue;
  • Swizzle - suggar for use ObjC swizzle methods;

Extensions for QuartzCore

  • Extensions for CACornerMask;
  • Extensions for CAGradientLayer;
  • Extensions for CATransform3D;
  • Extensions for CAMediaTimingFunction;
  • Extensions for CGFloat;
  • Extensions for CGPoint;
  • Extensions for CGSize;
  • Extensions for CGColor;

Extensions for CoreImage

  • Extensions for CIContext;
  • Extensions for CIFilter;

Extensions for CoreLocation

  • Extensions for CLLocation;
  • Extensions for CLLocationCoordinate2D;

Extensions for UIKit

  • Extensions for NSDirectionalEdgeInsets;
  • Extensions for UIGraphicsImageRenderer, UIGraphicsImageRendererFormat and UIImage;
  • Extensions for UIColor;
  • Extensions for UIEdgeInsets;
  • Extensions for UIBezierPath;
  • Extensions for UILayoutPriority;
  • Extensions for UIView;
  • Extensions for UIStackView;
  • Extensions for UIButton;
  • Extensions for UISwitch;
  • Extensions for UISearchBar;
  • Extensions for UIBarButtonItem;
  • Extensions for UITextView;
  • Extensions for UIScrollView;
  • Extensions for UICollectionView;
  • Extensions for UITableView;
  • Extensions for UINavigationViewController;
  • Extensions for UIPageViewController;
  • Extensions for UIViewController;
  • Extensions for UIWindow;
  • Extensions for UIApplication;
  • Extensions for UIFont;

Extensions for MapKit

  • Extensions for MKMapView;
  • Extensions for MKPolyline;

Extensions for WebKit

  • Extensions for WKWebView;

Extensions for LocalAuthentication

  • Extensions for LAContext;

Extensions for CoreData

  • Extensions for NSPredicate;
  • Extensions for NSManagedObject;

Extensions for Combine

  • Extensions for TopLevelDecoder;
  • Added -Relay alias for Subject with Never failure type;

v 0.9 | Extensions for CoreImage

v 1.X | Helpers

  • Add Logger extensions;
  • Actions blocks instead target for different UI elements, like button actions with blocks (including Combine);
  • Closures for different components with old target (simple version of https://github.com/vhesener/Closures);
  • Then, like https://github.com/devxoul/Then;
  • Extensions for keyboard observing with many helpers;
  • Extensions for change screen on multitasking;
  • Extensions for UIApplication to open schemes, such as mailto or popular apps;
  • Nibless view;
  • Anything else?

🚀 Installation

For usage and installation instructions, visit their website. To integrate AirKit into your Xcode project using CocoaPods, specify it in your Podfile:

# Import all modules. This import includes all "Root" modules. See details bellow
pod 'AirKit', '~> 0.8'

# Import one or many specific module(s)
## Core (without UI elements)
pod 'AirKit/Swift', '~> 0.8'
pod 'AirKit/Foundation', '~> 0.8'
pod 'AirKit/Combine', '~> 0.8'

## CoreUI (including UI elements)
pod 'AirKit/QuartzCore', '~> 0.8'
pod 'AirKit/CoreImage', '~> 0.8'
pod 'AirKit/UIKit', '~> 0.8'
pod 'AirKit/WebKit', '~> 0.8'

# Other (specific frameworks to the project)
pod 'AirKit/CoreLocation', '~> 0.8'
pod 'AirKit/MapKit', '~> 0.8'
pod 'AirKit/LocalAuthentication', '~> 0.8'

💻 Usage

Import AirKit to the file and use extensions that you need.

import AirKit

Don't worry to import AirKit in any file because AirKit is import-safety. What does it mean? When you import AirKit to your file it includes only selected modules without any other imports. For example,

import AirKit

final class ViewModel {
    let image: UIImage // 🔴 Cannot find 'UIImage' in scope | It happenes because to use "UIImage", you need to import "UIKit"
    let url: URL // 🔴 Cannot find 'URL' in scope | It happenes because to use "URL", you need to import "Foundation"
    let version: Version // Works because "Version" is a model from "AirKit"
}

📚 Documentation

Documentation will be available soon. But now it available only for all extensions methods and properties summary.

📜 License

Released under the MIT license. See LICENSE for details.