Skip to content

Commit

Permalink
Merge pull request #4 from adjust/v104
Browse files Browse the repository at this point in the history
Version 1.0.4
  • Loading branch information
genadyb committed May 9, 2022
2 parents 4041505 + 4389534 commit 0c62699
Show file tree
Hide file tree
Showing 16 changed files with 162 additions and 11 deletions.
6 changes: 3 additions & 3 deletions AdjustAdobeExtension.podspec
@@ -1,15 +1,15 @@

Pod::Spec.new do |s|
s.name = 'AdjustAdobeExtension'
s.version = '1.0.3'
s.version = '1.0.4'
s.summary = 'Adjust SDK extension for Adobe Experience Platform.'
s.description = <<-DESC
A leading attribution solution that brings the full power of mobile ad measurement to your campaigns.
DESC
s.homepage = 'https://github.com/adjust/ios_adobe_extension'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Adjust SDK Team' => 'sdk@adjust.com' }
s.source = { :git => 'https://github.com/adjust/ios_adobe_extension.git', :tag => "v1.0.3" }
s.source = { :git => 'https://github.com/adjust/ios_adobe_extension.git', :tag => "v1.0.4" }

s.ios.deployment_target = '10.0'

Expand All @@ -19,6 +19,6 @@ A leading attribution solution that brings the full power of mobile ad measureme
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'}
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'}

s.dependency 'Adjust', '4.29.7'
s.dependency 'Adjust', '4.30.0'
s.dependency 'ACPCore'
end
6 changes: 6 additions & 0 deletions AdjustAdobeExtension/Classes/AdjustAdobeExtension.h
Expand Up @@ -9,8 +9,14 @@
#import <Foundation/Foundation.h>
#import <ACPCore/ACPCore.h>
#import <ACPCore/ACPExtension.h>
#if defined(__has_include) && __has_include(<Adjust/Adjust.h>)
#import <Adjust/Adjust.h>
#else
#import <Adjust.h>
#endif
#import "AdjustAdobeExtensionConfig.h"
#import "AdjustAdobeExtensionEventListener.h"
#import "AdjustAdobeExtensionSharedStateListener.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion AdjustAdobeExtension/Classes/AdjustAdobeExtension.m
Expand Up @@ -11,7 +11,7 @@
#import "AdjustAdobeExtensionEventListener.h"

NSString * const ADJAdobeExtensionLogTag = @"AdjustAdobeExtension";
NSString * const ADJAdobeExtensionSdkPrefix = @"adobe_ext1.0.3";
NSString * const ADJAdobeExtensionSdkPrefix = @"adobe_ext1.0.4";

NSString * const ADJAdobeAdjustEventToken = @"adj.eventToken";
NSString * const ADJAdobeAdjustEventCurrency = @"adj.currency";
Expand Down
5 changes: 5 additions & 0 deletions AdjustAdobeExtension/Classes/AdjustAdobeExtensionConfig.h
Expand Up @@ -7,7 +7,12 @@
//

#import <Foundation/Foundation.h>
#if defined(__has_include) && __has_include(<Adjust/Adjust.h>)
#import <Adjust/Adjust.h>
#else
#import <Adjust.h>
#endif


typedef void (^CallbackAttributionChangedBlock)(ADJAttribution * _Nullable attribution);
typedef BOOL (^CallbackDeeplinkResponseBlock)(NSURL * _Nullable deeplink);
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,12 @@
### Version 1.0.4 (9th May 2022)
#### Added
- Added Swift Package Manager support.

#### Native iOS SDK
- [iOS@v4.30.0](https://github.com/adjust/ios_sdk/tree/v4.30.0)

---

### Version 1.0.3 (25th February 2022)
#### Added
- Added Xcode 13 compatibility.
Expand Down
51 changes: 51 additions & 0 deletions Package.swift
@@ -0,0 +1,51 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "AdjustAdobeExtension",
platforms: [.iOS(.v10)],
products: [
.library(
name: "AdjustAdobeExtension",
targets: ["AdjustAdobeExtension"])
],
dependencies: [
.package(
name: "Adjust",
url: "https://github.com/adjust/ios_sdk.git",
from: "4.30.0"
),
],
targets: [
.target(
name: "AdjustAdobeExtension",
dependencies: ["Adjust","ACPCore","ACPIdentity","ACPLifecycle","ACPSignal"],
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("include/AdjustAdobeExtension")
]
),
.binaryTarget(
name: "ACPCore",
url: "https://github.com/adjust/ios_adobe_extension/releases/download/v1.0.4/ACPCore.xcframework-2.9.5.zip",
checksum: "1feb78e211bfc1d4e52e499323772f66c3eaab56434342465f7ee8a036a51fa9"
),
.binaryTarget(
name: "ACPIdentity",
url: "https://github.com/adjust/ios_adobe_extension/releases/download/v1.0.4/ACPIdentity.xcframework-2.5.2.zip",
checksum: "9a4843568ad0832e575dbecb2524265bbfd9baf2557bc972f78b4359d70f8bc0"
),
.binaryTarget(
name: "ACPLifecycle",
url: "https://github.com/adjust/ios_adobe_extension/releases/download/v1.0.4/ACPLifecycle.xcframework-2.2.1.zip",
checksum: "02d7b6a1c615d9f5b222d58a95a0ded1ce4b1dac60fbecc9858d9e8dcd74c2eb"
),
.binaryTarget(
name: "ACPSignal",
url: "https://github.com/adjust/ios_adobe_extension/releases/download/v1.0.4/ACPSignal.xcframework-2.2.0.zip",
checksum: "2f7c9db8e8163fe2c5aa3e89fce485075b32751e65402f10a69eea674dd965a5"
)
]
)
84 changes: 78 additions & 6 deletions README.md
Expand Up @@ -2,25 +2,57 @@

## <a id="sdk-add"></a>Add the Adjust Extension to your project

### <a id="sdk-add-cocoapods"></a>Cocoapods integration

If you're using [CocoaPods](http://cocoapods.org), add the following line to your `Podfile` and continue from [this step](#sdk-integrate):

```ruby
pod 'AdjustAdobeExtension'
```

### <a id="sdk-integrate"></a>Integrate the Adjust Extension into your app
### <a id="sdk-add-spm"></a>Swift Package Manager integration

If you are using Swift Package Manager, add Adjust Extension for Adobe Experience SDK using the following Github repo link:

```
https://github.com/adjust/ios_adobe_extension.git
```

Currently, Adjust Extension uses the latest version of Adobe Experience Platform SDKs [ACP SDKs](https://github.com/Adobe-Marketing-Cloud/acp-sdks).
Due to a missing SPM support in Adobe ACP SDKs, all required Adobe frameworks are part of Adjust Extension release.

In the `Frameworks, Libraries, and Embedded Content` section of your App target's `General` tab, add the following frameworks and libraries required for Adobe frameworks: `UIKit`, `SystemConfiguration`, `WebKit`, `UserNotifications`, `libsqlite3.0`, `libc++`, `libz`.

## <a id="sdk-frameworks"></a>Add iOS frameworks

Adjust SDK is able to get additional information in case you link additional iOS frameworks to your app. Please, add following frameworks in case you want to enable Adjust SDK features based on their presence in your app and mark them as optional:

If you added the Adjust SDK via a Pod repository, add the following import statement:
- `AdSupport.framework` - This framework is needed so that SDK can access to IDFA value and (prior to iOS 14) LAT information.
- `iAd.framework` - This framework is needed so that SDK can automatically handle attribution for ASA campaigns you might be running.
- `AdServices.framework` - For devices running iOS 14.3 or higher, this framework allows the SDK to automatically handle attribution for ASA campaigns. It is required when leveraging the Apple Ads Attribution API.
- `StoreKit.framework` - This framework is needed for access to `SKAdNetwork` framework and for Adjust SDK to handle communication with it automatically in iOS 14 or later.
- `AppTrackingTransparency.framework` - This framework is needed in iOS 14 and later for SDK to be able to wrap user's tracking consent dialog and access to value of the user's consent to be tracked or not.

## <a id="sdk-integrate"></a>Integrate the Adjust Extension into your app

Add the following import statement:

```objc
// Objective-C
#import <AdjustAdobeExtension/AdjustAdobeExtension.h>
```

### <a id="basic-setup"></a>Basic setup
```swift
// Swift
import AdjustAdobeExtension
```

## <a id="basic-setup"></a>Basic setup

You don't need to start the Adjust Adjust Extension manually. First, set the configuration in [Launch dashboard](https://launch.adobe.com/) and initialize `ACPCore`, then register the Adjust Extension:

```objc
// Objective-C
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ACPCore configureWithAppId:@"..."];

Expand All @@ -33,11 +65,28 @@ You don't need to start the Adjust Adjust Extension manually. First, set the con
}
```

#### Delegates callback
```swift
// Swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

ACPCore.configure(withAppId: "...")

// ...

if let config = AdjustAdobeExtensionConfig.init(environment: ADJEnvironmentSandbox) {
AdjustAdobeExtension.register(with: config)
}

return true
}
```

### <a id="delegates-callback"></a>Delegates callback

Optional: If you want to receive the attribution and deep link delegates callback, you can register for it in `AdjustAdobeExtensionConfig`:

```objc
// Objective-C
[config callbackDeeplinkResponse:^BOOL(NSURL * _Nullable deeplink) {
// deep link response received

Expand All @@ -52,18 +101,41 @@ Optional: If you want to receive the attribution and deep link delegates callbac
}];
```
### Tracking events
```swift
// Swift
config.callbackDeeplinkResponse { (deeplink : URL?) in
// deep link response received
// Apply your logic to determine whether the Adjust SDK should try to open the deep link
return true;
// or
// return false;
}
config.callbackAttributionChanged { (attribution : ADJAttribution?) in
// attribution response received
}
```

## <a id="tracking-events"></a>Tracking events

Any event (action or state) tracked using `ACPCore` is tracked by Adjust if it contains the `ADJAdobeAdjustEventCurrency` constant as a key:

```objc
// Objective-C
[ACPCore trackAction:@"TestAction" data:@{@"a": @"b", ADJAdobeAdjustEventToken: @"abc123"}];
[ACPCore trackState:@"TestState" data:@{@"a": @"b"}]; // will *not* be tracked by Adjust
```
```swift
// Swift
ACPCore.trackAction("TestAction", data: ["a": "b", ADJAdobeAdjustEventToken: "abc123"])
ACPCore.trackState("TestState", data: ["a": "b"]) // will *not* be tracked by Adjust
```

If the event contains the constants `ADJAdobeAdjustEventCurrency` and `ADJAdobeAdjustEventRevenue` as keys, the event is tracked with this information as well.

### Attribution
## <a id="attribution"></a>Attribution

The option to share attribution data with Adobe is in the Launch dashboard under the extensions configuration and is on by default. Adjust tracks the action name `Adjust Campaign Data Received` with the following attribution information from Adjust:

Expand Down
1 change: 1 addition & 0 deletions Sources/AdjustAdobeExtension/AdjustAdobeExtension.m
1 change: 1 addition & 0 deletions Sources/AdjustAdobeExtension/AdjustAdobeExtensionConfig.m
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
1.0.3
1.0.4

0 comments on commit 0c62699

Please sign in to comment.