Skip to content

Commit

Permalink
feat: upgraded to the latest version of appsflyer sdk and added suppo…
Browse files Browse the repository at this point in the history
…rt for new events
  • Loading branch information
Desu Sai Venkat committed Apr 19, 2023
1 parent ef17b38 commit fa9ddc7
Show file tree
Hide file tree
Showing 16 changed files with 630 additions and 229 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@ fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
IDEWorkspaceChecks.plist
*.DS_Store
*.DS_Store


RudderConfig.plist
7 changes: 1 addition & 6 deletions Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@ platform :ios, '10.0'
target 'Rudder-Appsflyer_Example' do
pod 'Rudder-Appsflyer', :path => '../'

target 'Rudder-Appsflyer_Tests' do
inherit! :search_paths

pod 'FBSnapshotTestCase'
end

post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end

end
end
32 changes: 12 additions & 20 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
PODS:
- AppsFlyerFramework (6.9.1):
- AppsFlyerFramework/Main (= 6.9.1)
- AppsFlyerFramework/Main (6.9.1)
- FBSnapshotTestCase (2.1.4):
- FBSnapshotTestCase/SwiftSupport (= 2.1.4)
- FBSnapshotTestCase/Core (2.1.4)
- FBSnapshotTestCase/SwiftSupport (2.1.4):
- FBSnapshotTestCase/Core
- Rudder (1.8.0)
- Rudder-Appsflyer (2.1.0):
- AppsFlyerFramework (~> 6.9.1)
- Rudder (~> 1.0)
- AppsFlyerFramework (6.10.1):
- AppsFlyerFramework/Main (= 6.10.1)
- AppsFlyerFramework/Main (6.10.1)
- Rudder (1.13.0)
- Rudder-Appsflyer (2.2.0):
- AppsFlyerFramework (~> 6.10)
- Rudder (~> 1.12)

DEPENDENCIES:
- FBSnapshotTestCase
- Rudder-Appsflyer (from `../`)

SPEC REPOS:
trunk:
- AppsFlyerFramework
- FBSnapshotTestCase
- Rudder

EXTERNAL SOURCES:
Rudder-Appsflyer:
:path: "../"

SPEC CHECKSUMS:
AppsFlyerFramework: dc9aa675faa8e1a2ed40fb295d3c5408ee2b972a
FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a
Rudder: 0a5272646aa3b89295526cea2bf54d092044848a
Rudder-Appsflyer: e1f26d1d24d3a9351c7079b3f9c87815680da426
AppsFlyerFramework: 88a6eed37ad52bcee4ad74232efa8e22809d06c9
Rudder: 840bf4dfd9816ce6a82cb8870f1a2d4a44ed2652
Rudder-Appsflyer: 94b945c1dff963d5e655719980453ccbb9c083eb

PODFILE CHECKSUM: 72f0e785b3e2e2c1b9276c5aee9c1558d47208ad
PODFILE CHECKSUM: 49c77f0049a9ff4b4e9202c3918c8ff06a57b815

COCOAPODS: 1.11.3
COCOAPODS: 1.12.0
138 changes: 66 additions & 72 deletions Example/Rudder-Appsflyer.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

116 changes: 106 additions & 10 deletions Example/Rudder-Appsflyer/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="whP-gf-Uak">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="whP-gf-Uak">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -14,18 +13,115 @@
<objects>
<viewController id="whP-gf-Uak" customClass="_ViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="uEw-UM-LJ8"/>
<viewControllerLayoutGuide type="bottom" id="Mvr-aV-6Um"/>
<viewControllerLayoutGuide type="top" id="pfD-am-Lp0"/>
<viewControllerLayoutGuide type="bottom" id="Phu-UQ-DyG"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="TpU-gO-2f1">
<view key="view" contentMode="scaleToFill" id="O5k-Ma-h47">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wR9-MF-RGY">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="k82-tg-rJc">
<rect key="frame" x="0.0" y="0.0" width="375" height="300"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="n5A-BR-TMi">
<rect key="frame" x="10" y="0.0" width="355" height="300"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mcy-ia-sr1">
<rect key="frame" x="0.0" y="0.0" width="355" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="xav-HZ-VaI"/>
</constraints>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="tinted" title="Identify without traits">
<fontDescription key="titleFontDescription" type="system" pointSize="14"/>
</buttonConfiguration>
<connections>
<action selector="onButtonTap:" destination="whP-gf-Uak" eventType="touchUpInside" id="ydB-y8-kcW"/>
</connections>
</button>
<button opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="92O-2f-dd1">
<rect key="frame" x="0.0" y="80" width="355" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="77i-iU-uO1"/>
</constraints>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="tinted" title="Identify with traits">
<fontDescription key="titleFontDescription" type="system" pointSize="14"/>
</buttonConfiguration>
<connections>
<action selector="onButtonTap:" destination="whP-gf-Uak" eventType="touchUpInside" id="0IM-SK-BVw"/>
</connections>
</button>
<button opaque="NO" tag="2" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gik-S1-7Os">
<rect key="frame" x="0.0" y="160" width="355" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="W1F-TJ-S7f"/>
</constraints>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="tinted" title="Custom Event name with properties">
<fontDescription key="titleFontDescription" type="system" pointSize="14"/>
</buttonConfiguration>
<connections>
<action selector="onButtonTap:" destination="whP-gf-Uak" eventType="touchUpInside" id="vIb-TX-p10"/>
</connections>
</button>
<button opaque="NO" tag="3" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Muo-Hm-mTL">
<rect key="frame" x="0.0" y="240" width="355" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="m9g-mh-zbR"/>
</constraints>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="tinted" title="Alias">
<fontDescription key="titleFontDescription" type="system" pointSize="14"/>
</buttonConfiguration>
<connections>
<action selector="onButtonTap:" destination="whP-gf-Uak" eventType="touchUpInside" id="Yd0-Fd-O41"/>
</connections>
</button>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="n5A-BR-TMi" firstAttribute="top" secondItem="k82-tg-rJc" secondAttribute="top" id="2d4-00-IPw"/>
<constraint firstItem="n5A-BR-TMi" firstAttribute="leading" secondItem="k82-tg-rJc" secondAttribute="leading" constant="10" id="mLk-RQ-bWQ"/>
<constraint firstAttribute="trailing" secondItem="n5A-BR-TMi" secondAttribute="trailing" constant="10" id="tAB-dN-iJI"/>
<constraint firstAttribute="bottom" secondItem="n5A-BR-TMi" secondAttribute="bottom" id="uCi-JG-p7Z"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="k82-tg-rJc" firstAttribute="top" secondItem="wR9-MF-RGY" secondAttribute="top" id="T5I-FI-CTv"/>
<constraint firstItem="k82-tg-rJc" firstAttribute="leading" secondItem="wR9-MF-RGY" secondAttribute="leading" id="U2L-JG-0yX"/>
<constraint firstAttribute="trailing" secondItem="k82-tg-rJc" secondAttribute="trailing" id="b4e-O3-Rv2"/>
<constraint firstAttribute="bottom" secondItem="k82-tg-rJc" secondAttribute="bottom" id="fbi-wV-fXw"/>
<constraint firstItem="k82-tg-rJc" firstAttribute="width" secondItem="wR9-MF-RGY" secondAttribute="width" id="ksM-4K-dzA"/>
</constraints>
<viewLayoutGuide key="contentLayoutGuide" id="H6d-Of-ttT"/>
<viewLayoutGuide key="frameLayoutGuide" id="bCS-o8-mXD"/>
</scrollView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="wR9-MF-RGY" firstAttribute="width" secondItem="O5k-Ma-h47" secondAttribute="width" id="AaM-VN-7UD"/>
<constraint firstAttribute="trailing" secondItem="wR9-MF-RGY" secondAttribute="trailing" id="CTe-bV-6yo"/>
<constraint firstItem="Phu-UQ-DyG" firstAttribute="top" secondItem="wR9-MF-RGY" secondAttribute="bottom" id="gAd-IX-14K"/>
<constraint firstItem="wR9-MF-RGY" firstAttribute="leading" secondItem="O5k-Ma-h47" secondAttribute="leading" id="hYs-37-qtf"/>
<constraint firstItem="wR9-MF-RGY" firstAttribute="top" secondItem="pfD-am-Lp0" secondAttribute="bottom" id="vdZ-up-iC6"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="305" y="433"/>
<point key="canvasLocation" x="304.80000000000001" y="432.23388305847078"/>
</scene>
</scenes>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
2 changes: 2 additions & 0 deletions Example/Rudder-Appsflyer/Rudder-Appsflyer-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSUserTrackingUsageDescription</key>
<string>Allow app to track your actions ?</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//

27 changes: 27 additions & 0 deletions Example/Rudder-Appsflyer/RudderConfig/RudderConfig.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// RudderConfig.swift
// Rudder-Appsflyer
//
// Created by Desu Sai Venkat on 12/04/23.
//
import Foundation

@objc
class RudderConfig: NSObject, Codable {
@objc let WRITE_KEY: String
@objc let PROD_DATA_PLANE_URL: String
@objc let PROD_CONTROL_PLANE_URL: String
@objc let LOCAL_DATA_PLANE_URL: String
@objc let LOCAL_CONTROL_PLANE_URL: String
@objc let DEV_DATA_PLANE_URL: String
@objc let DEV_CONTROL_PLANE_URL: String

@objc
class func create(from url: URL) -> RudderConfig? {
if let data = try? Data(contentsOf: url),
let rudderConfig = try? PropertyListDecoder().decode(RudderConfig.self, from: data) {
return rudderConfig
}
return nil
}
}
27 changes: 27 additions & 0 deletions Example/Rudder-Appsflyer/RudderConfig/SampleRudderConfig.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
SampleRudderConfig.plist
Rudder-Appsflyer
Created by Desu Sai Venkat on 13/04/23.
Copyright (c) 2023 arnabp92. All rights reserved.
-->
<plist version="1.0">
<dict>
<key>WRITE_KEY</key>
<string></string>
<key>PROD_DATA_PLANE_URL</key>
<string></string>
<key>PROD_CONTROL_PLANE_URL</key>
<string></string>
<key>LOCAL_DATA_PLANE_URL</key>
<string></string>
<key>LOCAL_CONTROL_PLANE_URL</key>
<string></string>
<key>DEV_DATA_PLANE_URL</key>
<string></string>
<key>DEV_CONTROL_PLANE_URL</key>
<string></string>
</dict>
</plist>
Loading

0 comments on commit fa9ddc7

Please sign in to comment.