Skip to content

Commit

Permalink
1.6.34
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Korney committed Jul 26, 2024
1 parent 07b2f47 commit 55c51f8
Show file tree
Hide file tree
Showing 17 changed files with 74 additions and 29 deletions.
2 changes: 1 addition & 1 deletion AffiseAttributionLib.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Pod::Spec.new do |spec|
spec.name = "AffiseAttributionLib"
spec.version = ENV['LIB_VERSION'] || "1.6.33"
spec.version = ENV['LIB_VERSION'] || "1.6.34"
spec.summary = "Affise Attribution iOS library"
spec.description = "Affise SDK is a software you can use to collect app usage statistics, device identifiers, deeplink usage, track install referrer."
spec.homepage = "https://github.com/affise/sdk-ios"
Expand Down
4 changes: 2 additions & 2 deletions AffiseAttributionLib/Classes/deeplink/DeeplinkValue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class DeeplinkValue: NSObject {
public let path: String?
public let parameters: [String:[String]]

init(
public init(
deeplink: String,
scheme: String?,
host: String?,
Expand All @@ -32,7 +32,7 @@ extension DeeplinkValue {

extension Optional where Wrapped == URL {

func toDeeplinkValue() -> DeeplinkValue {
public func toDeeplinkValue() -> DeeplinkValue {
guard let self = self else {
return DeeplinkValue(
deeplink: "",
Expand Down
5 changes: 5 additions & 0 deletions AffiseAttributionLib/Classes/internal/BuildConfig.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Foundation

internal struct BuildConfig {
static let AFFISE_VERSION = "1.6.34"
}
2 changes: 2 additions & 0 deletions AffiseAttributionLib/Classes/modules/AffiseModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ open class AffiseModule: NSObject {
self.dependencies = dependencies
self.baseProviders = providers
}

open var version: String { "" }

open func start() {

Expand Down
10 changes: 6 additions & 4 deletions AffiseAttributionLib/Classes/modules/AffiseModuleManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ internal class AffiseModuleManager {
private func initAffiseModules(_ callback: (_ module: AffiseModule) -> Void) {
for name in AffiseModules.values() {
guard let cls = classType(name) else { continue }

let module = cls.init()
modules[name] = module

callback(module)
if module.version == BuildConfig.AFFISE_VERSION {
modules[name] = module
callback(module)
} else {
print(AffiseModuleError.version(name: name, module: module).localizedDescription)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Foundation

enum AffiseModuleError: Error {
case version(name: AffiseModules, module: AffiseModule)
}

extension AffiseModuleError : LocalizedError {
public var errorDescription: String? {
switch self {
case .version(name: let name, module: let module):
return NSLocalizedString("AffiseModuleError.version(module [\(name.description.lowercased()):\(module.version)] version is incompatible with [attribution:\(BuildConfig.AFFISE_VERSION)], use same version as attribution)", comment: "")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Foundation
class AffSDKVersionProvider: StringPropertyProvider {

override func provide() -> String? {
return "1.6.33"
return BuildConfig.AFFISE_VERSION
}

public override func getOrder() -> Float {
Expand Down
2 changes: 1 addition & 1 deletion AffiseInternal.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |spec|
spec.name = "AffiseInternal"
spec.version = ENV['LIB_VERSION'] || "1.6.33"
spec.version = ENV['LIB_VERSION'] || "1.6.34"
spec.summary = "Affise Internal library"
spec.description = "Affise Internal wrapper library for crossplatform"
spec.homepage = "https://github.com/affise/sdk-ios"
Expand Down
2 changes: 1 addition & 1 deletion AffiseModule.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = "AffiseModule"
s.version = ENV["LIB_VERSION"] || "1.6.33"
s.version = ENV["LIB_VERSION"] || "1.6.34"
s.summary = "Affise Modules"
s.description = "Affise module collection"
s.homepage = "https://github.com/affise/sdk-ios"
Expand Down
2 changes: 2 additions & 0 deletions AffiseModule/Advertising/Classes/AdvertisingModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import Foundation
@objc(AffiseAdvertisingModule)
public final class AdvertisingModule: AffiseModule {

public override var version: String { "1.6.34" }

private lazy var advertisingIdManager: AdvertisingIdManager = AdvertisingIdManagerImpl()

private lazy var adidProvider: Provider = AdidProvider(advertisingIdManager: advertisingIdManager)
Expand Down
2 changes: 2 additions & 0 deletions AffiseModule/Link/Classes/LinkModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import AffiseAttributionLib
@objc(AffiseLinkModule)
public final class LinkModule: AffiseModule {

public override var version: String { "1.6.34" }

private var useCase: LinkResolveUseCase? = nil

public override func start() {
Expand Down
2 changes: 2 additions & 0 deletions AffiseModule/Status/Classes/StatusModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import AffiseAttributionLib
@objc(AffiseStatusModule)
public final class StatusModule: AffiseModule {

public override var version: String { "1.6.34" }

private var checkStatusUseCase: CheckStatusUseCase? = nil
private var referrerUseCase: ReferrerUseCase? = nil

Expand Down
2 changes: 2 additions & 0 deletions AffiseModule/Subscription/Classes/SubscriptionModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import AffiseAttributionLib
@objc(AffiseSubscriptionModule)
public final class SubscriptionModule: AffiseModule {

public override var version: String { "1.6.34" }

lazy var storeManager: StoreManager = StoreManager()

override public func start() {
Expand Down
2 changes: 1 addition & 1 deletion AffiseSKAdNetwork.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Pod::Spec.new do |spec|
spec.name = "AffiseSKAdNetwork"
spec.version = ENV['LIB_VERSION'] || "1.6.33"
spec.version = ENV['LIB_VERSION'] || "1.6.34"
spec.summary = "AffiseSKAdNetwork iOS library"
spec.description = "Affise library for StoreKit Ad Network (SKAdNetwork)"
spec.homepage = "https://github.com/affise/sdk-ios"
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.6.34] - 2024-07-26

### Added

- Modules compatibility check.

## [1.6.33] - 2024-06-28

### Added
Expand Down Expand Up @@ -62,6 +68,7 @@
- Improve `AffiseModuleManager`
- Update for demo app

[1.6.34]: https://github.com/affise/sdk-ios/compare/1.6.33...1.6.34
[1.6.33]: https://github.com/affise/sdk-ios/compare/1.6.32...1.6.33
[1.6.32]: https://github.com/affise/sdk-ios/compare/1.6.31...1.6.32
[1.6.31]: https://github.com/affise/sdk-ios/compare/1.6.30...1.6.31
Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

| Pod | Version |
| ---- |:-------:|
| `AffiseAttributionLib` | [`1.6.33`](https://github.com/CocoaPods/Specs/tree/master/Specs/a/9/3/AffiseAttributionLib) |
| `AffiseSKAdNetwork` | [`1.6.33`](https://github.com/CocoaPods/Specs/tree/master/Specs/3/6/f/AffiseSKAdNetwork) |
| `AffiseModule/Advertising` | [`1.6.33`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Link` | [`1.6.33`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Status` | [`1.6.33`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseAttributionLib` | [`1.6.34`](https://github.com/CocoaPods/Specs/tree/master/Specs/a/9/3/AffiseAttributionLib) |
| `AffiseSKAdNetwork` | [`1.6.34`](https://github.com/CocoaPods/Specs/tree/master/Specs/3/6/f/AffiseSKAdNetwork) |
| `AffiseModule/Advertising` | [`1.6.34`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Link` | [`1.6.34`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Status` | [`1.6.34`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |

- [Affise Attribution iOS Library](#affise-attribution-ios-library)
- [Description](#description)
Expand Down Expand Up @@ -80,22 +80,22 @@ To add the SDK using Cocoapods, specify the version you want to use in your Podf

```ruby
# Affise SDK library
pod 'AffiseAttributionLib', '~> 1.6.33'
pod 'AffiseAttributionLib', '~> 1.6.34'
# Affise modules
pod 'AffiseModule/Advertising', '~> 1.6.33'
pod 'AffiseModule/Link', '~> 1.6.33'
pod 'AffiseModule/Status', '~> 1.6.33'
pod 'AffiseModule/Advertising', '~> 1.6.34'
pod 'AffiseModule/Link', '~> 1.6.34'
pod 'AffiseModule/Status', '~> 1.6.34'
```

Get source directly from GitHub

```ruby
# Affise SDK library
pod 'AffiseAttributionLib', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.33'
pod 'AffiseAttributionLib', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.34'
# Affise modules
pod 'AffiseModule/Advertising', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.33'
pod 'AffiseModule/Link', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.33'
pod 'AffiseModule/Status', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.33'
pod 'AffiseModule/Advertising', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.34'
pod 'AffiseModule/Link', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.34'
pod 'AffiseModule/Status', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.34'
```

### Integrate as Swift Package Manager
Expand Down Expand Up @@ -197,9 +197,9 @@ Affise
| Module | Version | Start |
| ------------- |:------------------------------------------------------------------------------------:|----------|
| `Advertising` | [`1.6.33`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Manual` |
| `Link` | [`1.6.33`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |
| `Status` | [`1.6.33`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |
| `Advertising` | [`1.6.34`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Manual` |
| `Link` | [`1.6.34`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |
| `Status` | [`1.6.34`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |

If module start type is `manual`, then call:

Expand Down Expand Up @@ -263,14 +263,14 @@ To add the SDK using Cocoapods, specify the version you want to use in your Podf

```ruby
# Wrapper for StoreKit Ad Network
pod 'AffiseSKAdNetwork', '~> 1.6.33'
pod 'AffiseSKAdNetwork', '~> 1.6.34'
```

Get source directly from GitHub

```ruby
# Wrapper for StoreKit Ad Network
pod 'AffiseSKAdNetwork', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.33'
pod 'AffiseSKAdNetwork', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.34'
```

For `swift` use:
Expand Down
7 changes: 7 additions & 0 deletions example/app/app/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,12 @@
</array>
<key>NSAdvertisingAttributionReportEndpoint</key>
<string>https://affise-skadnetwork.com/</string>
<key>UIApplicationSceneManifest</key>
<dict>
<!-- <key>UIApplicationSupportsMultipleScenes</key>
<true/> -->
<key>UISceneConfigurations</key>
<dict/>
</dict>
</dict>
</plist>

0 comments on commit 55c51f8

Please sign in to comment.