Skip to content

Commit

Permalink
1.6.42
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Korney committed Oct 3, 2024
1 parent ac6a3f6 commit 780d06a
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 44 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.41"
spec.version = ENV['LIB_VERSION'] || "1.6.42"
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
2 changes: 1 addition & 1 deletion AffiseAttributionLib/Classes/internal/BuildConfig.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation

internal struct BuildConfig {
static let AFFISE_VERSION = "1.6.41"
static let AFFISE_VERSION = "1.6.42"
}
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.41"
spec.version = ENV['LIB_VERSION'] || "1.6.42"
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.41"
s.version = ENV["LIB_VERSION"] || "1.6.42"
s.summary = "Affise Modules"
s.description = "Affise module collection"
s.homepage = "https://github.com/affise/sdk-ios"
Expand Down
2 changes: 1 addition & 1 deletion AffiseModule/Advertising/Classes/AdvertisingModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Foundation
@objc(AffiseAdvertisingModule)
public final class AdvertisingModule: AffiseModule {

public override var version: String { "1.6.41" }
public override var version: String { "1.6.42" }

private lazy var advertisingIdManager: AdvertisingIdManager = AdvertisingIdManagerImpl()

Expand Down
2 changes: 1 addition & 1 deletion AffiseModule/Link/Classes/LinkModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import AffiseAttributionLib
@objc(AffiseLinkModule)
public final class LinkModule: AffiseModule {

public override var version: String { "1.6.41" }
public override var version: String { "1.6.42" }

private var useCase: LinkResolveUseCase? = nil

Expand Down
2 changes: 1 addition & 1 deletion AffiseModule/Status/Classes/StatusModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import AffiseAttributionLib
@objc(AffiseStatusModule)
public final class StatusModule: AffiseModule {

public override var version: String { "1.6.41" }
public override var version: String { "1.6.42" }

private var checkStatusUseCase: CheckStatusUseCase? = nil
private var referrerUseCase: ReferrerUseCase? = nil
Expand Down
26 changes: 15 additions & 11 deletions AffiseModule/Status/Classes/usecase/CheckStatusUseCaseImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import AffiseAttributionLib

internal class CheckStatusUseCaseImpl {

private static let TIME_DELAY_SENDING: TimeInterval = 5
private let ATTEMPTS_TO_SEND = 30
private static let TIME_DELAY_SENDING: TimeInterval = 1
private static let TIMINGS = Array([1,1,2,3,5,8,13].reversed())
private let TIMEOUT_SEND: TimeInterval = 30

let PATH: String = "check_status"
Expand Down Expand Up @@ -68,15 +68,19 @@ extension CheckStatusUseCaseImpl: CheckStatusUseCase {

func send(_ onComplete: @escaping OnKeyValueCallback) {
DispatchQueue.global(qos:.background).async { [weak self] in
self?.sendWithRepeat(onComplete) {
Thread.sleep(forTimeInterval: CheckStatusUseCaseImpl.TIME_DELAY_SENDING)
self?.sendWithRepeat(onComplete) { attempt in
var i = 1
if CheckStatusUseCaseImpl.TIMINGS.count > attempt {
i = CheckStatusUseCaseImpl.TIMINGS[attempt]
}
Thread.sleep(forTimeInterval: CheckStatusUseCaseImpl.TIME_DELAY_SENDING * Double(i))
}
}
}

func sendWithRepeat( _ onComplete: @escaping OnKeyValueCallback, onFailedAttempt: () -> Void) {
func sendWithRepeat( _ onComplete: @escaping OnKeyValueCallback, onFailedAttempt: (Int) -> Void) {
//attempts to send
var attempts = ATTEMPTS_TO_SEND
var attempts = CheckStatusUseCaseImpl.TIMINGS.count + 1

//Send or not
var send = false
Expand Down Expand Up @@ -108,12 +112,12 @@ extension CheckStatusUseCaseImpl: CheckStatusUseCase {
if (attempts == 0) {
onComplete([])

let httpResponse = response ?? postBackResponse
let error = AffiseError.network(status: httpResponse?.code ?? 0, message: httpResponse?.body)
//Log error
logsManager?.addSdkError(error: AffiseError.cloud(url: url, error: error, attempts: ATTEMPTS_TO_SEND, retry: true))
// let httpResponse = response ?? postBackResponse
// let error = AffiseError.network(status: httpResponse?.code ?? 0, message: httpResponse?.body)
// //Log error
// logsManager?.addSdkError(error: AffiseError.cloud(url: url, error: error, attempts: CheckStatusUseCaseImpl.TIMINGS.count + 1, retry: true))
} else {
onFailedAttempt()
onFailedAttempt(attempts - 1)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion AffiseModule/Subscription/Classes/SubscriptionModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import AffiseAttributionLib
@objc(AffiseSubscriptionModule)
public final class SubscriptionModule: AffiseModule {

public override var version: String { "1.6.41" }
public override var version: String { "1.6.42" }

lazy var storeManager: StoreManager = StoreManager()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ extension ProductManagerSK2: ProductManager {
}

func product(_ id: String) -> Any {
return self.products[id]
return self.products[id] as Any
}
}
1 change: 0 additions & 1 deletion AffiseModule/Subscription/Classes/utils/StoreKit2Ext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ internal extension Product {
}

func toAffiseProduct(_ type: AffiseProductType? = nil) -> AffiseProduct {
self.price
return AffiseProduct(
productId: self.id,
title: self.displayName,
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.41"
spec.version = ENV['LIB_VERSION'] || "1.6.42"
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.42] - 2024-10-03

### Fixed

- Fix `Affise.Module.getStatus` timing retry.

## [1.6.41] - 2024-10-01

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

[1.6.42]: https://github.com/affise/sdk-ios/compare/1.6.41...1.6.42
[1.6.41]: https://github.com/affise/sdk-ios/compare/1.6.40...1.6.41
[1.6.40]: https://github.com/affise/sdk-ios/compare/1.6.39...1.6.40
[1.6.39]: https://github.com/affise/sdk-ios/compare/1.6.38...1.6.39
Expand Down
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

| Pod | Version |
| --------------------------- |:-------------------------:|
| `AffiseAttributionLib` | [`1.6.41`](https://github.com/CocoaPods/Specs/tree/master/Specs/a/9/3/AffiseAttributionLib) |
| `AffiseSKAdNetwork` | [`1.6.41`](https://github.com/CocoaPods/Specs/tree/master/Specs/3/6/f/AffiseSKAdNetwork) |
| `AffiseModule/Advertising` | [`1.6.41`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Link` | [`1.6.41`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Status` | [`1.6.41`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Subscription` | [`1.6.41`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseAttributionLib` | [`1.6.42`](https://github.com/CocoaPods/Specs/tree/master/Specs/a/9/3/AffiseAttributionLib) |
| `AffiseSKAdNetwork` | [`1.6.42`](https://github.com/CocoaPods/Specs/tree/master/Specs/3/6/f/AffiseSKAdNetwork) |
| `AffiseModule/Advertising` | [`1.6.42`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Link` | [`1.6.42`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Status` | [`1.6.42`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Subscription` | [`1.6.42`](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 @@ -85,24 +85,24 @@ To add the SDK using Cocoapods, specify the version you want to use in your Podf

```ruby
# Affise SDK library
pod 'AffiseAttributionLib', '~> 1.6.41'
pod 'AffiseAttributionLib', '~> 1.6.42'
# Affise modules
pod 'AffiseModule/Advertising', '~> 1.6.41'
pod 'AffiseModule/Link', '~> 1.6.41'
pod 'AffiseModule/Status', '~> 1.6.41'
pod 'AffiseModule/Subscription', '~> 1.6.41'
pod 'AffiseModule/Advertising', '~> 1.6.42'
pod 'AffiseModule/Link', '~> 1.6.42'
pod 'AffiseModule/Status', '~> 1.6.42'
pod 'AffiseModule/Subscription', '~> 1.6.42'
```

Get source directly from GitHub

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

### Integrate as Swift Package Manager
Expand Down Expand Up @@ -204,10 +204,10 @@ Affise
| Module | Version | Start |
| -------------- |:------------------------------------------------------------------------------------:|----------|
| `Advertising` | [`1.6.41`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Manual` |
| `Link` | [`1.6.41`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |
| `Status` | [`1.6.41`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |
| `Subscription` | [`1.6.41`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |
| `Advertising` | [`1.6.42`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Manual` |
| `Link` | [`1.6.42`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |
| `Status` | [`1.6.42`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |
| `Subscription` | [`1.6.42`](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 @@ -311,14 +311,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.41'
pod 'AffiseSKAdNetwork', '~> 1.6.42'
```

Get source directly from GitHub

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

For `swift` use:
Expand Down

0 comments on commit 780d06a

Please sign in to comment.