Swift语言开发的各种坑

1、当写extension的时候  关联类型全局不能重复,否则会有影响

public final class YDSExtension<Base> {
    public let base: Base
    public init(_ base: Base) {
        self.base = base
    }
}

/**
 A type that has YDSExtension.
 */
public protocol YDSExtensionCompatible {
    associatedtype YDSExtensionCompatibleType  //不能重名
    var yds: YDSExtensionCompatibleType { get }
}

public extension YDSExtensionCompatible {
    public var yds: YDSExtension<Self> {
        return YDSExtension(self)
    }
}

extension UIView: YDSExtensionCompatible { }

 

Node.JS、 JS、TypeScript相关 前后端技术栈

这几个概念有可能混,要先搞清标题的几个概念,下边罗列相关的技术栈

前端:vue/vue.cli  (vue开发脚手架,可以简单初始化一个应用,使用webpack进行编译打包,支持开发时热更新编辑内容到浏览器)  、 angular、 react

后端:国内的ThinkJS(不看好)、  express、koa、hapi

https://da-14.com/blog/10-best-nodejs-frameworks

https://cnodejs.org/topic/58caaec27dee71e5193a53ce

国人难得讲的清晰的:https://www.jianshu.com/p/3806417a1991?from=timeline

感觉不错的API规范:https://graphql.org

 

Node.JS 生产环境部署:https://github.com/yyx990803/pod   (简单易用,个人适用)、  PM2 、Docker(容器,支持微服务、服务发现)

IAP相关资料

中文流程详解:http://www.cocoachina.com/ios/20111028/3435.html

官方流程详解:https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/StoreKitGuide/PromotingIn-AppPurchases/PromotingIn-AppPurchases.html

官方服务器验证订单详细介绍:https://developer.apple.com/library/archive/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html