- This program is still under active development and in its early stage, consider that breaking changes and rewrites could occur before using it in a stable version
RPFramework is a set of utility classes and functions that aim to reduce boilerplate code and provide a cleaner architecture to your application
- Service-oriented Application Delegate (based on PluggableApplicationDelegate)
A service-oriented Application Delegate architecture will
Here is what your AppDelegate will look like:
import UIKit
import RPFramework
import PluggableApplicationDelegate
@UIApplicationMain
class AppDelegate: RPApplicationDelegate {
override var services: [ApplicationService] {
return [
CrashlyticsApplicationService(),
OtherApplicationService()
]
}
}Each ApplicationService you define will receive UIApplicationDelegate method calls, you define an ApplicationService this way (for example if you want to integrate the Fabric sdk into your app):
import Foundation
import PluggableApplicationDelegate
import Fabric
import Crashlytics
final class CrashlyticsApplicationService: NSObject, ApplicationService {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Fabric.with([Crashlytics.self])
return true
}
}The RPFramework Pod provides some basic ApplicationServices implementations that you can use out of the box or subclass in order to override the provided implementation, check the provided ApplicationServices here
RPFramework can be added to your project using CocoaPods by adding the following lines to your Podfile:
source 'https://github.com/RedP4nda/Specs'
pod 'RPFramework', '~> 0.9'Contributions are very welcome 👍😃.
Before submitting any pull request, please ensure you have run the included tests (if any) and they have passed. If you are including new functionality, please write test cases for it as well.
