diff --git a/tealium/core/pubsub/PubSub.swift b/tealium/core/pubsub/PubSub.swift index d2f83455..82b942f6 100644 --- a/tealium/core/pubsub/PubSub.swift +++ b/tealium/core/pubsub/PubSub.swift @@ -136,9 +136,11 @@ public class TealiumReplayObservable: TealiumObservable { public class TealiumReplaySubject: TealiumPublishSubject { + // Having a default value here would cause a crash on Carthage public init(cacheSize: Int?) { super.init(TealiumReplayObservable(cacheSize: cacheSize)) } + convenience public init() { self.init(cacheSize: 1) } @@ -190,10 +192,14 @@ public class TealiumBufferedObservable: TealiumObservable { public class TealiumBufferedSubject: TealiumPublishSubject { - @inline(never) - public init(bufferSize: Int? = 1) { + // Having a default value here would cause a crash on Carthage + public init(bufferSize: Int?) { super.init(TealiumBufferedObservable(bufferSize: bufferSize)) } + + convenience public init() { + self.init(bufferSize: 1) + } } private extension Optional where Wrapped == Int {