76 files added
5 files modified
| | |
| | | Pod::Spec.new do |s| |
| | | |
| | | s.name = 'WAAfImpl' |
| | | s.version = '3.9.3' |
| | | s.version = '3.9.7' |
| | | s.summary = 'WAAfImpl framework in production environment.' |
| | | s.license = 'MIT' |
| | | s.author = { "Wuyx" => "wuyixin_gh@gamehollywood.com" } |
| | |
| | | s.platform = :ios |
| | | s.ios.deployment_target = "7.0" |
| | | s.frameworks = "AdSupport", "iAd" |
| | | s.vendored_frameworks = 'frameworks/*.framework' |
| | | s.vendored_frameworks = 'frameworks/*' |
| | | s.resources = ['config/*.xml'] |
| | | s.requires_arc = true |
| | | s.dependency 'WASdkIntf' |
New file |
| | |
| | | # |
| | | # Be sure to run `pod spec lint WAAfImpl.podspec' to ensure this is a |
| | | # valid spec and to remove all comments including this before submitting the spec. |
| | | # |
| | | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html |
| | | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ |
| | | # |
| | | |
| | | Pod::Spec.new do |s| |
| | | |
| | | s.name = 'WAAfImpl' |
| | | s.version = '3.9.7' |
| | | s.summary = 'WAAfImpl framework in production environment.' |
| | | s.license = 'MIT' |
| | | s.author = { "Wuyx" => "wuyixin_gh@gamehollywood.com" } |
| | | s.homepage = 'http://repo.wingsdk.cn:8082/summary/WAAfImpl.git' |
| | | s.source = { :git => "http://admin@repo.wingsdk.cn:8082/r/WAAfImpl.git" , :tag => s.version} |
| | | s.platform = :ios |
| | | s.ios.deployment_target = "7.0" |
| | | s.frameworks = "AdSupport", "iAd" |
| | | s.vendored_frameworks = 'frameworks/*' |
| | | s.resources = ['config/*.xml'] |
| | | s.requires_arc = true |
| | | s.dependency 'WASdkIntf' |
| | | s.dependency 'WASdkImpl' |
| | | end |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <config> |
| | | <version val="AF3.9.3"/> |
| | | <version val="AF3.9.7"/> |
| | | <comps> |
| | | <!-- 数据收集模块 --> |
| | | <comp module="TRA" plaf="APPSFLYER" mandatory="YES" value="WAAFTrack" desc="APPSFLYER数据统计"/> |
New file |
| | |
| | | <?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>AvailableLibraries</key> |
| | | <array> |
| | | <dict> |
| | | <key>LibraryIdentifier</key> |
| | | <string>ios-arm64_armv7</string> |
| | | <key>LibraryPath</key> |
| | | <string>AppsFlyerLib.framework</string> |
| | | <key>SupportedArchitectures</key> |
| | | <array> |
| | | <string>arm64</string> |
| | | <string>armv7</string> |
| | | </array> |
| | | <key>SupportedPlatform</key> |
| | | <string>ios</string> |
| | | </dict> |
| | | <dict> |
| | | <key>LibraryIdentifier</key> |
| | | <string>tvos-arm64_x86_64-simulator</string> |
| | | <key>LibraryPath</key> |
| | | <string>AppsFlyerLib.framework</string> |
| | | <key>SupportedArchitectures</key> |
| | | <array> |
| | | <string>arm64</string> |
| | | <string>x86_64</string> |
| | | </array> |
| | | <key>SupportedPlatform</key> |
| | | <string>tvos</string> |
| | | <key>SupportedPlatformVariant</key> |
| | | <string>simulator</string> |
| | | </dict> |
| | | <dict> |
| | | <key>LibraryIdentifier</key> |
| | | <string>macos-arm64_x86_64</string> |
| | | <key>LibraryPath</key> |
| | | <string>AppsFlyerLib.framework</string> |
| | | <key>SupportedArchitectures</key> |
| | | <array> |
| | | <string>arm64</string> |
| | | <string>x86_64</string> |
| | | </array> |
| | | <key>SupportedPlatform</key> |
| | | <string>macos</string> |
| | | </dict> |
| | | <dict> |
| | | <key>LibraryIdentifier</key> |
| | | <string>ios-arm64_i386_x86_64-simulator</string> |
| | | <key>LibraryPath</key> |
| | | <string>AppsFlyerLib.framework</string> |
| | | <key>SupportedArchitectures</key> |
| | | <array> |
| | | <string>arm64</string> |
| | | <string>i386</string> |
| | | <string>x86_64</string> |
| | | </array> |
| | | <key>SupportedPlatform</key> |
| | | <string>ios</string> |
| | | <key>SupportedPlatformVariant</key> |
| | | <string>simulator</string> |
| | | </dict> |
| | | <dict> |
| | | <key>LibraryIdentifier</key> |
| | | <string>ios-arm64_x86_64-maccatalyst</string> |
| | | <key>LibraryPath</key> |
| | | <string>AppsFlyerLib.framework</string> |
| | | <key>SupportedArchitectures</key> |
| | | <array> |
| | | <string>arm64</string> |
| | | <string>x86_64</string> |
| | | </array> |
| | | <key>SupportedPlatform</key> |
| | | <string>ios</string> |
| | | <key>SupportedPlatformVariant</key> |
| | | <string>maccatalyst</string> |
| | | </dict> |
| | | <dict> |
| | | <key>LibraryIdentifier</key> |
| | | <string>tvos-arm64</string> |
| | | <key>LibraryPath</key> |
| | | <string>AppsFlyerLib.framework</string> |
| | | <key>SupportedArchitectures</key> |
| | | <array> |
| | | <string>arm64</string> |
| | | </array> |
| | | <key>SupportedPlatform</key> |
| | | <string>tvos</string> |
| | | </dict> |
| | | </array> |
| | | <key>CFBundlePackageType</key> |
| | | <string>XFWK</string> |
| | | <key>XCFrameworkFormatVersion</key> |
| | | <string>1.0</string> |
| | | </dict> |
| | | </plist> |
New file |
| | |
| | | // |
| | | // CrossPromotionHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | AppsFlyer allows you to log and attribute installs originating |
| | | from cross promotion campaigns of your existing apps. |
| | | Afterwards, you can optimize on your cross-promotion traffic to get even better results. |
| | | */ |
| | | @interface AppsFlyerCrossPromotionHelper : NSObject |
| | | |
| | | /** |
| | | To log an impression use the following API call. |
| | | Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard. |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | */ |
| | | + (void)logCrossPromoteImpression:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | /** |
| | | iOS allows you to utilize the StoreKit component to open |
| | | the App Store while remaining in the context of your app. |
| | | More details at https://support.appsflyer.com/hc/en-us/articles/115004481946-Cross-Promotion-Tracking#tracking-cross-promotion-impressions |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | @param openStoreBlock Contains promoted `clickURL` |
| | | */ |
| | | + (void)logAndOpenStore:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters |
| | | openStore:(void (^)(NSURLSession *urlSession, NSURL *clickURL))openStoreBlock; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplink.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | NS_SWIFT_NAME(DeepLink) |
| | | @interface AppsFlyerDeepLink : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property (readonly, nonnull) NSDictionary<NSString *, id> *clickEvent; |
| | | @property (readonly, nullable) NSString *deeplinkValue; |
| | | @property (readonly, nullable) NSString *matchType; |
| | | @property (readonly, nullable) NSString *clickHTTPReferrer; |
| | | @property (readonly, nullable) NSString *mediaSource; |
| | | @property (readonly, nullable) NSString *campaign; |
| | | @property (readonly, nullable) NSString *campaignId; |
| | | @property (readonly, nullable) NSString *afSub1; |
| | | @property (readonly, nullable) NSString *afSub2; |
| | | @property (readonly, nullable) NSString *afSub3; |
| | | @property (readonly, nullable) NSString *afSub4; |
| | | @property (readonly, nullable) NSString *afSub5; |
| | | @property (readonly) BOOL isDeferred; |
| | | |
| | | - (NSString *)toString; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplinkResult.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | @class AppsFlyerDeepLink; |
| | | |
| | | typedef NS_CLOSED_ENUM(NSUInteger, AFSDKDeepLinkResultStatus) { |
| | | AFSDKDeepLinkResultStatusNotFound, |
| | | AFSDKDeepLinkResultStatusFound, |
| | | AFSDKDeepLinkResultStatusFailure, |
| | | } NS_SWIFT_NAME(DeepLinkResultStatus); |
| | | |
| | | NS_SWIFT_NAME(DeepLinkResult) |
| | | @interface AppsFlyerDeepLinkResult : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(readonly) AFSDKDeepLinkResultStatus status; |
| | | |
| | | @property(readonly, nullable) AppsFlyerDeepLink *deepLink; |
| | | @property(readonly, nullable) NSError *error; |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // AppsFlyerLib.h |
| | | // AppsFlyerLib |
| | | // |
| | | // AppsFlyer iOS SDK 6.5.1 (51) |
| | | // Copyright (c) 2012-2020 AppsFlyer Ltd. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | #import "AppsFlyerCrossPromotionHelper.h" |
| | | #import "AppsFlyerShareInviteHelper.h" |
| | | #import "AppsFlyerDeepLinkResult.h" |
| | | #import "AppsFlyerDeepLink.h" |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | // In app event names constants |
| | | #define AFEventLevelAchieved @"af_level_achieved" |
| | | #define AFEventAddPaymentInfo @"af_add_payment_info" |
| | | #define AFEventAddToCart @"af_add_to_cart" |
| | | #define AFEventAddToWishlist @"af_add_to_wishlist" |
| | | #define AFEventCompleteRegistration @"af_complete_registration" |
| | | #define AFEventTutorial_completion @"af_tutorial_completion" |
| | | #define AFEventInitiatedCheckout @"af_initiated_checkout" |
| | | #define AFEventPurchase @"af_purchase" |
| | | #define AFEventRate @"af_rate" |
| | | #define AFEventSearch @"af_search" |
| | | #define AFEventSpentCredits @"af_spent_credits" |
| | | #define AFEventAchievementUnlocked @"af_achievement_unlocked" |
| | | #define AFEventContentView @"af_content_view" |
| | | #define AFEventListView @"af_list_view" |
| | | #define AFEventTravelBooking @"af_travel_booking" |
| | | #define AFEventShare @"af_share" |
| | | #define AFEventInvite @"af_invite" |
| | | #define AFEventLogin @"af_login" |
| | | #define AFEventReEngage @"af_re_engage" |
| | | #define AFEventUpdate @"af_update" |
| | | #define AFEventOpenedFromPushNotification @"af_opened_from_push_notification" |
| | | #define AFEventLocation @"af_location_coordinates" |
| | | #define AFEventCustomerSegment @"af_customer_segment" |
| | | |
| | | #define AFEventSubscribe @"af_subscribe" |
| | | #define AFEventStartTrial @"af_start_trial" |
| | | #define AFEventAdClick @"af_ad_click" |
| | | #define AFEventAdView @"af_ad_view" |
| | | |
| | | // In app event parameter names |
| | | #define AFEventParamContent @"af_content" |
| | | #define AFEventParamAchievementId @"af_achievement_id" |
| | | #define AFEventParamLevel @"af_level" |
| | | #define AFEventParamScore @"af_score" |
| | | #define AFEventParamSuccess @"af_success" |
| | | #define AFEventParamPrice @"af_price" |
| | | #define AFEventParamContentType @"af_content_type" |
| | | #define AFEventParamContentId @"af_content_id" |
| | | #define AFEventParamContentList @"af_content_list" |
| | | #define AFEventParamCurrency @"af_currency" |
| | | #define AFEventParamQuantity @"af_quantity" |
| | | #define AFEventParamRegistrationMethod @"af_registration_method" |
| | | #define AFEventParamPaymentInfoAvailable @"af_payment_info_available" |
| | | #define AFEventParamMaxRatingValue @"af_max_rating_value" |
| | | #define AFEventParamRatingValue @"af_rating_value" |
| | | #define AFEventParamSearchString @"af_search_string" |
| | | #define AFEventParamDateA @"af_date_a" |
| | | #define AFEventParamDateB @"af_date_b" |
| | | #define AFEventParamDestinationA @"af_destination_a" |
| | | #define AFEventParamDestinationB @"af_destination_b" |
| | | #define AFEventParamDescription @"af_description" |
| | | #define AFEventParamClass @"af_class" |
| | | #define AFEventParamEventStart @"af_event_start" |
| | | #define AFEventParamEventEnd @"af_event_end" |
| | | #define AFEventParamLat @"af_lat" |
| | | #define AFEventParamLong @"af_long" |
| | | #define AFEventParamCustomerUserId @"af_customer_user_id" |
| | | #define AFEventParamValidated @"af_validated" |
| | | #define AFEventParamRevenue @"af_revenue" |
| | | #define AFEventProjectedParamRevenue @"af_projected_revenue" |
| | | #define AFEventParamReceiptId @"af_receipt_id" |
| | | #define AFEventParamTutorialId @"af_tutorial_id" |
| | | #define AFEventParamVirtualCurrencyName @"af_virtual_currency_name" |
| | | #define AFEventParamDeepLink @"af_deep_link" |
| | | #define AFEventParamOldVersion @"af_old_version" |
| | | #define AFEventParamNewVersion @"af_new_version" |
| | | #define AFEventParamReviewText @"af_review_text" |
| | | #define AFEventParamCouponCode @"af_coupon_code" |
| | | #define AFEventParamOrderId @"af_order_id" |
| | | #define AFEventParam1 @"af_param_1" |
| | | #define AFEventParam2 @"af_param_2" |
| | | #define AFEventParam3 @"af_param_3" |
| | | #define AFEventParam4 @"af_param_4" |
| | | #define AFEventParam5 @"af_param_5" |
| | | #define AFEventParam6 @"af_param_6" |
| | | #define AFEventParam7 @"af_param_7" |
| | | #define AFEventParam8 @"af_param_8" |
| | | #define AFEventParam9 @"af_param_9" |
| | | #define AFEventParam10 @"af_param_10" |
| | | |
| | | #define AFEventParamDepartingDepartureDate @"af_departing_departure_date" |
| | | #define AFEventParamReturningDepartureDate @"af_returning_departure_date" |
| | | #define AFEventParamDestinationList @"af_destination_list" //array of string |
| | | #define AFEventParamCity @"af_city" |
| | | #define AFEventParamRegion @"af_region" |
| | | #define AFEventParamCountry @"af_country" |
| | | |
| | | |
| | | #define AFEventParamDepartingArrivalDate @"af_departing_arrival_date" |
| | | #define AFEventParamReturningArrivalDate @"af_returning_arrival_date" |
| | | #define AFEventParamSuggestedDestinations @"af_suggested_destinations" //array of string |
| | | #define AFEventParamTravelStart @"af_travel_start" |
| | | #define AFEventParamTravelEnd @"af_travel_end" |
| | | #define AFEventParamNumAdults @"af_num_adults" |
| | | #define AFEventParamNumChildren @"af_num_children" |
| | | #define AFEventParamNumInfants @"af_num_infants" |
| | | #define AFEventParamSuggestedHotels @"af_suggested_hotels" //array of string |
| | | |
| | | #define AFEventParamUserScore @"af_user_score" |
| | | #define AFEventParamHotelScore @"af_hotel_score" |
| | | #define AFEventParamPurchaseCurrency @"af_purchase_currency" |
| | | |
| | | #define AFEventParamPreferredStarRatings @"af_preferred_star_ratings" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | |
| | | #define AFEventParamPreferredPriceRange @"af_preferred_price_range" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | #define AFEventParamPreferredNeighborhoods @"af_preferred_neighborhoods" //array of string |
| | | #define AFEventParamPreferredNumStops @"af_preferred_num_stops" |
| | | |
| | | #define AFEventParamAdRevenueAdType @"af_adrev_ad_type" |
| | | #define AFEventParamAdRevenueNetworkName @"af_adrev_network_name" |
| | | #define AFEventParamAdRevenuePlacementId @"af_adrev_placement_id" |
| | | #define AFEventParamAdRevenueAdSize @"af_adrev_ad_size" |
| | | #define AFEventParamAdRevenueMediatedNetworkName @"af_adrev_mediated_network_name" |
| | | |
| | | /// Mail hashing type |
| | | typedef enum { |
| | | /// None |
| | | EmailCryptTypeNone = 0, |
| | | /// SHA1 |
| | | EmailCryptTypeSHA1 = 1, |
| | | /// MD5 |
| | | EmailCryptTypeMD5 = 2, |
| | | /// SHA256 |
| | | EmailCryptTypeSHA256 = 3 |
| | | } EmailCryptType; |
| | | |
| | | NS_SWIFT_NAME(DeepLinkDelegate) |
| | | @protocol AppsFlyerDeepLinkDelegate <NSObject> |
| | | |
| | | @optional |
| | | - (void)didResolveDeepLink:(AppsFlyerDeepLinkResult *_Nonnull)result; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | Conform and subscribe to this protocol to allow getting data about conversion and |
| | | install attribution |
| | | */ |
| | | @protocol AppsFlyerLibDelegate <NSObject> |
| | | |
| | | /** |
| | | `conversionInfo` contains information about install. |
| | | Organic/non-organic, etc. |
| | | @param conversionInfo May contain <code>null</code> values for some keys. Please handle this case. |
| | | */ |
| | | - (void)onConversionDataSuccess:(NSDictionary *)conversionInfo; |
| | | |
| | | /** |
| | | Any errors that occurred during the conversion request. |
| | | */ |
| | | - (void)onConversionDataFail:(NSError *)error; |
| | | |
| | | @optional |
| | | |
| | | /** |
| | | `attributionData` contains information about OneLink, deeplink. |
| | | */ |
| | | - (void)onAppOpenAttribution:(NSDictionary *)attributionData; |
| | | |
| | | /** |
| | | Any errors that occurred during the attribution request. |
| | | */ |
| | | - (void)onAppOpenAttributionFailure:(NSError *)error; |
| | | |
| | | /** |
| | | @abstract Sets the HTTP header fields of the ESP resolving to the given |
| | | dictionary. |
| | | @discussion This method replaces all header fields that may have |
| | | existed before this method ESP resolving call. |
| | | To keep default SDK behavior - return nil; |
| | | */ |
| | | - (NSDictionary <NSString *, NSString *> * _Nullable)allHTTPHeaderFieldsForResolveDeepLinkURL:(NSURL *)URL; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | You can log installs, app updates, sessions and additional in-app events |
| | | (including in-app purchases, game levels, etc.) |
| | | to evaluate ROI and user engagement. |
| | | The iOS SDK is compatible with all iOS/tvOS devices with iOS version 7 and above. |
| | | |
| | | @see [SDK Integration Validator](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS) |
| | | for more information. |
| | | |
| | | */ |
| | | @interface AppsFlyerLib : NSObject |
| | | |
| | | /** |
| | | Gets the singleton instance of the AppsFlyerLib class, creating it if |
| | | necessary. |
| | | |
| | | @return The singleton instance of AppsFlyerLib. |
| | | */ |
| | | + (AppsFlyerLib *)shared; |
| | | |
| | | /** |
| | | In case you use your own user ID in your app, you can set this property to that ID. |
| | | Enables you to cross-reference your own unique ID with AppsFlyer’s unique ID and the other devices’ IDs |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString * customerUserID; |
| | | |
| | | /** |
| | | In case you use custom data and you want to receive it in the raw reports. |
| | | |
| | | @see [Setting additional custom data](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS#setting-additional-custom-data) for more information. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAdditionalData:) NSDictionary * customData; |
| | | |
| | | /** |
| | | Use this property to set your AppsFlyer's dev key |
| | | */ |
| | | @property(nonatomic, strong) NSString * appsFlyerDevKey; |
| | | |
| | | /** |
| | | Use this property to set your app's Apple ID(taken from the app's page on iTunes Connect) |
| | | */ |
| | | @property(nonatomic, strong) NSString * appleAppID; |
| | | |
| | | #ifndef AFSDK_NO_IDFA |
| | | /** |
| | | AppsFlyer SDK collect Apple's `advertisingIdentifier` if the `AdSupport.framework` included in the SDK. |
| | | You can disable this behavior by setting the following property to YES |
| | | */ |
| | | @property(nonatomic) BOOL disableAdvertisingIdentifier; |
| | | |
| | | @property(nonatomic, strong, readonly) NSString *advertisingIdentifier; |
| | | |
| | | /** |
| | | Waits for request user authorization to access app-related data |
| | | */ |
| | | - (void)waitForATTUserAuthorizationWithTimeoutInterval:(NSTimeInterval)timeoutInterval |
| | | NS_SWIFT_NAME(waitForATTUserAuthorization(timeoutInterval:)); |
| | | |
| | | #endif |
| | | |
| | | @property(nonatomic) BOOL disableSKAdNetwork; |
| | | |
| | | /** |
| | | In case of in app purchase events, you can set the currency code your user has purchased with. |
| | | The currency code is a 3 letter code according to ISO standards |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrencyCode:@"USD"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currencyCode = "USD" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString *currencyCode; |
| | | |
| | | /** |
| | | Prints SDK messages to the console log. This property should only be used in `DEBUG` mode. |
| | | The default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL isDebug; |
| | | |
| | | /** |
| | | Set this flag to `YES`, to collect the current device name(e.g. "My iPhone"). Default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL shouldCollectDeviceName; |
| | | |
| | | /** |
| | | Set your `OneLink ID` from OneLink configuration. Used in User Invites to generate a OneLink. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAppInviteOneLink:) NSString * appInviteOneLinkID; |
| | | |
| | | /** |
| | | Opt-out logging for specific user |
| | | */ |
| | | @property(atomic) BOOL anonymizeUser; |
| | | |
| | | /** |
| | | Opt-out for Apple Search Ads attributions |
| | | */ |
| | | @property(atomic) BOOL disableCollectASA; |
| | | |
| | | @property(nonatomic) BOOL disableAppleAdsAttribution; |
| | | |
| | | /** |
| | | AppsFlyer delegate. See `AppsFlyerLibDelegate` |
| | | */ |
| | | @property(weak, nonatomic) id<AppsFlyerLibDelegate> delegate; |
| | | |
| | | @property(weak, nonatomic) id<AppsFlyerDeepLinkDelegate> deepLinkDelegate; |
| | | |
| | | /** |
| | | In app purchase receipt validation Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useReceiptValidationSandbox; |
| | | |
| | | /** |
| | | Set this flag to test uninstall on Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useUninstallSandbox; |
| | | |
| | | /** |
| | | For advertisers who wrap OneLink within another Universal Link. |
| | | An advertiser will be able to deeplink from a OneLink wrapped within another Universal Link and also log this retargeting conversion. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setResolveDeepLinkURLs:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *resolveDeepLinkURLs; |
| | | |
| | | /** |
| | | For advertisers who use vanity OneLinks. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] oneLinkCustomDomains:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *oneLinkCustomDomains; |
| | | |
| | | /* |
| | | * Set phone number for each `start` event. `phoneNumber` will be sent as SHA256 string |
| | | */ |
| | | @property(nonatomic, nullable) NSString *phoneNumber; |
| | | |
| | | - (NSString *)phoneNumber UNAVAILABLE_ATTRIBUTE; |
| | | |
| | | /** |
| | | To disable app's vendor identifier(IDFV), set disableIDFVCollection to true |
| | | */ |
| | | @property(nonatomic) BOOL disableIDFVCollection; |
| | | |
| | | /** |
| | | Set the language of the device. The data will be displayed in Raw Data Reports |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrentDeviceLanguage:@"EN"] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currentDeviceLanguage("EN") |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSString *currentDeviceLanguage; |
| | | |
| | | /** |
| | | Enable the collection of Facebook Deferred AppLinks |
| | | Requires Facebook SDK and Facebook app on target/client device. |
| | | This API must be invoked prior to initializing the AppsFlyer SDK in order to function properly. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] enableFacebookDeferredApplinksWithClass:[FBSDKAppLinkUtility class]] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().enableFacebookDeferredApplinks(with: FBSDKAppLinkUtility.self) |
| | | </pre> |
| | | |
| | | @param facebookAppLinkUtilityClass requeries method call `[FBSDKAppLinkUtility class]` as param. |
| | | */ |
| | | - (void)enableFacebookDeferredApplinksWithClass:(Class _Nullable)facebookAppLinkUtilityClass; |
| | | |
| | | /** |
| | | Use this to send the user's emails |
| | | |
| | | @param userEmails The list of strings that hold mails |
| | | @param type Hash algoritm |
| | | */ |
| | | - (void)setUserEmails:(NSArray<NSString *> * _Nullable)userEmails withCryptType:(EmailCryptType)type; |
| | | |
| | | /** |
| | | Start SDK session |
| | | Add the following method at the `applicationDidBecomeActive` in AppDelegate class |
| | | */ |
| | | - (void)start; |
| | | |
| | | - (void)startWithCompletionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler; |
| | | |
| | | /** |
| | | Use this method to log an events with multiple values. See AppsFlyer's documentation for details. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] logEvent:AFEventPurchase |
| | | withValues: @{AFEventParamRevenue : @200, |
| | | AFEventParamCurrency : @"USD", |
| | | AFEventParamQuantity : @2, |
| | | AFEventParamContentId: @"092", |
| | | AFEventParamReceiptId: @"9277"}]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventPurchase, |
| | | withValues: [AFEventParamRevenue : "1200", |
| | | AFEventParamContent : "shoes", |
| | | AFEventParamContentId: "123"]) |
| | | </pre> |
| | | |
| | | @param eventName Contains name of event that could be provided from predefined constants in `AppsFlyerLib.h` |
| | | @param values Contains dictionary of values for handling by backend |
| | | */ |
| | | - (void)logEvent:(NSString *)eventName withValues:(NSDictionary * _Nullable)values; |
| | | |
| | | - (void)logEventWithEventName:(NSString *)eventName |
| | | eventValues:(NSDictionary<NSString * , id> * _Nullable)eventValues |
| | | completionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler |
| | | NS_SWIFT_NAME(logEvent(name:values:completionHandler:)); |
| | | |
| | | /** |
| | | To log and validate in app purchases you can call this method from the completeTransaction: method on |
| | | your `SKPaymentTransactionObserver`. |
| | | |
| | | @param productIdentifier The product identifier |
| | | @param price The product price |
| | | @param currency The product currency |
| | | @param transactionId The purchase transaction Id |
| | | @param params The additional param, which you want to receive it in the raw reports |
| | | @param successBlock The success callback |
| | | @param failedBlock The failure callback |
| | | */ |
| | | - (void)validateAndLogInAppPurchase:(NSString * _Nullable)productIdentifier |
| | | price:(NSString * _Nullable)price |
| | | currency:(NSString * _Nullable)currency |
| | | transactionId:(NSString * _Nullable)transactionId |
| | | additionalParameters:(NSDictionary * _Nullable)params |
| | | success:(void (^ _Nullable)(NSDictionary * response))successBlock |
| | | failure:(void (^ _Nullable)(NSError * _Nullable error, id _Nullable reponse))failedBlock NS_AVAILABLE(10_7, 7_0); |
| | | |
| | | /** |
| | | To log location for geo-fencing. Does the same as code below. |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventLocation, withValues: [AFEventParamLong:longitude, AFEventParamLat:latitude]) |
| | | </pre> |
| | | |
| | | @param longitude The location longitude |
| | | @param latitude The location latitude |
| | | */ |
| | | - (void)logLocation:(double)longitude latitude:(double)latitude NS_SWIFT_NAME(logLocation(longitude:latitude:)); |
| | | |
| | | /** |
| | | This method returns AppsFlyer's internal id(unique for your app) |
| | | |
| | | @return Internal AppsFlyer Id |
| | | */ |
| | | - (NSString *)getAppsFlyerUID; |
| | | |
| | | /** |
| | | In case you want to log deep linking. Does the same as `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @warning Preferred to use `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url sourceApplication:(NSString * _Nullable)sourceApplication API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | In case you want to log deep linking. |
| | | Call this method from inside your AppDelegate `-application:openURL:sourceApplication:annotation:` |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | @param annotation The annotation that passed to your app delegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url |
| | | sourceApplication:(NSString * _Nullable)sourceApplication |
| | | withAnnotation:(id _Nullable)annotation API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Call this method from inside of your AppDelegate `-application:openURL:options:` method. |
| | | This method is functionally the same as calling the AppsFlyer method |
| | | `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your app delegate |
| | | @param options The options dictionary that was passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenUrl:(NSURL * _Nullable)url options:(NSDictionary * _Nullable)options API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Allow AppsFlyer to handle restoration from an NSUserActivity. |
| | | Use this method to log deep links with OneLink. |
| | | |
| | | @param userActivity The NSUserActivity that caused the app to be opened. |
| | | */ |
| | | - (BOOL)continueUserActivity:(NSUserActivity * _Nullable)userActivity |
| | | restorationHandler:(void (^ _Nullable)(NSArray * _Nullable))restorationHandler NS_AVAILABLE_IOS(9_0) API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Enable AppsFlyer to handle a push notification. |
| | | |
| | | @see [Learn more here](https://support.appsflyer.com/hc/en-us/articles/207364076-Measuring-Push-Notification-Re-Engagement-Campaigns) |
| | | |
| | | @warning To make it work - set data, related to AppsFlyer under key @"af". |
| | | |
| | | @param pushPayload The `userInfo` from received remote notification. One of root keys should be @"af". |
| | | */ |
| | | - (void)handlePushNotification:(NSDictionary * _Nullable)pushPayload; |
| | | |
| | | |
| | | /** |
| | | Register uninstall - you should register for remote notification and provide AppsFlyer the push device token. |
| | | |
| | | @param deviceToken The `deviceToken` from `-application:didRegisterForRemoteNotificationsWithDeviceToken:` |
| | | */ |
| | | - (void)registerUninstall:(NSData * _Nullable)deviceToken; |
| | | |
| | | /** |
| | | Get SDK version. |
| | | |
| | | @return The AppsFlyer SDK version info. |
| | | */ |
| | | - (NSString *)getSDKVersion; |
| | | |
| | | /** |
| | | This is for internal use. |
| | | */ |
| | | - (void)remoteDebuggingCallWithData:(NSString *)data; |
| | | |
| | | /** |
| | | Used to force the trigger `onAppOpenAttribution` delegate. |
| | | Notice, re-engagement, session and launch won't be counted. |
| | | Only for OneLink/UniversalLink/Deeplink resolving. |
| | | |
| | | @param URL The param to resolve into -[AppsFlyerLibDelegate onAppOpenAttribution:] |
| | | */ |
| | | - (void)performOnAppAttributionWithURL:(NSURL * _Nullable)URL; |
| | | |
| | | /** |
| | | @brief This property accepts a string value representing the host name for all endpoints. |
| | | Can be used to Zero rate your application’s data usage. Contact your CSM for more information. |
| | | |
| | | @warning To use `default` SDK endpoint – set value to `nil`. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setHost:@"example.com"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().host = "example.com" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *host; |
| | | |
| | | /** |
| | | * This function set the host name and prefix host name for all the endpoints |
| | | **/ |
| | | - (void)setHost:(NSString *)host withHostPrefix:(NSString *)hostPrefix; |
| | | |
| | | /** |
| | | * This property accepts a string value representing the prefix host name for all endpoints. |
| | | * for example "test" prefix with default host name will have the address "host.appsflyer.com" |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *hostPrefix; |
| | | |
| | | /** |
| | | This property is responsible for timeout between sessions in seconds. |
| | | Default value is 5 seconds. |
| | | */ |
| | | @property(atomic) NSUInteger minTimeBetweenSessions; |
| | | |
| | | /** |
| | | API to shut down all SDK activities. |
| | | |
| | | @warning This will disable all requests from AppsFlyer SDK. |
| | | */ |
| | | @property(atomic) BOOL isStopped; |
| | | |
| | | /** |
| | | API to set manually Facebook deferred app link |
| | | */ |
| | | @property(nonatomic, nullable) NSURL *facebookDeferredAppLink; |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *sharingFilter DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | @property(nonatomic) NSUInteger deepLinkTimeout; |
| | | |
| | | /** |
| | | Block an events from being shared with any partner |
| | | This method overwrite -[AppsFlyerLib setSharingFilter:] |
| | | */ |
| | | - (void)setSharingFilterForAllPartners DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | |
| | | The sharing filter is cleared in case if `nil` or empty array passed as a parameter. |
| | | "all" keyword sets sharing filter for ALL partners, it is case insencitive and has highest priority |
| | | if passed along with another values. For example, if ["all", "examplePartner1_int", "examplePartner2_int" ] passed, |
| | | the sharing filter will be set for ALL partners. |
| | | */ |
| | | - (void)setSharingFilterForPartners:(NSArray<NSString *> * _Nullable)sharingFilter; |
| | | |
| | | /** |
| | | Validate if URL contains certain string and append quiery |
| | | parameters to deeplink URL. In case if URL does not contain user-defined string, |
| | | parameters are not appended to the url. |
| | | |
| | | @param containsString string to check in URL. |
| | | @param parameters NSDictionary, which containins parameters to append to the deeplink url after it passed validation. |
| | | */ |
| | | - (void)appendParametersToDeepLinkingURLWithString:(NSString *)containsString |
| | | parameters:(NSDictionary<NSString *, NSString*> *)parameters |
| | | NS_SWIFT_NAME(appendParametersToDeeplinkURL(contains:parameters:)); |
| | | |
| | | /** |
| | | Adds array of keys, which are used to compose key path |
| | | to resolve deeplink from push notification payload `userInfo`. |
| | | |
| | | @param deepLinkPath an array of strings which contains keys to search for deeplink in payload. |
| | | */ |
| | | - (void)addPushNotificationDeepLinkPath:(NSArray<NSString *> *)deepLinkPath; |
| | | |
| | | /** |
| | | * Allows sending custom data for partner integration purposes. |
| | | * |
| | | * @param partnerId ID of the partner (usually has "_int" suffix) |
| | | * @param partnerInfo customer data, depends on the integration nature with specific partner |
| | | */ |
| | | |
| | | - (void)setPartnerDataWithPartnerId:(NSString * _Nullable)partnerId partnerInfo:(NSDictionary<NSString *, id> * _Nullable)partnerInfo |
| | | NS_SWIFT_NAME(setPartnerData(partnerId:partnerInfo:)); |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // LinkGenerator.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | Payload container for the `generateInviteUrlWithLinkGenerator:completionHandler:` from `AppsFlyerShareInviteHelper` |
| | | */ |
| | | @interface AppsFlyerLinkGenerator : NSObject |
| | | |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | - (instancetype)init NS_UNAVAILABLE; |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | + (instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(nonatomic, nullable) NSString *brandDomain; |
| | | |
| | | /// The channel through which the invite was sent (e.g. Facebook/Gmail/etc.). Usage: Recommended |
| | | - (void)setChannel :(nonnull NSString *)channel; |
| | | /// ReferrerCustomerId setter |
| | | - (void)setReferrerCustomerId:(nonnull NSString *)referrerCustomerId; |
| | | /// A campaign name. Usage: Optional |
| | | - (void)setCampaign :(nonnull NSString *)campaign; |
| | | /// ReferrerUID setter |
| | | - (void)setReferrerUID :(nonnull NSString *)referrerUID; |
| | | /// Referrer name |
| | | - (void)setReferrerName :(nonnull NSString *)referrerName; |
| | | /// The URL to referrer user avatar. Usage: Optional |
| | | - (void)setReferrerImageURL :(nonnull NSString *)referrerImageURL; |
| | | /// AppleAppID |
| | | - (void)setAppleAppID :(nonnull NSString *)appleAppID; |
| | | /// Deeplink path |
| | | - (void)setDeeplinkPath :(nonnull NSString *)deeplinkPath; |
| | | /// Base deeplink path |
| | | - (void)setBaseDeeplink :(nonnull NSString *)baseDeeplink; |
| | | /// A single key value custom parameter. Usage: Optional |
| | | - (void)addParameterValue :(nonnull NSString *)value forKey:(NSString *)key; |
| | | /// Multiple key value custom parameters. Usage: Optional |
| | | - (void)addParameters :(nonnull NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // ShareInviteHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import "AppsFlyerLinkGenerator.h" |
| | | |
| | | /** |
| | | AppsFlyerShareInviteHelper |
| | | */ |
| | | @interface AppsFlyerShareInviteHelper : NSObject |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | * The AppsFlyerShareInviteHelper class builds the invite URL according to various setter methods |
| | | * which allow passing on additional information on the click. |
| | | * This information is available through `onConversionDataReceived:` when the user accepts the invite and installs the app. |
| | | * In addition, campaign and channel parameters are visible within the AppsFlyer Dashboard. |
| | | */ |
| | | + (void)generateInviteUrlWithLinkGenerator:(AppsFlyerLinkGenerator *(^)(AppsFlyerLinkGenerator *generator))generatorCreator completionHandler:(void (^)(NSURL *_Nullable url))completionHandler; |
| | | |
| | | /** |
| | | * It is recommended to generate an in-app event after the invite is sent to log the invites from the senders' perspective. |
| | | * This enables you to find the users that tend most to invite friends, and the media sources that get you these users. |
| | | */ |
| | | + (void)logInvite:(nullable NSString *)channel parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | framework module AppsFlyerLib { |
| | | umbrella header "AppsFlyerLib.h" |
| | | |
| | | export * |
| | | module * { export * } |
| | | } |
New file |
| | |
| | | // |
| | | // CrossPromotionHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | AppsFlyer allows you to log and attribute installs originating |
| | | from cross promotion campaigns of your existing apps. |
| | | Afterwards, you can optimize on your cross-promotion traffic to get even better results. |
| | | */ |
| | | @interface AppsFlyerCrossPromotionHelper : NSObject |
| | | |
| | | /** |
| | | To log an impression use the following API call. |
| | | Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard. |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | */ |
| | | + (void)logCrossPromoteImpression:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | /** |
| | | iOS allows you to utilize the StoreKit component to open |
| | | the App Store while remaining in the context of your app. |
| | | More details at https://support.appsflyer.com/hc/en-us/articles/115004481946-Cross-Promotion-Tracking#tracking-cross-promotion-impressions |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | @param openStoreBlock Contains promoted `clickURL` |
| | | */ |
| | | + (void)logAndOpenStore:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters |
| | | openStore:(void (^)(NSURLSession *urlSession, NSURL *clickURL))openStoreBlock; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplink.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | NS_SWIFT_NAME(DeepLink) |
| | | @interface AppsFlyerDeepLink : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property (readonly, nonnull) NSDictionary<NSString *, id> *clickEvent; |
| | | @property (readonly, nullable) NSString *deeplinkValue; |
| | | @property (readonly, nullable) NSString *matchType; |
| | | @property (readonly, nullable) NSString *clickHTTPReferrer; |
| | | @property (readonly, nullable) NSString *mediaSource; |
| | | @property (readonly, nullable) NSString *campaign; |
| | | @property (readonly, nullable) NSString *campaignId; |
| | | @property (readonly, nullable) NSString *afSub1; |
| | | @property (readonly, nullable) NSString *afSub2; |
| | | @property (readonly, nullable) NSString *afSub3; |
| | | @property (readonly, nullable) NSString *afSub4; |
| | | @property (readonly, nullable) NSString *afSub5; |
| | | @property (readonly) BOOL isDeferred; |
| | | |
| | | - (NSString *)toString; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplinkResult.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | @class AppsFlyerDeepLink; |
| | | |
| | | typedef NS_CLOSED_ENUM(NSUInteger, AFSDKDeepLinkResultStatus) { |
| | | AFSDKDeepLinkResultStatusNotFound, |
| | | AFSDKDeepLinkResultStatusFound, |
| | | AFSDKDeepLinkResultStatusFailure, |
| | | } NS_SWIFT_NAME(DeepLinkResultStatus); |
| | | |
| | | NS_SWIFT_NAME(DeepLinkResult) |
| | | @interface AppsFlyerDeepLinkResult : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(readonly) AFSDKDeepLinkResultStatus status; |
| | | |
| | | @property(readonly, nullable) AppsFlyerDeepLink *deepLink; |
| | | @property(readonly, nullable) NSError *error; |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // AppsFlyerLib.h |
| | | // AppsFlyerLib |
| | | // |
| | | // AppsFlyer iOS SDK 6.5.1 (51) |
| | | // Copyright (c) 2012-2020 AppsFlyer Ltd. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | #import "AppsFlyerCrossPromotionHelper.h" |
| | | #import "AppsFlyerShareInviteHelper.h" |
| | | #import "AppsFlyerDeepLinkResult.h" |
| | | #import "AppsFlyerDeepLink.h" |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | // In app event names constants |
| | | #define AFEventLevelAchieved @"af_level_achieved" |
| | | #define AFEventAddPaymentInfo @"af_add_payment_info" |
| | | #define AFEventAddToCart @"af_add_to_cart" |
| | | #define AFEventAddToWishlist @"af_add_to_wishlist" |
| | | #define AFEventCompleteRegistration @"af_complete_registration" |
| | | #define AFEventTutorial_completion @"af_tutorial_completion" |
| | | #define AFEventInitiatedCheckout @"af_initiated_checkout" |
| | | #define AFEventPurchase @"af_purchase" |
| | | #define AFEventRate @"af_rate" |
| | | #define AFEventSearch @"af_search" |
| | | #define AFEventSpentCredits @"af_spent_credits" |
| | | #define AFEventAchievementUnlocked @"af_achievement_unlocked" |
| | | #define AFEventContentView @"af_content_view" |
| | | #define AFEventListView @"af_list_view" |
| | | #define AFEventTravelBooking @"af_travel_booking" |
| | | #define AFEventShare @"af_share" |
| | | #define AFEventInvite @"af_invite" |
| | | #define AFEventLogin @"af_login" |
| | | #define AFEventReEngage @"af_re_engage" |
| | | #define AFEventUpdate @"af_update" |
| | | #define AFEventOpenedFromPushNotification @"af_opened_from_push_notification" |
| | | #define AFEventLocation @"af_location_coordinates" |
| | | #define AFEventCustomerSegment @"af_customer_segment" |
| | | |
| | | #define AFEventSubscribe @"af_subscribe" |
| | | #define AFEventStartTrial @"af_start_trial" |
| | | #define AFEventAdClick @"af_ad_click" |
| | | #define AFEventAdView @"af_ad_view" |
| | | |
| | | // In app event parameter names |
| | | #define AFEventParamContent @"af_content" |
| | | #define AFEventParamAchievementId @"af_achievement_id" |
| | | #define AFEventParamLevel @"af_level" |
| | | #define AFEventParamScore @"af_score" |
| | | #define AFEventParamSuccess @"af_success" |
| | | #define AFEventParamPrice @"af_price" |
| | | #define AFEventParamContentType @"af_content_type" |
| | | #define AFEventParamContentId @"af_content_id" |
| | | #define AFEventParamContentList @"af_content_list" |
| | | #define AFEventParamCurrency @"af_currency" |
| | | #define AFEventParamQuantity @"af_quantity" |
| | | #define AFEventParamRegistrationMethod @"af_registration_method" |
| | | #define AFEventParamPaymentInfoAvailable @"af_payment_info_available" |
| | | #define AFEventParamMaxRatingValue @"af_max_rating_value" |
| | | #define AFEventParamRatingValue @"af_rating_value" |
| | | #define AFEventParamSearchString @"af_search_string" |
| | | #define AFEventParamDateA @"af_date_a" |
| | | #define AFEventParamDateB @"af_date_b" |
| | | #define AFEventParamDestinationA @"af_destination_a" |
| | | #define AFEventParamDestinationB @"af_destination_b" |
| | | #define AFEventParamDescription @"af_description" |
| | | #define AFEventParamClass @"af_class" |
| | | #define AFEventParamEventStart @"af_event_start" |
| | | #define AFEventParamEventEnd @"af_event_end" |
| | | #define AFEventParamLat @"af_lat" |
| | | #define AFEventParamLong @"af_long" |
| | | #define AFEventParamCustomerUserId @"af_customer_user_id" |
| | | #define AFEventParamValidated @"af_validated" |
| | | #define AFEventParamRevenue @"af_revenue" |
| | | #define AFEventProjectedParamRevenue @"af_projected_revenue" |
| | | #define AFEventParamReceiptId @"af_receipt_id" |
| | | #define AFEventParamTutorialId @"af_tutorial_id" |
| | | #define AFEventParamVirtualCurrencyName @"af_virtual_currency_name" |
| | | #define AFEventParamDeepLink @"af_deep_link" |
| | | #define AFEventParamOldVersion @"af_old_version" |
| | | #define AFEventParamNewVersion @"af_new_version" |
| | | #define AFEventParamReviewText @"af_review_text" |
| | | #define AFEventParamCouponCode @"af_coupon_code" |
| | | #define AFEventParamOrderId @"af_order_id" |
| | | #define AFEventParam1 @"af_param_1" |
| | | #define AFEventParam2 @"af_param_2" |
| | | #define AFEventParam3 @"af_param_3" |
| | | #define AFEventParam4 @"af_param_4" |
| | | #define AFEventParam5 @"af_param_5" |
| | | #define AFEventParam6 @"af_param_6" |
| | | #define AFEventParam7 @"af_param_7" |
| | | #define AFEventParam8 @"af_param_8" |
| | | #define AFEventParam9 @"af_param_9" |
| | | #define AFEventParam10 @"af_param_10" |
| | | |
| | | #define AFEventParamDepartingDepartureDate @"af_departing_departure_date" |
| | | #define AFEventParamReturningDepartureDate @"af_returning_departure_date" |
| | | #define AFEventParamDestinationList @"af_destination_list" //array of string |
| | | #define AFEventParamCity @"af_city" |
| | | #define AFEventParamRegion @"af_region" |
| | | #define AFEventParamCountry @"af_country" |
| | | |
| | | |
| | | #define AFEventParamDepartingArrivalDate @"af_departing_arrival_date" |
| | | #define AFEventParamReturningArrivalDate @"af_returning_arrival_date" |
| | | #define AFEventParamSuggestedDestinations @"af_suggested_destinations" //array of string |
| | | #define AFEventParamTravelStart @"af_travel_start" |
| | | #define AFEventParamTravelEnd @"af_travel_end" |
| | | #define AFEventParamNumAdults @"af_num_adults" |
| | | #define AFEventParamNumChildren @"af_num_children" |
| | | #define AFEventParamNumInfants @"af_num_infants" |
| | | #define AFEventParamSuggestedHotels @"af_suggested_hotels" //array of string |
| | | |
| | | #define AFEventParamUserScore @"af_user_score" |
| | | #define AFEventParamHotelScore @"af_hotel_score" |
| | | #define AFEventParamPurchaseCurrency @"af_purchase_currency" |
| | | |
| | | #define AFEventParamPreferredStarRatings @"af_preferred_star_ratings" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | |
| | | #define AFEventParamPreferredPriceRange @"af_preferred_price_range" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | #define AFEventParamPreferredNeighborhoods @"af_preferred_neighborhoods" //array of string |
| | | #define AFEventParamPreferredNumStops @"af_preferred_num_stops" |
| | | |
| | | #define AFEventParamAdRevenueAdType @"af_adrev_ad_type" |
| | | #define AFEventParamAdRevenueNetworkName @"af_adrev_network_name" |
| | | #define AFEventParamAdRevenuePlacementId @"af_adrev_placement_id" |
| | | #define AFEventParamAdRevenueAdSize @"af_adrev_ad_size" |
| | | #define AFEventParamAdRevenueMediatedNetworkName @"af_adrev_mediated_network_name" |
| | | |
| | | /// Mail hashing type |
| | | typedef enum { |
| | | /// None |
| | | EmailCryptTypeNone = 0, |
| | | /// SHA1 |
| | | EmailCryptTypeSHA1 = 1, |
| | | /// MD5 |
| | | EmailCryptTypeMD5 = 2, |
| | | /// SHA256 |
| | | EmailCryptTypeSHA256 = 3 |
| | | } EmailCryptType; |
| | | |
| | | NS_SWIFT_NAME(DeepLinkDelegate) |
| | | @protocol AppsFlyerDeepLinkDelegate <NSObject> |
| | | |
| | | @optional |
| | | - (void)didResolveDeepLink:(AppsFlyerDeepLinkResult *_Nonnull)result; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | Conform and subscribe to this protocol to allow getting data about conversion and |
| | | install attribution |
| | | */ |
| | | @protocol AppsFlyerLibDelegate <NSObject> |
| | | |
| | | /** |
| | | `conversionInfo` contains information about install. |
| | | Organic/non-organic, etc. |
| | | @param conversionInfo May contain <code>null</code> values for some keys. Please handle this case. |
| | | */ |
| | | - (void)onConversionDataSuccess:(NSDictionary *)conversionInfo; |
| | | |
| | | /** |
| | | Any errors that occurred during the conversion request. |
| | | */ |
| | | - (void)onConversionDataFail:(NSError *)error; |
| | | |
| | | @optional |
| | | |
| | | /** |
| | | `attributionData` contains information about OneLink, deeplink. |
| | | */ |
| | | - (void)onAppOpenAttribution:(NSDictionary *)attributionData; |
| | | |
| | | /** |
| | | Any errors that occurred during the attribution request. |
| | | */ |
| | | - (void)onAppOpenAttributionFailure:(NSError *)error; |
| | | |
| | | /** |
| | | @abstract Sets the HTTP header fields of the ESP resolving to the given |
| | | dictionary. |
| | | @discussion This method replaces all header fields that may have |
| | | existed before this method ESP resolving call. |
| | | To keep default SDK behavior - return nil; |
| | | */ |
| | | - (NSDictionary <NSString *, NSString *> * _Nullable)allHTTPHeaderFieldsForResolveDeepLinkURL:(NSURL *)URL; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | You can log installs, app updates, sessions and additional in-app events |
| | | (including in-app purchases, game levels, etc.) |
| | | to evaluate ROI and user engagement. |
| | | The iOS SDK is compatible with all iOS/tvOS devices with iOS version 7 and above. |
| | | |
| | | @see [SDK Integration Validator](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS) |
| | | for more information. |
| | | |
| | | */ |
| | | @interface AppsFlyerLib : NSObject |
| | | |
| | | /** |
| | | Gets the singleton instance of the AppsFlyerLib class, creating it if |
| | | necessary. |
| | | |
| | | @return The singleton instance of AppsFlyerLib. |
| | | */ |
| | | + (AppsFlyerLib *)shared; |
| | | |
| | | /** |
| | | In case you use your own user ID in your app, you can set this property to that ID. |
| | | Enables you to cross-reference your own unique ID with AppsFlyer’s unique ID and the other devices’ IDs |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString * customerUserID; |
| | | |
| | | /** |
| | | In case you use custom data and you want to receive it in the raw reports. |
| | | |
| | | @see [Setting additional custom data](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS#setting-additional-custom-data) for more information. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAdditionalData:) NSDictionary * customData; |
| | | |
| | | /** |
| | | Use this property to set your AppsFlyer's dev key |
| | | */ |
| | | @property(nonatomic, strong) NSString * appsFlyerDevKey; |
| | | |
| | | /** |
| | | Use this property to set your app's Apple ID(taken from the app's page on iTunes Connect) |
| | | */ |
| | | @property(nonatomic, strong) NSString * appleAppID; |
| | | |
| | | #ifndef AFSDK_NO_IDFA |
| | | /** |
| | | AppsFlyer SDK collect Apple's `advertisingIdentifier` if the `AdSupport.framework` included in the SDK. |
| | | You can disable this behavior by setting the following property to YES |
| | | */ |
| | | @property(nonatomic) BOOL disableAdvertisingIdentifier; |
| | | |
| | | @property(nonatomic, strong, readonly) NSString *advertisingIdentifier; |
| | | |
| | | /** |
| | | Waits for request user authorization to access app-related data |
| | | */ |
| | | - (void)waitForATTUserAuthorizationWithTimeoutInterval:(NSTimeInterval)timeoutInterval |
| | | NS_SWIFT_NAME(waitForATTUserAuthorization(timeoutInterval:)); |
| | | |
| | | #endif |
| | | |
| | | @property(nonatomic) BOOL disableSKAdNetwork; |
| | | |
| | | /** |
| | | In case of in app purchase events, you can set the currency code your user has purchased with. |
| | | The currency code is a 3 letter code according to ISO standards |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrencyCode:@"USD"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currencyCode = "USD" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString *currencyCode; |
| | | |
| | | /** |
| | | Prints SDK messages to the console log. This property should only be used in `DEBUG` mode. |
| | | The default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL isDebug; |
| | | |
| | | /** |
| | | Set this flag to `YES`, to collect the current device name(e.g. "My iPhone"). Default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL shouldCollectDeviceName; |
| | | |
| | | /** |
| | | Set your `OneLink ID` from OneLink configuration. Used in User Invites to generate a OneLink. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAppInviteOneLink:) NSString * appInviteOneLinkID; |
| | | |
| | | /** |
| | | Opt-out logging for specific user |
| | | */ |
| | | @property(atomic) BOOL anonymizeUser; |
| | | |
| | | /** |
| | | Opt-out for Apple Search Ads attributions |
| | | */ |
| | | @property(atomic) BOOL disableCollectASA; |
| | | |
| | | @property(nonatomic) BOOL disableAppleAdsAttribution; |
| | | |
| | | /** |
| | | AppsFlyer delegate. See `AppsFlyerLibDelegate` |
| | | */ |
| | | @property(weak, nonatomic) id<AppsFlyerLibDelegate> delegate; |
| | | |
| | | @property(weak, nonatomic) id<AppsFlyerDeepLinkDelegate> deepLinkDelegate; |
| | | |
| | | /** |
| | | In app purchase receipt validation Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useReceiptValidationSandbox; |
| | | |
| | | /** |
| | | Set this flag to test uninstall on Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useUninstallSandbox; |
| | | |
| | | /** |
| | | For advertisers who wrap OneLink within another Universal Link. |
| | | An advertiser will be able to deeplink from a OneLink wrapped within another Universal Link and also log this retargeting conversion. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setResolveDeepLinkURLs:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *resolveDeepLinkURLs; |
| | | |
| | | /** |
| | | For advertisers who use vanity OneLinks. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] oneLinkCustomDomains:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *oneLinkCustomDomains; |
| | | |
| | | /* |
| | | * Set phone number for each `start` event. `phoneNumber` will be sent as SHA256 string |
| | | */ |
| | | @property(nonatomic, nullable) NSString *phoneNumber; |
| | | |
| | | - (NSString *)phoneNumber UNAVAILABLE_ATTRIBUTE; |
| | | |
| | | /** |
| | | To disable app's vendor identifier(IDFV), set disableIDFVCollection to true |
| | | */ |
| | | @property(nonatomic) BOOL disableIDFVCollection; |
| | | |
| | | /** |
| | | Set the language of the device. The data will be displayed in Raw Data Reports |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrentDeviceLanguage:@"EN"] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currentDeviceLanguage("EN") |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSString *currentDeviceLanguage; |
| | | |
| | | /** |
| | | Enable the collection of Facebook Deferred AppLinks |
| | | Requires Facebook SDK and Facebook app on target/client device. |
| | | This API must be invoked prior to initializing the AppsFlyer SDK in order to function properly. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] enableFacebookDeferredApplinksWithClass:[FBSDKAppLinkUtility class]] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().enableFacebookDeferredApplinks(with: FBSDKAppLinkUtility.self) |
| | | </pre> |
| | | |
| | | @param facebookAppLinkUtilityClass requeries method call `[FBSDKAppLinkUtility class]` as param. |
| | | */ |
| | | - (void)enableFacebookDeferredApplinksWithClass:(Class _Nullable)facebookAppLinkUtilityClass; |
| | | |
| | | /** |
| | | Use this to send the user's emails |
| | | |
| | | @param userEmails The list of strings that hold mails |
| | | @param type Hash algoritm |
| | | */ |
| | | - (void)setUserEmails:(NSArray<NSString *> * _Nullable)userEmails withCryptType:(EmailCryptType)type; |
| | | |
| | | /** |
| | | Start SDK session |
| | | Add the following method at the `applicationDidBecomeActive` in AppDelegate class |
| | | */ |
| | | - (void)start; |
| | | |
| | | - (void)startWithCompletionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler; |
| | | |
| | | /** |
| | | Use this method to log an events with multiple values. See AppsFlyer's documentation for details. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] logEvent:AFEventPurchase |
| | | withValues: @{AFEventParamRevenue : @200, |
| | | AFEventParamCurrency : @"USD", |
| | | AFEventParamQuantity : @2, |
| | | AFEventParamContentId: @"092", |
| | | AFEventParamReceiptId: @"9277"}]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventPurchase, |
| | | withValues: [AFEventParamRevenue : "1200", |
| | | AFEventParamContent : "shoes", |
| | | AFEventParamContentId: "123"]) |
| | | </pre> |
| | | |
| | | @param eventName Contains name of event that could be provided from predefined constants in `AppsFlyerLib.h` |
| | | @param values Contains dictionary of values for handling by backend |
| | | */ |
| | | - (void)logEvent:(NSString *)eventName withValues:(NSDictionary * _Nullable)values; |
| | | |
| | | - (void)logEventWithEventName:(NSString *)eventName |
| | | eventValues:(NSDictionary<NSString * , id> * _Nullable)eventValues |
| | | completionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler |
| | | NS_SWIFT_NAME(logEvent(name:values:completionHandler:)); |
| | | |
| | | /** |
| | | To log and validate in app purchases you can call this method from the completeTransaction: method on |
| | | your `SKPaymentTransactionObserver`. |
| | | |
| | | @param productIdentifier The product identifier |
| | | @param price The product price |
| | | @param currency The product currency |
| | | @param transactionId The purchase transaction Id |
| | | @param params The additional param, which you want to receive it in the raw reports |
| | | @param successBlock The success callback |
| | | @param failedBlock The failure callback |
| | | */ |
| | | - (void)validateAndLogInAppPurchase:(NSString * _Nullable)productIdentifier |
| | | price:(NSString * _Nullable)price |
| | | currency:(NSString * _Nullable)currency |
| | | transactionId:(NSString * _Nullable)transactionId |
| | | additionalParameters:(NSDictionary * _Nullable)params |
| | | success:(void (^ _Nullable)(NSDictionary * response))successBlock |
| | | failure:(void (^ _Nullable)(NSError * _Nullable error, id _Nullable reponse))failedBlock NS_AVAILABLE(10_7, 7_0); |
| | | |
| | | /** |
| | | To log location for geo-fencing. Does the same as code below. |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventLocation, withValues: [AFEventParamLong:longitude, AFEventParamLat:latitude]) |
| | | </pre> |
| | | |
| | | @param longitude The location longitude |
| | | @param latitude The location latitude |
| | | */ |
| | | - (void)logLocation:(double)longitude latitude:(double)latitude NS_SWIFT_NAME(logLocation(longitude:latitude:)); |
| | | |
| | | /** |
| | | This method returns AppsFlyer's internal id(unique for your app) |
| | | |
| | | @return Internal AppsFlyer Id |
| | | */ |
| | | - (NSString *)getAppsFlyerUID; |
| | | |
| | | /** |
| | | In case you want to log deep linking. Does the same as `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @warning Preferred to use `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url sourceApplication:(NSString * _Nullable)sourceApplication API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | In case you want to log deep linking. |
| | | Call this method from inside your AppDelegate `-application:openURL:sourceApplication:annotation:` |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | @param annotation The annotation that passed to your app delegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url |
| | | sourceApplication:(NSString * _Nullable)sourceApplication |
| | | withAnnotation:(id _Nullable)annotation API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Call this method from inside of your AppDelegate `-application:openURL:options:` method. |
| | | This method is functionally the same as calling the AppsFlyer method |
| | | `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your app delegate |
| | | @param options The options dictionary that was passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenUrl:(NSURL * _Nullable)url options:(NSDictionary * _Nullable)options API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Allow AppsFlyer to handle restoration from an NSUserActivity. |
| | | Use this method to log deep links with OneLink. |
| | | |
| | | @param userActivity The NSUserActivity that caused the app to be opened. |
| | | */ |
| | | - (BOOL)continueUserActivity:(NSUserActivity * _Nullable)userActivity |
| | | restorationHandler:(void (^ _Nullable)(NSArray * _Nullable))restorationHandler NS_AVAILABLE_IOS(9_0) API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Enable AppsFlyer to handle a push notification. |
| | | |
| | | @see [Learn more here](https://support.appsflyer.com/hc/en-us/articles/207364076-Measuring-Push-Notification-Re-Engagement-Campaigns) |
| | | |
| | | @warning To make it work - set data, related to AppsFlyer under key @"af". |
| | | |
| | | @param pushPayload The `userInfo` from received remote notification. One of root keys should be @"af". |
| | | */ |
| | | - (void)handlePushNotification:(NSDictionary * _Nullable)pushPayload; |
| | | |
| | | |
| | | /** |
| | | Register uninstall - you should register for remote notification and provide AppsFlyer the push device token. |
| | | |
| | | @param deviceToken The `deviceToken` from `-application:didRegisterForRemoteNotificationsWithDeviceToken:` |
| | | */ |
| | | - (void)registerUninstall:(NSData * _Nullable)deviceToken; |
| | | |
| | | /** |
| | | Get SDK version. |
| | | |
| | | @return The AppsFlyer SDK version info. |
| | | */ |
| | | - (NSString *)getSDKVersion; |
| | | |
| | | /** |
| | | This is for internal use. |
| | | */ |
| | | - (void)remoteDebuggingCallWithData:(NSString *)data; |
| | | |
| | | /** |
| | | Used to force the trigger `onAppOpenAttribution` delegate. |
| | | Notice, re-engagement, session and launch won't be counted. |
| | | Only for OneLink/UniversalLink/Deeplink resolving. |
| | | |
| | | @param URL The param to resolve into -[AppsFlyerLibDelegate onAppOpenAttribution:] |
| | | */ |
| | | - (void)performOnAppAttributionWithURL:(NSURL * _Nullable)URL; |
| | | |
| | | /** |
| | | @brief This property accepts a string value representing the host name for all endpoints. |
| | | Can be used to Zero rate your application’s data usage. Contact your CSM for more information. |
| | | |
| | | @warning To use `default` SDK endpoint – set value to `nil`. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setHost:@"example.com"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().host = "example.com" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *host; |
| | | |
| | | /** |
| | | * This function set the host name and prefix host name for all the endpoints |
| | | **/ |
| | | - (void)setHost:(NSString *)host withHostPrefix:(NSString *)hostPrefix; |
| | | |
| | | /** |
| | | * This property accepts a string value representing the prefix host name for all endpoints. |
| | | * for example "test" prefix with default host name will have the address "host.appsflyer.com" |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *hostPrefix; |
| | | |
| | | /** |
| | | This property is responsible for timeout between sessions in seconds. |
| | | Default value is 5 seconds. |
| | | */ |
| | | @property(atomic) NSUInteger minTimeBetweenSessions; |
| | | |
| | | /** |
| | | API to shut down all SDK activities. |
| | | |
| | | @warning This will disable all requests from AppsFlyer SDK. |
| | | */ |
| | | @property(atomic) BOOL isStopped; |
| | | |
| | | /** |
| | | API to set manually Facebook deferred app link |
| | | */ |
| | | @property(nonatomic, nullable) NSURL *facebookDeferredAppLink; |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *sharingFilter DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | @property(nonatomic) NSUInteger deepLinkTimeout; |
| | | |
| | | /** |
| | | Block an events from being shared with any partner |
| | | This method overwrite -[AppsFlyerLib setSharingFilter:] |
| | | */ |
| | | - (void)setSharingFilterForAllPartners DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | |
| | | The sharing filter is cleared in case if `nil` or empty array passed as a parameter. |
| | | "all" keyword sets sharing filter for ALL partners, it is case insencitive and has highest priority |
| | | if passed along with another values. For example, if ["all", "examplePartner1_int", "examplePartner2_int" ] passed, |
| | | the sharing filter will be set for ALL partners. |
| | | */ |
| | | - (void)setSharingFilterForPartners:(NSArray<NSString *> * _Nullable)sharingFilter; |
| | | |
| | | /** |
| | | Validate if URL contains certain string and append quiery |
| | | parameters to deeplink URL. In case if URL does not contain user-defined string, |
| | | parameters are not appended to the url. |
| | | |
| | | @param containsString string to check in URL. |
| | | @param parameters NSDictionary, which containins parameters to append to the deeplink url after it passed validation. |
| | | */ |
| | | - (void)appendParametersToDeepLinkingURLWithString:(NSString *)containsString |
| | | parameters:(NSDictionary<NSString *, NSString*> *)parameters |
| | | NS_SWIFT_NAME(appendParametersToDeeplinkURL(contains:parameters:)); |
| | | |
| | | /** |
| | | Adds array of keys, which are used to compose key path |
| | | to resolve deeplink from push notification payload `userInfo`. |
| | | |
| | | @param deepLinkPath an array of strings which contains keys to search for deeplink in payload. |
| | | */ |
| | | - (void)addPushNotificationDeepLinkPath:(NSArray<NSString *> *)deepLinkPath; |
| | | |
| | | /** |
| | | * Allows sending custom data for partner integration purposes. |
| | | * |
| | | * @param partnerId ID of the partner (usually has "_int" suffix) |
| | | * @param partnerInfo customer data, depends on the integration nature with specific partner |
| | | */ |
| | | |
| | | - (void)setPartnerDataWithPartnerId:(NSString * _Nullable)partnerId partnerInfo:(NSDictionary<NSString *, id> * _Nullable)partnerInfo |
| | | NS_SWIFT_NAME(setPartnerData(partnerId:partnerInfo:)); |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // LinkGenerator.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | Payload container for the `generateInviteUrlWithLinkGenerator:completionHandler:` from `AppsFlyerShareInviteHelper` |
| | | */ |
| | | @interface AppsFlyerLinkGenerator : NSObject |
| | | |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | - (instancetype)init NS_UNAVAILABLE; |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | + (instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(nonatomic, nullable) NSString *brandDomain; |
| | | |
| | | /// The channel through which the invite was sent (e.g. Facebook/Gmail/etc.). Usage: Recommended |
| | | - (void)setChannel :(nonnull NSString *)channel; |
| | | /// ReferrerCustomerId setter |
| | | - (void)setReferrerCustomerId:(nonnull NSString *)referrerCustomerId; |
| | | /// A campaign name. Usage: Optional |
| | | - (void)setCampaign :(nonnull NSString *)campaign; |
| | | /// ReferrerUID setter |
| | | - (void)setReferrerUID :(nonnull NSString *)referrerUID; |
| | | /// Referrer name |
| | | - (void)setReferrerName :(nonnull NSString *)referrerName; |
| | | /// The URL to referrer user avatar. Usage: Optional |
| | | - (void)setReferrerImageURL :(nonnull NSString *)referrerImageURL; |
| | | /// AppleAppID |
| | | - (void)setAppleAppID :(nonnull NSString *)appleAppID; |
| | | /// Deeplink path |
| | | - (void)setDeeplinkPath :(nonnull NSString *)deeplinkPath; |
| | | /// Base deeplink path |
| | | - (void)setBaseDeeplink :(nonnull NSString *)baseDeeplink; |
| | | /// A single key value custom parameter. Usage: Optional |
| | | - (void)addParameterValue :(nonnull NSString *)value forKey:(NSString *)key; |
| | | /// Multiple key value custom parameters. Usage: Optional |
| | | - (void)addParameters :(nonnull NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // ShareInviteHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import "AppsFlyerLinkGenerator.h" |
| | | |
| | | /** |
| | | AppsFlyerShareInviteHelper |
| | | */ |
| | | @interface AppsFlyerShareInviteHelper : NSObject |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | * The AppsFlyerShareInviteHelper class builds the invite URL according to various setter methods |
| | | * which allow passing on additional information on the click. |
| | | * This information is available through `onConversionDataReceived:` when the user accepts the invite and installs the app. |
| | | * In addition, campaign and channel parameters are visible within the AppsFlyer Dashboard. |
| | | */ |
| | | + (void)generateInviteUrlWithLinkGenerator:(AppsFlyerLinkGenerator *(^)(AppsFlyerLinkGenerator *generator))generatorCreator completionHandler:(void (^)(NSURL *_Nullable url))completionHandler; |
| | | |
| | | /** |
| | | * It is recommended to generate an in-app event after the invite is sent to log the invites from the senders' perspective. |
| | | * This enables you to find the users that tend most to invite friends, and the media sources that get you these users. |
| | | */ |
| | | + (void)logInvite:(nullable NSString *)channel parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | framework module AppsFlyerLib { |
| | | umbrella header "AppsFlyerLib.h" |
| | | |
| | | export * |
| | | module * { export * } |
| | | } |
New file |
| | |
| | | <?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>files</key> |
| | | <dict> |
| | | <key>Headers/AppsFlyerCrossPromotionHelper.h</key> |
| | | <data> |
| | | ezewyhf50Apa+1HjqfRFE7nXZIE= |
| | | </data> |
| | | <key>Headers/AppsFlyerDeepLink.h</key> |
| | | <data> |
| | | jDznIDDggwXT7EmzE7TYcZjhMjA= |
| | | </data> |
| | | <key>Headers/AppsFlyerDeepLinkResult.h</key> |
| | | <data> |
| | | 3J9juDAkVB2LUxC7/NDmKqgrzyQ= |
| | | </data> |
| | | <key>Headers/AppsFlyerLib.h</key> |
| | | <data> |
| | | NbnEYqmh3YQxKTTMmU6NdiBjCPU= |
| | | </data> |
| | | <key>Headers/AppsFlyerLinkGenerator.h</key> |
| | | <data> |
| | | dmn7cx6Z5wxK92gRzGUwPeRiZFg= |
| | | </data> |
| | | <key>Headers/AppsFlyerShareInviteHelper.h</key> |
| | | <data> |
| | | d9/NIwpZ+CNQ8zsxhNkHTT7kpRE= |
| | | </data> |
| | | <key>Info.plist</key> |
| | | <data> |
| | | GbWZO/IfU0HuLtMYUa/y74kscxc= |
| | | </data> |
| | | <key>Modules/module.modulemap</key> |
| | | <data> |
| | | r+QHVTsITCgZyCe0Vpvj+KSPIWc= |
| | | </data> |
| | | </dict> |
| | | <key>files2</key> |
| | | <dict> |
| | | <key>Headers/AppsFlyerCrossPromotionHelper.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | ezewyhf50Apa+1HjqfRFE7nXZIE= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | YgrwrWx/ZFYjXh2t5ZHY6S0EZTroYfe5Nprl3alq+Ho= |
| | | </data> |
| | | </dict> |
| | | <key>Headers/AppsFlyerDeepLink.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | jDznIDDggwXT7EmzE7TYcZjhMjA= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | Z5nW/ynpNNV+krqJXqy1Gb+gdnruPFWutZYYX7hSt3I= |
| | | </data> |
| | | </dict> |
| | | <key>Headers/AppsFlyerDeepLinkResult.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | 3J9juDAkVB2LUxC7/NDmKqgrzyQ= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | QsQGXKix5206DUBBUdDxfg5ykma/3V9MoHOxbz8NaOs= |
| | | </data> |
| | | </dict> |
| | | <key>Headers/AppsFlyerLib.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | NbnEYqmh3YQxKTTMmU6NdiBjCPU= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | VBCf2HT4z2f3yajqjKb+SDfyFWvy4PD1EWeiHBZg8FQ= |
| | | </data> |
| | | </dict> |
| | | <key>Headers/AppsFlyerLinkGenerator.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | dmn7cx6Z5wxK92gRzGUwPeRiZFg= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | n5nvQT7mm5XE6/p92Fwks9TR1rVR9k1TgTk06A14CMg= |
| | | </data> |
| | | </dict> |
| | | <key>Headers/AppsFlyerShareInviteHelper.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | d9/NIwpZ+CNQ8zsxhNkHTT7kpRE= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | dcwbMQEM8N0Ugem7QbAWWGP+hfO/0vlued2Pep6IKtc= |
| | | </data> |
| | | </dict> |
| | | <key>Modules/module.modulemap</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | r+QHVTsITCgZyCe0Vpvj+KSPIWc= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | ZcaMjc66PAFkteksoe5Rzelk7opMMS8QdKiza/LgQwA= |
| | | </data> |
| | | </dict> |
| | | </dict> |
| | | <key>rules</key> |
| | | <dict> |
| | | <key>^.*</key> |
| | | <true/> |
| | | <key>^.*\.lproj/</key> |
| | | <dict> |
| | | <key>optional</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>1000</real> |
| | | </dict> |
| | | <key>^.*\.lproj/locversion.plist$</key> |
| | | <dict> |
| | | <key>omit</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>1100</real> |
| | | </dict> |
| | | <key>^Base\.lproj/</key> |
| | | <dict> |
| | | <key>weight</key> |
| | | <real>1010</real> |
| | | </dict> |
| | | <key>^version.plist$</key> |
| | | <true/> |
| | | </dict> |
| | | <key>rules2</key> |
| | | <dict> |
| | | <key>.*\.dSYM($|/)</key> |
| | | <dict> |
| | | <key>weight</key> |
| | | <real>11</real> |
| | | </dict> |
| | | <key>^(.*/)?\.DS_Store$</key> |
| | | <dict> |
| | | <key>omit</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>2000</real> |
| | | </dict> |
| | | <key>^.*</key> |
| | | <true/> |
| | | <key>^.*\.lproj/</key> |
| | | <dict> |
| | | <key>optional</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>1000</real> |
| | | </dict> |
| | | <key>^.*\.lproj/locversion.plist$</key> |
| | | <dict> |
| | | <key>omit</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>1100</real> |
| | | </dict> |
| | | <key>^Base\.lproj/</key> |
| | | <dict> |
| | | <key>weight</key> |
| | | <real>1010</real> |
| | | </dict> |
| | | <key>^Info\.plist$</key> |
| | | <dict> |
| | | <key>omit</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>20</real> |
| | | </dict> |
| | | <key>^PkgInfo$</key> |
| | | <dict> |
| | | <key>omit</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>20</real> |
| | | </dict> |
| | | <key>^embedded\.provisionprofile$</key> |
| | | <dict> |
| | | <key>weight</key> |
| | | <real>20</real> |
| | | </dict> |
| | | <key>^version\.plist$</key> |
| | | <dict> |
| | | <key>weight</key> |
| | | <real>20</real> |
| | | </dict> |
| | | </dict> |
| | | </dict> |
| | | </plist> |
New file |
| | |
| | | Versions/Current/AppsFlyerLib |
New file |
| | |
| | | Versions/Current/Headers |
New file |
| | |
| | | Versions/Current/Modules |
New file |
| | |
| | | Versions/Current/Resources |
New file |
| | |
| | | // |
| | | // CrossPromotionHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | AppsFlyer allows you to log and attribute installs originating |
| | | from cross promotion campaigns of your existing apps. |
| | | Afterwards, you can optimize on your cross-promotion traffic to get even better results. |
| | | */ |
| | | @interface AppsFlyerCrossPromotionHelper : NSObject |
| | | |
| | | /** |
| | | To log an impression use the following API call. |
| | | Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard. |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | */ |
| | | + (void)logCrossPromoteImpression:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | /** |
| | | iOS allows you to utilize the StoreKit component to open |
| | | the App Store while remaining in the context of your app. |
| | | More details at https://support.appsflyer.com/hc/en-us/articles/115004481946-Cross-Promotion-Tracking#tracking-cross-promotion-impressions |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | @param openStoreBlock Contains promoted `clickURL` |
| | | */ |
| | | + (void)logAndOpenStore:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters |
| | | openStore:(void (^)(NSURLSession *urlSession, NSURL *clickURL))openStoreBlock; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplink.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | NS_SWIFT_NAME(DeepLink) |
| | | @interface AppsFlyerDeepLink : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property (readonly, nonnull) NSDictionary<NSString *, id> *clickEvent; |
| | | @property (readonly, nullable) NSString *deeplinkValue; |
| | | @property (readonly, nullable) NSString *matchType; |
| | | @property (readonly, nullable) NSString *clickHTTPReferrer; |
| | | @property (readonly, nullable) NSString *mediaSource; |
| | | @property (readonly, nullable) NSString *campaign; |
| | | @property (readonly, nullable) NSString *campaignId; |
| | | @property (readonly, nullable) NSString *afSub1; |
| | | @property (readonly, nullable) NSString *afSub2; |
| | | @property (readonly, nullable) NSString *afSub3; |
| | | @property (readonly, nullable) NSString *afSub4; |
| | | @property (readonly, nullable) NSString *afSub5; |
| | | @property (readonly) BOOL isDeferred; |
| | | |
| | | - (NSString *)toString; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplinkResult.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | @class AppsFlyerDeepLink; |
| | | |
| | | typedef NS_CLOSED_ENUM(NSUInteger, AFSDKDeepLinkResultStatus) { |
| | | AFSDKDeepLinkResultStatusNotFound, |
| | | AFSDKDeepLinkResultStatusFound, |
| | | AFSDKDeepLinkResultStatusFailure, |
| | | } NS_SWIFT_NAME(DeepLinkResultStatus); |
| | | |
| | | NS_SWIFT_NAME(DeepLinkResult) |
| | | @interface AppsFlyerDeepLinkResult : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(readonly) AFSDKDeepLinkResultStatus status; |
| | | |
| | | @property(readonly, nullable) AppsFlyerDeepLink *deepLink; |
| | | @property(readonly, nullable) NSError *error; |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // AppsFlyerLib.h |
| | | // AppsFlyerLib |
| | | // |
| | | // AppsFlyer iOS SDK 6.5.1 (51) |
| | | // Copyright (c) 2012-2020 AppsFlyer Ltd. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | #import "AppsFlyerCrossPromotionHelper.h" |
| | | #import "AppsFlyerShareInviteHelper.h" |
| | | #import "AppsFlyerDeepLinkResult.h" |
| | | #import "AppsFlyerDeepLink.h" |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | // In app event names constants |
| | | #define AFEventLevelAchieved @"af_level_achieved" |
| | | #define AFEventAddPaymentInfo @"af_add_payment_info" |
| | | #define AFEventAddToCart @"af_add_to_cart" |
| | | #define AFEventAddToWishlist @"af_add_to_wishlist" |
| | | #define AFEventCompleteRegistration @"af_complete_registration" |
| | | #define AFEventTutorial_completion @"af_tutorial_completion" |
| | | #define AFEventInitiatedCheckout @"af_initiated_checkout" |
| | | #define AFEventPurchase @"af_purchase" |
| | | #define AFEventRate @"af_rate" |
| | | #define AFEventSearch @"af_search" |
| | | #define AFEventSpentCredits @"af_spent_credits" |
| | | #define AFEventAchievementUnlocked @"af_achievement_unlocked" |
| | | #define AFEventContentView @"af_content_view" |
| | | #define AFEventListView @"af_list_view" |
| | | #define AFEventTravelBooking @"af_travel_booking" |
| | | #define AFEventShare @"af_share" |
| | | #define AFEventInvite @"af_invite" |
| | | #define AFEventLogin @"af_login" |
| | | #define AFEventReEngage @"af_re_engage" |
| | | #define AFEventUpdate @"af_update" |
| | | #define AFEventOpenedFromPushNotification @"af_opened_from_push_notification" |
| | | #define AFEventLocation @"af_location_coordinates" |
| | | #define AFEventCustomerSegment @"af_customer_segment" |
| | | |
| | | #define AFEventSubscribe @"af_subscribe" |
| | | #define AFEventStartTrial @"af_start_trial" |
| | | #define AFEventAdClick @"af_ad_click" |
| | | #define AFEventAdView @"af_ad_view" |
| | | |
| | | // In app event parameter names |
| | | #define AFEventParamContent @"af_content" |
| | | #define AFEventParamAchievementId @"af_achievement_id" |
| | | #define AFEventParamLevel @"af_level" |
| | | #define AFEventParamScore @"af_score" |
| | | #define AFEventParamSuccess @"af_success" |
| | | #define AFEventParamPrice @"af_price" |
| | | #define AFEventParamContentType @"af_content_type" |
| | | #define AFEventParamContentId @"af_content_id" |
| | | #define AFEventParamContentList @"af_content_list" |
| | | #define AFEventParamCurrency @"af_currency" |
| | | #define AFEventParamQuantity @"af_quantity" |
| | | #define AFEventParamRegistrationMethod @"af_registration_method" |
| | | #define AFEventParamPaymentInfoAvailable @"af_payment_info_available" |
| | | #define AFEventParamMaxRatingValue @"af_max_rating_value" |
| | | #define AFEventParamRatingValue @"af_rating_value" |
| | | #define AFEventParamSearchString @"af_search_string" |
| | | #define AFEventParamDateA @"af_date_a" |
| | | #define AFEventParamDateB @"af_date_b" |
| | | #define AFEventParamDestinationA @"af_destination_a" |
| | | #define AFEventParamDestinationB @"af_destination_b" |
| | | #define AFEventParamDescription @"af_description" |
| | | #define AFEventParamClass @"af_class" |
| | | #define AFEventParamEventStart @"af_event_start" |
| | | #define AFEventParamEventEnd @"af_event_end" |
| | | #define AFEventParamLat @"af_lat" |
| | | #define AFEventParamLong @"af_long" |
| | | #define AFEventParamCustomerUserId @"af_customer_user_id" |
| | | #define AFEventParamValidated @"af_validated" |
| | | #define AFEventParamRevenue @"af_revenue" |
| | | #define AFEventProjectedParamRevenue @"af_projected_revenue" |
| | | #define AFEventParamReceiptId @"af_receipt_id" |
| | | #define AFEventParamTutorialId @"af_tutorial_id" |
| | | #define AFEventParamVirtualCurrencyName @"af_virtual_currency_name" |
| | | #define AFEventParamDeepLink @"af_deep_link" |
| | | #define AFEventParamOldVersion @"af_old_version" |
| | | #define AFEventParamNewVersion @"af_new_version" |
| | | #define AFEventParamReviewText @"af_review_text" |
| | | #define AFEventParamCouponCode @"af_coupon_code" |
| | | #define AFEventParamOrderId @"af_order_id" |
| | | #define AFEventParam1 @"af_param_1" |
| | | #define AFEventParam2 @"af_param_2" |
| | | #define AFEventParam3 @"af_param_3" |
| | | #define AFEventParam4 @"af_param_4" |
| | | #define AFEventParam5 @"af_param_5" |
| | | #define AFEventParam6 @"af_param_6" |
| | | #define AFEventParam7 @"af_param_7" |
| | | #define AFEventParam8 @"af_param_8" |
| | | #define AFEventParam9 @"af_param_9" |
| | | #define AFEventParam10 @"af_param_10" |
| | | |
| | | #define AFEventParamDepartingDepartureDate @"af_departing_departure_date" |
| | | #define AFEventParamReturningDepartureDate @"af_returning_departure_date" |
| | | #define AFEventParamDestinationList @"af_destination_list" //array of string |
| | | #define AFEventParamCity @"af_city" |
| | | #define AFEventParamRegion @"af_region" |
| | | #define AFEventParamCountry @"af_country" |
| | | |
| | | |
| | | #define AFEventParamDepartingArrivalDate @"af_departing_arrival_date" |
| | | #define AFEventParamReturningArrivalDate @"af_returning_arrival_date" |
| | | #define AFEventParamSuggestedDestinations @"af_suggested_destinations" //array of string |
| | | #define AFEventParamTravelStart @"af_travel_start" |
| | | #define AFEventParamTravelEnd @"af_travel_end" |
| | | #define AFEventParamNumAdults @"af_num_adults" |
| | | #define AFEventParamNumChildren @"af_num_children" |
| | | #define AFEventParamNumInfants @"af_num_infants" |
| | | #define AFEventParamSuggestedHotels @"af_suggested_hotels" //array of string |
| | | |
| | | #define AFEventParamUserScore @"af_user_score" |
| | | #define AFEventParamHotelScore @"af_hotel_score" |
| | | #define AFEventParamPurchaseCurrency @"af_purchase_currency" |
| | | |
| | | #define AFEventParamPreferredStarRatings @"af_preferred_star_ratings" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | |
| | | #define AFEventParamPreferredPriceRange @"af_preferred_price_range" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | #define AFEventParamPreferredNeighborhoods @"af_preferred_neighborhoods" //array of string |
| | | #define AFEventParamPreferredNumStops @"af_preferred_num_stops" |
| | | |
| | | #define AFEventParamAdRevenueAdType @"af_adrev_ad_type" |
| | | #define AFEventParamAdRevenueNetworkName @"af_adrev_network_name" |
| | | #define AFEventParamAdRevenuePlacementId @"af_adrev_placement_id" |
| | | #define AFEventParamAdRevenueAdSize @"af_adrev_ad_size" |
| | | #define AFEventParamAdRevenueMediatedNetworkName @"af_adrev_mediated_network_name" |
| | | |
| | | /// Mail hashing type |
| | | typedef enum { |
| | | /// None |
| | | EmailCryptTypeNone = 0, |
| | | /// SHA1 |
| | | EmailCryptTypeSHA1 = 1, |
| | | /// MD5 |
| | | EmailCryptTypeMD5 = 2, |
| | | /// SHA256 |
| | | EmailCryptTypeSHA256 = 3 |
| | | } EmailCryptType; |
| | | |
| | | NS_SWIFT_NAME(DeepLinkDelegate) |
| | | @protocol AppsFlyerDeepLinkDelegate <NSObject> |
| | | |
| | | @optional |
| | | - (void)didResolveDeepLink:(AppsFlyerDeepLinkResult *_Nonnull)result; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | Conform and subscribe to this protocol to allow getting data about conversion and |
| | | install attribution |
| | | */ |
| | | @protocol AppsFlyerLibDelegate <NSObject> |
| | | |
| | | /** |
| | | `conversionInfo` contains information about install. |
| | | Organic/non-organic, etc. |
| | | @param conversionInfo May contain <code>null</code> values for some keys. Please handle this case. |
| | | */ |
| | | - (void)onConversionDataSuccess:(NSDictionary *)conversionInfo; |
| | | |
| | | /** |
| | | Any errors that occurred during the conversion request. |
| | | */ |
| | | - (void)onConversionDataFail:(NSError *)error; |
| | | |
| | | @optional |
| | | |
| | | /** |
| | | `attributionData` contains information about OneLink, deeplink. |
| | | */ |
| | | - (void)onAppOpenAttribution:(NSDictionary *)attributionData; |
| | | |
| | | /** |
| | | Any errors that occurred during the attribution request. |
| | | */ |
| | | - (void)onAppOpenAttributionFailure:(NSError *)error; |
| | | |
| | | /** |
| | | @abstract Sets the HTTP header fields of the ESP resolving to the given |
| | | dictionary. |
| | | @discussion This method replaces all header fields that may have |
| | | existed before this method ESP resolving call. |
| | | To keep default SDK behavior - return nil; |
| | | */ |
| | | - (NSDictionary <NSString *, NSString *> * _Nullable)allHTTPHeaderFieldsForResolveDeepLinkURL:(NSURL *)URL; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | You can log installs, app updates, sessions and additional in-app events |
| | | (including in-app purchases, game levels, etc.) |
| | | to evaluate ROI and user engagement. |
| | | The iOS SDK is compatible with all iOS/tvOS devices with iOS version 7 and above. |
| | | |
| | | @see [SDK Integration Validator](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS) |
| | | for more information. |
| | | |
| | | */ |
| | | @interface AppsFlyerLib : NSObject |
| | | |
| | | /** |
| | | Gets the singleton instance of the AppsFlyerLib class, creating it if |
| | | necessary. |
| | | |
| | | @return The singleton instance of AppsFlyerLib. |
| | | */ |
| | | + (AppsFlyerLib *)shared; |
| | | |
| | | /** |
| | | In case you use your own user ID in your app, you can set this property to that ID. |
| | | Enables you to cross-reference your own unique ID with AppsFlyer’s unique ID and the other devices’ IDs |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString * customerUserID; |
| | | |
| | | /** |
| | | In case you use custom data and you want to receive it in the raw reports. |
| | | |
| | | @see [Setting additional custom data](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS#setting-additional-custom-data) for more information. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAdditionalData:) NSDictionary * customData; |
| | | |
| | | /** |
| | | Use this property to set your AppsFlyer's dev key |
| | | */ |
| | | @property(nonatomic, strong) NSString * appsFlyerDevKey; |
| | | |
| | | /** |
| | | Use this property to set your app's Apple ID(taken from the app's page on iTunes Connect) |
| | | */ |
| | | @property(nonatomic, strong) NSString * appleAppID; |
| | | |
| | | #ifndef AFSDK_NO_IDFA |
| | | /** |
| | | AppsFlyer SDK collect Apple's `advertisingIdentifier` if the `AdSupport.framework` included in the SDK. |
| | | You can disable this behavior by setting the following property to YES |
| | | */ |
| | | @property(nonatomic) BOOL disableAdvertisingIdentifier; |
| | | |
| | | @property(nonatomic, strong, readonly) NSString *advertisingIdentifier; |
| | | |
| | | /** |
| | | Waits for request user authorization to access app-related data |
| | | */ |
| | | - (void)waitForATTUserAuthorizationWithTimeoutInterval:(NSTimeInterval)timeoutInterval |
| | | NS_SWIFT_NAME(waitForATTUserAuthorization(timeoutInterval:)); |
| | | |
| | | #endif |
| | | |
| | | @property(nonatomic) BOOL disableSKAdNetwork; |
| | | |
| | | /** |
| | | In case of in app purchase events, you can set the currency code your user has purchased with. |
| | | The currency code is a 3 letter code according to ISO standards |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrencyCode:@"USD"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currencyCode = "USD" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString *currencyCode; |
| | | |
| | | /** |
| | | Prints SDK messages to the console log. This property should only be used in `DEBUG` mode. |
| | | The default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL isDebug; |
| | | |
| | | /** |
| | | Set this flag to `YES`, to collect the current device name(e.g. "My iPhone"). Default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL shouldCollectDeviceName; |
| | | |
| | | /** |
| | | Set your `OneLink ID` from OneLink configuration. Used in User Invites to generate a OneLink. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAppInviteOneLink:) NSString * appInviteOneLinkID; |
| | | |
| | | /** |
| | | Opt-out logging for specific user |
| | | */ |
| | | @property(atomic) BOOL anonymizeUser; |
| | | |
| | | /** |
| | | Opt-out for Apple Search Ads attributions |
| | | */ |
| | | @property(atomic) BOOL disableCollectASA; |
| | | |
| | | @property(nonatomic) BOOL disableAppleAdsAttribution; |
| | | |
| | | /** |
| | | AppsFlyer delegate. See `AppsFlyerLibDelegate` |
| | | */ |
| | | @property(weak, nonatomic) id<AppsFlyerLibDelegate> delegate; |
| | | |
| | | @property(weak, nonatomic) id<AppsFlyerDeepLinkDelegate> deepLinkDelegate; |
| | | |
| | | /** |
| | | In app purchase receipt validation Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useReceiptValidationSandbox; |
| | | |
| | | /** |
| | | Set this flag to test uninstall on Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useUninstallSandbox; |
| | | |
| | | /** |
| | | For advertisers who wrap OneLink within another Universal Link. |
| | | An advertiser will be able to deeplink from a OneLink wrapped within another Universal Link and also log this retargeting conversion. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setResolveDeepLinkURLs:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *resolveDeepLinkURLs; |
| | | |
| | | /** |
| | | For advertisers who use vanity OneLinks. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] oneLinkCustomDomains:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *oneLinkCustomDomains; |
| | | |
| | | /* |
| | | * Set phone number for each `start` event. `phoneNumber` will be sent as SHA256 string |
| | | */ |
| | | @property(nonatomic, nullable) NSString *phoneNumber; |
| | | |
| | | - (NSString *)phoneNumber UNAVAILABLE_ATTRIBUTE; |
| | | |
| | | /** |
| | | To disable app's vendor identifier(IDFV), set disableIDFVCollection to true |
| | | */ |
| | | @property(nonatomic) BOOL disableIDFVCollection; |
| | | |
| | | /** |
| | | Set the language of the device. The data will be displayed in Raw Data Reports |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrentDeviceLanguage:@"EN"] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currentDeviceLanguage("EN") |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSString *currentDeviceLanguage; |
| | | |
| | | /** |
| | | Enable the collection of Facebook Deferred AppLinks |
| | | Requires Facebook SDK and Facebook app on target/client device. |
| | | This API must be invoked prior to initializing the AppsFlyer SDK in order to function properly. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] enableFacebookDeferredApplinksWithClass:[FBSDKAppLinkUtility class]] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().enableFacebookDeferredApplinks(with: FBSDKAppLinkUtility.self) |
| | | </pre> |
| | | |
| | | @param facebookAppLinkUtilityClass requeries method call `[FBSDKAppLinkUtility class]` as param. |
| | | */ |
| | | - (void)enableFacebookDeferredApplinksWithClass:(Class _Nullable)facebookAppLinkUtilityClass; |
| | | |
| | | /** |
| | | Use this to send the user's emails |
| | | |
| | | @param userEmails The list of strings that hold mails |
| | | @param type Hash algoritm |
| | | */ |
| | | - (void)setUserEmails:(NSArray<NSString *> * _Nullable)userEmails withCryptType:(EmailCryptType)type; |
| | | |
| | | /** |
| | | Start SDK session |
| | | Add the following method at the `applicationDidBecomeActive` in AppDelegate class |
| | | */ |
| | | - (void)start; |
| | | |
| | | - (void)startWithCompletionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler; |
| | | |
| | | /** |
| | | Use this method to log an events with multiple values. See AppsFlyer's documentation for details. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] logEvent:AFEventPurchase |
| | | withValues: @{AFEventParamRevenue : @200, |
| | | AFEventParamCurrency : @"USD", |
| | | AFEventParamQuantity : @2, |
| | | AFEventParamContentId: @"092", |
| | | AFEventParamReceiptId: @"9277"}]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventPurchase, |
| | | withValues: [AFEventParamRevenue : "1200", |
| | | AFEventParamContent : "shoes", |
| | | AFEventParamContentId: "123"]) |
| | | </pre> |
| | | |
| | | @param eventName Contains name of event that could be provided from predefined constants in `AppsFlyerLib.h` |
| | | @param values Contains dictionary of values for handling by backend |
| | | */ |
| | | - (void)logEvent:(NSString *)eventName withValues:(NSDictionary * _Nullable)values; |
| | | |
| | | - (void)logEventWithEventName:(NSString *)eventName |
| | | eventValues:(NSDictionary<NSString * , id> * _Nullable)eventValues |
| | | completionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler |
| | | NS_SWIFT_NAME(logEvent(name:values:completionHandler:)); |
| | | |
| | | /** |
| | | To log and validate in app purchases you can call this method from the completeTransaction: method on |
| | | your `SKPaymentTransactionObserver`. |
| | | |
| | | @param productIdentifier The product identifier |
| | | @param price The product price |
| | | @param currency The product currency |
| | | @param transactionId The purchase transaction Id |
| | | @param params The additional param, which you want to receive it in the raw reports |
| | | @param successBlock The success callback |
| | | @param failedBlock The failure callback |
| | | */ |
| | | - (void)validateAndLogInAppPurchase:(NSString * _Nullable)productIdentifier |
| | | price:(NSString * _Nullable)price |
| | | currency:(NSString * _Nullable)currency |
| | | transactionId:(NSString * _Nullable)transactionId |
| | | additionalParameters:(NSDictionary * _Nullable)params |
| | | success:(void (^ _Nullable)(NSDictionary * response))successBlock |
| | | failure:(void (^ _Nullable)(NSError * _Nullable error, id _Nullable reponse))failedBlock NS_AVAILABLE(10_7, 7_0); |
| | | |
| | | /** |
| | | To log location for geo-fencing. Does the same as code below. |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventLocation, withValues: [AFEventParamLong:longitude, AFEventParamLat:latitude]) |
| | | </pre> |
| | | |
| | | @param longitude The location longitude |
| | | @param latitude The location latitude |
| | | */ |
| | | - (void)logLocation:(double)longitude latitude:(double)latitude NS_SWIFT_NAME(logLocation(longitude:latitude:)); |
| | | |
| | | /** |
| | | This method returns AppsFlyer's internal id(unique for your app) |
| | | |
| | | @return Internal AppsFlyer Id |
| | | */ |
| | | - (NSString *)getAppsFlyerUID; |
| | | |
| | | /** |
| | | In case you want to log deep linking. Does the same as `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @warning Preferred to use `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url sourceApplication:(NSString * _Nullable)sourceApplication API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | In case you want to log deep linking. |
| | | Call this method from inside your AppDelegate `-application:openURL:sourceApplication:annotation:` |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | @param annotation The annotation that passed to your app delegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url |
| | | sourceApplication:(NSString * _Nullable)sourceApplication |
| | | withAnnotation:(id _Nullable)annotation API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Call this method from inside of your AppDelegate `-application:openURL:options:` method. |
| | | This method is functionally the same as calling the AppsFlyer method |
| | | `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your app delegate |
| | | @param options The options dictionary that was passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenUrl:(NSURL * _Nullable)url options:(NSDictionary * _Nullable)options API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Allow AppsFlyer to handle restoration from an NSUserActivity. |
| | | Use this method to log deep links with OneLink. |
| | | |
| | | @param userActivity The NSUserActivity that caused the app to be opened. |
| | | */ |
| | | - (BOOL)continueUserActivity:(NSUserActivity * _Nullable)userActivity |
| | | restorationHandler:(void (^ _Nullable)(NSArray * _Nullable))restorationHandler NS_AVAILABLE_IOS(9_0) API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Enable AppsFlyer to handle a push notification. |
| | | |
| | | @see [Learn more here](https://support.appsflyer.com/hc/en-us/articles/207364076-Measuring-Push-Notification-Re-Engagement-Campaigns) |
| | | |
| | | @warning To make it work - set data, related to AppsFlyer under key @"af". |
| | | |
| | | @param pushPayload The `userInfo` from received remote notification. One of root keys should be @"af". |
| | | */ |
| | | - (void)handlePushNotification:(NSDictionary * _Nullable)pushPayload; |
| | | |
| | | |
| | | /** |
| | | Register uninstall - you should register for remote notification and provide AppsFlyer the push device token. |
| | | |
| | | @param deviceToken The `deviceToken` from `-application:didRegisterForRemoteNotificationsWithDeviceToken:` |
| | | */ |
| | | - (void)registerUninstall:(NSData * _Nullable)deviceToken; |
| | | |
| | | /** |
| | | Get SDK version. |
| | | |
| | | @return The AppsFlyer SDK version info. |
| | | */ |
| | | - (NSString *)getSDKVersion; |
| | | |
| | | /** |
| | | This is for internal use. |
| | | */ |
| | | - (void)remoteDebuggingCallWithData:(NSString *)data; |
| | | |
| | | /** |
| | | Used to force the trigger `onAppOpenAttribution` delegate. |
| | | Notice, re-engagement, session and launch won't be counted. |
| | | Only for OneLink/UniversalLink/Deeplink resolving. |
| | | |
| | | @param URL The param to resolve into -[AppsFlyerLibDelegate onAppOpenAttribution:] |
| | | */ |
| | | - (void)performOnAppAttributionWithURL:(NSURL * _Nullable)URL; |
| | | |
| | | /** |
| | | @brief This property accepts a string value representing the host name for all endpoints. |
| | | Can be used to Zero rate your application’s data usage. Contact your CSM for more information. |
| | | |
| | | @warning To use `default` SDK endpoint – set value to `nil`. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setHost:@"example.com"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().host = "example.com" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *host; |
| | | |
| | | /** |
| | | * This function set the host name and prefix host name for all the endpoints |
| | | **/ |
| | | - (void)setHost:(NSString *)host withHostPrefix:(NSString *)hostPrefix; |
| | | |
| | | /** |
| | | * This property accepts a string value representing the prefix host name for all endpoints. |
| | | * for example "test" prefix with default host name will have the address "host.appsflyer.com" |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *hostPrefix; |
| | | |
| | | /** |
| | | This property is responsible for timeout between sessions in seconds. |
| | | Default value is 5 seconds. |
| | | */ |
| | | @property(atomic) NSUInteger minTimeBetweenSessions; |
| | | |
| | | /** |
| | | API to shut down all SDK activities. |
| | | |
| | | @warning This will disable all requests from AppsFlyer SDK. |
| | | */ |
| | | @property(atomic) BOOL isStopped; |
| | | |
| | | /** |
| | | API to set manually Facebook deferred app link |
| | | */ |
| | | @property(nonatomic, nullable) NSURL *facebookDeferredAppLink; |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *sharingFilter DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | @property(nonatomic) NSUInteger deepLinkTimeout; |
| | | |
| | | /** |
| | | Block an events from being shared with any partner |
| | | This method overwrite -[AppsFlyerLib setSharingFilter:] |
| | | */ |
| | | - (void)setSharingFilterForAllPartners DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | |
| | | The sharing filter is cleared in case if `nil` or empty array passed as a parameter. |
| | | "all" keyword sets sharing filter for ALL partners, it is case insencitive and has highest priority |
| | | if passed along with another values. For example, if ["all", "examplePartner1_int", "examplePartner2_int" ] passed, |
| | | the sharing filter will be set for ALL partners. |
| | | */ |
| | | - (void)setSharingFilterForPartners:(NSArray<NSString *> * _Nullable)sharingFilter; |
| | | |
| | | /** |
| | | Validate if URL contains certain string and append quiery |
| | | parameters to deeplink URL. In case if URL does not contain user-defined string, |
| | | parameters are not appended to the url. |
| | | |
| | | @param containsString string to check in URL. |
| | | @param parameters NSDictionary, which containins parameters to append to the deeplink url after it passed validation. |
| | | */ |
| | | - (void)appendParametersToDeepLinkingURLWithString:(NSString *)containsString |
| | | parameters:(NSDictionary<NSString *, NSString*> *)parameters |
| | | NS_SWIFT_NAME(appendParametersToDeeplinkURL(contains:parameters:)); |
| | | |
| | | /** |
| | | Adds array of keys, which are used to compose key path |
| | | to resolve deeplink from push notification payload `userInfo`. |
| | | |
| | | @param deepLinkPath an array of strings which contains keys to search for deeplink in payload. |
| | | */ |
| | | - (void)addPushNotificationDeepLinkPath:(NSArray<NSString *> *)deepLinkPath; |
| | | |
| | | /** |
| | | * Allows sending custom data for partner integration purposes. |
| | | * |
| | | * @param partnerId ID of the partner (usually has "_int" suffix) |
| | | * @param partnerInfo customer data, depends on the integration nature with specific partner |
| | | */ |
| | | |
| | | - (void)setPartnerDataWithPartnerId:(NSString * _Nullable)partnerId partnerInfo:(NSDictionary<NSString *, id> * _Nullable)partnerInfo |
| | | NS_SWIFT_NAME(setPartnerData(partnerId:partnerInfo:)); |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // LinkGenerator.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | Payload container for the `generateInviteUrlWithLinkGenerator:completionHandler:` from `AppsFlyerShareInviteHelper` |
| | | */ |
| | | @interface AppsFlyerLinkGenerator : NSObject |
| | | |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | - (instancetype)init NS_UNAVAILABLE; |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | + (instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(nonatomic, nullable) NSString *brandDomain; |
| | | |
| | | /// The channel through which the invite was sent (e.g. Facebook/Gmail/etc.). Usage: Recommended |
| | | - (void)setChannel :(nonnull NSString *)channel; |
| | | /// ReferrerCustomerId setter |
| | | - (void)setReferrerCustomerId:(nonnull NSString *)referrerCustomerId; |
| | | /// A campaign name. Usage: Optional |
| | | - (void)setCampaign :(nonnull NSString *)campaign; |
| | | /// ReferrerUID setter |
| | | - (void)setReferrerUID :(nonnull NSString *)referrerUID; |
| | | /// Referrer name |
| | | - (void)setReferrerName :(nonnull NSString *)referrerName; |
| | | /// The URL to referrer user avatar. Usage: Optional |
| | | - (void)setReferrerImageURL :(nonnull NSString *)referrerImageURL; |
| | | /// AppleAppID |
| | | - (void)setAppleAppID :(nonnull NSString *)appleAppID; |
| | | /// Deeplink path |
| | | - (void)setDeeplinkPath :(nonnull NSString *)deeplinkPath; |
| | | /// Base deeplink path |
| | | - (void)setBaseDeeplink :(nonnull NSString *)baseDeeplink; |
| | | /// A single key value custom parameter. Usage: Optional |
| | | - (void)addParameterValue :(nonnull NSString *)value forKey:(NSString *)key; |
| | | /// Multiple key value custom parameters. Usage: Optional |
| | | - (void)addParameters :(nonnull NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // ShareInviteHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import "AppsFlyerLinkGenerator.h" |
| | | |
| | | /** |
| | | AppsFlyerShareInviteHelper |
| | | */ |
| | | @interface AppsFlyerShareInviteHelper : NSObject |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | * The AppsFlyerShareInviteHelper class builds the invite URL according to various setter methods |
| | | * which allow passing on additional information on the click. |
| | | * This information is available through `onConversionDataReceived:` when the user accepts the invite and installs the app. |
| | | * In addition, campaign and channel parameters are visible within the AppsFlyer Dashboard. |
| | | */ |
| | | + (void)generateInviteUrlWithLinkGenerator:(AppsFlyerLinkGenerator *(^)(AppsFlyerLinkGenerator *generator))generatorCreator completionHandler:(void (^)(NSURL *_Nullable url))completionHandler; |
| | | |
| | | /** |
| | | * It is recommended to generate an in-app event after the invite is sent to log the invites from the senders' perspective. |
| | | * This enables you to find the users that tend most to invite friends, and the media sources that get you these users. |
| | | */ |
| | | + (void)logInvite:(nullable NSString *)channel parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | framework module AppsFlyerLib { |
| | | umbrella header "AppsFlyerLib.h" |
| | | |
| | | export * |
| | | module * { export * } |
| | | } |
New file |
| | |
| | | <?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>BuildMachineOSBuild</key> |
| | | <string>20G224</string> |
| | | <key>CFBundleDevelopmentRegion</key> |
| | | <string>en</string> |
| | | <key>CFBundleExecutable</key> |
| | | <string>AppsFlyerLib</string> |
| | | <key>CFBundleIdentifier</key> |
| | | <string>com.appsflyer.sdk.lib</string> |
| | | <key>CFBundleInfoDictionaryVersion</key> |
| | | <string>6.0</string> |
| | | <key>CFBundleName</key> |
| | | <string>AppsFlyerLib</string> |
| | | <key>CFBundlePackageType</key> |
| | | <string>FMWK</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.0</string> |
| | | <key>CFBundleSignature</key> |
| | | <string>????</string> |
| | | <key>CFBundleSupportedPlatforms</key> |
| | | <array> |
| | | <string>MacOSX</string> |
| | | </array> |
| | | <key>CFBundleVersion</key> |
| | | <string>6.3.4</string> |
| | | <key>DTCompiler</key> |
| | | <string>com.apple.compilers.llvm.clang.1_0</string> |
| | | <key>DTPlatformBuild</key> |
| | | <string>13C100</string> |
| | | <key>DTPlatformName</key> |
| | | <string>macosx</string> |
| | | <key>DTPlatformVersion</key> |
| | | <string>12.1</string> |
| | | <key>DTSDKBuild</key> |
| | | <string>21C46</string> |
| | | <key>DTSDKName</key> |
| | | <string>macosx12.1</string> |
| | | <key>DTXcode</key> |
| | | <string>1321</string> |
| | | <key>DTXcodeBuild</key> |
| | | <string>13C100</string> |
| | | <key>LSMinimumSystemVersion</key> |
| | | <string>10.15</string> |
| | | <key>UIDeviceFamily</key> |
| | | <array> |
| | | <integer>2</integer> |
| | | </array> |
| | | </dict> |
| | | </plist> |
New file |
| | |
| | | Versions/Current/AppsFlyerLib |
New file |
| | |
| | | Versions/Current/Headers |
New file |
| | |
| | | Versions/Current/Modules |
New file |
| | |
| | | Versions/Current/Resources |
New file |
| | |
| | | // |
| | | // CrossPromotionHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | AppsFlyer allows you to log and attribute installs originating |
| | | from cross promotion campaigns of your existing apps. |
| | | Afterwards, you can optimize on your cross-promotion traffic to get even better results. |
| | | */ |
| | | @interface AppsFlyerCrossPromotionHelper : NSObject |
| | | |
| | | /** |
| | | To log an impression use the following API call. |
| | | Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard. |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | */ |
| | | + (void)logCrossPromoteImpression:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | /** |
| | | iOS allows you to utilize the StoreKit component to open |
| | | the App Store while remaining in the context of your app. |
| | | More details at https://support.appsflyer.com/hc/en-us/articles/115004481946-Cross-Promotion-Tracking#tracking-cross-promotion-impressions |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | @param openStoreBlock Contains promoted `clickURL` |
| | | */ |
| | | + (void)logAndOpenStore:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters |
| | | openStore:(void (^)(NSURLSession *urlSession, NSURL *clickURL))openStoreBlock; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplink.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | NS_SWIFT_NAME(DeepLink) |
| | | @interface AppsFlyerDeepLink : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property (readonly, nonnull) NSDictionary<NSString *, id> *clickEvent; |
| | | @property (readonly, nullable) NSString *deeplinkValue; |
| | | @property (readonly, nullable) NSString *matchType; |
| | | @property (readonly, nullable) NSString *clickHTTPReferrer; |
| | | @property (readonly, nullable) NSString *mediaSource; |
| | | @property (readonly, nullable) NSString *campaign; |
| | | @property (readonly, nullable) NSString *campaignId; |
| | | @property (readonly, nullable) NSString *afSub1; |
| | | @property (readonly, nullable) NSString *afSub2; |
| | | @property (readonly, nullable) NSString *afSub3; |
| | | @property (readonly, nullable) NSString *afSub4; |
| | | @property (readonly, nullable) NSString *afSub5; |
| | | @property (readonly) BOOL isDeferred; |
| | | |
| | | - (NSString *)toString; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplinkResult.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | @class AppsFlyerDeepLink; |
| | | |
| | | typedef NS_CLOSED_ENUM(NSUInteger, AFSDKDeepLinkResultStatus) { |
| | | AFSDKDeepLinkResultStatusNotFound, |
| | | AFSDKDeepLinkResultStatusFound, |
| | | AFSDKDeepLinkResultStatusFailure, |
| | | } NS_SWIFT_NAME(DeepLinkResultStatus); |
| | | |
| | | NS_SWIFT_NAME(DeepLinkResult) |
| | | @interface AppsFlyerDeepLinkResult : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(readonly) AFSDKDeepLinkResultStatus status; |
| | | |
| | | @property(readonly, nullable) AppsFlyerDeepLink *deepLink; |
| | | @property(readonly, nullable) NSError *error; |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // AppsFlyerLib.h |
| | | // AppsFlyerLib |
| | | // |
| | | // AppsFlyer iOS SDK 6.5.1 (51) |
| | | // Copyright (c) 2012-2020 AppsFlyer Ltd. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | #import "AppsFlyerCrossPromotionHelper.h" |
| | | #import "AppsFlyerShareInviteHelper.h" |
| | | #import "AppsFlyerDeepLinkResult.h" |
| | | #import "AppsFlyerDeepLink.h" |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | // In app event names constants |
| | | #define AFEventLevelAchieved @"af_level_achieved" |
| | | #define AFEventAddPaymentInfo @"af_add_payment_info" |
| | | #define AFEventAddToCart @"af_add_to_cart" |
| | | #define AFEventAddToWishlist @"af_add_to_wishlist" |
| | | #define AFEventCompleteRegistration @"af_complete_registration" |
| | | #define AFEventTutorial_completion @"af_tutorial_completion" |
| | | #define AFEventInitiatedCheckout @"af_initiated_checkout" |
| | | #define AFEventPurchase @"af_purchase" |
| | | #define AFEventRate @"af_rate" |
| | | #define AFEventSearch @"af_search" |
| | | #define AFEventSpentCredits @"af_spent_credits" |
| | | #define AFEventAchievementUnlocked @"af_achievement_unlocked" |
| | | #define AFEventContentView @"af_content_view" |
| | | #define AFEventListView @"af_list_view" |
| | | #define AFEventTravelBooking @"af_travel_booking" |
| | | #define AFEventShare @"af_share" |
| | | #define AFEventInvite @"af_invite" |
| | | #define AFEventLogin @"af_login" |
| | | #define AFEventReEngage @"af_re_engage" |
| | | #define AFEventUpdate @"af_update" |
| | | #define AFEventOpenedFromPushNotification @"af_opened_from_push_notification" |
| | | #define AFEventLocation @"af_location_coordinates" |
| | | #define AFEventCustomerSegment @"af_customer_segment" |
| | | |
| | | #define AFEventSubscribe @"af_subscribe" |
| | | #define AFEventStartTrial @"af_start_trial" |
| | | #define AFEventAdClick @"af_ad_click" |
| | | #define AFEventAdView @"af_ad_view" |
| | | |
| | | // In app event parameter names |
| | | #define AFEventParamContent @"af_content" |
| | | #define AFEventParamAchievementId @"af_achievement_id" |
| | | #define AFEventParamLevel @"af_level" |
| | | #define AFEventParamScore @"af_score" |
| | | #define AFEventParamSuccess @"af_success" |
| | | #define AFEventParamPrice @"af_price" |
| | | #define AFEventParamContentType @"af_content_type" |
| | | #define AFEventParamContentId @"af_content_id" |
| | | #define AFEventParamContentList @"af_content_list" |
| | | #define AFEventParamCurrency @"af_currency" |
| | | #define AFEventParamQuantity @"af_quantity" |
| | | #define AFEventParamRegistrationMethod @"af_registration_method" |
| | | #define AFEventParamPaymentInfoAvailable @"af_payment_info_available" |
| | | #define AFEventParamMaxRatingValue @"af_max_rating_value" |
| | | #define AFEventParamRatingValue @"af_rating_value" |
| | | #define AFEventParamSearchString @"af_search_string" |
| | | #define AFEventParamDateA @"af_date_a" |
| | | #define AFEventParamDateB @"af_date_b" |
| | | #define AFEventParamDestinationA @"af_destination_a" |
| | | #define AFEventParamDestinationB @"af_destination_b" |
| | | #define AFEventParamDescription @"af_description" |
| | | #define AFEventParamClass @"af_class" |
| | | #define AFEventParamEventStart @"af_event_start" |
| | | #define AFEventParamEventEnd @"af_event_end" |
| | | #define AFEventParamLat @"af_lat" |
| | | #define AFEventParamLong @"af_long" |
| | | #define AFEventParamCustomerUserId @"af_customer_user_id" |
| | | #define AFEventParamValidated @"af_validated" |
| | | #define AFEventParamRevenue @"af_revenue" |
| | | #define AFEventProjectedParamRevenue @"af_projected_revenue" |
| | | #define AFEventParamReceiptId @"af_receipt_id" |
| | | #define AFEventParamTutorialId @"af_tutorial_id" |
| | | #define AFEventParamVirtualCurrencyName @"af_virtual_currency_name" |
| | | #define AFEventParamDeepLink @"af_deep_link" |
| | | #define AFEventParamOldVersion @"af_old_version" |
| | | #define AFEventParamNewVersion @"af_new_version" |
| | | #define AFEventParamReviewText @"af_review_text" |
| | | #define AFEventParamCouponCode @"af_coupon_code" |
| | | #define AFEventParamOrderId @"af_order_id" |
| | | #define AFEventParam1 @"af_param_1" |
| | | #define AFEventParam2 @"af_param_2" |
| | | #define AFEventParam3 @"af_param_3" |
| | | #define AFEventParam4 @"af_param_4" |
| | | #define AFEventParam5 @"af_param_5" |
| | | #define AFEventParam6 @"af_param_6" |
| | | #define AFEventParam7 @"af_param_7" |
| | | #define AFEventParam8 @"af_param_8" |
| | | #define AFEventParam9 @"af_param_9" |
| | | #define AFEventParam10 @"af_param_10" |
| | | |
| | | #define AFEventParamDepartingDepartureDate @"af_departing_departure_date" |
| | | #define AFEventParamReturningDepartureDate @"af_returning_departure_date" |
| | | #define AFEventParamDestinationList @"af_destination_list" //array of string |
| | | #define AFEventParamCity @"af_city" |
| | | #define AFEventParamRegion @"af_region" |
| | | #define AFEventParamCountry @"af_country" |
| | | |
| | | |
| | | #define AFEventParamDepartingArrivalDate @"af_departing_arrival_date" |
| | | #define AFEventParamReturningArrivalDate @"af_returning_arrival_date" |
| | | #define AFEventParamSuggestedDestinations @"af_suggested_destinations" //array of string |
| | | #define AFEventParamTravelStart @"af_travel_start" |
| | | #define AFEventParamTravelEnd @"af_travel_end" |
| | | #define AFEventParamNumAdults @"af_num_adults" |
| | | #define AFEventParamNumChildren @"af_num_children" |
| | | #define AFEventParamNumInfants @"af_num_infants" |
| | | #define AFEventParamSuggestedHotels @"af_suggested_hotels" //array of string |
| | | |
| | | #define AFEventParamUserScore @"af_user_score" |
| | | #define AFEventParamHotelScore @"af_hotel_score" |
| | | #define AFEventParamPurchaseCurrency @"af_purchase_currency" |
| | | |
| | | #define AFEventParamPreferredStarRatings @"af_preferred_star_ratings" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | |
| | | #define AFEventParamPreferredPriceRange @"af_preferred_price_range" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | #define AFEventParamPreferredNeighborhoods @"af_preferred_neighborhoods" //array of string |
| | | #define AFEventParamPreferredNumStops @"af_preferred_num_stops" |
| | | |
| | | #define AFEventParamAdRevenueAdType @"af_adrev_ad_type" |
| | | #define AFEventParamAdRevenueNetworkName @"af_adrev_network_name" |
| | | #define AFEventParamAdRevenuePlacementId @"af_adrev_placement_id" |
| | | #define AFEventParamAdRevenueAdSize @"af_adrev_ad_size" |
| | | #define AFEventParamAdRevenueMediatedNetworkName @"af_adrev_mediated_network_name" |
| | | |
| | | /// Mail hashing type |
| | | typedef enum { |
| | | /// None |
| | | EmailCryptTypeNone = 0, |
| | | /// SHA1 |
| | | EmailCryptTypeSHA1 = 1, |
| | | /// MD5 |
| | | EmailCryptTypeMD5 = 2, |
| | | /// SHA256 |
| | | EmailCryptTypeSHA256 = 3 |
| | | } EmailCryptType; |
| | | |
| | | NS_SWIFT_NAME(DeepLinkDelegate) |
| | | @protocol AppsFlyerDeepLinkDelegate <NSObject> |
| | | |
| | | @optional |
| | | - (void)didResolveDeepLink:(AppsFlyerDeepLinkResult *_Nonnull)result; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | Conform and subscribe to this protocol to allow getting data about conversion and |
| | | install attribution |
| | | */ |
| | | @protocol AppsFlyerLibDelegate <NSObject> |
| | | |
| | | /** |
| | | `conversionInfo` contains information about install. |
| | | Organic/non-organic, etc. |
| | | @param conversionInfo May contain <code>null</code> values for some keys. Please handle this case. |
| | | */ |
| | | - (void)onConversionDataSuccess:(NSDictionary *)conversionInfo; |
| | | |
| | | /** |
| | | Any errors that occurred during the conversion request. |
| | | */ |
| | | - (void)onConversionDataFail:(NSError *)error; |
| | | |
| | | @optional |
| | | |
| | | /** |
| | | `attributionData` contains information about OneLink, deeplink. |
| | | */ |
| | | - (void)onAppOpenAttribution:(NSDictionary *)attributionData; |
| | | |
| | | /** |
| | | Any errors that occurred during the attribution request. |
| | | */ |
| | | - (void)onAppOpenAttributionFailure:(NSError *)error; |
| | | |
| | | /** |
| | | @abstract Sets the HTTP header fields of the ESP resolving to the given |
| | | dictionary. |
| | | @discussion This method replaces all header fields that may have |
| | | existed before this method ESP resolving call. |
| | | To keep default SDK behavior - return nil; |
| | | */ |
| | | - (NSDictionary <NSString *, NSString *> * _Nullable)allHTTPHeaderFieldsForResolveDeepLinkURL:(NSURL *)URL; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | You can log installs, app updates, sessions and additional in-app events |
| | | (including in-app purchases, game levels, etc.) |
| | | to evaluate ROI and user engagement. |
| | | The iOS SDK is compatible with all iOS/tvOS devices with iOS version 7 and above. |
| | | |
| | | @see [SDK Integration Validator](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS) |
| | | for more information. |
| | | |
| | | */ |
| | | @interface AppsFlyerLib : NSObject |
| | | |
| | | /** |
| | | Gets the singleton instance of the AppsFlyerLib class, creating it if |
| | | necessary. |
| | | |
| | | @return The singleton instance of AppsFlyerLib. |
| | | */ |
| | | + (AppsFlyerLib *)shared; |
| | | |
| | | /** |
| | | In case you use your own user ID in your app, you can set this property to that ID. |
| | | Enables you to cross-reference your own unique ID with AppsFlyer’s unique ID and the other devices’ IDs |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString * customerUserID; |
| | | |
| | | /** |
| | | In case you use custom data and you want to receive it in the raw reports. |
| | | |
| | | @see [Setting additional custom data](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS#setting-additional-custom-data) for more information. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAdditionalData:) NSDictionary * customData; |
| | | |
| | | /** |
| | | Use this property to set your AppsFlyer's dev key |
| | | */ |
| | | @property(nonatomic, strong) NSString * appsFlyerDevKey; |
| | | |
| | | /** |
| | | Use this property to set your app's Apple ID(taken from the app's page on iTunes Connect) |
| | | */ |
| | | @property(nonatomic, strong) NSString * appleAppID; |
| | | |
| | | #ifndef AFSDK_NO_IDFA |
| | | /** |
| | | AppsFlyer SDK collect Apple's `advertisingIdentifier` if the `AdSupport.framework` included in the SDK. |
| | | You can disable this behavior by setting the following property to YES |
| | | */ |
| | | @property(nonatomic) BOOL disableAdvertisingIdentifier; |
| | | |
| | | @property(nonatomic, strong, readonly) NSString *advertisingIdentifier; |
| | | |
| | | /** |
| | | Waits for request user authorization to access app-related data |
| | | */ |
| | | - (void)waitForATTUserAuthorizationWithTimeoutInterval:(NSTimeInterval)timeoutInterval |
| | | NS_SWIFT_NAME(waitForATTUserAuthorization(timeoutInterval:)); |
| | | |
| | | #endif |
| | | |
| | | @property(nonatomic) BOOL disableSKAdNetwork; |
| | | |
| | | /** |
| | | In case of in app purchase events, you can set the currency code your user has purchased with. |
| | | The currency code is a 3 letter code according to ISO standards |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrencyCode:@"USD"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currencyCode = "USD" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString *currencyCode; |
| | | |
| | | /** |
| | | Prints SDK messages to the console log. This property should only be used in `DEBUG` mode. |
| | | The default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL isDebug; |
| | | |
| | | /** |
| | | Set this flag to `YES`, to collect the current device name(e.g. "My iPhone"). Default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL shouldCollectDeviceName; |
| | | |
| | | /** |
| | | Set your `OneLink ID` from OneLink configuration. Used in User Invites to generate a OneLink. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAppInviteOneLink:) NSString * appInviteOneLinkID; |
| | | |
| | | /** |
| | | Opt-out logging for specific user |
| | | */ |
| | | @property(atomic) BOOL anonymizeUser; |
| | | |
| | | /** |
| | | Opt-out for Apple Search Ads attributions |
| | | */ |
| | | @property(atomic) BOOL disableCollectASA; |
| | | |
| | | @property(nonatomic) BOOL disableAppleAdsAttribution; |
| | | |
| | | /** |
| | | AppsFlyer delegate. See `AppsFlyerLibDelegate` |
| | | */ |
| | | @property(weak, nonatomic) id<AppsFlyerLibDelegate> delegate; |
| | | |
| | | @property(weak, nonatomic) id<AppsFlyerDeepLinkDelegate> deepLinkDelegate; |
| | | |
| | | /** |
| | | In app purchase receipt validation Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useReceiptValidationSandbox; |
| | | |
| | | /** |
| | | Set this flag to test uninstall on Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useUninstallSandbox; |
| | | |
| | | /** |
| | | For advertisers who wrap OneLink within another Universal Link. |
| | | An advertiser will be able to deeplink from a OneLink wrapped within another Universal Link and also log this retargeting conversion. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setResolveDeepLinkURLs:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *resolveDeepLinkURLs; |
| | | |
| | | /** |
| | | For advertisers who use vanity OneLinks. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] oneLinkCustomDomains:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *oneLinkCustomDomains; |
| | | |
| | | /* |
| | | * Set phone number for each `start` event. `phoneNumber` will be sent as SHA256 string |
| | | */ |
| | | @property(nonatomic, nullable) NSString *phoneNumber; |
| | | |
| | | - (NSString *)phoneNumber UNAVAILABLE_ATTRIBUTE; |
| | | |
| | | /** |
| | | To disable app's vendor identifier(IDFV), set disableIDFVCollection to true |
| | | */ |
| | | @property(nonatomic) BOOL disableIDFVCollection; |
| | | |
| | | /** |
| | | Set the language of the device. The data will be displayed in Raw Data Reports |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrentDeviceLanguage:@"EN"] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currentDeviceLanguage("EN") |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSString *currentDeviceLanguage; |
| | | |
| | | /** |
| | | Enable the collection of Facebook Deferred AppLinks |
| | | Requires Facebook SDK and Facebook app on target/client device. |
| | | This API must be invoked prior to initializing the AppsFlyer SDK in order to function properly. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] enableFacebookDeferredApplinksWithClass:[FBSDKAppLinkUtility class]] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().enableFacebookDeferredApplinks(with: FBSDKAppLinkUtility.self) |
| | | </pre> |
| | | |
| | | @param facebookAppLinkUtilityClass requeries method call `[FBSDKAppLinkUtility class]` as param. |
| | | */ |
| | | - (void)enableFacebookDeferredApplinksWithClass:(Class _Nullable)facebookAppLinkUtilityClass; |
| | | |
| | | /** |
| | | Use this to send the user's emails |
| | | |
| | | @param userEmails The list of strings that hold mails |
| | | @param type Hash algoritm |
| | | */ |
| | | - (void)setUserEmails:(NSArray<NSString *> * _Nullable)userEmails withCryptType:(EmailCryptType)type; |
| | | |
| | | /** |
| | | Start SDK session |
| | | Add the following method at the `applicationDidBecomeActive` in AppDelegate class |
| | | */ |
| | | - (void)start; |
| | | |
| | | - (void)startWithCompletionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler; |
| | | |
| | | /** |
| | | Use this method to log an events with multiple values. See AppsFlyer's documentation for details. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] logEvent:AFEventPurchase |
| | | withValues: @{AFEventParamRevenue : @200, |
| | | AFEventParamCurrency : @"USD", |
| | | AFEventParamQuantity : @2, |
| | | AFEventParamContentId: @"092", |
| | | AFEventParamReceiptId: @"9277"}]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventPurchase, |
| | | withValues: [AFEventParamRevenue : "1200", |
| | | AFEventParamContent : "shoes", |
| | | AFEventParamContentId: "123"]) |
| | | </pre> |
| | | |
| | | @param eventName Contains name of event that could be provided from predefined constants in `AppsFlyerLib.h` |
| | | @param values Contains dictionary of values for handling by backend |
| | | */ |
| | | - (void)logEvent:(NSString *)eventName withValues:(NSDictionary * _Nullable)values; |
| | | |
| | | - (void)logEventWithEventName:(NSString *)eventName |
| | | eventValues:(NSDictionary<NSString * , id> * _Nullable)eventValues |
| | | completionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler |
| | | NS_SWIFT_NAME(logEvent(name:values:completionHandler:)); |
| | | |
| | | /** |
| | | To log and validate in app purchases you can call this method from the completeTransaction: method on |
| | | your `SKPaymentTransactionObserver`. |
| | | |
| | | @param productIdentifier The product identifier |
| | | @param price The product price |
| | | @param currency The product currency |
| | | @param transactionId The purchase transaction Id |
| | | @param params The additional param, which you want to receive it in the raw reports |
| | | @param successBlock The success callback |
| | | @param failedBlock The failure callback |
| | | */ |
| | | - (void)validateAndLogInAppPurchase:(NSString * _Nullable)productIdentifier |
| | | price:(NSString * _Nullable)price |
| | | currency:(NSString * _Nullable)currency |
| | | transactionId:(NSString * _Nullable)transactionId |
| | | additionalParameters:(NSDictionary * _Nullable)params |
| | | success:(void (^ _Nullable)(NSDictionary * response))successBlock |
| | | failure:(void (^ _Nullable)(NSError * _Nullable error, id _Nullable reponse))failedBlock NS_AVAILABLE(10_7, 7_0); |
| | | |
| | | /** |
| | | To log location for geo-fencing. Does the same as code below. |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventLocation, withValues: [AFEventParamLong:longitude, AFEventParamLat:latitude]) |
| | | </pre> |
| | | |
| | | @param longitude The location longitude |
| | | @param latitude The location latitude |
| | | */ |
| | | - (void)logLocation:(double)longitude latitude:(double)latitude NS_SWIFT_NAME(logLocation(longitude:latitude:)); |
| | | |
| | | /** |
| | | This method returns AppsFlyer's internal id(unique for your app) |
| | | |
| | | @return Internal AppsFlyer Id |
| | | */ |
| | | - (NSString *)getAppsFlyerUID; |
| | | |
| | | /** |
| | | In case you want to log deep linking. Does the same as `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @warning Preferred to use `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url sourceApplication:(NSString * _Nullable)sourceApplication API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | In case you want to log deep linking. |
| | | Call this method from inside your AppDelegate `-application:openURL:sourceApplication:annotation:` |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | @param annotation The annotation that passed to your app delegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url |
| | | sourceApplication:(NSString * _Nullable)sourceApplication |
| | | withAnnotation:(id _Nullable)annotation API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Call this method from inside of your AppDelegate `-application:openURL:options:` method. |
| | | This method is functionally the same as calling the AppsFlyer method |
| | | `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your app delegate |
| | | @param options The options dictionary that was passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenUrl:(NSURL * _Nullable)url options:(NSDictionary * _Nullable)options API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Allow AppsFlyer to handle restoration from an NSUserActivity. |
| | | Use this method to log deep links with OneLink. |
| | | |
| | | @param userActivity The NSUserActivity that caused the app to be opened. |
| | | */ |
| | | - (BOOL)continueUserActivity:(NSUserActivity * _Nullable)userActivity |
| | | restorationHandler:(void (^ _Nullable)(NSArray * _Nullable))restorationHandler NS_AVAILABLE_IOS(9_0) API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Enable AppsFlyer to handle a push notification. |
| | | |
| | | @see [Learn more here](https://support.appsflyer.com/hc/en-us/articles/207364076-Measuring-Push-Notification-Re-Engagement-Campaigns) |
| | | |
| | | @warning To make it work - set data, related to AppsFlyer under key @"af". |
| | | |
| | | @param pushPayload The `userInfo` from received remote notification. One of root keys should be @"af". |
| | | */ |
| | | - (void)handlePushNotification:(NSDictionary * _Nullable)pushPayload; |
| | | |
| | | |
| | | /** |
| | | Register uninstall - you should register for remote notification and provide AppsFlyer the push device token. |
| | | |
| | | @param deviceToken The `deviceToken` from `-application:didRegisterForRemoteNotificationsWithDeviceToken:` |
| | | */ |
| | | - (void)registerUninstall:(NSData * _Nullable)deviceToken; |
| | | |
| | | /** |
| | | Get SDK version. |
| | | |
| | | @return The AppsFlyer SDK version info. |
| | | */ |
| | | - (NSString *)getSDKVersion; |
| | | |
| | | /** |
| | | This is for internal use. |
| | | */ |
| | | - (void)remoteDebuggingCallWithData:(NSString *)data; |
| | | |
| | | /** |
| | | Used to force the trigger `onAppOpenAttribution` delegate. |
| | | Notice, re-engagement, session and launch won't be counted. |
| | | Only for OneLink/UniversalLink/Deeplink resolving. |
| | | |
| | | @param URL The param to resolve into -[AppsFlyerLibDelegate onAppOpenAttribution:] |
| | | */ |
| | | - (void)performOnAppAttributionWithURL:(NSURL * _Nullable)URL; |
| | | |
| | | /** |
| | | @brief This property accepts a string value representing the host name for all endpoints. |
| | | Can be used to Zero rate your application’s data usage. Contact your CSM for more information. |
| | | |
| | | @warning To use `default` SDK endpoint – set value to `nil`. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setHost:@"example.com"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().host = "example.com" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *host; |
| | | |
| | | /** |
| | | * This function set the host name and prefix host name for all the endpoints |
| | | **/ |
| | | - (void)setHost:(NSString *)host withHostPrefix:(NSString *)hostPrefix; |
| | | |
| | | /** |
| | | * This property accepts a string value representing the prefix host name for all endpoints. |
| | | * for example "test" prefix with default host name will have the address "host.appsflyer.com" |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *hostPrefix; |
| | | |
| | | /** |
| | | This property is responsible for timeout between sessions in seconds. |
| | | Default value is 5 seconds. |
| | | */ |
| | | @property(atomic) NSUInteger minTimeBetweenSessions; |
| | | |
| | | /** |
| | | API to shut down all SDK activities. |
| | | |
| | | @warning This will disable all requests from AppsFlyer SDK. |
| | | */ |
| | | @property(atomic) BOOL isStopped; |
| | | |
| | | /** |
| | | API to set manually Facebook deferred app link |
| | | */ |
| | | @property(nonatomic, nullable) NSURL *facebookDeferredAppLink; |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *sharingFilter DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | @property(nonatomic) NSUInteger deepLinkTimeout; |
| | | |
| | | /** |
| | | Block an events from being shared with any partner |
| | | This method overwrite -[AppsFlyerLib setSharingFilter:] |
| | | */ |
| | | - (void)setSharingFilterForAllPartners DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | |
| | | The sharing filter is cleared in case if `nil` or empty array passed as a parameter. |
| | | "all" keyword sets sharing filter for ALL partners, it is case insencitive and has highest priority |
| | | if passed along with another values. For example, if ["all", "examplePartner1_int", "examplePartner2_int" ] passed, |
| | | the sharing filter will be set for ALL partners. |
| | | */ |
| | | - (void)setSharingFilterForPartners:(NSArray<NSString *> * _Nullable)sharingFilter; |
| | | |
| | | /** |
| | | Validate if URL contains certain string and append quiery |
| | | parameters to deeplink URL. In case if URL does not contain user-defined string, |
| | | parameters are not appended to the url. |
| | | |
| | | @param containsString string to check in URL. |
| | | @param parameters NSDictionary, which containins parameters to append to the deeplink url after it passed validation. |
| | | */ |
| | | - (void)appendParametersToDeepLinkingURLWithString:(NSString *)containsString |
| | | parameters:(NSDictionary<NSString *, NSString*> *)parameters |
| | | NS_SWIFT_NAME(appendParametersToDeeplinkURL(contains:parameters:)); |
| | | |
| | | /** |
| | | Adds array of keys, which are used to compose key path |
| | | to resolve deeplink from push notification payload `userInfo`. |
| | | |
| | | @param deepLinkPath an array of strings which contains keys to search for deeplink in payload. |
| | | */ |
| | | - (void)addPushNotificationDeepLinkPath:(NSArray<NSString *> *)deepLinkPath; |
| | | |
| | | /** |
| | | * Allows sending custom data for partner integration purposes. |
| | | * |
| | | * @param partnerId ID of the partner (usually has "_int" suffix) |
| | | * @param partnerInfo customer data, depends on the integration nature with specific partner |
| | | */ |
| | | |
| | | - (void)setPartnerDataWithPartnerId:(NSString * _Nullable)partnerId partnerInfo:(NSDictionary<NSString *, id> * _Nullable)partnerInfo |
| | | NS_SWIFT_NAME(setPartnerData(partnerId:partnerInfo:)); |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // LinkGenerator.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | Payload container for the `generateInviteUrlWithLinkGenerator:completionHandler:` from `AppsFlyerShareInviteHelper` |
| | | */ |
| | | @interface AppsFlyerLinkGenerator : NSObject |
| | | |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | - (instancetype)init NS_UNAVAILABLE; |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | + (instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(nonatomic, nullable) NSString *brandDomain; |
| | | |
| | | /// The channel through which the invite was sent (e.g. Facebook/Gmail/etc.). Usage: Recommended |
| | | - (void)setChannel :(nonnull NSString *)channel; |
| | | /// ReferrerCustomerId setter |
| | | - (void)setReferrerCustomerId:(nonnull NSString *)referrerCustomerId; |
| | | /// A campaign name. Usage: Optional |
| | | - (void)setCampaign :(nonnull NSString *)campaign; |
| | | /// ReferrerUID setter |
| | | - (void)setReferrerUID :(nonnull NSString *)referrerUID; |
| | | /// Referrer name |
| | | - (void)setReferrerName :(nonnull NSString *)referrerName; |
| | | /// The URL to referrer user avatar. Usage: Optional |
| | | - (void)setReferrerImageURL :(nonnull NSString *)referrerImageURL; |
| | | /// AppleAppID |
| | | - (void)setAppleAppID :(nonnull NSString *)appleAppID; |
| | | /// Deeplink path |
| | | - (void)setDeeplinkPath :(nonnull NSString *)deeplinkPath; |
| | | /// Base deeplink path |
| | | - (void)setBaseDeeplink :(nonnull NSString *)baseDeeplink; |
| | | /// A single key value custom parameter. Usage: Optional |
| | | - (void)addParameterValue :(nonnull NSString *)value forKey:(NSString *)key; |
| | | /// Multiple key value custom parameters. Usage: Optional |
| | | - (void)addParameters :(nonnull NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // ShareInviteHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import "AppsFlyerLinkGenerator.h" |
| | | |
| | | /** |
| | | AppsFlyerShareInviteHelper |
| | | */ |
| | | @interface AppsFlyerShareInviteHelper : NSObject |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | * The AppsFlyerShareInviteHelper class builds the invite URL according to various setter methods |
| | | * which allow passing on additional information on the click. |
| | | * This information is available through `onConversionDataReceived:` when the user accepts the invite and installs the app. |
| | | * In addition, campaign and channel parameters are visible within the AppsFlyer Dashboard. |
| | | */ |
| | | + (void)generateInviteUrlWithLinkGenerator:(AppsFlyerLinkGenerator *(^)(AppsFlyerLinkGenerator *generator))generatorCreator completionHandler:(void (^)(NSURL *_Nullable url))completionHandler; |
| | | |
| | | /** |
| | | * It is recommended to generate an in-app event after the invite is sent to log the invites from the senders' perspective. |
| | | * This enables you to find the users that tend most to invite friends, and the media sources that get you these users. |
| | | */ |
| | | + (void)logInvite:(nullable NSString *)channel parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | framework module AppsFlyerLib { |
| | | umbrella header "AppsFlyerLib.h" |
| | | |
| | | export * |
| | | module * { export * } |
| | | } |
New file |
| | |
| | | <?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>BuildMachineOSBuild</key> |
| | | <string>20G224</string> |
| | | <key>CFBundleDevelopmentRegion</key> |
| | | <string>en</string> |
| | | <key>CFBundleExecutable</key> |
| | | <string>AppsFlyerLib</string> |
| | | <key>CFBundleIdentifier</key> |
| | | <string>com.appsflyer.sdk.lib</string> |
| | | <key>CFBundleInfoDictionaryVersion</key> |
| | | <string>6.0</string> |
| | | <key>CFBundleName</key> |
| | | <string>AppsFlyerLib</string> |
| | | <key>CFBundlePackageType</key> |
| | | <string>FMWK</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.0</string> |
| | | <key>CFBundleSignature</key> |
| | | <string>????</string> |
| | | <key>CFBundleSupportedPlatforms</key> |
| | | <array> |
| | | <string>MacOSX</string> |
| | | </array> |
| | | <key>CFBundleVersion</key> |
| | | <string>6.3.4</string> |
| | | <key>DTCompiler</key> |
| | | <string>com.apple.compilers.llvm.clang.1_0</string> |
| | | <key>DTPlatformBuild</key> |
| | | <string>13C100</string> |
| | | <key>DTPlatformName</key> |
| | | <string>macosx</string> |
| | | <key>DTPlatformVersion</key> |
| | | <string>12.1</string> |
| | | <key>DTSDKBuild</key> |
| | | <string>21C46</string> |
| | | <key>DTSDKName</key> |
| | | <string>macosx12.1</string> |
| | | <key>DTXcode</key> |
| | | <string>1321</string> |
| | | <key>DTXcodeBuild</key> |
| | | <string>13C100</string> |
| | | <key>LSMinimumSystemVersion</key> |
| | | <string>10.11</string> |
| | | </dict> |
| | | </plist> |
New file |
| | |
| | | // |
| | | // CrossPromotionHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | AppsFlyer allows you to log and attribute installs originating |
| | | from cross promotion campaigns of your existing apps. |
| | | Afterwards, you can optimize on your cross-promotion traffic to get even better results. |
| | | */ |
| | | @interface AppsFlyerCrossPromotionHelper : NSObject |
| | | |
| | | /** |
| | | To log an impression use the following API call. |
| | | Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard. |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | */ |
| | | + (void)logCrossPromoteImpression:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | /** |
| | | iOS allows you to utilize the StoreKit component to open |
| | | the App Store while remaining in the context of your app. |
| | | More details at https://support.appsflyer.com/hc/en-us/articles/115004481946-Cross-Promotion-Tracking#tracking-cross-promotion-impressions |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | @param openStoreBlock Contains promoted `clickURL` |
| | | */ |
| | | + (void)logAndOpenStore:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters |
| | | openStore:(void (^)(NSURLSession *urlSession, NSURL *clickURL))openStoreBlock; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplink.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | NS_SWIFT_NAME(DeepLink) |
| | | @interface AppsFlyerDeepLink : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property (readonly, nonnull) NSDictionary<NSString *, id> *clickEvent; |
| | | @property (readonly, nullable) NSString *deeplinkValue; |
| | | @property (readonly, nullable) NSString *matchType; |
| | | @property (readonly, nullable) NSString *clickHTTPReferrer; |
| | | @property (readonly, nullable) NSString *mediaSource; |
| | | @property (readonly, nullable) NSString *campaign; |
| | | @property (readonly, nullable) NSString *campaignId; |
| | | @property (readonly, nullable) NSString *afSub1; |
| | | @property (readonly, nullable) NSString *afSub2; |
| | | @property (readonly, nullable) NSString *afSub3; |
| | | @property (readonly, nullable) NSString *afSub4; |
| | | @property (readonly, nullable) NSString *afSub5; |
| | | @property (readonly) BOOL isDeferred; |
| | | |
| | | - (NSString *)toString; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplinkResult.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | @class AppsFlyerDeepLink; |
| | | |
| | | typedef NS_CLOSED_ENUM(NSUInteger, AFSDKDeepLinkResultStatus) { |
| | | AFSDKDeepLinkResultStatusNotFound, |
| | | AFSDKDeepLinkResultStatusFound, |
| | | AFSDKDeepLinkResultStatusFailure, |
| | | } NS_SWIFT_NAME(DeepLinkResultStatus); |
| | | |
| | | NS_SWIFT_NAME(DeepLinkResult) |
| | | @interface AppsFlyerDeepLinkResult : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(readonly) AFSDKDeepLinkResultStatus status; |
| | | |
| | | @property(readonly, nullable) AppsFlyerDeepLink *deepLink; |
| | | @property(readonly, nullable) NSError *error; |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // AppsFlyerLib.h |
| | | // AppsFlyerLib |
| | | // |
| | | // AppsFlyer iOS SDK 6.5.1 (51) |
| | | // Copyright (c) 2012-2020 AppsFlyer Ltd. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | #import "AppsFlyerCrossPromotionHelper.h" |
| | | #import "AppsFlyerShareInviteHelper.h" |
| | | #import "AppsFlyerDeepLinkResult.h" |
| | | #import "AppsFlyerDeepLink.h" |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | // In app event names constants |
| | | #define AFEventLevelAchieved @"af_level_achieved" |
| | | #define AFEventAddPaymentInfo @"af_add_payment_info" |
| | | #define AFEventAddToCart @"af_add_to_cart" |
| | | #define AFEventAddToWishlist @"af_add_to_wishlist" |
| | | #define AFEventCompleteRegistration @"af_complete_registration" |
| | | #define AFEventTutorial_completion @"af_tutorial_completion" |
| | | #define AFEventInitiatedCheckout @"af_initiated_checkout" |
| | | #define AFEventPurchase @"af_purchase" |
| | | #define AFEventRate @"af_rate" |
| | | #define AFEventSearch @"af_search" |
| | | #define AFEventSpentCredits @"af_spent_credits" |
| | | #define AFEventAchievementUnlocked @"af_achievement_unlocked" |
| | | #define AFEventContentView @"af_content_view" |
| | | #define AFEventListView @"af_list_view" |
| | | #define AFEventTravelBooking @"af_travel_booking" |
| | | #define AFEventShare @"af_share" |
| | | #define AFEventInvite @"af_invite" |
| | | #define AFEventLogin @"af_login" |
| | | #define AFEventReEngage @"af_re_engage" |
| | | #define AFEventUpdate @"af_update" |
| | | #define AFEventOpenedFromPushNotification @"af_opened_from_push_notification" |
| | | #define AFEventLocation @"af_location_coordinates" |
| | | #define AFEventCustomerSegment @"af_customer_segment" |
| | | |
| | | #define AFEventSubscribe @"af_subscribe" |
| | | #define AFEventStartTrial @"af_start_trial" |
| | | #define AFEventAdClick @"af_ad_click" |
| | | #define AFEventAdView @"af_ad_view" |
| | | |
| | | // In app event parameter names |
| | | #define AFEventParamContent @"af_content" |
| | | #define AFEventParamAchievementId @"af_achievement_id" |
| | | #define AFEventParamLevel @"af_level" |
| | | #define AFEventParamScore @"af_score" |
| | | #define AFEventParamSuccess @"af_success" |
| | | #define AFEventParamPrice @"af_price" |
| | | #define AFEventParamContentType @"af_content_type" |
| | | #define AFEventParamContentId @"af_content_id" |
| | | #define AFEventParamContentList @"af_content_list" |
| | | #define AFEventParamCurrency @"af_currency" |
| | | #define AFEventParamQuantity @"af_quantity" |
| | | #define AFEventParamRegistrationMethod @"af_registration_method" |
| | | #define AFEventParamPaymentInfoAvailable @"af_payment_info_available" |
| | | #define AFEventParamMaxRatingValue @"af_max_rating_value" |
| | | #define AFEventParamRatingValue @"af_rating_value" |
| | | #define AFEventParamSearchString @"af_search_string" |
| | | #define AFEventParamDateA @"af_date_a" |
| | | #define AFEventParamDateB @"af_date_b" |
| | | #define AFEventParamDestinationA @"af_destination_a" |
| | | #define AFEventParamDestinationB @"af_destination_b" |
| | | #define AFEventParamDescription @"af_description" |
| | | #define AFEventParamClass @"af_class" |
| | | #define AFEventParamEventStart @"af_event_start" |
| | | #define AFEventParamEventEnd @"af_event_end" |
| | | #define AFEventParamLat @"af_lat" |
| | | #define AFEventParamLong @"af_long" |
| | | #define AFEventParamCustomerUserId @"af_customer_user_id" |
| | | #define AFEventParamValidated @"af_validated" |
| | | #define AFEventParamRevenue @"af_revenue" |
| | | #define AFEventProjectedParamRevenue @"af_projected_revenue" |
| | | #define AFEventParamReceiptId @"af_receipt_id" |
| | | #define AFEventParamTutorialId @"af_tutorial_id" |
| | | #define AFEventParamVirtualCurrencyName @"af_virtual_currency_name" |
| | | #define AFEventParamDeepLink @"af_deep_link" |
| | | #define AFEventParamOldVersion @"af_old_version" |
| | | #define AFEventParamNewVersion @"af_new_version" |
| | | #define AFEventParamReviewText @"af_review_text" |
| | | #define AFEventParamCouponCode @"af_coupon_code" |
| | | #define AFEventParamOrderId @"af_order_id" |
| | | #define AFEventParam1 @"af_param_1" |
| | | #define AFEventParam2 @"af_param_2" |
| | | #define AFEventParam3 @"af_param_3" |
| | | #define AFEventParam4 @"af_param_4" |
| | | #define AFEventParam5 @"af_param_5" |
| | | #define AFEventParam6 @"af_param_6" |
| | | #define AFEventParam7 @"af_param_7" |
| | | #define AFEventParam8 @"af_param_8" |
| | | #define AFEventParam9 @"af_param_9" |
| | | #define AFEventParam10 @"af_param_10" |
| | | |
| | | #define AFEventParamDepartingDepartureDate @"af_departing_departure_date" |
| | | #define AFEventParamReturningDepartureDate @"af_returning_departure_date" |
| | | #define AFEventParamDestinationList @"af_destination_list" //array of string |
| | | #define AFEventParamCity @"af_city" |
| | | #define AFEventParamRegion @"af_region" |
| | | #define AFEventParamCountry @"af_country" |
| | | |
| | | |
| | | #define AFEventParamDepartingArrivalDate @"af_departing_arrival_date" |
| | | #define AFEventParamReturningArrivalDate @"af_returning_arrival_date" |
| | | #define AFEventParamSuggestedDestinations @"af_suggested_destinations" //array of string |
| | | #define AFEventParamTravelStart @"af_travel_start" |
| | | #define AFEventParamTravelEnd @"af_travel_end" |
| | | #define AFEventParamNumAdults @"af_num_adults" |
| | | #define AFEventParamNumChildren @"af_num_children" |
| | | #define AFEventParamNumInfants @"af_num_infants" |
| | | #define AFEventParamSuggestedHotels @"af_suggested_hotels" //array of string |
| | | |
| | | #define AFEventParamUserScore @"af_user_score" |
| | | #define AFEventParamHotelScore @"af_hotel_score" |
| | | #define AFEventParamPurchaseCurrency @"af_purchase_currency" |
| | | |
| | | #define AFEventParamPreferredStarRatings @"af_preferred_star_ratings" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | |
| | | #define AFEventParamPreferredPriceRange @"af_preferred_price_range" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | #define AFEventParamPreferredNeighborhoods @"af_preferred_neighborhoods" //array of string |
| | | #define AFEventParamPreferredNumStops @"af_preferred_num_stops" |
| | | |
| | | #define AFEventParamAdRevenueAdType @"af_adrev_ad_type" |
| | | #define AFEventParamAdRevenueNetworkName @"af_adrev_network_name" |
| | | #define AFEventParamAdRevenuePlacementId @"af_adrev_placement_id" |
| | | #define AFEventParamAdRevenueAdSize @"af_adrev_ad_size" |
| | | #define AFEventParamAdRevenueMediatedNetworkName @"af_adrev_mediated_network_name" |
| | | |
| | | /// Mail hashing type |
| | | typedef enum { |
| | | /// None |
| | | EmailCryptTypeNone = 0, |
| | | /// SHA1 |
| | | EmailCryptTypeSHA1 = 1, |
| | | /// MD5 |
| | | EmailCryptTypeMD5 = 2, |
| | | /// SHA256 |
| | | EmailCryptTypeSHA256 = 3 |
| | | } EmailCryptType; |
| | | |
| | | NS_SWIFT_NAME(DeepLinkDelegate) |
| | | @protocol AppsFlyerDeepLinkDelegate <NSObject> |
| | | |
| | | @optional |
| | | - (void)didResolveDeepLink:(AppsFlyerDeepLinkResult *_Nonnull)result; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | Conform and subscribe to this protocol to allow getting data about conversion and |
| | | install attribution |
| | | */ |
| | | @protocol AppsFlyerLibDelegate <NSObject> |
| | | |
| | | /** |
| | | `conversionInfo` contains information about install. |
| | | Organic/non-organic, etc. |
| | | @param conversionInfo May contain <code>null</code> values for some keys. Please handle this case. |
| | | */ |
| | | - (void)onConversionDataSuccess:(NSDictionary *)conversionInfo; |
| | | |
| | | /** |
| | | Any errors that occurred during the conversion request. |
| | | */ |
| | | - (void)onConversionDataFail:(NSError *)error; |
| | | |
| | | @optional |
| | | |
| | | /** |
| | | `attributionData` contains information about OneLink, deeplink. |
| | | */ |
| | | - (void)onAppOpenAttribution:(NSDictionary *)attributionData; |
| | | |
| | | /** |
| | | Any errors that occurred during the attribution request. |
| | | */ |
| | | - (void)onAppOpenAttributionFailure:(NSError *)error; |
| | | |
| | | /** |
| | | @abstract Sets the HTTP header fields of the ESP resolving to the given |
| | | dictionary. |
| | | @discussion This method replaces all header fields that may have |
| | | existed before this method ESP resolving call. |
| | | To keep default SDK behavior - return nil; |
| | | */ |
| | | - (NSDictionary <NSString *, NSString *> * _Nullable)allHTTPHeaderFieldsForResolveDeepLinkURL:(NSURL *)URL; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | You can log installs, app updates, sessions and additional in-app events |
| | | (including in-app purchases, game levels, etc.) |
| | | to evaluate ROI and user engagement. |
| | | The iOS SDK is compatible with all iOS/tvOS devices with iOS version 7 and above. |
| | | |
| | | @see [SDK Integration Validator](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS) |
| | | for more information. |
| | | |
| | | */ |
| | | @interface AppsFlyerLib : NSObject |
| | | |
| | | /** |
| | | Gets the singleton instance of the AppsFlyerLib class, creating it if |
| | | necessary. |
| | | |
| | | @return The singleton instance of AppsFlyerLib. |
| | | */ |
| | | + (AppsFlyerLib *)shared; |
| | | |
| | | /** |
| | | In case you use your own user ID in your app, you can set this property to that ID. |
| | | Enables you to cross-reference your own unique ID with AppsFlyer’s unique ID and the other devices’ IDs |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString * customerUserID; |
| | | |
| | | /** |
| | | In case you use custom data and you want to receive it in the raw reports. |
| | | |
| | | @see [Setting additional custom data](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS#setting-additional-custom-data) for more information. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAdditionalData:) NSDictionary * customData; |
| | | |
| | | /** |
| | | Use this property to set your AppsFlyer's dev key |
| | | */ |
| | | @property(nonatomic, strong) NSString * appsFlyerDevKey; |
| | | |
| | | /** |
| | | Use this property to set your app's Apple ID(taken from the app's page on iTunes Connect) |
| | | */ |
| | | @property(nonatomic, strong) NSString * appleAppID; |
| | | |
| | | #ifndef AFSDK_NO_IDFA |
| | | /** |
| | | AppsFlyer SDK collect Apple's `advertisingIdentifier` if the `AdSupport.framework` included in the SDK. |
| | | You can disable this behavior by setting the following property to YES |
| | | */ |
| | | @property(nonatomic) BOOL disableAdvertisingIdentifier; |
| | | |
| | | @property(nonatomic, strong, readonly) NSString *advertisingIdentifier; |
| | | |
| | | /** |
| | | Waits for request user authorization to access app-related data |
| | | */ |
| | | - (void)waitForATTUserAuthorizationWithTimeoutInterval:(NSTimeInterval)timeoutInterval |
| | | NS_SWIFT_NAME(waitForATTUserAuthorization(timeoutInterval:)); |
| | | |
| | | #endif |
| | | |
| | | @property(nonatomic) BOOL disableSKAdNetwork; |
| | | |
| | | /** |
| | | In case of in app purchase events, you can set the currency code your user has purchased with. |
| | | The currency code is a 3 letter code according to ISO standards |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrencyCode:@"USD"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currencyCode = "USD" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString *currencyCode; |
| | | |
| | | /** |
| | | Prints SDK messages to the console log. This property should only be used in `DEBUG` mode. |
| | | The default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL isDebug; |
| | | |
| | | /** |
| | | Set this flag to `YES`, to collect the current device name(e.g. "My iPhone"). Default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL shouldCollectDeviceName; |
| | | |
| | | /** |
| | | Set your `OneLink ID` from OneLink configuration. Used in User Invites to generate a OneLink. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAppInviteOneLink:) NSString * appInviteOneLinkID; |
| | | |
| | | /** |
| | | Opt-out logging for specific user |
| | | */ |
| | | @property(atomic) BOOL anonymizeUser; |
| | | |
| | | /** |
| | | Opt-out for Apple Search Ads attributions |
| | | */ |
| | | @property(atomic) BOOL disableCollectASA; |
| | | |
| | | @property(nonatomic) BOOL disableAppleAdsAttribution; |
| | | |
| | | /** |
| | | AppsFlyer delegate. See `AppsFlyerLibDelegate` |
| | | */ |
| | | @property(weak, nonatomic) id<AppsFlyerLibDelegate> delegate; |
| | | |
| | | @property(weak, nonatomic) id<AppsFlyerDeepLinkDelegate> deepLinkDelegate; |
| | | |
| | | /** |
| | | In app purchase receipt validation Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useReceiptValidationSandbox; |
| | | |
| | | /** |
| | | Set this flag to test uninstall on Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useUninstallSandbox; |
| | | |
| | | /** |
| | | For advertisers who wrap OneLink within another Universal Link. |
| | | An advertiser will be able to deeplink from a OneLink wrapped within another Universal Link and also log this retargeting conversion. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setResolveDeepLinkURLs:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *resolveDeepLinkURLs; |
| | | |
| | | /** |
| | | For advertisers who use vanity OneLinks. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] oneLinkCustomDomains:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *oneLinkCustomDomains; |
| | | |
| | | /* |
| | | * Set phone number for each `start` event. `phoneNumber` will be sent as SHA256 string |
| | | */ |
| | | @property(nonatomic, nullable) NSString *phoneNumber; |
| | | |
| | | - (NSString *)phoneNumber UNAVAILABLE_ATTRIBUTE; |
| | | |
| | | /** |
| | | To disable app's vendor identifier(IDFV), set disableIDFVCollection to true |
| | | */ |
| | | @property(nonatomic) BOOL disableIDFVCollection; |
| | | |
| | | /** |
| | | Set the language of the device. The data will be displayed in Raw Data Reports |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrentDeviceLanguage:@"EN"] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currentDeviceLanguage("EN") |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSString *currentDeviceLanguage; |
| | | |
| | | /** |
| | | Enable the collection of Facebook Deferred AppLinks |
| | | Requires Facebook SDK and Facebook app on target/client device. |
| | | This API must be invoked prior to initializing the AppsFlyer SDK in order to function properly. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] enableFacebookDeferredApplinksWithClass:[FBSDKAppLinkUtility class]] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().enableFacebookDeferredApplinks(with: FBSDKAppLinkUtility.self) |
| | | </pre> |
| | | |
| | | @param facebookAppLinkUtilityClass requeries method call `[FBSDKAppLinkUtility class]` as param. |
| | | */ |
| | | - (void)enableFacebookDeferredApplinksWithClass:(Class _Nullable)facebookAppLinkUtilityClass; |
| | | |
| | | /** |
| | | Use this to send the user's emails |
| | | |
| | | @param userEmails The list of strings that hold mails |
| | | @param type Hash algoritm |
| | | */ |
| | | - (void)setUserEmails:(NSArray<NSString *> * _Nullable)userEmails withCryptType:(EmailCryptType)type; |
| | | |
| | | /** |
| | | Start SDK session |
| | | Add the following method at the `applicationDidBecomeActive` in AppDelegate class |
| | | */ |
| | | - (void)start; |
| | | |
| | | - (void)startWithCompletionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler; |
| | | |
| | | /** |
| | | Use this method to log an events with multiple values. See AppsFlyer's documentation for details. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] logEvent:AFEventPurchase |
| | | withValues: @{AFEventParamRevenue : @200, |
| | | AFEventParamCurrency : @"USD", |
| | | AFEventParamQuantity : @2, |
| | | AFEventParamContentId: @"092", |
| | | AFEventParamReceiptId: @"9277"}]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventPurchase, |
| | | withValues: [AFEventParamRevenue : "1200", |
| | | AFEventParamContent : "shoes", |
| | | AFEventParamContentId: "123"]) |
| | | </pre> |
| | | |
| | | @param eventName Contains name of event that could be provided from predefined constants in `AppsFlyerLib.h` |
| | | @param values Contains dictionary of values for handling by backend |
| | | */ |
| | | - (void)logEvent:(NSString *)eventName withValues:(NSDictionary * _Nullable)values; |
| | | |
| | | - (void)logEventWithEventName:(NSString *)eventName |
| | | eventValues:(NSDictionary<NSString * , id> * _Nullable)eventValues |
| | | completionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler |
| | | NS_SWIFT_NAME(logEvent(name:values:completionHandler:)); |
| | | |
| | | /** |
| | | To log and validate in app purchases you can call this method from the completeTransaction: method on |
| | | your `SKPaymentTransactionObserver`. |
| | | |
| | | @param productIdentifier The product identifier |
| | | @param price The product price |
| | | @param currency The product currency |
| | | @param transactionId The purchase transaction Id |
| | | @param params The additional param, which you want to receive it in the raw reports |
| | | @param successBlock The success callback |
| | | @param failedBlock The failure callback |
| | | */ |
| | | - (void)validateAndLogInAppPurchase:(NSString * _Nullable)productIdentifier |
| | | price:(NSString * _Nullable)price |
| | | currency:(NSString * _Nullable)currency |
| | | transactionId:(NSString * _Nullable)transactionId |
| | | additionalParameters:(NSDictionary * _Nullable)params |
| | | success:(void (^ _Nullable)(NSDictionary * response))successBlock |
| | | failure:(void (^ _Nullable)(NSError * _Nullable error, id _Nullable reponse))failedBlock NS_AVAILABLE(10_7, 7_0); |
| | | |
| | | /** |
| | | To log location for geo-fencing. Does the same as code below. |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventLocation, withValues: [AFEventParamLong:longitude, AFEventParamLat:latitude]) |
| | | </pre> |
| | | |
| | | @param longitude The location longitude |
| | | @param latitude The location latitude |
| | | */ |
| | | - (void)logLocation:(double)longitude latitude:(double)latitude NS_SWIFT_NAME(logLocation(longitude:latitude:)); |
| | | |
| | | /** |
| | | This method returns AppsFlyer's internal id(unique for your app) |
| | | |
| | | @return Internal AppsFlyer Id |
| | | */ |
| | | - (NSString *)getAppsFlyerUID; |
| | | |
| | | /** |
| | | In case you want to log deep linking. Does the same as `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @warning Preferred to use `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url sourceApplication:(NSString * _Nullable)sourceApplication API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | In case you want to log deep linking. |
| | | Call this method from inside your AppDelegate `-application:openURL:sourceApplication:annotation:` |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | @param annotation The annotation that passed to your app delegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url |
| | | sourceApplication:(NSString * _Nullable)sourceApplication |
| | | withAnnotation:(id _Nullable)annotation API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Call this method from inside of your AppDelegate `-application:openURL:options:` method. |
| | | This method is functionally the same as calling the AppsFlyer method |
| | | `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your app delegate |
| | | @param options The options dictionary that was passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenUrl:(NSURL * _Nullable)url options:(NSDictionary * _Nullable)options API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Allow AppsFlyer to handle restoration from an NSUserActivity. |
| | | Use this method to log deep links with OneLink. |
| | | |
| | | @param userActivity The NSUserActivity that caused the app to be opened. |
| | | */ |
| | | - (BOOL)continueUserActivity:(NSUserActivity * _Nullable)userActivity |
| | | restorationHandler:(void (^ _Nullable)(NSArray * _Nullable))restorationHandler NS_AVAILABLE_IOS(9_0) API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Enable AppsFlyer to handle a push notification. |
| | | |
| | | @see [Learn more here](https://support.appsflyer.com/hc/en-us/articles/207364076-Measuring-Push-Notification-Re-Engagement-Campaigns) |
| | | |
| | | @warning To make it work - set data, related to AppsFlyer under key @"af". |
| | | |
| | | @param pushPayload The `userInfo` from received remote notification. One of root keys should be @"af". |
| | | */ |
| | | - (void)handlePushNotification:(NSDictionary * _Nullable)pushPayload; |
| | | |
| | | |
| | | /** |
| | | Register uninstall - you should register for remote notification and provide AppsFlyer the push device token. |
| | | |
| | | @param deviceToken The `deviceToken` from `-application:didRegisterForRemoteNotificationsWithDeviceToken:` |
| | | */ |
| | | - (void)registerUninstall:(NSData * _Nullable)deviceToken; |
| | | |
| | | /** |
| | | Get SDK version. |
| | | |
| | | @return The AppsFlyer SDK version info. |
| | | */ |
| | | - (NSString *)getSDKVersion; |
| | | |
| | | /** |
| | | This is for internal use. |
| | | */ |
| | | - (void)remoteDebuggingCallWithData:(NSString *)data; |
| | | |
| | | /** |
| | | Used to force the trigger `onAppOpenAttribution` delegate. |
| | | Notice, re-engagement, session and launch won't be counted. |
| | | Only for OneLink/UniversalLink/Deeplink resolving. |
| | | |
| | | @param URL The param to resolve into -[AppsFlyerLibDelegate onAppOpenAttribution:] |
| | | */ |
| | | - (void)performOnAppAttributionWithURL:(NSURL * _Nullable)URL; |
| | | |
| | | /** |
| | | @brief This property accepts a string value representing the host name for all endpoints. |
| | | Can be used to Zero rate your application’s data usage. Contact your CSM for more information. |
| | | |
| | | @warning To use `default` SDK endpoint – set value to `nil`. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setHost:@"example.com"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().host = "example.com" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *host; |
| | | |
| | | /** |
| | | * This function set the host name and prefix host name for all the endpoints |
| | | **/ |
| | | - (void)setHost:(NSString *)host withHostPrefix:(NSString *)hostPrefix; |
| | | |
| | | /** |
| | | * This property accepts a string value representing the prefix host name for all endpoints. |
| | | * for example "test" prefix with default host name will have the address "host.appsflyer.com" |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *hostPrefix; |
| | | |
| | | /** |
| | | This property is responsible for timeout between sessions in seconds. |
| | | Default value is 5 seconds. |
| | | */ |
| | | @property(atomic) NSUInteger minTimeBetweenSessions; |
| | | |
| | | /** |
| | | API to shut down all SDK activities. |
| | | |
| | | @warning This will disable all requests from AppsFlyer SDK. |
| | | */ |
| | | @property(atomic) BOOL isStopped; |
| | | |
| | | /** |
| | | API to set manually Facebook deferred app link |
| | | */ |
| | | @property(nonatomic, nullable) NSURL *facebookDeferredAppLink; |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *sharingFilter DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | @property(nonatomic) NSUInteger deepLinkTimeout; |
| | | |
| | | /** |
| | | Block an events from being shared with any partner |
| | | This method overwrite -[AppsFlyerLib setSharingFilter:] |
| | | */ |
| | | - (void)setSharingFilterForAllPartners DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | |
| | | The sharing filter is cleared in case if `nil` or empty array passed as a parameter. |
| | | "all" keyword sets sharing filter for ALL partners, it is case insencitive and has highest priority |
| | | if passed along with another values. For example, if ["all", "examplePartner1_int", "examplePartner2_int" ] passed, |
| | | the sharing filter will be set for ALL partners. |
| | | */ |
| | | - (void)setSharingFilterForPartners:(NSArray<NSString *> * _Nullable)sharingFilter; |
| | | |
| | | /** |
| | | Validate if URL contains certain string and append quiery |
| | | parameters to deeplink URL. In case if URL does not contain user-defined string, |
| | | parameters are not appended to the url. |
| | | |
| | | @param containsString string to check in URL. |
| | | @param parameters NSDictionary, which containins parameters to append to the deeplink url after it passed validation. |
| | | */ |
| | | - (void)appendParametersToDeepLinkingURLWithString:(NSString *)containsString |
| | | parameters:(NSDictionary<NSString *, NSString*> *)parameters |
| | | NS_SWIFT_NAME(appendParametersToDeeplinkURL(contains:parameters:)); |
| | | |
| | | /** |
| | | Adds array of keys, which are used to compose key path |
| | | to resolve deeplink from push notification payload `userInfo`. |
| | | |
| | | @param deepLinkPath an array of strings which contains keys to search for deeplink in payload. |
| | | */ |
| | | - (void)addPushNotificationDeepLinkPath:(NSArray<NSString *> *)deepLinkPath; |
| | | |
| | | /** |
| | | * Allows sending custom data for partner integration purposes. |
| | | * |
| | | * @param partnerId ID of the partner (usually has "_int" suffix) |
| | | * @param partnerInfo customer data, depends on the integration nature with specific partner |
| | | */ |
| | | |
| | | - (void)setPartnerDataWithPartnerId:(NSString * _Nullable)partnerId partnerInfo:(NSDictionary<NSString *, id> * _Nullable)partnerInfo |
| | | NS_SWIFT_NAME(setPartnerData(partnerId:partnerInfo:)); |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // LinkGenerator.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | Payload container for the `generateInviteUrlWithLinkGenerator:completionHandler:` from `AppsFlyerShareInviteHelper` |
| | | */ |
| | | @interface AppsFlyerLinkGenerator : NSObject |
| | | |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | - (instancetype)init NS_UNAVAILABLE; |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | + (instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(nonatomic, nullable) NSString *brandDomain; |
| | | |
| | | /// The channel through which the invite was sent (e.g. Facebook/Gmail/etc.). Usage: Recommended |
| | | - (void)setChannel :(nonnull NSString *)channel; |
| | | /// ReferrerCustomerId setter |
| | | - (void)setReferrerCustomerId:(nonnull NSString *)referrerCustomerId; |
| | | /// A campaign name. Usage: Optional |
| | | - (void)setCampaign :(nonnull NSString *)campaign; |
| | | /// ReferrerUID setter |
| | | - (void)setReferrerUID :(nonnull NSString *)referrerUID; |
| | | /// Referrer name |
| | | - (void)setReferrerName :(nonnull NSString *)referrerName; |
| | | /// The URL to referrer user avatar. Usage: Optional |
| | | - (void)setReferrerImageURL :(nonnull NSString *)referrerImageURL; |
| | | /// AppleAppID |
| | | - (void)setAppleAppID :(nonnull NSString *)appleAppID; |
| | | /// Deeplink path |
| | | - (void)setDeeplinkPath :(nonnull NSString *)deeplinkPath; |
| | | /// Base deeplink path |
| | | - (void)setBaseDeeplink :(nonnull NSString *)baseDeeplink; |
| | | /// A single key value custom parameter. Usage: Optional |
| | | - (void)addParameterValue :(nonnull NSString *)value forKey:(NSString *)key; |
| | | /// Multiple key value custom parameters. Usage: Optional |
| | | - (void)addParameters :(nonnull NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // ShareInviteHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import "AppsFlyerLinkGenerator.h" |
| | | |
| | | /** |
| | | AppsFlyerShareInviteHelper |
| | | */ |
| | | @interface AppsFlyerShareInviteHelper : NSObject |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | * The AppsFlyerShareInviteHelper class builds the invite URL according to various setter methods |
| | | * which allow passing on additional information on the click. |
| | | * This information is available through `onConversionDataReceived:` when the user accepts the invite and installs the app. |
| | | * In addition, campaign and channel parameters are visible within the AppsFlyer Dashboard. |
| | | */ |
| | | + (void)generateInviteUrlWithLinkGenerator:(AppsFlyerLinkGenerator *(^)(AppsFlyerLinkGenerator *generator))generatorCreator completionHandler:(void (^)(NSURL *_Nullable url))completionHandler; |
| | | |
| | | /** |
| | | * It is recommended to generate an in-app event after the invite is sent to log the invites from the senders' perspective. |
| | | * This enables you to find the users that tend most to invite friends, and the media sources that get you these users. |
| | | */ |
| | | + (void)logInvite:(nullable NSString *)channel parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | framework module AppsFlyerLib { |
| | | umbrella header "AppsFlyerLib.h" |
| | | |
| | | export * |
| | | module * { export * } |
| | | } |
New file |
| | |
| | | // |
| | | // CrossPromotionHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | AppsFlyer allows you to log and attribute installs originating |
| | | from cross promotion campaigns of your existing apps. |
| | | Afterwards, you can optimize on your cross-promotion traffic to get even better results. |
| | | */ |
| | | @interface AppsFlyerCrossPromotionHelper : NSObject |
| | | |
| | | /** |
| | | To log an impression use the following API call. |
| | | Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard. |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | */ |
| | | + (void)logCrossPromoteImpression:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | /** |
| | | iOS allows you to utilize the StoreKit component to open |
| | | the App Store while remaining in the context of your app. |
| | | More details at https://support.appsflyer.com/hc/en-us/articles/115004481946-Cross-Promotion-Tracking#tracking-cross-promotion-impressions |
| | | |
| | | @param appID Promoted App ID |
| | | @param campaign A campaign name |
| | | @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }` |
| | | @param openStoreBlock Contains promoted `clickURL` |
| | | */ |
| | | + (void)logAndOpenStore:(nonnull NSString *)appID |
| | | campaign:(nullable NSString *)campaign |
| | | parameters:(nullable NSDictionary *)parameters |
| | | openStore:(void (^)(NSURLSession *urlSession, NSURL *clickURL))openStoreBlock; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplink.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | NS_SWIFT_NAME(DeepLink) |
| | | @interface AppsFlyerDeepLink : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property (readonly, nonnull) NSDictionary<NSString *, id> *clickEvent; |
| | | @property (readonly, nullable) NSString *deeplinkValue; |
| | | @property (readonly, nullable) NSString *matchType; |
| | | @property (readonly, nullable) NSString *clickHTTPReferrer; |
| | | @property (readonly, nullable) NSString *mediaSource; |
| | | @property (readonly, nullable) NSString *campaign; |
| | | @property (readonly, nullable) NSString *campaignId; |
| | | @property (readonly, nullable) NSString *afSub1; |
| | | @property (readonly, nullable) NSString *afSub2; |
| | | @property (readonly, nullable) NSString *afSub3; |
| | | @property (readonly, nullable) NSString *afSub4; |
| | | @property (readonly, nullable) NSString *afSub5; |
| | | @property (readonly) BOOL isDeferred; |
| | | |
| | | - (NSString *)toString; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // AFSDKDeeplinkResult.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Andrii Hahan on 20.08.2020. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | @class AppsFlyerDeepLink; |
| | | |
| | | typedef NS_CLOSED_ENUM(NSUInteger, AFSDKDeepLinkResultStatus) { |
| | | AFSDKDeepLinkResultStatusNotFound, |
| | | AFSDKDeepLinkResultStatusFound, |
| | | AFSDKDeepLinkResultStatusFailure, |
| | | } NS_SWIFT_NAME(DeepLinkResultStatus); |
| | | |
| | | NS_SWIFT_NAME(DeepLinkResult) |
| | | @interface AppsFlyerDeepLinkResult : NSObject |
| | | |
| | | - (nonnull instancetype)init NS_UNAVAILABLE; |
| | | + (nonnull instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(readonly) AFSDKDeepLinkResultStatus status; |
| | | |
| | | @property(readonly, nullable) AppsFlyerDeepLink *deepLink; |
| | | @property(readonly, nullable) NSError *error; |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // AppsFlyerLib.h |
| | | // AppsFlyerLib |
| | | // |
| | | // AppsFlyer iOS SDK 6.5.1 (51) |
| | | // Copyright (c) 2012-2020 AppsFlyer Ltd. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | #import "AppsFlyerCrossPromotionHelper.h" |
| | | #import "AppsFlyerShareInviteHelper.h" |
| | | #import "AppsFlyerDeepLinkResult.h" |
| | | #import "AppsFlyerDeepLink.h" |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | // In app event names constants |
| | | #define AFEventLevelAchieved @"af_level_achieved" |
| | | #define AFEventAddPaymentInfo @"af_add_payment_info" |
| | | #define AFEventAddToCart @"af_add_to_cart" |
| | | #define AFEventAddToWishlist @"af_add_to_wishlist" |
| | | #define AFEventCompleteRegistration @"af_complete_registration" |
| | | #define AFEventTutorial_completion @"af_tutorial_completion" |
| | | #define AFEventInitiatedCheckout @"af_initiated_checkout" |
| | | #define AFEventPurchase @"af_purchase" |
| | | #define AFEventRate @"af_rate" |
| | | #define AFEventSearch @"af_search" |
| | | #define AFEventSpentCredits @"af_spent_credits" |
| | | #define AFEventAchievementUnlocked @"af_achievement_unlocked" |
| | | #define AFEventContentView @"af_content_view" |
| | | #define AFEventListView @"af_list_view" |
| | | #define AFEventTravelBooking @"af_travel_booking" |
| | | #define AFEventShare @"af_share" |
| | | #define AFEventInvite @"af_invite" |
| | | #define AFEventLogin @"af_login" |
| | | #define AFEventReEngage @"af_re_engage" |
| | | #define AFEventUpdate @"af_update" |
| | | #define AFEventOpenedFromPushNotification @"af_opened_from_push_notification" |
| | | #define AFEventLocation @"af_location_coordinates" |
| | | #define AFEventCustomerSegment @"af_customer_segment" |
| | | |
| | | #define AFEventSubscribe @"af_subscribe" |
| | | #define AFEventStartTrial @"af_start_trial" |
| | | #define AFEventAdClick @"af_ad_click" |
| | | #define AFEventAdView @"af_ad_view" |
| | | |
| | | // In app event parameter names |
| | | #define AFEventParamContent @"af_content" |
| | | #define AFEventParamAchievementId @"af_achievement_id" |
| | | #define AFEventParamLevel @"af_level" |
| | | #define AFEventParamScore @"af_score" |
| | | #define AFEventParamSuccess @"af_success" |
| | | #define AFEventParamPrice @"af_price" |
| | | #define AFEventParamContentType @"af_content_type" |
| | | #define AFEventParamContentId @"af_content_id" |
| | | #define AFEventParamContentList @"af_content_list" |
| | | #define AFEventParamCurrency @"af_currency" |
| | | #define AFEventParamQuantity @"af_quantity" |
| | | #define AFEventParamRegistrationMethod @"af_registration_method" |
| | | #define AFEventParamPaymentInfoAvailable @"af_payment_info_available" |
| | | #define AFEventParamMaxRatingValue @"af_max_rating_value" |
| | | #define AFEventParamRatingValue @"af_rating_value" |
| | | #define AFEventParamSearchString @"af_search_string" |
| | | #define AFEventParamDateA @"af_date_a" |
| | | #define AFEventParamDateB @"af_date_b" |
| | | #define AFEventParamDestinationA @"af_destination_a" |
| | | #define AFEventParamDestinationB @"af_destination_b" |
| | | #define AFEventParamDescription @"af_description" |
| | | #define AFEventParamClass @"af_class" |
| | | #define AFEventParamEventStart @"af_event_start" |
| | | #define AFEventParamEventEnd @"af_event_end" |
| | | #define AFEventParamLat @"af_lat" |
| | | #define AFEventParamLong @"af_long" |
| | | #define AFEventParamCustomerUserId @"af_customer_user_id" |
| | | #define AFEventParamValidated @"af_validated" |
| | | #define AFEventParamRevenue @"af_revenue" |
| | | #define AFEventProjectedParamRevenue @"af_projected_revenue" |
| | | #define AFEventParamReceiptId @"af_receipt_id" |
| | | #define AFEventParamTutorialId @"af_tutorial_id" |
| | | #define AFEventParamVirtualCurrencyName @"af_virtual_currency_name" |
| | | #define AFEventParamDeepLink @"af_deep_link" |
| | | #define AFEventParamOldVersion @"af_old_version" |
| | | #define AFEventParamNewVersion @"af_new_version" |
| | | #define AFEventParamReviewText @"af_review_text" |
| | | #define AFEventParamCouponCode @"af_coupon_code" |
| | | #define AFEventParamOrderId @"af_order_id" |
| | | #define AFEventParam1 @"af_param_1" |
| | | #define AFEventParam2 @"af_param_2" |
| | | #define AFEventParam3 @"af_param_3" |
| | | #define AFEventParam4 @"af_param_4" |
| | | #define AFEventParam5 @"af_param_5" |
| | | #define AFEventParam6 @"af_param_6" |
| | | #define AFEventParam7 @"af_param_7" |
| | | #define AFEventParam8 @"af_param_8" |
| | | #define AFEventParam9 @"af_param_9" |
| | | #define AFEventParam10 @"af_param_10" |
| | | |
| | | #define AFEventParamDepartingDepartureDate @"af_departing_departure_date" |
| | | #define AFEventParamReturningDepartureDate @"af_returning_departure_date" |
| | | #define AFEventParamDestinationList @"af_destination_list" //array of string |
| | | #define AFEventParamCity @"af_city" |
| | | #define AFEventParamRegion @"af_region" |
| | | #define AFEventParamCountry @"af_country" |
| | | |
| | | |
| | | #define AFEventParamDepartingArrivalDate @"af_departing_arrival_date" |
| | | #define AFEventParamReturningArrivalDate @"af_returning_arrival_date" |
| | | #define AFEventParamSuggestedDestinations @"af_suggested_destinations" //array of string |
| | | #define AFEventParamTravelStart @"af_travel_start" |
| | | #define AFEventParamTravelEnd @"af_travel_end" |
| | | #define AFEventParamNumAdults @"af_num_adults" |
| | | #define AFEventParamNumChildren @"af_num_children" |
| | | #define AFEventParamNumInfants @"af_num_infants" |
| | | #define AFEventParamSuggestedHotels @"af_suggested_hotels" //array of string |
| | | |
| | | #define AFEventParamUserScore @"af_user_score" |
| | | #define AFEventParamHotelScore @"af_hotel_score" |
| | | #define AFEventParamPurchaseCurrency @"af_purchase_currency" |
| | | |
| | | #define AFEventParamPreferredStarRatings @"af_preferred_star_ratings" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | |
| | | #define AFEventParamPreferredPriceRange @"af_preferred_price_range" //array of int (basically a tuple (min,max) but we'll use array of int and instruct the developer to use two values) |
| | | #define AFEventParamPreferredNeighborhoods @"af_preferred_neighborhoods" //array of string |
| | | #define AFEventParamPreferredNumStops @"af_preferred_num_stops" |
| | | |
| | | #define AFEventParamAdRevenueAdType @"af_adrev_ad_type" |
| | | #define AFEventParamAdRevenueNetworkName @"af_adrev_network_name" |
| | | #define AFEventParamAdRevenuePlacementId @"af_adrev_placement_id" |
| | | #define AFEventParamAdRevenueAdSize @"af_adrev_ad_size" |
| | | #define AFEventParamAdRevenueMediatedNetworkName @"af_adrev_mediated_network_name" |
| | | |
| | | /// Mail hashing type |
| | | typedef enum { |
| | | /// None |
| | | EmailCryptTypeNone = 0, |
| | | /// SHA1 |
| | | EmailCryptTypeSHA1 = 1, |
| | | /// MD5 |
| | | EmailCryptTypeMD5 = 2, |
| | | /// SHA256 |
| | | EmailCryptTypeSHA256 = 3 |
| | | } EmailCryptType; |
| | | |
| | | NS_SWIFT_NAME(DeepLinkDelegate) |
| | | @protocol AppsFlyerDeepLinkDelegate <NSObject> |
| | | |
| | | @optional |
| | | - (void)didResolveDeepLink:(AppsFlyerDeepLinkResult *_Nonnull)result; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | Conform and subscribe to this protocol to allow getting data about conversion and |
| | | install attribution |
| | | */ |
| | | @protocol AppsFlyerLibDelegate <NSObject> |
| | | |
| | | /** |
| | | `conversionInfo` contains information about install. |
| | | Organic/non-organic, etc. |
| | | @param conversionInfo May contain <code>null</code> values for some keys. Please handle this case. |
| | | */ |
| | | - (void)onConversionDataSuccess:(NSDictionary *)conversionInfo; |
| | | |
| | | /** |
| | | Any errors that occurred during the conversion request. |
| | | */ |
| | | - (void)onConversionDataFail:(NSError *)error; |
| | | |
| | | @optional |
| | | |
| | | /** |
| | | `attributionData` contains information about OneLink, deeplink. |
| | | */ |
| | | - (void)onAppOpenAttribution:(NSDictionary *)attributionData; |
| | | |
| | | /** |
| | | Any errors that occurred during the attribution request. |
| | | */ |
| | | - (void)onAppOpenAttributionFailure:(NSError *)error; |
| | | |
| | | /** |
| | | @abstract Sets the HTTP header fields of the ESP resolving to the given |
| | | dictionary. |
| | | @discussion This method replaces all header fields that may have |
| | | existed before this method ESP resolving call. |
| | | To keep default SDK behavior - return nil; |
| | | */ |
| | | - (NSDictionary <NSString *, NSString *> * _Nullable)allHTTPHeaderFieldsForResolveDeepLinkURL:(NSURL *)URL; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | You can log installs, app updates, sessions and additional in-app events |
| | | (including in-app purchases, game levels, etc.) |
| | | to evaluate ROI and user engagement. |
| | | The iOS SDK is compatible with all iOS/tvOS devices with iOS version 7 and above. |
| | | |
| | | @see [SDK Integration Validator](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS) |
| | | for more information. |
| | | |
| | | */ |
| | | @interface AppsFlyerLib : NSObject |
| | | |
| | | /** |
| | | Gets the singleton instance of the AppsFlyerLib class, creating it if |
| | | necessary. |
| | | |
| | | @return The singleton instance of AppsFlyerLib. |
| | | */ |
| | | + (AppsFlyerLib *)shared; |
| | | |
| | | /** |
| | | In case you use your own user ID in your app, you can set this property to that ID. |
| | | Enables you to cross-reference your own unique ID with AppsFlyer’s unique ID and the other devices’ IDs |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString * customerUserID; |
| | | |
| | | /** |
| | | In case you use custom data and you want to receive it in the raw reports. |
| | | |
| | | @see [Setting additional custom data](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS#setting-additional-custom-data) for more information. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAdditionalData:) NSDictionary * customData; |
| | | |
| | | /** |
| | | Use this property to set your AppsFlyer's dev key |
| | | */ |
| | | @property(nonatomic, strong) NSString * appsFlyerDevKey; |
| | | |
| | | /** |
| | | Use this property to set your app's Apple ID(taken from the app's page on iTunes Connect) |
| | | */ |
| | | @property(nonatomic, strong) NSString * appleAppID; |
| | | |
| | | #ifndef AFSDK_NO_IDFA |
| | | /** |
| | | AppsFlyer SDK collect Apple's `advertisingIdentifier` if the `AdSupport.framework` included in the SDK. |
| | | You can disable this behavior by setting the following property to YES |
| | | */ |
| | | @property(nonatomic) BOOL disableAdvertisingIdentifier; |
| | | |
| | | @property(nonatomic, strong, readonly) NSString *advertisingIdentifier; |
| | | |
| | | /** |
| | | Waits for request user authorization to access app-related data |
| | | */ |
| | | - (void)waitForATTUserAuthorizationWithTimeoutInterval:(NSTimeInterval)timeoutInterval |
| | | NS_SWIFT_NAME(waitForATTUserAuthorization(timeoutInterval:)); |
| | | |
| | | #endif |
| | | |
| | | @property(nonatomic) BOOL disableSKAdNetwork; |
| | | |
| | | /** |
| | | In case of in app purchase events, you can set the currency code your user has purchased with. |
| | | The currency code is a 3 letter code according to ISO standards |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrencyCode:@"USD"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currencyCode = "USD" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, nullable) NSString *currencyCode; |
| | | |
| | | /** |
| | | Prints SDK messages to the console log. This property should only be used in `DEBUG` mode. |
| | | The default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL isDebug; |
| | | |
| | | /** |
| | | Set this flag to `YES`, to collect the current device name(e.g. "My iPhone"). Default value is `NO` |
| | | */ |
| | | @property(nonatomic) BOOL shouldCollectDeviceName; |
| | | |
| | | /** |
| | | Set your `OneLink ID` from OneLink configuration. Used in User Invites to generate a OneLink. |
| | | */ |
| | | @property(nonatomic, strong, nullable, setter = setAppInviteOneLink:) NSString * appInviteOneLinkID; |
| | | |
| | | /** |
| | | Opt-out logging for specific user |
| | | */ |
| | | @property(atomic) BOOL anonymizeUser; |
| | | |
| | | /** |
| | | Opt-out for Apple Search Ads attributions |
| | | */ |
| | | @property(atomic) BOOL disableCollectASA; |
| | | |
| | | @property(nonatomic) BOOL disableAppleAdsAttribution; |
| | | |
| | | /** |
| | | AppsFlyer delegate. See `AppsFlyerLibDelegate` |
| | | */ |
| | | @property(weak, nonatomic) id<AppsFlyerLibDelegate> delegate; |
| | | |
| | | @property(weak, nonatomic) id<AppsFlyerDeepLinkDelegate> deepLinkDelegate; |
| | | |
| | | /** |
| | | In app purchase receipt validation Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useReceiptValidationSandbox; |
| | | |
| | | /** |
| | | Set this flag to test uninstall on Apple environment(production or sandbox). The default value is NO |
| | | */ |
| | | @property(nonatomic) BOOL useUninstallSandbox; |
| | | |
| | | /** |
| | | For advertisers who wrap OneLink within another Universal Link. |
| | | An advertiser will be able to deeplink from a OneLink wrapped within another Universal Link and also log this retargeting conversion. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setResolveDeepLinkURLs:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *resolveDeepLinkURLs; |
| | | |
| | | /** |
| | | For advertisers who use vanity OneLinks. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] oneLinkCustomDomains:@[@"domain.com", @"subdomain.domain.com"]]; |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *oneLinkCustomDomains; |
| | | |
| | | /* |
| | | * Set phone number for each `start` event. `phoneNumber` will be sent as SHA256 string |
| | | */ |
| | | @property(nonatomic, nullable) NSString *phoneNumber; |
| | | |
| | | - (NSString *)phoneNumber UNAVAILABLE_ATTRIBUTE; |
| | | |
| | | /** |
| | | To disable app's vendor identifier(IDFV), set disableIDFVCollection to true |
| | | */ |
| | | @property(nonatomic) BOOL disableIDFVCollection; |
| | | |
| | | /** |
| | | Set the language of the device. The data will be displayed in Raw Data Reports |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setCurrentDeviceLanguage:@"EN"] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().currentDeviceLanguage("EN") |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, nullable) NSString *currentDeviceLanguage; |
| | | |
| | | /** |
| | | Enable the collection of Facebook Deferred AppLinks |
| | | Requires Facebook SDK and Facebook app on target/client device. |
| | | This API must be invoked prior to initializing the AppsFlyer SDK in order to function properly. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] enableFacebookDeferredApplinksWithClass:[FBSDKAppLinkUtility class]] |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().enableFacebookDeferredApplinks(with: FBSDKAppLinkUtility.self) |
| | | </pre> |
| | | |
| | | @param facebookAppLinkUtilityClass requeries method call `[FBSDKAppLinkUtility class]` as param. |
| | | */ |
| | | - (void)enableFacebookDeferredApplinksWithClass:(Class _Nullable)facebookAppLinkUtilityClass; |
| | | |
| | | /** |
| | | Use this to send the user's emails |
| | | |
| | | @param userEmails The list of strings that hold mails |
| | | @param type Hash algoritm |
| | | */ |
| | | - (void)setUserEmails:(NSArray<NSString *> * _Nullable)userEmails withCryptType:(EmailCryptType)type; |
| | | |
| | | /** |
| | | Start SDK session |
| | | Add the following method at the `applicationDidBecomeActive` in AppDelegate class |
| | | */ |
| | | - (void)start; |
| | | |
| | | - (void)startWithCompletionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler; |
| | | |
| | | /** |
| | | Use this method to log an events with multiple values. See AppsFlyer's documentation for details. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] logEvent:AFEventPurchase |
| | | withValues: @{AFEventParamRevenue : @200, |
| | | AFEventParamCurrency : @"USD", |
| | | AFEventParamQuantity : @2, |
| | | AFEventParamContentId: @"092", |
| | | AFEventParamReceiptId: @"9277"}]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventPurchase, |
| | | withValues: [AFEventParamRevenue : "1200", |
| | | AFEventParamContent : "shoes", |
| | | AFEventParamContentId: "123"]) |
| | | </pre> |
| | | |
| | | @param eventName Contains name of event that could be provided from predefined constants in `AppsFlyerLib.h` |
| | | @param values Contains dictionary of values for handling by backend |
| | | */ |
| | | - (void)logEvent:(NSString *)eventName withValues:(NSDictionary * _Nullable)values; |
| | | |
| | | - (void)logEventWithEventName:(NSString *)eventName |
| | | eventValues:(NSDictionary<NSString * , id> * _Nullable)eventValues |
| | | completionHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nullable dictionary, NSError * _Nullable error))completionHandler |
| | | NS_SWIFT_NAME(logEvent(name:values:completionHandler:)); |
| | | |
| | | /** |
| | | To log and validate in app purchases you can call this method from the completeTransaction: method on |
| | | your `SKPaymentTransactionObserver`. |
| | | |
| | | @param productIdentifier The product identifier |
| | | @param price The product price |
| | | @param currency The product currency |
| | | @param transactionId The purchase transaction Id |
| | | @param params The additional param, which you want to receive it in the raw reports |
| | | @param successBlock The success callback |
| | | @param failedBlock The failure callback |
| | | */ |
| | | - (void)validateAndLogInAppPurchase:(NSString * _Nullable)productIdentifier |
| | | price:(NSString * _Nullable)price |
| | | currency:(NSString * _Nullable)currency |
| | | transactionId:(NSString * _Nullable)transactionId |
| | | additionalParameters:(NSDictionary * _Nullable)params |
| | | success:(void (^ _Nullable)(NSDictionary * response))successBlock |
| | | failure:(void (^ _Nullable)(NSError * _Nullable error, id _Nullable reponse))failedBlock NS_AVAILABLE(10_7, 7_0); |
| | | |
| | | /** |
| | | To log location for geo-fencing. Does the same as code below. |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().logEvent(AFEventLocation, withValues: [AFEventParamLong:longitude, AFEventParamLat:latitude]) |
| | | </pre> |
| | | |
| | | @param longitude The location longitude |
| | | @param latitude The location latitude |
| | | */ |
| | | - (void)logLocation:(double)longitude latitude:(double)latitude NS_SWIFT_NAME(logLocation(longitude:latitude:)); |
| | | |
| | | /** |
| | | This method returns AppsFlyer's internal id(unique for your app) |
| | | |
| | | @return Internal AppsFlyer Id |
| | | */ |
| | | - (NSString *)getAppsFlyerUID; |
| | | |
| | | /** |
| | | In case you want to log deep linking. Does the same as `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @warning Preferred to use `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url sourceApplication:(NSString * _Nullable)sourceApplication API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | In case you want to log deep linking. |
| | | Call this method from inside your AppDelegate `-application:openURL:sourceApplication:annotation:` |
| | | |
| | | @param url The URL that was passed to your AppDelegate. |
| | | @param sourceApplication The sourceApplication that passed to your AppDelegate. |
| | | @param annotation The annotation that passed to your app delegate. |
| | | */ |
| | | - (void)handleOpenURL:(NSURL * _Nullable)url |
| | | sourceApplication:(NSString * _Nullable)sourceApplication |
| | | withAnnotation:(id _Nullable)annotation API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Call this method from inside of your AppDelegate `-application:openURL:options:` method. |
| | | This method is functionally the same as calling the AppsFlyer method |
| | | `-handleOpenURL:sourceApplication:withAnnotation`. |
| | | |
| | | @param url The URL that was passed to your app delegate |
| | | @param options The options dictionary that was passed to your AppDelegate. |
| | | */ |
| | | - (void)handleOpenUrl:(NSURL * _Nullable)url options:(NSDictionary * _Nullable)options API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Allow AppsFlyer to handle restoration from an NSUserActivity. |
| | | Use this method to log deep links with OneLink. |
| | | |
| | | @param userActivity The NSUserActivity that caused the app to be opened. |
| | | */ |
| | | - (BOOL)continueUserActivity:(NSUserActivity * _Nullable)userActivity |
| | | restorationHandler:(void (^ _Nullable)(NSArray * _Nullable))restorationHandler NS_AVAILABLE_IOS(9_0) API_UNAVAILABLE(macos); |
| | | |
| | | /** |
| | | Enable AppsFlyer to handle a push notification. |
| | | |
| | | @see [Learn more here](https://support.appsflyer.com/hc/en-us/articles/207364076-Measuring-Push-Notification-Re-Engagement-Campaigns) |
| | | |
| | | @warning To make it work - set data, related to AppsFlyer under key @"af". |
| | | |
| | | @param pushPayload The `userInfo` from received remote notification. One of root keys should be @"af". |
| | | */ |
| | | - (void)handlePushNotification:(NSDictionary * _Nullable)pushPayload; |
| | | |
| | | |
| | | /** |
| | | Register uninstall - you should register for remote notification and provide AppsFlyer the push device token. |
| | | |
| | | @param deviceToken The `deviceToken` from `-application:didRegisterForRemoteNotificationsWithDeviceToken:` |
| | | */ |
| | | - (void)registerUninstall:(NSData * _Nullable)deviceToken; |
| | | |
| | | /** |
| | | Get SDK version. |
| | | |
| | | @return The AppsFlyer SDK version info. |
| | | */ |
| | | - (NSString *)getSDKVersion; |
| | | |
| | | /** |
| | | This is for internal use. |
| | | */ |
| | | - (void)remoteDebuggingCallWithData:(NSString *)data; |
| | | |
| | | /** |
| | | Used to force the trigger `onAppOpenAttribution` delegate. |
| | | Notice, re-engagement, session and launch won't be counted. |
| | | Only for OneLink/UniversalLink/Deeplink resolving. |
| | | |
| | | @param URL The param to resolve into -[AppsFlyerLibDelegate onAppOpenAttribution:] |
| | | */ |
| | | - (void)performOnAppAttributionWithURL:(NSURL * _Nullable)URL; |
| | | |
| | | /** |
| | | @brief This property accepts a string value representing the host name for all endpoints. |
| | | Can be used to Zero rate your application’s data usage. Contact your CSM for more information. |
| | | |
| | | @warning To use `default` SDK endpoint – set value to `nil`. |
| | | |
| | | Objective-C: |
| | | |
| | | <pre> |
| | | [[AppsFlyerLib shared] setHost:@"example.com"]; |
| | | </pre> |
| | | |
| | | Swift: |
| | | |
| | | <pre> |
| | | AppsFlyerLib.shared().host = "example.com" |
| | | </pre> |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *host; |
| | | |
| | | /** |
| | | * This function set the host name and prefix host name for all the endpoints |
| | | **/ |
| | | - (void)setHost:(NSString *)host withHostPrefix:(NSString *)hostPrefix; |
| | | |
| | | /** |
| | | * This property accepts a string value representing the prefix host name for all endpoints. |
| | | * for example "test" prefix with default host name will have the address "host.appsflyer.com" |
| | | */ |
| | | @property(nonatomic, strong, readonly) NSString *hostPrefix; |
| | | |
| | | /** |
| | | This property is responsible for timeout between sessions in seconds. |
| | | Default value is 5 seconds. |
| | | */ |
| | | @property(atomic) NSUInteger minTimeBetweenSessions; |
| | | |
| | | /** |
| | | API to shut down all SDK activities. |
| | | |
| | | @warning This will disable all requests from AppsFlyer SDK. |
| | | */ |
| | | @property(atomic) BOOL isStopped; |
| | | |
| | | /** |
| | | API to set manually Facebook deferred app link |
| | | */ |
| | | @property(nonatomic, nullable) NSURL *facebookDeferredAppLink; |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | */ |
| | | @property(nonatomic, nullable) NSArray<NSString *> *sharingFilter DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | @property(nonatomic) NSUInteger deepLinkTimeout; |
| | | |
| | | /** |
| | | Block an events from being shared with any partner |
| | | This method overwrite -[AppsFlyerLib setSharingFilter:] |
| | | */ |
| | | - (void)setSharingFilterForAllPartners DEPRECATED_MSG_ATTRIBUTE("starting SDK version 6.4.0, please use `setSharingFilterForPartners:`"); |
| | | |
| | | /** |
| | | Block an events from being shared with ad networks and other 3rd party integrations |
| | | Must only include letters/digits or underscore, maximum length: 45 |
| | | |
| | | The sharing filter is cleared in case if `nil` or empty array passed as a parameter. |
| | | "all" keyword sets sharing filter for ALL partners, it is case insencitive and has highest priority |
| | | if passed along with another values. For example, if ["all", "examplePartner1_int", "examplePartner2_int" ] passed, |
| | | the sharing filter will be set for ALL partners. |
| | | */ |
| | | - (void)setSharingFilterForPartners:(NSArray<NSString *> * _Nullable)sharingFilter; |
| | | |
| | | /** |
| | | Validate if URL contains certain string and append quiery |
| | | parameters to deeplink URL. In case if URL does not contain user-defined string, |
| | | parameters are not appended to the url. |
| | | |
| | | @param containsString string to check in URL. |
| | | @param parameters NSDictionary, which containins parameters to append to the deeplink url after it passed validation. |
| | | */ |
| | | - (void)appendParametersToDeepLinkingURLWithString:(NSString *)containsString |
| | | parameters:(NSDictionary<NSString *, NSString*> *)parameters |
| | | NS_SWIFT_NAME(appendParametersToDeeplinkURL(contains:parameters:)); |
| | | |
| | | /** |
| | | Adds array of keys, which are used to compose key path |
| | | to resolve deeplink from push notification payload `userInfo`. |
| | | |
| | | @param deepLinkPath an array of strings which contains keys to search for deeplink in payload. |
| | | */ |
| | | - (void)addPushNotificationDeepLinkPath:(NSArray<NSString *> *)deepLinkPath; |
| | | |
| | | /** |
| | | * Allows sending custom data for partner integration purposes. |
| | | * |
| | | * @param partnerId ID of the partner (usually has "_int" suffix) |
| | | * @param partnerInfo customer data, depends on the integration nature with specific partner |
| | | */ |
| | | |
| | | - (void)setPartnerDataWithPartnerId:(NSString * _Nullable)partnerId partnerInfo:(NSDictionary<NSString *, id> * _Nullable)partnerInfo |
| | | NS_SWIFT_NAME(setPartnerData(partnerId:partnerInfo:)); |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // LinkGenerator.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | Payload container for the `generateInviteUrlWithLinkGenerator:completionHandler:` from `AppsFlyerShareInviteHelper` |
| | | */ |
| | | @interface AppsFlyerLinkGenerator : NSObject |
| | | |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | - (instancetype)init NS_UNAVAILABLE; |
| | | /// Instance initialization is not allowed. Use generated instance |
| | | /// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]` |
| | | + (instancetype)new NS_UNAVAILABLE; |
| | | |
| | | @property(nonatomic, nullable) NSString *brandDomain; |
| | | |
| | | /// The channel through which the invite was sent (e.g. Facebook/Gmail/etc.). Usage: Recommended |
| | | - (void)setChannel :(nonnull NSString *)channel; |
| | | /// ReferrerCustomerId setter |
| | | - (void)setReferrerCustomerId:(nonnull NSString *)referrerCustomerId; |
| | | /// A campaign name. Usage: Optional |
| | | - (void)setCampaign :(nonnull NSString *)campaign; |
| | | /// ReferrerUID setter |
| | | - (void)setReferrerUID :(nonnull NSString *)referrerUID; |
| | | /// Referrer name |
| | | - (void)setReferrerName :(nonnull NSString *)referrerName; |
| | | /// The URL to referrer user avatar. Usage: Optional |
| | | - (void)setReferrerImageURL :(nonnull NSString *)referrerImageURL; |
| | | /// AppleAppID |
| | | - (void)setAppleAppID :(nonnull NSString *)appleAppID; |
| | | /// Deeplink path |
| | | - (void)setDeeplinkPath :(nonnull NSString *)deeplinkPath; |
| | | /// Base deeplink path |
| | | - (void)setBaseDeeplink :(nonnull NSString *)baseDeeplink; |
| | | /// A single key value custom parameter. Usage: Optional |
| | | - (void)addParameterValue :(nonnull NSString *)value forKey:(NSString *)key; |
| | | /// Multiple key value custom parameters. Usage: Optional |
| | | - (void)addParameters :(nonnull NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // ShareInviteHelper.h |
| | | // AppsFlyerLib |
| | | // |
| | | // Created by Gil Meroz on 27/01/2017. |
| | | // |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import "AppsFlyerLinkGenerator.h" |
| | | |
| | | /** |
| | | AppsFlyerShareInviteHelper |
| | | */ |
| | | @interface AppsFlyerShareInviteHelper : NSObject |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | /** |
| | | * The AppsFlyerShareInviteHelper class builds the invite URL according to various setter methods |
| | | * which allow passing on additional information on the click. |
| | | * This information is available through `onConversionDataReceived:` when the user accepts the invite and installs the app. |
| | | * In addition, campaign and channel parameters are visible within the AppsFlyer Dashboard. |
| | | */ |
| | | + (void)generateInviteUrlWithLinkGenerator:(AppsFlyerLinkGenerator *(^)(AppsFlyerLinkGenerator *generator))generatorCreator completionHandler:(void (^)(NSURL *_Nullable url))completionHandler; |
| | | |
| | | /** |
| | | * It is recommended to generate an in-app event after the invite is sent to log the invites from the senders' perspective. |
| | | * This enables you to find the users that tend most to invite friends, and the media sources that get you these users. |
| | | */ |
| | | + (void)logInvite:(nullable NSString *)channel parameters:(nullable NSDictionary *)parameters; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | framework module AppsFlyerLib { |
| | | umbrella header "AppsFlyerLib.h" |
| | | |
| | | export * |
| | | module * { export * } |
| | | } |
New file |
| | |
| | | <?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>files</key> |
| | | <dict> |
| | | <key>Headers/AppsFlyerCrossPromotionHelper.h</key> |
| | | <data> |
| | | ezewyhf50Apa+1HjqfRFE7nXZIE= |
| | | </data> |
| | | <key>Headers/AppsFlyerDeepLink.h</key> |
| | | <data> |
| | | jDznIDDggwXT7EmzE7TYcZjhMjA= |
| | | </data> |
| | | <key>Headers/AppsFlyerDeepLinkResult.h</key> |
| | | <data> |
| | | 3J9juDAkVB2LUxC7/NDmKqgrzyQ= |
| | | </data> |
| | | <key>Headers/AppsFlyerLib.h</key> |
| | | <data> |
| | | NbnEYqmh3YQxKTTMmU6NdiBjCPU= |
| | | </data> |
| | | <key>Headers/AppsFlyerLinkGenerator.h</key> |
| | | <data> |
| | | dmn7cx6Z5wxK92gRzGUwPeRiZFg= |
| | | </data> |
| | | <key>Headers/AppsFlyerShareInviteHelper.h</key> |
| | | <data> |
| | | d9/NIwpZ+CNQ8zsxhNkHTT7kpRE= |
| | | </data> |
| | | <key>Info.plist</key> |
| | | <data> |
| | | 5QhzTTFQOBHLASR1HKiUixnktZw= |
| | | </data> |
| | | <key>Modules/module.modulemap</key> |
| | | <data> |
| | | r+QHVTsITCgZyCe0Vpvj+KSPIWc= |
| | | </data> |
| | | </dict> |
| | | <key>files2</key> |
| | | <dict> |
| | | <key>Headers/AppsFlyerCrossPromotionHelper.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | ezewyhf50Apa+1HjqfRFE7nXZIE= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | YgrwrWx/ZFYjXh2t5ZHY6S0EZTroYfe5Nprl3alq+Ho= |
| | | </data> |
| | | </dict> |
| | | <key>Headers/AppsFlyerDeepLink.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | jDznIDDggwXT7EmzE7TYcZjhMjA= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | Z5nW/ynpNNV+krqJXqy1Gb+gdnruPFWutZYYX7hSt3I= |
| | | </data> |
| | | </dict> |
| | | <key>Headers/AppsFlyerDeepLinkResult.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | 3J9juDAkVB2LUxC7/NDmKqgrzyQ= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | QsQGXKix5206DUBBUdDxfg5ykma/3V9MoHOxbz8NaOs= |
| | | </data> |
| | | </dict> |
| | | <key>Headers/AppsFlyerLib.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | NbnEYqmh3YQxKTTMmU6NdiBjCPU= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | VBCf2HT4z2f3yajqjKb+SDfyFWvy4PD1EWeiHBZg8FQ= |
| | | </data> |
| | | </dict> |
| | | <key>Headers/AppsFlyerLinkGenerator.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | dmn7cx6Z5wxK92gRzGUwPeRiZFg= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | n5nvQT7mm5XE6/p92Fwks9TR1rVR9k1TgTk06A14CMg= |
| | | </data> |
| | | </dict> |
| | | <key>Headers/AppsFlyerShareInviteHelper.h</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | d9/NIwpZ+CNQ8zsxhNkHTT7kpRE= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | dcwbMQEM8N0Ugem7QbAWWGP+hfO/0vlued2Pep6IKtc= |
| | | </data> |
| | | </dict> |
| | | <key>Modules/module.modulemap</key> |
| | | <dict> |
| | | <key>hash</key> |
| | | <data> |
| | | r+QHVTsITCgZyCe0Vpvj+KSPIWc= |
| | | </data> |
| | | <key>hash2</key> |
| | | <data> |
| | | ZcaMjc66PAFkteksoe5Rzelk7opMMS8QdKiza/LgQwA= |
| | | </data> |
| | | </dict> |
| | | </dict> |
| | | <key>rules</key> |
| | | <dict> |
| | | <key>^.*</key> |
| | | <true/> |
| | | <key>^.*\.lproj/</key> |
| | | <dict> |
| | | <key>optional</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>1000</real> |
| | | </dict> |
| | | <key>^.*\.lproj/locversion.plist$</key> |
| | | <dict> |
| | | <key>omit</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>1100</real> |
| | | </dict> |
| | | <key>^Base\.lproj/</key> |
| | | <dict> |
| | | <key>weight</key> |
| | | <real>1010</real> |
| | | </dict> |
| | | <key>^version.plist$</key> |
| | | <true/> |
| | | </dict> |
| | | <key>rules2</key> |
| | | <dict> |
| | | <key>.*\.dSYM($|/)</key> |
| | | <dict> |
| | | <key>weight</key> |
| | | <real>11</real> |
| | | </dict> |
| | | <key>^(.*/)?\.DS_Store$</key> |
| | | <dict> |
| | | <key>omit</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>2000</real> |
| | | </dict> |
| | | <key>^.*</key> |
| | | <true/> |
| | | <key>^.*\.lproj/</key> |
| | | <dict> |
| | | <key>optional</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>1000</real> |
| | | </dict> |
| | | <key>^.*\.lproj/locversion.plist$</key> |
| | | <dict> |
| | | <key>omit</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>1100</real> |
| | | </dict> |
| | | <key>^Base\.lproj/</key> |
| | | <dict> |
| | | <key>weight</key> |
| | | <real>1010</real> |
| | | </dict> |
| | | <key>^Info\.plist$</key> |
| | | <dict> |
| | | <key>omit</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>20</real> |
| | | </dict> |
| | | <key>^PkgInfo$</key> |
| | | <dict> |
| | | <key>omit</key> |
| | | <true/> |
| | | <key>weight</key> |
| | | <real>20</real> |
| | | </dict> |
| | | <key>^embedded\.provisionprofile$</key> |
| | | <dict> |
| | | <key>weight</key> |
| | | <real>20</real> |
| | | </dict> |
| | | <key>^version\.plist$</key> |
| | | <dict> |
| | | <key>weight</key> |
| | | <real>20</real> |
| | | </dict> |
| | | </dict> |
| | | </dict> |
| | | </plist> |
| | |
| | | |
| | | // In this header, you should import all the public headers of your framework using statements like #import <WAAfImpl/PublicHeader.h> |
| | | |
| | | //time:2020/05/20 09:17 ver:3.8.4 |
| | | //time:2022/02/16 09:17 ver:3.9.7 |