Latest1.0.5
Homepagehttps://github.com/ladeiko/SwiftSelfAware
LicenseMIT
Platformsios 9.0, requires ARC
FrameworksUIKit
Authors

Original idea

Purpose

Swift solution to run the code on application startup.

Changes

v1.0.5

  • Fix compilation warnings on Swift < 4.1

v1.0.4

  • Fix compilation warnings

Installation

Cocoapods

Add this to your Podfile

pod 'SwiftSelfAware'

If cocoapod spec file was not found, then you can set direct git url:

pod 'SwiftSelfAware', :git => 'https://github.com/ladeiko/SwiftSelfAware.git'

Then install pods by running:

pod install

Usage

import Foundation
import SwiftSelfAware

class SomeClass: SelfAware {

    static func awake() {
        print("Run before applicationDidFinishLaunching")
    }

}

Latest podspec

{
    "name": "SwiftSelfAware",
    "version": "1.0.5",
    "summary": "Swift version of legacy Objective-C 'load' initialization.",
    "homepage": "https://github.com/ladeiko/SwiftSelfAware",
    "license": "MIT",
    "authors": {
        "Siarhei Ladzeika": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ladeiko/SwiftSelfAware.git",
        "tag": "1.0.5"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source_files": "Classes/**/*.{m,s,swift}",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This