Skip to content

Commit

Permalink
fix for actions and test app
Browse files Browse the repository at this point in the history
  • Loading branch information
morisgateno-appsflyer committed Aug 20, 2024
1 parent 474c00e commit 2005a8f
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 98 deletions.
4 changes: 2 additions & 2 deletions .github/bash_scripts/pre_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ mv segment-appsflyer-ios.podspec segment-appsflyer-ios-qa.podspec

sed -r -i '' "s/(.*AppsFlyerLib.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerLibVersion\3/g" Package.swift

sed -r -i '' "s/(.*pod \'segment-appsflyer-ios)\'(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1\',\'$rcVersion\'/g" examples/SwiftPodsSample/Podfile
sed -r -i '' "s/(.*pod \'segment-appsflyer-ios)\'(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1\',\'$rcVersion\'/g" examples/ObjcPodsSample/Podfile
sed -r -i '' "s/(.*pod \'segment-appsflyer-ios)\'(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1-qa\',\'$rcVersion\'/g" examples/SwiftPodsSample/Podfile
sed -r -i '' "s/(.*pod \'segment-appsflyer-ios)\'(.*\'[0-9]+\.[0-9]+\.[0-9]+\')/\1-qa\',\'$rcVersion\'/g" examples/ObjcPodsSample/Podfile

sed -r -i '' "s/(## This is a Segment wrapper for AppsFlyer SDK that is built with iOS SDK v)(.*)/\1$appsflyerLibVersion./g" README.md
sed -r -i '' "s/(.*pod \'segment-appsflyer-ios.*)([0-9]+\.[0-9]+\.[0-9]+)(.*)/\1$appsflyerLibVersion\3/g" README.md
Expand Down
32 changes: 25 additions & 7 deletions examples/SwiftPodsSample/SwiftPodsSample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
954064F38BF10350BB5B1DAC /* Pods_SwiftPodsSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D615F2D019A120C8773288D /* Pods_SwiftPodsSample.framework */; };
9D29F71F24E4081F007A929A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D29F71E24E4081F007A929A /* AppDelegate.swift */; };
9D29F72124E4081F007A929A /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D29F72024E4081F007A929A /* SceneDelegate.swift */; };
9D29F72324E4081F007A929A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D29F72224E4081F007A929A /* ViewController.swift */; };
9D29F72624E4081F007A929A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9D29F72424E4081F007A929A /* Main.storyboard */; };
9D29F72824E40820007A929A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9D29F72724E40820007A929A /* Assets.xcassets */; };
Expand All @@ -20,14 +19,14 @@
2D615F2D019A120C8773288D /* Pods_SwiftPodsSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftPodsSample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9D29F71B24E4081F007A929A /* SwiftPodsSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftPodsSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
9D29F71E24E4081F007A929A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
9D29F72024E4081F007A929A /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
9D29F72224E4081F007A929A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
9D29F72524E4081F007A929A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
9D29F72724E40820007A929A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
9D29F72A24E40820007A929A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
9D29F72C24E40820007A929A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9D29F73324E40AE9007A929A /* SwiftPodsSample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwiftPodsSample-Bridging-Header.h"; sourceTree = "<group>"; };
9F10C505DB27305DDC0B3EDD /* Pods-SwiftPodsSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftPodsSample.release.xcconfig"; path = "Target Support Files/Pods-SwiftPodsSample/Pods-SwiftPodsSample.release.xcconfig"; sourceTree = "<group>"; };
B3619ED32C74A6770067E195 /* SwiftPodsSample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SwiftPodsSample.entitlements; sourceTree = "<group>"; };
D55B32FE162D54FD3F59944C /* Pods-SwiftPodsSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftPodsSample.debug.xcconfig"; path = "Target Support Files/Pods-SwiftPodsSample/Pods-SwiftPodsSample.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -73,9 +72,9 @@
9D29F71D24E4081F007A929A /* SwiftPodsSample */ = {
isa = PBXGroup;
children = (
B3619ED32C74A6770067E195 /* SwiftPodsSample.entitlements */,
9D29F73324E40AE9007A929A /* SwiftPodsSample-Bridging-Header.h */,
9D29F71E24E4081F007A929A /* AppDelegate.swift */,
9D29F72024E4081F007A929A /* SceneDelegate.swift */,
9D29F72224E4081F007A929A /* ViewController.swift */,
9D29F72424E4081F007A929A /* Main.storyboard */,
9D29F72724E40820007A929A /* Assets.xcassets */,
Expand Down Expand Up @@ -105,6 +104,7 @@
9D29F71824E4081F007A929A /* Frameworks */,
9D29F71924E4081F007A929A /* Resources */,
F6332A18B9239844E271B4AD /* [CP] Embed Pods Frameworks */,
AE2D77C364B498651EBB1DB7 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -183,6 +183,23 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
AE2D77C364B498651EBB1DB7 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-SwiftPodsSample/Pods-SwiftPodsSample-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-SwiftPodsSample/Pods-SwiftPodsSample-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwiftPodsSample/Pods-SwiftPodsSample-resources.sh\"\n";
showEnvVarsInLog = 0;
};
F6332A18B9239844E271B4AD /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -209,7 +226,6 @@
files = (
9D29F72324E4081F007A929A /* ViewController.swift in Sources */,
9D29F71F24E4081F007A929A /* AppDelegate.swift in Sources */,
9D29F72124E4081F007A929A /* SceneDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -357,14 +373,15 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = SwiftPodsSample/SwiftPodsSample.entitlements;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 6UQAD4B3U2;
INFOPLIST_FILE = SwiftPodsSample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.appsflyer.SwiftPodsSample;
PRODUCT_BUNDLE_IDENTIFIER = com.appsflyer.SwiftPodsSampleMoris;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "SwiftPodsSample/SwiftPodsSample-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand All @@ -378,14 +395,15 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = SwiftPodsSample/SwiftPodsSample.entitlements;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 6UQAD4B3U2;
INFOPLIST_FILE = SwiftPodsSample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.appsflyer.SwiftPodsSample;
PRODUCT_BUNDLE_IDENTIFIER = com.appsflyer.SwiftPodsSampleMoris;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "SwiftPodsSample/SwiftPodsSample-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
23 changes: 8 additions & 15 deletions examples/SwiftPodsSample/SwiftPodsSample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import AppTrackingTransparency

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

// For AppsFLyer debug logs uncomment the line below
Expand Down Expand Up @@ -51,24 +51,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}

// For Swift version < 4.2 replace function signature with the commented out code
// func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool { // this line for Swift < 4.2
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
AppsFlyerLib.shared().continue(userActivity, restorationHandler: nil)
return true
}

func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
AppsFlyerLib.shared().continue(userActivity, restorationHandler: restorationHandler)
return true
AppsFlyerLib.shared().continue(userActivity, restorationHandler: nil)
return true
}

func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
AppsFlyerLib.shared().handleOpen(url, sourceApplication: sourceApplication, withAnnotation: annotation)
return true
}

// Open URI-scheme for iOS 9 and above
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
AppsFlyerLib.shared().handleOpen(url, options: options)
return true
AppsFlyerLib.shared().handleOpen(url, options: options)
return true
}
}

Expand Down
23 changes: 2 additions & 21 deletions examples/SwiftPodsSample/SwiftPodsSample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!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>This will allow us to collect your IDFA</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand All @@ -22,25 +20,8 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>NSUserTrackingUsageDescription</key>
<string>This will allow us to collect your IDFA</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
52 changes: 0 additions & 52 deletions examples/SwiftPodsSample/SwiftPodsSample/SceneDelegate.swift

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?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">
<plist version="1.0">
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:sample-app-for-segment.onelink.me</string>
</array>
</dict>
</plist>
13 changes: 13 additions & 0 deletions examples/SwiftPodsSample/SwiftPodsSample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
//Looks for single or multiple taps.
let tap = UITapGestureRecognizer(target: self, action: #selector(UIInputViewController.dismissKeyboard))

//Uncomment the line below if you want the tap not not interfere and cancel other interactions.
//tap.cancelsTouchesInView = false

view.addGestureRecognizer(tap)
}

//MARK:- IBActions
Expand All @@ -36,5 +43,11 @@ class ViewController: UIViewController {

}

//Calls this function when the tap is recognized.
@objc func dismissKeyboard() {
//Causes the view (or one of its embedded text fields) to resign the first responder status.
view.endEditing(true)
}

}

Loading

0 comments on commit 2005a8f

Please sign in to comment.