PippinLibrary 3.0.0

PippinLibrary 3.0.0

Andrew McKnight 维护。



 
依赖关系
Anchorage>= 0
然后>= 0
闭包>= 0
 

  • Andrew McKnight

Pippin

Swift 5.1 platforms License

Pippin 是一组用于设置 iOS 应用基础设施并协助开发任务(如编写代码、测试和调试)的工具集合。

使用默认设置开始只要声明 Podfile 依赖项就很简单

pod 'Pippin'

并且,在您的应用启动序列中的某个时刻

import Pippin
import PippinAdapters

let environment = Environment.default(
    bugReportRecipients: ["[email protected]"],
    touchVizRootVC: UIViewController(nibName: nil, bundle: nil) // optional
)

// Crashlytics is a special situation
environment.crashReporter = CrashlyticsAdapter(debug: true)

// other optional peripherals
environment.locator = CoreLocationAdapter(locatorDelegate: self)

environment.connectEnvironment()

您将得到以下内容,几乎无需编写任何样板代码

  • 记录日志
  • 崩溃报告
  • 错误报告
  • 进度指示器
  • 警告对话框
  • 字体
  • 应用程序和启动信息
  • 数据模型
  • 触摸可视化
  • 启动参数和环境变量
  • 已授权的 CLLocationManager(也可以用类似的方式获取已授权的 AVCaptureDevice

Podspecs

有五个 podspecs 可以使用这些工具,请查阅每个的 README 以获取更多信息

注意:这些是通过单独的 podspecs 而不是带有多个 podspecs 的单个 podspec 交付的,有几个原因。这两个规范级别对所有功能并不是等效的。

旧的 Pippin.podspec 现在是一个伞形框架,它拉取了 PippinCorePippinAdaptersPippinLibraryPippinTesting 以方便使用。

示例项目

这些项目用于测试,可以使用 pod try 进行评估

贡献

欢迎提交问题和拉取请求!

测试

rake test

运行一组Rake任务,这些任务本身也可以独立运行

  • example_smoke_tests
  • unit_tests
  • test_smoke_test
  • subspec_smoke_test

example_smoke_tests

对于 Examples/ 中的每个项目,尝试 pod install 并构建。

unit_tests

运行为任何 test_specs 创建的Pippin podspecs单元测试套件。

test_smoke_test

通过 pod install 尝试构建 Example/Pippin.xcodeproject 单元和 UI 测试目标,这两个目标都声明了依赖于 PippinLibraryPippinTesting

subspec_smoke_test

集成烟雾测试,为每个Pippin podspec的每个子spec生成一个Xcode项目,每个项目都有Swift和Objective-C两种语言实现,以便在执行pod install后尝试构建。每个项目都存放在PippinTests/SmokeTests下。

PippinTests/还包含在ObjcApp/SwiftApp/中的模板项目源代码,以及模板Podfile。

Podspec test_specs

Pippin的podspec现阶段在Tests/目录下包含单元测试。

  • PippinLibrary
  • PippinTesting

感谢!

如果这个项目帮到了您,请考虑留一些小费🤗