Latest 1.2
Homepage https://github.com/OctMon/Easy
License MIT
Platforms ios 9.0
Authors

CI Status
Version
License
Platform

Requirements

  • iOS 9.0+
  • Xcode 10.0+
  • Swift 4.2

Installation

Easy is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'Easy'

Example

To run the example project, clone the repo.

import Easy

typealias easy = Easy
typealias app = EasyApp
typealias log = EasyLog
typealias alert = EasyAlert
typealias actionSheet = EasyActionSheet
typealias global = EasyGlobal
typealias router = EasyRouter

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        configGlobal()
        window = easy.NavigationController(rootViewController: Main()).makeRootViewController()
        config(application, launchOptions: launchOptions)
        return true
    }

    func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
        return easy.Social.handleOpenURLSocial(open: url)
    }

}

EasyLog

log.print("hello print") // hello print

log.debug("hello debug")
// 2018-12-06 11:09:25.373 [debug] [Tests.swift:38] testEasyLog() > hello debug

EasyApp

log.print(app.isDebug) // true
log.print(app.isBeta) // false

log.print(app.screenBounds) // (0.0, 0.0, 414.0, 736.0)
log.print(app.screenSize) // (414.0, 736.0)
log.print(app.screenWidth) // 414.0
log.print(app.screenHeight) // 736.0
log.print(app.screenScale) // 3.0

log.print(app.statusBarHeight) // 20.0
log.print(app.userDefaults) // <NSUserDefaults: 0x6000029c1380>
log.print(app.notificationCenter) // <CFNotificationCenter 0x6000003c4720 [0x10f4a5b68]
log.print(app.delegate) // Optional(<Easy_Example.AppDelegate: 0x600000f9ca00>)
log.print(app.keyWindow) // Optional(<UIWindow: 0x7fd487701540; frame = (0 0; 414 736); gestureRecognizers = <NSArray: 0x6000001c5b30>; layer = <UIWindowLayer: 0x600000fd8300>>)
log.print(app.window) // Optional(<UIWindow: 0x7fd487701540; frame = (0 0; 414 736); gestureRecognizers = <NSArray: 0x6000001c5b30>; layer = <UIWindowLayer: 0x600000fd8300>>)
log.print(app.rootViewController // Optional(<Easy.EasyNavigationController: 0x7fd48886f000>)

log.print(app.isCameraAvailableFront) // true
log.print(app.isCameraAvailableRear) // true

log.print(app.timestamp) // 1544232815
log.print(app.timestampMillis) // 1544232815518

log.print(app.randomUUID) // 90F67FF1-58B0-492E-9A98-9DC019BCB43C
log.print(app.randomLowercasedUUID) // 65a1273a-7889-4854-bddb-939f0089e88e
log.print(app.getKeychainUUID) // D262661F-06C8-4B45-B3FC-1878DCB65456

Author

octmon, [email protected]

License

Easy is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Easy",
    "version": "1.2",
    "summary": "develop Swift with Easy",
    "description": "Reduce development time and increase development efficiency",
    "homepage": "https://github.com/OctMon/Easy",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "OctMon": "[email protected]"
    },
    "source": {
        "git": "https://github.com/OctMon/Easy.git",
        "tag": "1.2"
    },
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.2",
    "default_subspecs": [
        "Core",
        "Session"
    ],
    "subspecs": [
        {
            "name": "Core",
            "source_files": "Easy/Classes/Core/*",
            "resources": [
                "Easy/Resources/EasyCore.bundle"
            ],
            "dependencies": {
                "SnapKit": [
                    "~> 4.2.0"
                ]
            }
        },
        {
            "name": "Common",
            "dependencies": {
                "MBProgressHUD": [
                    "~> 1.1.0"
                ],
                "MJRefresh": [
                    "~> 3.1.15.7"
                ],
                "RTRootNavigationController": [
                    "~> 0.7.1"
                ],
                "SDWebImage": [
                    "~> 4.4.2"
                ]
            }
        },
        {
            "name": "PhotoBrowser",
            "source_files": "Easy/Classes/PhotoBrowser/*",
            "dependencies": {
                "Easy/Core": [],
                "ZLPhotoBrowser": [
                    "~> 2.7.6"
                ]
            }
        },
        {
            "name": "RSA",
            "source_files": "Easy/Classes/RSA/*",
            "dependencies": {
                "Easy/Core": [],
                "SwiftyRSA": [
                    "~> 1.5.0"
                ]
            }
        },
        {
            "name": "Session",
            "source_files": "Easy/Classes/Session/*",
            "dependencies": {
                "Easy/Core": [],
                "Alamofire": [
                    "~> 4.8.0"
                ]
            }
        },
        {
            "name": "Social",
            "source_files": "Easy/Classes/Social/*",
            "resources": [
                "Easy/Resources/EasySocial.bundle"
            ],
            "dependencies": {
                "Easy/Core": [],
                "MonkeyKing": [
                    "~> 1.12.1"
                ]
            }
        },
        {
            "name": "Scan",
            "source_files": "Easy/Classes/Scan/*",
            "dependencies": {
                "Easy/Core": []
            }
        },
        {
            "name": "Page",
            "source_files": "Easy/Classes/Page/*",
            "dependencies": {
                "Easy/Core": [],
                "WMPageController": [
                    "~> 2.5.2"
                ]
            }
        },
        {
            "name": "Beta",
            "source_files": "Easy/Classes/Beta/*",
            "dependencies": {
                "Easy/Core": [],
                "Easy/Session": [],
                "FLEX": [
                    "~> 2.4.0"
                ],
                "GDPerformanceView-Swift": [],
                "OOMDetector": [
                    "~> 1.3"
                ]
            },
            "xcconfig": {
                "SWIFT_ACTIVE_COMPILATION_CONDITIONS": "$(inherited) BETA"
            }
        }
    ]
}

Pin It on Pinterest

Share This