小编Vig*_*r G的帖子

Cocoapods - 发现多个规格警告

pod install,我收到类似警告Found multiple specifications for "<Pod Name>"

这意味着我Podspecs这个目录中有多个~/cocoapods/repo

Podfile 示例:

source '<Private Podspec>'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

target 'SDKDemo' do
  use_frameworks!    
  pod '<Pod Name>'
end 
Run Code Online (Sandbox Code Playgroud)

我的问题是

  1. 安装 pod 时将使用哪个 Podspec。
  2. 如果 Podspec 取自<Private Podspec>,在这种情况下它将如何工作
source 'https://github.com/CocoaPods/Specs.git'
source '<Private Podspec>'
Run Code Online (Sandbox Code Playgroud)

我得出的结论是,源代码的顺序会影响 Podspec 的决定。但我想澄清这一点。

cocoapods

10
推荐指数
2
解决办法
2万
查看次数

用字符串枚举创建Fluent模型

这是我的流利模型

struct Ailment: PostgreSQLModel {

enum Frequency: String , Content {
    case regular = "Regular"
    case occasional = "Occasional"
    case incidentFound = "Incident Found"
}

var id: Int?

var ailment: String

var frequency: Frequency

var dateIdentified: Date?

var underMedication: Bool

var breifDescription: String

}
Run Code Online (Sandbox Code Playgroud)

我可以用创建Fluent模型Int Enum,但不能用String Enum

我低于异常

Fatal error: Error raised at top level: ?? DecodingError: Cannot initialize Frequency from invalid String value 1
Run Code Online (Sandbox Code Playgroud)

提前致谢 :)

fluent vapor

5
推荐指数
1
解决办法
283
查看次数

标签 统计

cocoapods ×1

fluent ×1

vapor ×1