Skip to content

Commit

Permalink
1.6.30
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Korney committed May 16, 2024
1 parent b8ac20a commit eab4878
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 42 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.29"
spec.version = ENV['LIB_VERSION'] || "1.6.30"
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
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
//
// PostBackModelToJsonStringConverter.swift
// app
//
// Created by Sergey Korney
//


/**
* Converter List<PostBackModel> to String
*/
Expand Down Expand Up @@ -40,22 +32,22 @@ class PostBackModelToJsonStringConverter : Converter {
}

//Events
let eventsArray = obj.events?.map { event in event.data } ?? []
let eventsArray = obj.events?.compactEvent() ?? []
dict.append((Parameters.AFFISE_EVENTS_COUNT, eventsArray.count))
dict.append((EVENTS_KEY, eventsArray))

//Events
let sdkEventsArray = obj.internalEvents?.map { event in event.data } ?? []
//Internal Events
var sdkEventsArray = obj.internalEvents?.compactEvent() ?? []
dict.append((Parameters.AFFISE_INTERNAL_EVENTS_COUNT, sdkEventsArray.count))
dict.append((INTERNAL_EVENTS_KEY, sdkEventsArray))
dict.append((INTERNAL_EVENTS_KEY, sdkEventsArray.compactMap { $0 }))

//Logs
let logsArray = obj.logs?.map { log in log.data } ?? []
let logsArray = obj.logs?.compactLog() ?? []
dict.append((Parameters.AFFISE_SDK_EVENTS_COUNT, logsArray.count))
dict.append((SDK_EVENTS_KEY, logsArray))

//Metrics
let metricsArray = obj.metrics?.map { metric in metric.data } ?? []
let metricsArray = obj.metrics?.compactEvent() ?? []
dict.append((Parameters.AFFISE_METRICS_EVENTS_COUNT, metricsArray.count))
dict.append((METRICS_EVENTS_KEY, metricsArray))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
//
// PostBackModel.swift
// app
//
// Created by Sergey Korney
//


struct PostBackModel {
let parameters: [(ProviderType, Any?)]

Expand Down
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.29"
return "1.6.30"
}

public override func getOrder() -> Float {
Expand Down
23 changes: 23 additions & 0 deletions AffiseAttributionLib/Classes/utils/Array+Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,26 @@ extension Array where Element == (ProviderType, Any?) {
}
}
}

extension Array where Element == SerializedEvent {
func compactEvent() -> [String] {
return self.compactMap { event in
if event.data.isBlank {
return nil
}
return event.data
}
}
}

extension Array where Element == SerializedLog {
func compactLog() -> [String] {
return self.compactMap { event in
if event.data.isBlank {
return nil
}
return event.data
}
}
}

5 changes: 4 additions & 1 deletion AffiseAttributionLib/Classes/utils/StringUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ public extension String {
return Foundation.URL(string: self)
}


func toJsonGuardString() -> String {
return self.replacingOccurrences(of: "\"", with: "\\\"")
}

var isBlank: Bool {
return allSatisfy { $0.isWhitespace }
}
}
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.29"
spec.version = ENV['LIB_VERSION'] || "1.6.30"
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.29"
s.version = ENV["LIB_VERSION"] || "1.6.30"
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 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.29"
spec.version = ENV['LIB_VERSION'] || "1.6.30"
spec.summary = "AffiseSKAdNetwork iOS library"
spec.description = "Affise library for StoreKit Ad Network (SKAdNetwork)"
spec.homepage = "https://github.com/affise/sdk-ios"
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

| Pod | Version |
| ---- |:-------:|
| `AffiseAttributionLib` | [`1.6.29`](https://github.com/CocoaPods/Specs/tree/master/Specs/a/9/3/AffiseAttributionLib) |
| `AffiseSKAdNetwork` | [`1.6.29`](https://github.com/CocoaPods/Specs/tree/master/Specs/3/6/f/AffiseSKAdNetwork) |
| `AffiseModule/Advertising` | [`1.6.29`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Status` | [`1.6.29`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseAttributionLib` | [`1.6.30`](https://github.com/CocoaPods/Specs/tree/master/Specs/a/9/3/AffiseAttributionLib) |
| `AffiseSKAdNetwork` | [`1.6.30`](https://github.com/CocoaPods/Specs/tree/master/Specs/3/6/f/AffiseSKAdNetwork) |
| `AffiseModule/Advertising` | [`1.6.30`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) |
| `AffiseModule/Status` | [`1.6.30`](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 @@ -76,20 +76,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.29'
pod 'AffiseAttributionLib', '~> 1.6.30'
# Affise modules
pod 'AffiseModule/Advertising', '~> 1.6.29'
pod 'AffiseModule/Status', '~> 1.6.29'
pod 'AffiseModule/Advertising', '~> 1.6.30'
pod 'AffiseModule/Status', '~> 1.6.30'
```

Get source directly from GitHub

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

### Integrate as Swift Package Manager
Expand Down Expand Up @@ -191,8 +191,8 @@ Affise
| Module | Version | Start |
| ------------- |:------------------------------------------------------------------------------------:|----------|
| `Advertising` | [`1.6.29`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Manual` |
| `Status` | [`1.6.29`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |
| `Advertising` | [`1.6.30`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Manual` |
| `Status` | [`1.6.30`](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 @@ -244,14 +244,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.29'
pod 'AffiseSKAdNetwork', '~> 1.6.30'
```

Get source directly from GitHub

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

For `swift` use:
Expand Down

0 comments on commit eab4878

Please sign in to comment.