Latest 0.9.2
Homepage https://github.com/appwise-labs/AppwiseCore
License MIT
Platforms ios 9.0
Authors

Version
License
Platform
Swift version

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. We recommend you use Bundler to manage gems, but you can manually install it with the following command:

$ gem install cocoapods

To integrate AppwiseCore into your Xcode project using CocoaPods, specify it in your Podfile:

use_frameworks!

pod 'AppwiseCore'

Then, run the following command:

$ bundle exec pod install

Usage

Create an implementation of the Config protocol, and a subclass of the generic AppDelegate class (referencing your config type). If you use networking functionality, it’s recommended to use the Router and Client types.

If you need database functionality, additionally add the "AppwiseCore/CoreData" dependency. It will automatically be initialised as long as you’ve implemented the AppDelegate & Config types.

We recommend you take a look at the Example project, it contains most of the basic structure we use in each project.

Fabric integration

When using AppwiseCore, you’ll want to add Crashlytics logging to your project. To do so, add (and use) the following application service (see source):

import AppwiseCore
import Crashlytics
import CrashlyticsRecorder
import Fabric

final class FabricApplicationService: NSObject, ApplicationService {
    func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool {
        Fabric.with([Crashlytics()])
        _ = CrashlyticsRecorder.createSharedInstance(crashlytics: Crashlytics.sharedInstance())
        _ = AnswersRecorder.createSharedInstance(answers: Answers.self)

        return true
    }
}

// MARK: - Conform Crashlytics & Fabric to recorder protocol

extension Crashlytics: CrashlyticsProtocol {
    public func log(_ format: String, args: CVaListPointer) {
        #if DEBUG
            CLSNSLogv(format, args)
        #else
            CLSLogv(format, args)
        #endif
    }
}

extension Answers: AnswersProtocol {
}

Authors

This framework contains source code based on:

License

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

Latest podspec

{
    "name": "AppwiseCore",
    "version": "0.9.2",
    "summary": "Just a library of some stuff we use internally.",
    "description": "Contains a few generic types (appdelegate, config, router, client) and some helper methods.",
    "homepage": "https://github.com/appwise-labs/AppwiseCore",
    "authors": {
        "David Jennes": "[email protected]"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.2",
    "source": {
        "git": "https://github.com/appwise-labs/AppwiseCore.git",
        "tag": "0.9.2",
        "submodules": true
    },
    "preserve_paths": [
        "Scripts/*",
        "Sourcery/*"
    ],
    "default_subspecs": [
        "Core",
        "Behaviours",
        "UI"
    ],
    "subspecs": [
        {
            "name": "Behaviours",
            "source_files": "Sources/Behaviours/**/*.swift",
            "dependencies": {
                "AppwiseCore/Common": [],
                "Then": []
            }
        },
        {
            "name": "Common",
            "source_files": "Sources/Common/**/*.swift",
            "pod_target_xcconfig": {
                "SWIFT_ACTIVE_COMPILATION_CONDITIONS[config=Debug]": "DEBUG"
            }
        },
        {
            "name": "Core",
            "source_files": "Sources/Core/**/*.swift",
            "dependencies": {
                "AppwiseCore/Common": [],
                "Alamofire": [],
                "CocoaLumberjack/Swift": [],
                "CrashlyticsRecorder": [],
                "Then": []
            }
        },
        {
            "name": "CoreData",
            "source_files": "Sources/CoreData/**/*.swift",
            "dependencies": {
                "AppwiseCore/Common": [],
                "AppwiseCore/Core": [],
                "Groot": [],
                "SugarRecord/CoreData": []
            }
        },
        {
            "name": "DeepLink",
            "source_files": "Sources/DeepLink/**/*.swift",
            "dependencies": {
                "AppwiseCore/Behaviours": [],
                "AppwiseCore/Common": []
            }
        },
        {
            "name": "UI",
            "source_files": "Sources/UI/**/*.swift",
            "dependencies": {
                "AppwiseCore/Core": [],
                "AppwiseCore/Behaviours": [],
                "IBAnimatable": []
            }
        }
    ]
}

Pin It on Pinterest

Share This