PippinCore 2.2.0

PippinCore 2.2.0

Andrew McKnight 维护。



 
依赖
结果>= 0
PippinLibrary>= 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 以获取更多信息

注意: 这几个由各自的 podspec 提供而不是一个包含多个 podspec 的 podspec 的原因有几个。这两个 spec 级别对所有功能都不等价。

  • test_spec 只针对一个子spec的安装问题。
  • 不支持使用 Pod:configurations 来安装子spec:[https://github.com/CocoaPods/CocoaPods/issues/3503](https://github.com/CocoaPods/CocoaPods/issues/3503)。

旧的 Pippin.podspec 现在是一个承托框架,其中包含 PippinCorePippinAdaptersPippinLibraryPippinTesting,以便方便使用。

示例项目

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

贡献

欢迎提交问题和pull请求!

测试

rake test

运行一系列独立的Rake任务

  • example_smoke_tests
  • 单元测试
  • test_smoke_test
  • subspec_smoke_test

example_smoke_tests

在每个Examples/项目目录中尝试执行pod install 和构建。

unit_tests

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

test_smoke_test

运行pod install并尝试构建声明依赖于PippinLibraryPippinTestingExample/Pippin.xcodeproject单元和UI测试目标。

subspec_smoke_test

集成烟雾测试,为每个Pippin podspec的每个子规格生成一个Xcode项目,每个项目都包括Swift和Objective-C,以便在安装该子规格后尝试构建。每个项目都存放在PippinTests/SmokeTests下。

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

Podspec test_specs

Pippin podspecs目前包含在Tests/下位于单元测试。

  • PippinLibrary
  • PippinTesting

感谢!

如果这个项目对您有帮助,请考虑留下小费🤗