From a96ce028be57985fceede7c3606bd473e5e2ef60 Mon Sep 17 00:00:00 2001 From: Sergey Korney Date: Fri, 2 Feb 2024 19:02:28 +0500 Subject: [PATCH] 1.6.25 --- AffiseAttributionLib.podspec | 4 +-- .../Classes/events/EventsManager.swift | 22 +++++++++--- .../init/AffSDKVersionProvider.swift | 2 +- AffiseInternal.podspec | 8 ++--- AffiseModule.podspec | 6 ++-- AffiseSKAdNetwork.podspec | 4 +-- README.md | 35 +++++++++++-------- 7 files changed, 51 insertions(+), 30 deletions(-) diff --git a/AffiseAttributionLib.podspec b/AffiseAttributionLib.podspec index a0221eb..c3d154d 100644 --- a/AffiseAttributionLib.podspec +++ b/AffiseAttributionLib.podspec @@ -5,7 +5,7 @@ Pod::Spec.new do |spec| spec.name = "AffiseAttributionLib" - spec.version = ENV['LIB_VERSION'] || "1.6.24" + spec.version = ENV['LIB_VERSION'] || "1.6.25" 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" @@ -18,6 +18,6 @@ Pod::Spec.new do |spec| spec.source_files = "AffiseAttributionLib/Classes/**/*.{h,m,swift}" spec.resources = "AffiseAttributionLib/Assets/*.{js}" - spec.ios.deployment_target = "10.0" + spec.ios.deployment_target = "9.0" spec.swift_version = '5.7' end diff --git a/AffiseAttributionLib/Classes/events/EventsManager.swift b/AffiseAttributionLib/Classes/events/EventsManager.swift index ec00ce5..b7e5681 100644 --- a/AffiseAttributionLib/Classes/events/EventsManager.swift +++ b/AffiseAttributionLib/Classes/events/EventsManager.swift @@ -78,15 +78,28 @@ class EventsManager { self?.stopTimer() //Create timer - let timer = Timer.scheduledTimer( + guard let timer = self?.scheduledTimer() else { return } + self?.timer = timer + RunLoop.current.add(timer, forMode: .common) + } + } + + private func scheduledTimer() -> Timer { + if #available(iOS 10.0, *) { + return Timer.scheduledTimer( withTimeInterval: EventsManager.TIME_SEND_REPEAT, repeats: true ) { [weak self] _ in self?.fireTimer() } - - self?.timer = timer - RunLoop.current.add(timer, forMode: .common) + } else { + return Timer.scheduledTimer( + timeInterval: EventsManager.TIME_SEND_REPEAT, + target: self, + selector: #selector(self.fireTimer), + userInfo: nil, + repeats: true + ) } } @@ -100,6 +113,7 @@ class EventsManager { timer = nil } + @objc private func fireTimer() { //Send events sendEvents() diff --git a/AffiseAttributionLib/Classes/parameters/providers/init/AffSDKVersionProvider.swift b/AffiseAttributionLib/Classes/parameters/providers/init/AffSDKVersionProvider.swift index 74057f5..59f849b 100644 --- a/AffiseAttributionLib/Classes/parameters/providers/init/AffSDKVersionProvider.swift +++ b/AffiseAttributionLib/Classes/parameters/providers/init/AffSDKVersionProvider.swift @@ -6,7 +6,7 @@ import Foundation class AffSDKVersionProvider: StringPropertyProvider { override func provide() -> String? { - return "1.6.24" + return "1.6.25" } public override func getOrder() -> Float { diff --git a/AffiseInternal.podspec b/AffiseInternal.podspec index ecccf2f..08ab448 100644 --- a/AffiseInternal.podspec +++ b/AffiseInternal.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |spec| spec.name = "AffiseInternal" - spec.version = ENV['LIB_VERSION'] || "1.6.24" + spec.version = ENV['LIB_VERSION'] || "1.6.25" spec.summary = "Affise Internal library" spec.description = "Affise Internal wrapper library for crossplatform" spec.homepage = "https://github.com/affise/sdk-ios" @@ -20,9 +20,9 @@ Pod::Spec.new do |spec| } spec.source_files = "AffiseInternal/Classes/**/*.{swift}" - spec.ios.deployment_target = "10.0" + spec.ios.deployment_target = "9.0" spec.swift_version = '5.7' - spec.dependency "AffiseAttributionLib" - spec.dependency "AffiseSKAdNetwork" + spec.dependency "AffiseAttributionLib", "#{spec.version}" + spec.dependency "AffiseSKAdNetwork", "#{spec.version}" end diff --git a/AffiseModule.podspec b/AffiseModule.podspec index a358551..f06bfcb 100644 --- a/AffiseModule.podspec +++ b/AffiseModule.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "AffiseModule" - s.version = ENV["LIB_VERSION"] || "1.6.24" + s.version = ENV["LIB_VERSION"] || "1.6.25" s.summary = "Affise Modules" s.description = "Affise module collection" s.homepage = "https://github.com/affise/sdk-ios" @@ -20,10 +20,10 @@ Pod::Spec.new do |s| :submodules => true } - s.ios.deployment_target = "10.0" + s.ios.deployment_target = "9.0" s.swift_version = "5.7" - s.dependency "AffiseAttributionLib" + s.dependency "AffiseAttributionLib", "#{s.version}" s.subspec "Status" do |sub| sub.source_files = "AffiseModule/Status/Classes/**/*.{swift}" diff --git a/AffiseSKAdNetwork.podspec b/AffiseSKAdNetwork.podspec index daa72b4..33970b9 100644 --- a/AffiseSKAdNetwork.podspec +++ b/AffiseSKAdNetwork.podspec @@ -5,7 +5,7 @@ Pod::Spec.new do |spec| spec.name = "AffiseSKAdNetwork" - spec.version = ENV['LIB_VERSION'] || "1.6.24" + spec.version = ENV['LIB_VERSION'] || "1.6.25" spec.summary = "AffiseSKAdNetwork iOS library" spec.description = "Affise library for StoreKit Ad Network (SKAdNetwork)" spec.homepage = "https://github.com/affise/sdk-ios" @@ -18,7 +18,7 @@ Pod::Spec.new do |spec| spec.source_files = "AffiseSKAdNetwork/**/*.{h,m,swift}" spec.platform = "ios" - spec.ios.deployment_target = "10.0" + spec.ios.deployment_target = "9.0" spec.swift_version = "5.7" spec.framework = "StoreKit" diff --git a/README.md b/README.md index 35c4015..48ec7cb 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ | Pod | Version | | ---- |:-------:| -| `AffiseAttributionLib` | [`1.6.24`](https://github.com/CocoaPods/Specs/tree/master/Specs/a/9/3/AffiseAttributionLib) | -| `AffiseSKAdNetwork` | [`1.6.24`](https://github.com/CocoaPods/Specs/tree/master/Specs/3/6/f/AffiseSKAdNetwork) | -| `AffiseModule/Advertising` | [`1.6.24`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | -| `AffiseModule/Status` | [`1.6.24`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | +| `AffiseAttributionLib` | [`1.6.25`](https://github.com/CocoaPods/Specs/tree/master/Specs/a/9/3/AffiseAttributionLib) | +| `AffiseSKAdNetwork` | [`1.6.25`](https://github.com/CocoaPods/Specs/tree/master/Specs/3/6/f/AffiseSKAdNetwork) | +| `AffiseModule/Advertising` | [`1.6.25`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | +| `AffiseModule/Status` | [`1.6.25`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | - [Affise Attribution iOS Library](#affise-attribution-ios-library) - [Description](#description) @@ -73,20 +73,20 @@ To add the SDK using Cocoapods, specify the version you want to use in your Podf ```ruby # Affise SDK library -pod 'AffiseAttributionLib', '~> 1.6.24' +pod 'AffiseAttributionLib', '~> 1.6.25' # Affise modules -pod 'AffiseModule/Advertising', '~> 1.6.24' -pod 'AffiseModule/Status', '~> 1.6.24' +pod 'AffiseModule/Advertising', '~> 1.6.25' +pod 'AffiseModule/Status', '~> 1.6.25' ``` Get source directly from GitHub ```ruby # Affise SDK library -pod 'AffiseAttributionLib', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.24' +pod 'AffiseAttributionLib', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.25' # Affise modules -pod 'AffiseModule/Advertising', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.24' -pod 'AffiseModule/Status', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.24' +pod 'AffiseModule/Advertising', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.25' +pod 'AffiseModule/Status', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.25' ``` ### Integrate as Swift Package Manager @@ -188,8 +188,8 @@ Affise | Module | Version | Start | | ------------- |:------------------------------------------------------------------------------------:|----------| -| `Advertising` | [`1.6.24`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Manual` | -| `Status` | [`1.6.24`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` | +| `Advertising` | [`1.6.25`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Manual` | +| `Status` | [`1.6.25`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` | If module start type is `manual`, then call: @@ -241,14 +241,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.24' +pod 'AffiseSKAdNetwork', '~> 1.6.25' ``` Get source directly from GitHub ```ruby # Wrapper for StoreKit Ad Network -pod 'AffiseSKAdNetwork', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.24' +pod 'AffiseSKAdNetwork', :git => 'https://github.com/affise/sdk-ios.git', :tag => '1.6.25' ``` For `swift` use: @@ -551,6 +551,13 @@ Use any of custom events if default doesn't fit your scenario: - `CustomId09` - `CustomId10` +If above event functionality still limits your usecase, you can use `UserCustomEvent` + +```swift +UserCustomEvent(eventName: "MyCustomEvent") + .send() +``` + ## Predefined event parameters To enrich your event with another dimension, you can use predefined parameters for most common cases.