备份CatanBuilding瘦身独立工程
This commit is contained in:
8
Packages/tysdk/Editor.meta
Normal file
8
Packages/tysdk/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f45c70fc03ca943dfa8ca97ff6c4dd7b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
20
Packages/tysdk/Editor/AndroidBuildProcessor.cs
Normal file
20
Packages/tysdk/Editor/AndroidBuildProcessor.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.IO;
|
||||
using UnityEditor.Android;
|
||||
|
||||
namespace tysdk.editor
|
||||
{
|
||||
|
||||
public class AndroidPostBuildProcessor : IPostGenerateGradleAndroidProject
|
||||
{
|
||||
public int callbackOrder => 1;
|
||||
|
||||
public void OnPostGenerateGradleAndroidProject(string path)
|
||||
{
|
||||
UnityEngine.Debug.Log($"OnPostGenerateGradleAndroidProject {path}");
|
||||
var projectPath = Directory.GetParent(path).ToString();
|
||||
var googleServicesJsonPath = "Packages/tysdk/Files/google-services.json";
|
||||
var googleServicesTargetPath = Path.Combine(projectPath, "launcher/google-services.json");
|
||||
File.Copy(googleServicesJsonPath, googleServicesTargetPath, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Packages/tysdk/Editor/AndroidBuildProcessor.cs.meta
Normal file
11
Packages/tysdk/Editor/AndroidBuildProcessor.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56f87573a715b418e8502b3402d41a44
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
309
Packages/tysdk/Editor/IOSBuildProcessor.cs
Normal file
309
Packages/tysdk/Editor/IOSBuildProcessor.cs
Normal file
@@ -0,0 +1,309 @@
|
||||
|
||||
#if UNITY_IOS
|
||||
|
||||
using UnityEditor.Callbacks;
|
||||
using UnityEditor.iOS.Xcode;
|
||||
using UnityEditor;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace tysdk.editor
|
||||
{
|
||||
|
||||
public class iOSPostBuildProcessor
|
||||
{
|
||||
|
||||
//[MenuItem("Tools/XcodeProcessTest")]
|
||||
//public static void Test()
|
||||
//{
|
||||
//var path = Path.Join(Directory.GetCurrentDirectory(),"bin/ft_xcode_0_26_20250512133516");
|
||||
//ProcessXCodeProj(path);
|
||||
//}
|
||||
|
||||
[PostProcessBuild(1000)]
|
||||
public static void ChangeXcodeSettings(BuildTarget buildTarget, string pathToBuiltProject)
|
||||
{
|
||||
if (buildTarget == BuildTarget.iOS)
|
||||
{
|
||||
UnityEngine.Debug.Log($"ChangeXcodeSettings {pathToBuiltProject}");
|
||||
ProcessXCodeProj(pathToBuiltProject);
|
||||
}
|
||||
}
|
||||
|
||||
private static void ProcessXCodeProj(string pathToBuiltProject)
|
||||
{
|
||||
string pbxprojPath = PBXProject.GetPBXProjectPath(pathToBuiltProject);
|
||||
PBXProject proj = new PBXProject();
|
||||
proj.ReadFromFile(pbxprojPath);
|
||||
|
||||
string target = proj.GetUnityMainTargetGuid();
|
||||
XCodeSetSigingAndCapbilities(target, proj, pathToBuiltProject);
|
||||
ProcessBuildSettings(proj);
|
||||
XcodeOverwriteFiles(pathToBuiltProject, proj);
|
||||
ProceeFirebasePlist(target, proj, pathToBuiltProject);
|
||||
|
||||
UnityEngine.Debug.Log($"XCodeProj {pbxprojPath}");
|
||||
File.WriteAllText(pbxprojPath, proj.WriteToString());
|
||||
|
||||
ProcessLocalization(pbxprojPath);
|
||||
|
||||
ProcessPlist(pathToBuiltProject);
|
||||
|
||||
}
|
||||
|
||||
// const string knowRegions = "knownRegions = (\n\t\t\t\ten,\n\t\t\t\tfr,\n\t\t\t\tde,\n\t\t\t\tes,\n\t\t\t\tid,\n\t\t\t\t\"zh-Hans\",\n\t\t\t\t\"zh-Hant\",\n\t\t\t);";
|
||||
|
||||
const string developmentRegion = "developmentRegion = en;";
|
||||
|
||||
private static void ProcessLocalization(string pbxProjPath)
|
||||
{
|
||||
var raw = File.ReadAllText(pbxProjPath);
|
||||
Regex developmentRegionRegex = new Regex(@"developmentRegion\s*=\s*(\w+);");
|
||||
Regex knownRegionsRegex = new Regex(@"knownRegions\s*=\s*\(([^)]+)\);");
|
||||
raw = developmentRegionRegex.Replace(raw, developmentRegion);
|
||||
raw = knownRegionsRegex.Replace(raw, MakeRegionsStr("en", "fr", "de", "es", "id", "zh-Hans", "zh-Hant", "nl", "it", "ja", "ko", "ms", "pl", "pt", "th", "tr", "ar"));
|
||||
File.WriteAllText(pbxProjPath, raw);
|
||||
}
|
||||
|
||||
private static string MakeRegionsStr(params string[] regions)
|
||||
{
|
||||
var sb = new System.Text.StringBuilder();
|
||||
foreach (var region in regions)
|
||||
{
|
||||
sb.Append($"\n\t\t\t\t{region},");
|
||||
}
|
||||
var str = sb.ToString();
|
||||
return $"knownRegions = ({str.Substring(0,str.Length-1)}\t\t\t);";
|
||||
}
|
||||
|
||||
private static void XcodeOverwriteFiles(string projPath, PBXProject proj)
|
||||
{
|
||||
|
||||
string mainAppPath = Path.Combine(projPath, "MainApp", "main.mm");
|
||||
string mainContent = File.ReadAllText(mainAppPath);
|
||||
string newContent = mainContent.Replace("#include <UnityFramework/UnityFramework.h>", @"#include ""../UnityFramework/UnityFramework.h""");
|
||||
File.WriteAllText(mainAppPath, newContent);
|
||||
|
||||
mainAppPath = Path.Combine(projPath, "Classes", "Preprocessor.h");
|
||||
mainContent = File.ReadAllText(mainAppPath);
|
||||
newContent = mainContent.Replace("#define UNITY_USES_REMOTE_NOTIFICATIONS 0", "#define UNITY_USES_REMOTE_NOTIFICATIONS 1");
|
||||
File.WriteAllText(mainAppPath, newContent);
|
||||
}
|
||||
|
||||
private static void ProceeFirebasePlist(string target, PBXProject proj, string root)
|
||||
{
|
||||
var plistPath = Path.Combine("Packages/tysdk/Files", "GoogleService-Info.plist");
|
||||
File.Copy(plistPath, $"{root}/GoogleService-Info.plist", true);
|
||||
var plistGuid = proj.AddFile("GoogleService-Info.plist", "GoogleService-Info.plist", PBXSourceTree.Source);
|
||||
proj.AddFileToBuild(target, plistGuid);
|
||||
}
|
||||
|
||||
private static void XCodeSetSigingAndCapbilities(string target, PBXProject proj, string root)
|
||||
{
|
||||
var entitlementsContent = File.ReadAllText("Packages/tysdk/Files/Unity-iPhone.entitlements");
|
||||
File.WriteAllText($"{root}/Unity-iPhone/Unity-iPhone.entitlements", entitlementsContent);
|
||||
|
||||
proj.AddCapability(target, PBXCapabilityType.SignInWithApple, "Unity-iPhone/Unity-iPhone.entitlements");
|
||||
proj.AddCapability(target, PBXCapabilityType.KeychainSharing, "Unity-iPhone/Unity-iPhone.entitlements");
|
||||
proj.AddCapability(target, PBXCapabilityType.PushNotifications, "Unity-iPhone/Unity-iPhone.entitlements");
|
||||
proj.AddCapability(target, PBXCapabilityType.AssociatedDomains, "Unity-iPhone/Unity-iPhone.entitlements");
|
||||
}
|
||||
|
||||
private static void ProcessBuildSettings(PBXProject proj)
|
||||
{
|
||||
string target = proj.TargetGuidByName("GameAssembly");
|
||||
proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-all_load");
|
||||
|
||||
target = proj.TargetGuidByName("UnityFramework");
|
||||
proj.SetBuildProperty(target, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "NO");
|
||||
proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC");
|
||||
proj.AddFrameworkToProject(target, "AppTrackingTransparency.framework", false);
|
||||
|
||||
proj.AddFrameworkToProject(target, "StoreKit.framework", false);
|
||||
proj.AddFrameworkToProject(target, "CFNetwork.framework", false);
|
||||
proj.AddFrameworkToProject(target, "CoreTelephony.framework", false);
|
||||
proj.AddFrameworkToProject(target, "Security.framework", false);
|
||||
proj.AddFrameworkToProject(target, "SystemConfiguration.framework", false);
|
||||
proj.AddFrameworkToProject(target, "libc++.tbd", false);
|
||||
proj.AddFrameworkToProject(target, "libsqlite3.tbd", false);
|
||||
proj.AddFrameworkToProject(target, "libz.tbd", false);
|
||||
proj.AddFrameworkToProject(target, "Accelerate.framework", false);
|
||||
proj.AddFrameworkToProject(target, "AuthenticationServices.framework", false);
|
||||
proj.AddFrameworkToProject(target, "SafariServices.framework", false);
|
||||
proj.AddFrameworkToProject(target, "LocalAuthentication.framework", false);
|
||||
proj.AddFrameworkToProject(target, "CoreGraphics.framework", false);
|
||||
proj.AddFrameworkToProject(target, "WebKit.framework", false);
|
||||
//Add AdSupport Framework
|
||||
proj.AddFrameworkToProject(target, "AdSupport.framework", false);
|
||||
}
|
||||
|
||||
private static void ProcessPlist(string root)
|
||||
{
|
||||
string plistPath = root + "/Info.plist";
|
||||
PlistDocument plist = new PlistDocument();
|
||||
plist.ReadFromString(File.ReadAllText(plistPath));
|
||||
PlistElementDict infoDict = plist.root;
|
||||
|
||||
PlistElementArray urlTypesArray = null;
|
||||
if (!infoDict.values.ContainsKey("CFBundleURLTypes"))
|
||||
{
|
||||
urlTypesArray = infoDict.CreateArray("CFBundleURLTypes");
|
||||
}
|
||||
else
|
||||
{
|
||||
urlTypesArray = infoDict.values["CFBundleURLTypes"].AsArray();
|
||||
}
|
||||
|
||||
if (!infoDict.values.ContainsKey("NSUserActivityTypes"))
|
||||
{
|
||||
PlistElementArray userActivityTypes = infoDict.CreateArray("NSUserActivityTypes");
|
||||
userActivityTypes.AddString("INSendMessageIntent");
|
||||
}
|
||||
else
|
||||
{
|
||||
PlistElementArray userActivityTypes = infoDict.values["NSUserActivityTypes"].AsArray();
|
||||
userActivityTypes.AddString("INSendMessageIntent");
|
||||
}
|
||||
|
||||
PlistElementArray queriesSchemesArray = null;
|
||||
if (!infoDict.values.ContainsKey("LSApplicationQueriesSchemes"))
|
||||
{
|
||||
queriesSchemesArray = infoDict.CreateArray("LSApplicationQueriesSchemes");
|
||||
}
|
||||
else
|
||||
{
|
||||
queriesSchemesArray = infoDict.values["LSApplicationQueriesSchemes"].AsArray();
|
||||
}
|
||||
|
||||
// AAT
|
||||
var trackingDescription = "Data will be used to deliver personalized content to you";
|
||||
infoDict.SetString("NSUserTrackingUsageDescription", trackingDescription);
|
||||
|
||||
// Photo Library
|
||||
infoDict.SetBoolean("PHPhotoLibraryPreventAutomaticLimitedAccessAlert", true);
|
||||
var photoLibraryUsageDescription = "The app requires your consent to add photos or videos to the photo gallery so that you can manage and share them more easily. We are committed to protecting your privacy and complying with relevant laws and regulations.";
|
||||
infoDict.SetString("NSPhotoLibraryUsageDescription", photoLibraryUsageDescription);
|
||||
|
||||
// UIFileSharing
|
||||
infoDict.SetBoolean("UIFileSharingEnabled", true);
|
||||
|
||||
// Google
|
||||
string googleClientID = "com.googleusercontent.apps.481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62";
|
||||
CreateURLTypes(urlTypesArray.AddDict(), "google", googleClientID);
|
||||
|
||||
//Facebook
|
||||
{
|
||||
string faceBookAppId = "162066986963808";
|
||||
string faceBookDisPlayname = "arkgame";
|
||||
string facebookClientToken = "5fe59b0d985ad7acb51f48081e69d45b";
|
||||
PlistElementDict facebookDic = urlTypesArray.AddDict();
|
||||
PlistElementArray fbSchmes = facebookDic.CreateArray("CFBundleURLSchemes");
|
||||
|
||||
CreateURLTypes(urlTypesArray.AddDict(), "fb", $"fb{faceBookAppId}");
|
||||
|
||||
infoDict.SetString("FacebookAppID", faceBookAppId);
|
||||
infoDict.SetString("FacebookDisplayName", faceBookDisPlayname);
|
||||
infoDict.SetString("FacebookClientToken", facebookClientToken);
|
||||
//白名单
|
||||
queriesSchemesArray.AddString("fb-messenger-share-api");
|
||||
queriesSchemesArray.AddString("fbauth2");
|
||||
queriesSchemesArray.AddString("fbauth");
|
||||
queriesSchemesArray.AddString("fbshareextension");
|
||||
queriesSchemesArray.AddString("fbapi");
|
||||
queriesSchemesArray.AddString("fbapi20130214");
|
||||
queriesSchemesArray.AddString("fbapi20130410");
|
||||
queriesSchemesArray.AddString("fbapi20130702");
|
||||
queriesSchemesArray.AddString("fbapi20131010");
|
||||
queriesSchemesArray.AddString("fbapi20131219");
|
||||
queriesSchemesArray.AddString("fbapi20140410");
|
||||
queriesSchemesArray.AddString("fbapi20140116");
|
||||
queriesSchemesArray.AddString("fbapi20150313");
|
||||
queriesSchemesArray.AddString("fbapi20150629");
|
||||
queriesSchemesArray.AddString("fbapi20160328");
|
||||
}
|
||||
AddSKAdNetworkIdentifier(infoDict);
|
||||
|
||||
// "en", "fr", "de", "es", "id", "zh-Hans", "zh-Hant", "nl", "it", "ja", "ko", "ms", "pl", "pt", "th", "tr", "ar"
|
||||
var localization = infoDict.CreateArray("CFBundleLocalizations");
|
||||
localization.AddString("en");
|
||||
localization.AddString("fr");
|
||||
localization.AddString("de");
|
||||
localization.AddString("es");
|
||||
localization.AddString("id");
|
||||
localization.AddString("zh_CN");
|
||||
localization.AddString("zh_TW");
|
||||
localization.AddString("nl");
|
||||
localization.AddString("it");
|
||||
localization.AddString("ja");
|
||||
localization.AddString("ko");
|
||||
localization.AddString("ms");
|
||||
localization.AddString("pl");
|
||||
localization.AddString("pt");
|
||||
localization.AddString("th");
|
||||
localization.AddString("tr");
|
||||
localization.AddString("ar");
|
||||
|
||||
//CoMo
|
||||
//<key>GOOGLE_ANALYTICS_DEFAULT_ALLOW_ANALYTICS_STORAGE</key> <true/>
|
||||
// <key>GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_STORAGE</key> <true/>
|
||||
// <key>GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_USER_DATA</key> <true/>
|
||||
// <key>GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS</key> <true/>
|
||||
infoDict.SetBoolean("GOOGLE_ANALYTICS_DEFAULT_ALLOW_ANALYTICS_STORAGE", true);
|
||||
infoDict.SetBoolean("GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_STORAGE", true);
|
||||
infoDict.SetBoolean("GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_USER_DATA", true);
|
||||
infoDict.SetBoolean("GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS", true);
|
||||
|
||||
File.WriteAllText(plistPath, plist.WriteToString());
|
||||
}
|
||||
|
||||
private static void AddSKAdNetworkIdentifier(PlistElementDict infoDict)
|
||||
{
|
||||
|
||||
List<string> skadnetworks = new List<string>() {
|
||||
"22mmun2rn5.skadnetwork", "238da6jt44.skadnetwork", "24t9a8vw3c.skadnetwork", "24zw6aqk47.skadnetwork", "252b5q8x7y.skadnetwork", "275upjj5gd.skadnetwork",
|
||||
"294l99pt4k.skadnetwork", "2fnua5tdw4.skadnetwork", "2u9pt9hc89.skadnetwork", "32z4fx6l9h.skadnetwork", "3l6bd9hu43.skadnetwork", "3qcr597p9d.skadnetwork",
|
||||
"3qy4746246.skadnetwork", "3rd42ekr43.skadnetwork", "3sh42y64q3.skadnetwork", "424m5254lk.skadnetwork", "4468km3ulz.skadnetwork", "44jx6755aq.skadnetwork",
|
||||
"44n7hlldy6.skadnetwork", "47vhws6wlr.skadnetwork", "488r3q3dtq.skadnetwork", "4dzt52r2t5.skadnetwork", "4fzdc2evr5.skadnetwork", "4mn522wn87.skadnetwork",
|
||||
"4pfyvq9l8r.skadnetwork", "4w7y6s5ca2.skadnetwork", "523jb4fst2.skadnetwork", "52fl2v3hgk.skadnetwork", "54nzkqm89y.skadnetwork", "578prtvx9j.skadnetwork",
|
||||
"5a6flpkh64.skadnetwork", "5f5u5tfb26.skadnetwork", "5l3tpt7t6e.skadnetwork", "5lm9lj6jb7.skadnetwork", "5tjdwbrq8w.skadnetwork", "6964rsfnh4.skadnetwork",
|
||||
"6g9af3uyq4.skadnetwork", "6p4ks3rnbw.skadnetwork", "6v7lgmsu45.skadnetwork", "6xzpu9s2p8.skadnetwork", "6yxyv74ff7.skadnetwork", "737z793b9f.skadnetwork",
|
||||
"74b6s63p6l.skadnetwork", "7953jerfzd.skadnetwork", "79pbpufp6p.skadnetwork", "7fmhfwg9en.skadnetwork", "7rz58n8ntl.skadnetwork", "7ug5zh24hu.skadnetwork",
|
||||
"84993kbrcf.skadnetwork", "89z7zv988g.skadnetwork", "8c4e2ghe7u.skadnetwork", "8m87ys6875.skadnetwork", "8r8llnkz5a.skadnetwork", "8s468mfl3y.skadnetwork",
|
||||
"97r2b46745.skadnetwork", "9b89h5y424.skadnetwork", "9g2aggbj52.skadnetwork", "9nlqeag3gk.skadnetwork", "9rd848q2bz.skadnetwork", "9t245vhmpl.skadnetwork",
|
||||
"9vvzujtq5s.skadnetwork", "9yg77x724h.skadnetwork", "a2p9lx4jpn.skadnetwork", "a7xqa6mtl2.skadnetwork", "a8cz6cu7e5.skadnetwork", "av6w8kgt66.skadnetwork",
|
||||
"b9bk5wbcq9.skadnetwork", "bxvub5ada5.skadnetwork", "c3frkrj4fj.skadnetwork", "c6k4g5qg8m.skadnetwork", "cg4yq2srnc.skadnetwork", "cj5566h2ga.skadnetwork",
|
||||
"cp8zw746q7.skadnetwork", "cs644xg564.skadnetwork", "cstr6suwn9.skadnetwork", "cwn433xbcr.skadnetwork", "dbu4b84rxf.skadnetwork", "dkc879ngq3.skadnetwork",
|
||||
"dzg6xy7pwj.skadnetwork", "e5fvkxwrpn.skadnetwork", "ecpz2srf59.skadnetwork", "eh6m2bh4zr.skadnetwork", "ejvt5qm6ak.skadnetwork", "f38h382jlk.skadnetwork",
|
||||
"f73kdq92p3.skadnetwork", "f7s53z58qe.skadnetwork", "feyaarzu9v.skadnetwork", "g28c52eehv.skadnetwork", "g2y4y55b64.skadnetwork", "g6gcrrvk4p.skadnetwork",
|
||||
"ggvn48r87g.skadnetwork", "glqzh8vgby.skadnetwork", "gta8lk7p23.skadnetwork", "gta9lk7p23.skadnetwork", "h65wbv5k3f.skadnetwork", "hb56zgv37p.skadnetwork",
|
||||
"hdw39hrw9y.skadnetwork", "hs6bdukanm.skadnetwork", "k674qkevps.skadnetwork", "k6y4y55b64.skadnetwork", "kbd757ywx3.skadnetwork", "kbmxgpxpgc.skadnetwork",
|
||||
"klf5c3l5u5.skadnetwork", "krvm3zuq6h.skadnetwork", "lr83yxwka7.skadnetwork", "ludvb6z3bs.skadnetwork", "m297p6643m.skadnetwork", "m5mvw97r93.skadnetwork",
|
||||
"m8dbw4sv7c.skadnetwork", "mj797d8u6f.skadnetwork", "mlmmfzh3r3.skadnetwork", "mls7yz5dvl.skadnetwork", "mp6xlyr22a.skadnetwork", "mqn7fxpca7.skadnetwork",
|
||||
"mtkv5xtk9e.skadnetwork", "n38lu8286q.skadnetwork", "n66cz3y3bx.skadnetwork", "n6fk4nfna4.skadnetwork", "n9x2a789qt.skadnetwork", "nzq8sh4pbs.skadnetwork",
|
||||
"p78axxw29g.skadnetwork", "ppxm28t8ap.skadnetwork", "prcb7njmu6.skadnetwork", "pwa73g5rt2.skadnetwork", "pwdxu55a5a.skadnetwork", "qqp299437r.skadnetwork",
|
||||
"qu637u8glc.skadnetwork", "r45fhb6rf7.skadnetwork", "rvh3l7un93.skadnetwork", "rx5hdcabgc.skadnetwork", "s39g8k73mm.skadnetwork", "s69wq72ugq.skadnetwork",
|
||||
"su67r6k2v3.skadnetwork", "t38b2kh725.skadnetwork", "t6d3zquu66.skadnetwork", "tl55sbb4fm.skadnetwork", "tvvz7th9br.skadnetwork", "u679fj5vs4.skadnetwork",
|
||||
"uw77j35x4d.skadnetwork", "v4nxqhlyqp.skadnetwork", "v72qych5uu.skadnetwork", "v79kvwwj4g.skadnetwork", "v9wttpbfk9.skadnetwork", "vcra2ehyfk.skadnetwork",
|
||||
"vutu7akeur.skadnetwork", "w9q455wk68.skadnetwork", "wg4vff78zm.skadnetwork", "wzmmz9fp6w.skadnetwork", "x44k69ngh6.skadnetwork", "x5l83yy675.skadnetwork",
|
||||
"x8jxxk4ff5.skadnetwork", "x8uqf25wch.skadnetwork", "xga6mpmplv.skadnetwork", "xy9t38ct57.skadnetwork", "y45688jllp.skadnetwork", "y5ghdn5j9k.skadnetwork",
|
||||
"yclnxrl5pm.skadnetwork", "ydx93a7ass.skadnetwork", "z24wtl6j62.skadnetwork", "zmvfpc5aq8.skadnetwork", "zq492l623r.skadnetwork"
|
||||
};
|
||||
var items = infoDict.CreateArray("SKAdNetworkItems");
|
||||
var key = "SKAdNetworkIdentifier";
|
||||
foreach (var identifier in skadnetworks)
|
||||
{
|
||||
items.AddDict().SetString(key, identifier);
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreateURLTypes(PlistElementDict dict, string name, string scheme1)
|
||||
{
|
||||
dict.SetString("CFBundleTypeRole", "Editor"); dict.SetString("CFBundleURLName", name);
|
||||
dict.CreateArray("CFBundleURLSchemes");
|
||||
PlistElementArray schemes = dict.values["CFBundleURLSchemes"].AsArray();
|
||||
schemes.AddString(scheme1);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
11
Packages/tysdk/Editor/IOSBuildProcessor.cs.meta
Normal file
11
Packages/tysdk/Editor/IOSBuildProcessor.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 468d2681067c74abb878906d38bdedde
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
16
Packages/tysdk/Editor/tysdk.editor.asmdef
Normal file
16
Packages/tysdk/Editor/tysdk.editor.asmdef
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "tysdk.editor",
|
||||
"rootNamespace": "tysdk.editor",
|
||||
"references": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
7
Packages/tysdk/Editor/tysdk.editor.asmdef.meta
Normal file
7
Packages/tysdk/Editor/tysdk.editor.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a774485133c74ca3b9d9c2727879d3a
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/tysdk/Files.meta
Normal file
8
Packages/tysdk/Files.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ddb489fcd9d004a64ab0af6d4192749d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
36
Packages/tysdk/Files/GoogleService-Info.plist
Normal file
36
Packages/tysdk/Files/GoogleService-Info.plist
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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>CLIENT_ID</key>
|
||||
<string>481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62.apps.googleusercontent.com</string>
|
||||
<key>REVERSED_CLIENT_ID</key>
|
||||
<string>com.googleusercontent.apps.481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62</string>
|
||||
<key>ANDROID_CLIENT_ID</key>
|
||||
<string>481260393117-jhq50gh6n2p6pat1bjhcgj3th1ke19jg.apps.googleusercontent.com</string>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyDQrn5AeVA-T0PV22PtuUc_GrpK-M5cl-k</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>481260393117</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>com.arkgame.ft</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>fishing-travel</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>fishing-travel.appspot.com</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true></true>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:481260393117:ios:120b4fb634fae8d007fa74</string>
|
||||
</dict>
|
||||
</plist>
|
||||
7
Packages/tysdk/Files/GoogleService-Info.plist.meta
Normal file
7
Packages/tysdk/Files/GoogleService-Info.plist.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 363a577373a8c487da06a71bde433af3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Packages/tysdk/Files/Unity-iPhone.entitlements
Normal file
22
Packages/tysdk/Files/Unity-iPhone.entitlements
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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>aps-environment</key>
|
||||
<string>development</string>
|
||||
<key>com.apple.developer.applesignin</key>
|
||||
<array>
|
||||
<string>Default</string>
|
||||
</array>
|
||||
<key>com.apple.developer.associated-domains</key>
|
||||
<array>
|
||||
<string>applinks:fishingtraveliae.onelink.me</string>
|
||||
</array>
|
||||
<key>com.apple.developer.usernotifications.communication</key>
|
||||
<true/>
|
||||
<key>keychain-access-groups</key>
|
||||
<array>
|
||||
<string>$(AppIdentifierPrefix)com.game</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
7
Packages/tysdk/Files/Unity-iPhone.entitlements.meta
Normal file
7
Packages/tysdk/Files/Unity-iPhone.entitlements.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8b995fb09313427896125176170fbc5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
47
Packages/tysdk/Files/google-services.json
Normal file
47
Packages/tysdk/Files/google-services.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "481260393117",
|
||||
"project_id": "fishing-travel",
|
||||
"storage_bucket": "fishing-travel.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:481260393117:android:4e8da50d0ee3b5c207fa74",
|
||||
"android_client_info": {
|
||||
"package_name": "com.arkgame.ft"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "481260393117-jhq50gh6n2p6pat1bjhcgj3th1ke19jg.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.arkgame.ft",
|
||||
"certificate_hash": "c9cf2f5eaba383cbdd5b968d0342c49afabc32a2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBU6gAwu0O28jg7-TRd_Vx2YMCH_Baa8Bw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
7
Packages/tysdk/Files/google-services.json.meta
Normal file
7
Packages/tysdk/Files/google-services.json.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe43ff94ee6dd4dc980ffa685191687c
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/tysdk/Plugins.meta
Normal file
8
Packages/tysdk/Plugins.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fc06e61b91d2471ba36eb6f67a64a7e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/tysdk/Plugins/Android.meta
Normal file
8
Packages/tysdk/Plugins/Android.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 356fc225f980544cfa685e5699c7bff5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
30
Packages/tysdk/Plugins/Android/ConfigManager.java
Normal file
30
Packages/tysdk/Plugins/Android/ConfigManager.java
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
package com.unity3d.player;
|
||||
|
||||
public class ConfigManager {
|
||||
//通用参数
|
||||
public static int SDK_APPID = 20587;
|
||||
public static String SDK_GAMEID = "20587";
|
||||
public static String SDK_PROJECTID = "20587";
|
||||
public static String SDK_CLOUDID = "128";
|
||||
public static String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.googleplay.FishingMaster";
|
||||
|
||||
public static String SDK_LOGIN_SERVER_URL = "https://128-hwsfsdk-sdk-online01.qijihdhk.com";
|
||||
|
||||
// 防沉迷 - nameSpace
|
||||
public static String FCM_NAMESPACE = "128";
|
||||
// 防沉迷 - 长连接服务地址+端口
|
||||
public static String FCM_IAM_HOST = "tcp://fcmtcp.tuyoo.com:3563";
|
||||
// 防沉迷 - 防沉迷服务地址
|
||||
public static String FCM_ANTISERVERURL = "https://fcmapi.tuyoo.com";
|
||||
|
||||
|
||||
public static final String UNITY_FACADE_NAME = "TYSdkFacade";
|
||||
public static final String LOGIN_CALLBACK_FUNCTION_NAME = "LoginResult";
|
||||
public static final String CHECKLINK_CALLBACK_FUNCTION_NAME = "CheckLinkResult";
|
||||
public static final String PAY_CALLBACK_FUNCTION_NAME = "PayResult";
|
||||
public static final String PAY_TYPE_CALLBACK_FUNCTION_NAME = "SKUListResult";
|
||||
public static final String FCM_NOTICE_FUNCTION_NAME = "FCMCallback";
|
||||
public static final String FCM_REALNAME_CALLBACK_FUNCTION_NAME = "RealNameCallback";
|
||||
|
||||
}
|
||||
32
Packages/tysdk/Plugins/Android/ConfigManager.java.meta
Normal file
32
Packages/tysdk/Plugins/Android/ConfigManager.java.meta
Normal file
@@ -0,0 +1,32 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1db5fda501403f6488b08a37aebd8a80
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
436
Packages/tysdk/Plugins/Android/SDKManager.java
Normal file
436
Packages/tysdk/Plugins/Android/SDKManager.java
Normal file
@@ -0,0 +1,436 @@
|
||||
|
||||
package com.unity3d.player;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.barton.log.GASDKFactory;
|
||||
import com.barton.log.builder.GAConfiguration;
|
||||
import com.barton.log.builder.ParamsBuilder;
|
||||
import com.barton.log.ebarton.BaseUrl;
|
||||
import com.barton.log.ebarton.EventType;
|
||||
import com.barton.log.logapi.IGASDK;
|
||||
import com.facebook.share.model.ShareLinkContent;
|
||||
import com.facebook.share.widget.MessageDialog;
|
||||
import com.facebook.share.widget.ShareDialog;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.play.core.review.ReviewException;
|
||||
import com.google.android.play.core.review.ReviewInfo;
|
||||
import com.google.android.play.core.review.ReviewManager;
|
||||
import com.google.android.play.core.review.ReviewManagerFactory;
|
||||
import com.google.android.play.core.review.model.ReviewErrorCode;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.tuyoo.gamesdk.api.SDKAPI;
|
||||
import com.tuyoo.gamesdk.api.SDKCallBack;
|
||||
import com.tuyoo.gamesdk.api.SDKWrapper;
|
||||
import com.tuyoo.gamesdk.api.TuYooClientID;
|
||||
import com.tuyoo.gamesdk.event.EventBus;
|
||||
import com.tuyoo.gamesdk.event.EventConsts;
|
||||
import com.tuyoo.gamesdk.event.data.PayEventData;
|
||||
import com.tuyoo.gamesdk.event.data.WeixinShareData;
|
||||
import com.tuyoo.gamesdk.model.InitParam;
|
||||
import com.tuyoo.gamesdk.pay.model.PayType;
|
||||
import com.tuyoo.gamesdk.util.SDKLog;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class SDKManager {
|
||||
|
||||
private final static Handler handler = new Handler(Looper.getMainLooper());
|
||||
private static IGASDK gasdk;
|
||||
private static final String TAG = com.unity3d.player.SDKManager.class.getSimpleName();
|
||||
private static String curType = TuYooClientID.tyGuest;
|
||||
public static void InitSDK(Activity activity)
|
||||
{
|
||||
activity.runOnUiThread(() -> {
|
||||
SDKAPI.getIns().lightModeEnable();
|
||||
try {
|
||||
SDKAPI.getIns().init(new InitParam.Builder()
|
||||
.withActivity(activity)
|
||||
.withAppId(ConfigManager.SDK_APPID)
|
||||
.withClientId(ConfigManager.SDK_CLIENTID)
|
||||
.withServerUrl(ConfigManager.SDK_LOGIN_SERVER_URL)
|
||||
.build());
|
||||
TYUnityActivity.setSdkInited();
|
||||
SDKAPI.getIns().onActivityStart(activity);
|
||||
SDKAPI.getIns().onActivityResume(activity);
|
||||
} catch (Exception e) {
|
||||
System.out.println("initSDK Exception " + e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static void parseLoginInfo(int i, String s) {
|
||||
try {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("code", i);
|
||||
if (i == 0) {
|
||||
JSONObject serverResponse = new JSONObject(s);
|
||||
JSONObject userInfo = serverResponse.getJSONObject("result");
|
||||
JSONObject userInfoResult = new JSONObject();
|
||||
userInfoResult.put("result", userInfo);
|
||||
result.put("respObj", userInfoResult);
|
||||
} else {
|
||||
result.put("errStr", s);
|
||||
}
|
||||
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.LOGIN_CALLBACK_FUNCTION_NAME, result.toString());
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG,"SDKManager-parseLoginInfo-Exception" + e);
|
||||
SDKLog.e("SDKManager-parseLoginInfo-Exception" + e);
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.LOGIN_CALLBACK_FUNCTION_NAME, "{\"code\":1}}");
|
||||
}
|
||||
}
|
||||
|
||||
//登录回调-统一的回调方法(保持回调仅有一个,否则可能会出现多次回调的情况)
|
||||
static SDKCallBack.Login mLogin = new SDKCallBack.Login() {
|
||||
@Override
|
||||
public void callback(int i, String s) {
|
||||
SDKLog.i("SDKCallBack.Login callback: " + i + " \n" + s);
|
||||
parseLoginInfo(i, s);
|
||||
}
|
||||
};
|
||||
|
||||
static SDKCallBack.Pay mPay = new SDKCallBack.Pay() {
|
||||
@Override
|
||||
public void callback(int i, String s) {
|
||||
|
||||
SDKLog.i("SDKCallBack.Pay callback: " + i + " \n" + s);
|
||||
try {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("code", i);
|
||||
result.put("respObj", s);
|
||||
result.put("errStr", s);
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_CALLBACK_FUNCTION_NAME, result.toString());
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG,"SDKManager-SDKCallBack.Pay-Exception" + e);
|
||||
SDKLog.e("SDKManager-SDKCallBack.Pay-Exception" + e);
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_CALLBACK_FUNCTION_NAME, "{\"code\":1}}");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static void UnityResetServerUrl(String url) {
|
||||
SDKLog.i("UnityResetServerUrl : " + url);
|
||||
SDKAPI.getIns().updateServer(url);
|
||||
}
|
||||
|
||||
public static void UnityLoginByTokenFun(String token) {
|
||||
SDKLog.i("UnityLoginByTokenFun : " + token);
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SDKAPI.getIns().loginByToken(token, mLogin);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void UnityGetIdentityFun(String type) {
|
||||
SDKLog.i("UnityGetIdentityFun : " + type);
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SDKAPI.getIns().loginByType(type, mLogin);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void UnityLogin(String type) {
|
||||
SDKLog.i("UnityLogin : " + type);
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SDKAPI.getIns().loginByType(type, mLogin);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void UnityLogOutByChannel(String type) {
|
||||
SDKLog.i("UnityLoginOut : ");
|
||||
handler.post(() -> SDKAPI.getIns().logout(type));
|
||||
}
|
||||
|
||||
public static void LinkAccount(String type, String userId)
|
||||
{
|
||||
SDKAPI.getIns().getSnsInfo(type, (code, snsInfo, msg) -> {
|
||||
if(code == SDKCallBack.CODE_SUCCESS && snsInfo != null){
|
||||
SDKAPI.getIns().bindBySnsId(snsInfo, userId, mLogin);
|
||||
}else {
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.LOGIN_CALLBACK_FUNCTION_NAME, "{\"code\":1}}");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void LinkCheck(String type)
|
||||
{
|
||||
SDKAPI.getIns().getSnsInfo(type, (code, snsInfo, msg) -> {
|
||||
if(code == SDKCallBack.CODE_SUCCESS && snsInfo != null){
|
||||
SDKAPI.getIns().checkSnsInfo(snsInfo, (code1, msg1) -> {
|
||||
if(code1 == SDKCallBack.CODE_SUCCESS && !TextUtils.isEmpty(msg1)){
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject(msg1).optJSONObject("result");
|
||||
//返回信息中code为0时表示服务端查询成功,exit为1表示此渠道用户信息已产生过途游账号,可直接进行登录,exit为0表示此渠道用户信息未产生过途游账号,可以进行绑定
|
||||
if(jsonObject.optString("code").equals("0")
|
||||
&& jsonObject.optString("exist").equals("0")){
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.CHECKLINK_CALLBACK_FUNCTION_NAME, "0");
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.CHECKLINK_CALLBACK_FUNCTION_NAME, "1");
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.CHECKLINK_CALLBACK_FUNCTION_NAME, "-1");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.CHECKLINK_CALLBACK_FUNCTION_NAME, "-1");
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.CHECKLINK_CALLBACK_FUNCTION_NAME, "-1");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void UnityKnow(String productId, String productName, String productCount, String prodorderId, String appInfo) {
|
||||
SDKLog.i("UnityKnow : " + productId);
|
||||
HashMap<String, String> extraInfo = new HashMap<String, String>();
|
||||
extraInfo.put("appInfo", appInfo);
|
||||
SDKAPI.getIns().pay(productId, productName, productCount, Integer.parseInt(ConfigManager.SDK_GAMEID), mPay, prodorderId, extraInfo);
|
||||
}
|
||||
|
||||
public static void UnityGetKnowTypeList(String productId)
|
||||
{
|
||||
Log.e(TAG,"UnityGetKnowTypeList:" + productId );
|
||||
final PayEventData.PayReq mPayReq = new PayEventData.PayReq();
|
||||
mPayReq.prodId = productId;
|
||||
SDKAPI.getIns().charge(mPayReq , new SDKCallBack.Base1() {
|
||||
@Override
|
||||
public void callback(int code, String msg) {
|
||||
SDKLog.e("====> code= " + code + " msg= " + msg);
|
||||
try {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("code", code);
|
||||
if(code == 0){
|
||||
result.put("respObj", msg);
|
||||
}else {
|
||||
result.put("errStr", msg);
|
||||
}
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, result.toString());
|
||||
} catch (Exception e) {
|
||||
SDKLog.e("SDKManager-UnityGetKnowTypeList-Exception" + e);
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, "{\"code\":1}}");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void UnityKnowNew(String productId, String productPrice, String productName, String productCount, String prodorderId, String appInfo, String ptype)
|
||||
{
|
||||
PayEventData.PayData payData = new PayEventData.PayData();
|
||||
final PayEventData.PayReq mPayReq = new PayEventData.PayReq();
|
||||
mPayReq.prodId = productId;
|
||||
mPayReq.prodPrice = productPrice;
|
||||
mPayReq.prodName = productName;
|
||||
mPayReq.prodCount = productCount;
|
||||
// 此字段与服务端回调接口内的appInfo不对应,与orderId相对应
|
||||
mPayReq.appInfo = prodorderId;
|
||||
HashMap<String, String> map = new HashMap<String, String>();
|
||||
// 此字段(appInfo)可用于传递透传信息(此信息与服务端回调接口内的appInfo相对应)
|
||||
map.put("appInfo", appInfo);
|
||||
mPayReq.extra = map;
|
||||
payData.payReq = mPayReq;
|
||||
PayType payType = new PayType();
|
||||
payType.paytype = ptype;
|
||||
SDKAPI.getIns().payNew(payData, payType, mPay);
|
||||
}
|
||||
|
||||
|
||||
public static void thirdExtend()
|
||||
{
|
||||
Log.e(TAG,"====>java thirdExtend");
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
try {
|
||||
jsonObject.put("action","ACTION_GET_SKU_DETAILS_LIST");
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
SDKAPI.getIns().thirdExtend(jsonObject.toString(), new SDKCallBack.Extend() {
|
||||
@Override public void callback(int code, String msg) {
|
||||
|
||||
Log.e(TAG,"====>thirdExtend code= " + code + " msg= " + msg );
|
||||
try {
|
||||
//获取成功,msg即为对应的json字符串
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("code", code);
|
||||
if(code == SDKCallBack.Extend.EXTEND_CODE_SUCCESS){
|
||||
result.put("respObj", msg);
|
||||
}else {
|
||||
Log.e(TAG,"获取商品列表失败啦:" + msg);
|
||||
result.put("thirdExtend_errStr", msg);
|
||||
}
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, result.toString());
|
||||
} catch (Exception e) {
|
||||
SDKLog.e("SDKManager-UnityGetKnowTypeList-Exception" + e);
|
||||
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, "{\"code\":1}}");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static IGASDK GetGameGa(){
|
||||
if(gasdk == null){
|
||||
GAConfiguration.Builder builder = new GAConfiguration.Builder()
|
||||
.withBaseUrl(BaseUrl.INTERNATIONAL)
|
||||
.withContext(SDKWrapper.getInstance().getContext())
|
||||
.withClientId(ConfigManager.SDK_CLIENTID)
|
||||
.withGameId(ConfigManager.SDK_GAMEID)
|
||||
.withProjectId(ConfigManager.SDK_PROJECTID);
|
||||
gasdk = GASDKFactory.createGASDK(builder.build());
|
||||
}
|
||||
return gasdk;
|
||||
}
|
||||
|
||||
public static void SetGaUserInfo(String userId)
|
||||
{
|
||||
Log.e(TAG,"SetGaUserInfo : " + userId);
|
||||
SDKLog.i("SetGaUserInfo : " + userId);
|
||||
GetGameGa().setUserId(userId);
|
||||
}
|
||||
|
||||
public static void SetGaCommonInfo(String SetGaCommonInfo)
|
||||
{
|
||||
Log.e(TAG,"SetGaCommonInfo : " + SetGaCommonInfo);
|
||||
SDKLog.i("SetGaCommonInfo : " + SetGaCommonInfo);
|
||||
Gson gson = new Gson();
|
||||
Map<String, Object> map = gson.fromJson(SetGaCommonInfo, new TypeToken<Map<String, Object>>(){}.getType());
|
||||
for (String key : map.keySet()) {
|
||||
System.out.println("Key = " + key + ", Value = " + map.get(key));
|
||||
if(!TextUtils.isEmpty(key) && map.get(key) != null){
|
||||
GetGameGa().addCommonParameter(key, map.get(key).toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void GAReportParams(int type, String eventstr, String paramstr)
|
||||
{
|
||||
ParamsBuilder paramsBuilder = ParamsBuilder.newInstance();
|
||||
Gson gson = new Gson();
|
||||
Map<String, Object> map = gson.fromJson(paramstr, new TypeToken<Map<String, Object>>(){}.getType());
|
||||
for (String key : map.keySet()) {
|
||||
if(!TextUtils.isEmpty(key) && map.get(key) != null){
|
||||
paramsBuilder.append(key, map.get(key).toString());
|
||||
}
|
||||
}
|
||||
// GA_TRACK = 1, //默认类型
|
||||
// GA_CION = 2, //金流相关事件
|
||||
// GA_PAY = 3, //支付相关事件
|
||||
// GA_GAME = 4, //游戏行为
|
||||
// GA_LOGIN = 5, //登录注册相关事件
|
||||
// GA_PUSH = 6, //推送相关事件
|
||||
// GA_ADBOX = 7, //adbox相关事件
|
||||
// GA_PREFORMANCE = 8, //性能上报相关事件
|
||||
// GA_SDK = 9, //SDK相关事件
|
||||
// GA_ABTest = 10, //abtest相关事件
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case 2:
|
||||
GetGameGa().track(EventType.COIN , eventstr, paramsBuilder);
|
||||
break;
|
||||
case 3:
|
||||
GetGameGa().track(EventType.PAY , eventstr, paramsBuilder);
|
||||
break;
|
||||
case 4:
|
||||
GetGameGa().track(EventType.GAME , eventstr, paramsBuilder);
|
||||
break;
|
||||
case 5:
|
||||
GetGameGa().track(EventType.LOGIN , eventstr, paramsBuilder);
|
||||
break;
|
||||
case 6:
|
||||
GetGameGa().track(EventType.PUSH , eventstr, paramsBuilder);
|
||||
break;
|
||||
case 7:
|
||||
GetGameGa().track(EventType.ADBOX , eventstr, paramsBuilder);
|
||||
break;
|
||||
case 8:
|
||||
GetGameGa().track(EventType.PREFORMANCE , eventstr, paramsBuilder);
|
||||
break;
|
||||
case 9:
|
||||
GetGameGa().track(EventType.SDK , eventstr, paramsBuilder);
|
||||
break;
|
||||
default:
|
||||
GetGameGa().track(EventType.TRACK , eventstr, paramsBuilder);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Review()
|
||||
{
|
||||
ReviewManager manager = ReviewManagerFactory.create(SDKWrapper.getInstance().getContext());
|
||||
Task<ReviewInfo> request = manager.requestReviewFlow();
|
||||
request.addOnCompleteListener(reqTask -> {
|
||||
if (reqTask.isSuccessful()) {
|
||||
ReviewInfo reviewInfo = reqTask.getResult();
|
||||
Activity activity = UnityPlayer.currentActivity;
|
||||
manager.launchReviewFlow(activity, reviewInfo);
|
||||
} else {
|
||||
@ReviewErrorCode int reviewErrorCode = ((ReviewException) request.getException()).getErrorCode();
|
||||
Log.e(TAG,"Review Error code: " + reviewErrorCode);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void FBShareLink(String title, String content, String url)
|
||||
{
|
||||
Log.e(TAG,"FBShareLink : " + title + " " + content + " " + url);
|
||||
|
||||
if (ShareDialog.canShow(ShareLinkContent.class)) {
|
||||
Activity activity = UnityPlayer.currentActivity;
|
||||
ShareDialog dialog = new ShareDialog(activity);
|
||||
ShareLinkContent linkContent = new ShareLinkContent.Builder()
|
||||
.setQuote(content)
|
||||
.setContentUrl(Uri.parse(url))
|
||||
.build();
|
||||
dialog.show(linkContent);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.e(TAG, "FBShareDialog can not show");
|
||||
}
|
||||
}
|
||||
|
||||
public static void MessengerShareLink(String title, String content, String url)
|
||||
{
|
||||
Log.e(TAG,"MessengerShareLink : " + title + " " + content + " " + url);
|
||||
if (MessageDialog.canShow(ShareLinkContent.class)) {
|
||||
Activity activity = UnityPlayer.currentActivity;
|
||||
ShareLinkContent linkContent = new ShareLinkContent.Builder()
|
||||
.setQuote(content)
|
||||
.setContentUrl(Uri.parse(url))
|
||||
.build();
|
||||
MessageDialog.show(activity,linkContent);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.e(TAG, "Messenger ShareDialog can not show");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
32
Packages/tysdk/Plugins/Android/SDKManager.java.meta
Normal file
32
Packages/tysdk/Plugins/Android/SDKManager.java.meta
Normal file
@@ -0,0 +1,32 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 876959024d9e251429915310f08e77fa
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Packages/tysdk/Plugins/Android/TYApp.java
Normal file
22
Packages/tysdk/Plugins/Android/TYApp.java
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
package com.unity3d.player;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
|
||||
import com.tuyoo.gamesdk.api.SDKAPI;
|
||||
|
||||
public class TYApp extends Application {
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
SDKAPI.getIns().onApplicationCreate(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void attachBaseContext(Context base) {
|
||||
super.attachBaseContext(base);
|
||||
SDKAPI.getIns().onAttachBaseContext(base, this);
|
||||
}
|
||||
}
|
||||
32
Packages/tysdk/Plugins/Android/TYApp.java.meta
Normal file
32
Packages/tysdk/Plugins/Android/TYApp.java.meta
Normal file
@@ -0,0 +1,32 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a1ea679ceb0eb1408aea268c324d5ee
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
87
Packages/tysdk/Plugins/Android/TYUnityActivity.java
Normal file
87
Packages/tysdk/Plugins/Android/TYUnityActivity.java
Normal file
@@ -0,0 +1,87 @@
|
||||
package com.unity3d.player;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import com.tuyoo.gamesdk.api.SDKAPI;
|
||||
|
||||
public class TYUnityActivity extends UnityPlayerActivity
|
||||
{
|
||||
private static boolean sdkInited = false;
|
||||
|
||||
public static void setSdkInited() {
|
||||
sdkInited = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
if(sdkInited)
|
||||
{
|
||||
SDKAPI.getIns().onActivityStart(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
if(sdkInited)
|
||||
{
|
||||
SDKAPI.getIns().onNewIntent(intent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRestart() {
|
||||
super.onRestart();
|
||||
if(sdkInited)
|
||||
{
|
||||
SDKAPI.getIns().onActivityRestart(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if(sdkInited)
|
||||
{
|
||||
SDKAPI.getIns().onActivityResume(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if(sdkInited)
|
||||
{
|
||||
SDKAPI.getIns().onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
if(sdkInited)
|
||||
{
|
||||
SDKAPI.getIns().onActivityPause(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
if(sdkInited)
|
||||
{
|
||||
SDKAPI.getIns().onActivityStop(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if(sdkInited)
|
||||
{
|
||||
SDKAPI.getIns().onActivityDestroy(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Packages/tysdk/Plugins/Android/TYUnityActivity.java.meta
Normal file
32
Packages/tysdk/Plugins/Android/TYUnityActivity.java.meta
Normal file
@@ -0,0 +1,32 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a7f18d54c9627847a164308babb45d1
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5de6597649e539f40ab04d749d779e3b
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Packages/tysdk/Plugins/Android/tuyoosdk_1.0.0.aar
Normal file
BIN
Packages/tysdk/Plugins/Android/tuyoosdk_1.0.0.aar
Normal file
Binary file not shown.
32
Packages/tysdk/Plugins/Android/tuyoosdk_1.0.0.aar.meta
Normal file
32
Packages/tysdk/Plugins/Android/tuyoosdk_1.0.0.aar.meta
Normal file
@@ -0,0 +1,32 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f428771db6e5c94290a685844f7b531
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/tysdk/Plugins/iOS.meta
Normal file
8
Packages/tysdk/Plugins/iOS.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56e1913a50860401881b7eda14220a1a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
34
Packages/tysdk/Plugins/iOS/AttRequest.mm
Normal file
34
Packages/tysdk/Plugins/iOS/AttRequest.mm
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
#import <AppTrackingTransparency/AppTrackingTransparency.h>
|
||||
#import "UnityInterface.h"
|
||||
|
||||
extern "C" {
|
||||
void RequestATT()
|
||||
{
|
||||
if (@available(iOS 14.0, *)) {
|
||||
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
|
||||
if (status == ATTrackingManagerAuthorizationStatusAuthorized) {
|
||||
UnitySendMessage("TYSdkFacade","RequestATTResult", "1");
|
||||
} else {
|
||||
|
||||
UnitySendMessage("TYSdkFacade","RequestATTResult", "0");
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
UnitySendMessage("TYSdkFacade","RequestATTResult", "1");
|
||||
}
|
||||
}
|
||||
|
||||
int GetATT()
|
||||
{
|
||||
if (@available(iOS 14.0, *)) {
|
||||
ATTrackingManagerAuthorizationStatus status = [ATTrackingManager trackingAuthorizationStatus];
|
||||
if (status == ATTrackingManagerAuthorizationStatusAuthorized)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
73
Packages/tysdk/Plugins/iOS/AttRequest.mm.meta
Normal file
73
Packages/tysdk/Plugins/iOS/AttRequest.mm.meta
Normal file
@@ -0,0 +1,73 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d55c16fff7e2b4176b3bf0a81dfbd811
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude iOS: 0
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
7
Packages/tysdk/Plugins/iOS/CustomAppController.h
Normal file
7
Packages/tysdk/Plugins/iOS/CustomAppController.h
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
#import <UnityFramework/UnityFramework.h>
|
||||
#import "../Classes/UnityAppController.h"
|
||||
|
||||
@interface CustomAppController : UnityAppController
|
||||
|
||||
@end
|
||||
68
Packages/tysdk/Plugins/iOS/CustomAppController.h.meta
Normal file
68
Packages/tysdk/Plugins/iOS/CustomAppController.h.meta
Normal file
@@ -0,0 +1,68 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 390a8880804644b76a5a96381f90a2ae
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude iOS: 0
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
61
Packages/tysdk/Plugins/iOS/CustomAppController.m
Normal file
61
Packages/tysdk/Plugins/iOS/CustomAppController.m
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
#import "CustomAppController.h"
|
||||
#import <XYSDK/XYSDK.h>
|
||||
#import "TYConfig.h"
|
||||
|
||||
IMPL_APP_CONTROLLER_SUBCLASS(CustomAppController)
|
||||
|
||||
@implementation CustomAppController
|
||||
|
||||
-(BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
|
||||
{
|
||||
[super application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
[self initXYSDK:application didFinishLaunchingWithOptions:launchOptions];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)initXYSDK:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions{
|
||||
|
||||
[[GASDK getGAlog:SDK_PROJECTID] initWithGameId:SDK_GAMEID clientId:SDK_CLIENTID withCommonParams:@{} serverUrl:GA_INTERNATIONAL];
|
||||
|
||||
XYSDKInitConfig * config = [[XYSDKInitConfig alloc] init];
|
||||
config.appId = [SDK_APPID intValue];
|
||||
config.cloudId = SDK_CLOUDID;
|
||||
config.clientId = SDK_CLIENTID;
|
||||
config.serverUrl = SDK_LOGIN_SERVER_URL;
|
||||
config.gameId = SDK_GAMEID;
|
||||
config.openTerminalLog = XYSDK_DEBUG;
|
||||
config.googleClientid = GOOGLE_CLIENTID;
|
||||
|
||||
config.launchOptions = launchOptions;
|
||||
config.launchApplication = application;
|
||||
[XYApi initWithConfig:config];
|
||||
[XYApi application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options{
|
||||
[super application:app openURL:url options:options];
|
||||
[XYApi application:app openURL:url sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey] annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
|
||||
[XYApi application:app openURL:url options:options];
|
||||
return YES;
|
||||
}
|
||||
|
||||
//- (BOOL) application:(UIApplication *)application handleOpenURL:(NSURL *)url{
|
||||
// [super application:application handleOpenURL:url];
|
||||
// [XYApi application:application handleOpenURL:url];
|
||||
// return YES;
|
||||
//}
|
||||
|
||||
- (BOOL) application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler{
|
||||
[super application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
|
||||
[XYApi application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(void) applicationWillTerminate:(UIApplication *)application{
|
||||
[super applicationWillTerminate:application];
|
||||
[XYApi applicationWillTerminate:application];
|
||||
}
|
||||
|
||||
@end
|
||||
73
Packages/tysdk/Plugins/iOS/CustomAppController.m.meta
Normal file
73
Packages/tysdk/Plugins/iOS/CustomAppController.m.meta
Normal file
@@ -0,0 +1,73 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26372324e1ece4a58883feb431ade7cc
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude iOS: 0
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
88
Packages/tysdk/Plugins/iOS/FBShareHelper.swift
Normal file
88
Packages/tysdk/Plugins/iOS/FBShareHelper.swift
Normal file
@@ -0,0 +1,88 @@
|
||||
import Foundation
|
||||
import FBSDKShareKit
|
||||
import Pods_UnityFramework
|
||||
|
||||
@objc public class FBShareHelper : NSObject{
|
||||
|
||||
@objc public func FBShare(title: String, content:String, link : String){
|
||||
guard let url = URL(string: link) else
|
||||
{
|
||||
NSLog("url faild")
|
||||
return
|
||||
}
|
||||
let vc = UnityFramework.getInstance().appController().rootViewController
|
||||
|
||||
let c = ShareLinkContent()
|
||||
c.quote = content
|
||||
c.contentURL = url
|
||||
|
||||
let dialog = ShareDialog(
|
||||
viewController: vc,
|
||||
content: c,
|
||||
delegate: FBShareHelperDelegate()
|
||||
)
|
||||
NSLog("show fb share dialog")
|
||||
// Recommended to validate before trying to display the dialog
|
||||
do {
|
||||
try dialog.validate()
|
||||
} catch {
|
||||
print("fbshare faild ! \(error)")
|
||||
}
|
||||
dialog.show()
|
||||
}
|
||||
|
||||
@objc public func MFBShare(title: String, content:String, link : String){
|
||||
guard let url = URL(string: link) else
|
||||
{
|
||||
NSLog("url faild")
|
||||
return
|
||||
}
|
||||
|
||||
let c = ShareLinkContent()
|
||||
c.quote = content
|
||||
c.contentURL = url
|
||||
|
||||
let dialog = MessageDialog(content: c, delegate: FBShareHelperDelegate())
|
||||
|
||||
do {
|
||||
try dialog.validate()
|
||||
} catch {
|
||||
print("messenger share faild ! \(error)")
|
||||
}
|
||||
|
||||
if(dialog.canShow)
|
||||
{
|
||||
dialog.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
print("messenger share faild !")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class FBShareHelperDelegate: SharingDelegate
|
||||
{
|
||||
public func sharer(_ sharer: any FBSDKShareKit.Sharing, didCompleteWithResults results: [String : Any]) {
|
||||
print("Share success \(results)")
|
||||
SendToUnity(success: true)
|
||||
}
|
||||
|
||||
public func sharer(_ sharer: any FBSDKShareKit.Sharing, didFailWithError error: any Error) {
|
||||
print("Share error \(error)")
|
||||
SendToUnity(success: false)
|
||||
}
|
||||
|
||||
public func sharerDidCancel(_ sharer: any FBSDKShareKit.Sharing) {
|
||||
print("Share cancel")
|
||||
SendToUnity(success: false)
|
||||
}
|
||||
|
||||
private func SendToUnity(success:Bool)
|
||||
{
|
||||
let message = success ? "0" : "1"
|
||||
UnityFramework.getInstance().sendMessageToGO(withName: "GameObje", functionName: "Func", message: message)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
37
Packages/tysdk/Plugins/iOS/FBShareHelper.swift.meta
Normal file
37
Packages/tysdk/Plugins/iOS/FBShareHelper.swift.meta
Normal file
@@ -0,0 +1,37 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4af00d7aeb9247deaac729b3df35036
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/tysdk/Plugins/iOS/Facebook.meta
Normal file
8
Packages/tysdk/Plugins/iOS/Facebook.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3fe7c890d13ff4045bac77d7e928e532
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
27
Packages/tysdk/Plugins/iOS/Facebook/FBAEMKit.framework.meta
Normal file
27
Packages/tysdk/Plugins/iOS/Facebook/FBAEMKit.framework.meta
Normal file
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 925fac028b9f247cb97c5f9ac9a3c69b
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Packages/tysdk/Plugins/iOS/Facebook/FBAEMKit.framework/FBAEMKit
Normal file
BIN
Packages/tysdk/Plugins/iOS/Facebook/FBAEMKit.framework/FBAEMKit
Normal file
Binary file not shown.
@@ -0,0 +1,359 @@
|
||||
#if 0
|
||||
#elif defined(__arm64__) && __arm64__
|
||||
// Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
|
||||
#ifndef FBAEMKIT_SWIFT_H
|
||||
#define FBAEMKIT_SWIFT_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#if defined(__OBJC__)
|
||||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <cstdbool>
|
||||
#include <cstring>
|
||||
#include <stdlib.h>
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
|
||||
# include <ptrauth.h>
|
||||
#else
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
|
||||
# ifndef __ptrauth_swift_value_witness_function_pointer
|
||||
# define __ptrauth_swift_value_witness_function_pointer(x)
|
||||
# endif
|
||||
# ifndef __ptrauth_swift_class_method_pointer
|
||||
# define __ptrauth_swift_class_method_pointer(x)
|
||||
# endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RUNTIME_NAME)
|
||||
# if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
# else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_COMPILE_NAME)
|
||||
# if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
# else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_METHOD_FAMILY)
|
||||
# if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
# else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_NOESCAPE)
|
||||
# if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
# else
|
||||
# define SWIFT_NOESCAPE
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RELEASES_ARGUMENT)
|
||||
# if __has_attribute(ns_consumed)
|
||||
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
||||
# else
|
||||
# define SWIFT_RELEASES_ARGUMENT
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_WARN_UNUSED_RESULT)
|
||||
# if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
# else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_NORETURN)
|
||||
# if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
# else
|
||||
# define SWIFT_NORETURN
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RESILIENT_CLASS)
|
||||
# if __has_attribute(objc_class_stub)
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# else
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_WEAK_IMPORT)
|
||||
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_OBJC)
|
||||
# if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
# else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
# endif
|
||||
#endif
|
||||
#if defined(__OBJC__)
|
||||
#if !defined(IBSegueAction)
|
||||
# define IBSegueAction
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(SWIFT_EXTERN)
|
||||
# if defined(__cplusplus)
|
||||
# define SWIFT_EXTERN extern "C"
|
||||
# else
|
||||
# define SWIFT_EXTERN extern
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_CALL)
|
||||
# define SWIFT_CALL __attribute__((swiftcall))
|
||||
#endif
|
||||
#if !defined(SWIFT_INDIRECT_RESULT)
|
||||
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
|
||||
#endif
|
||||
#if !defined(SWIFT_CONTEXT)
|
||||
# define SWIFT_CONTEXT __attribute__((swift_context))
|
||||
#endif
|
||||
#if !defined(SWIFT_ERROR_RESULT)
|
||||
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
# define SWIFT_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SWIFT_NOEXCEPT
|
||||
#endif
|
||||
#if !defined(SWIFT_C_INLINE_THUNK)
|
||||
# if __has_attribute(always_inline)
|
||||
# if __has_attribute(nodebug)
|
||||
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
|
||||
# else
|
||||
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
|
||||
# endif
|
||||
# else
|
||||
# define SWIFT_C_INLINE_THUNK inline
|
||||
# endif
|
||||
#endif
|
||||
#if defined(_WIN32)
|
||||
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
||||
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
||||
# define SWIFT_IMPORT_STDLIB_SYMBOL
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__OBJC__)
|
||||
#if __has_feature(objc_modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
@import ObjectiveC;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FBAEMKit",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
#if defined(__OBJC__)
|
||||
@class NSString;
|
||||
|
||||
SWIFT_PROTOCOL_NAMED("AEMNetworking")
|
||||
@protocol FBAEMNetworking
|
||||
- (void)startGraphRequestWithGraphPath:(NSString * _Nonnull)graphPath parameters:(NSDictionary<NSString *, id> * _Nonnull)parameters tokenString:(NSString * _Nullable)tokenString HTTPMethod:(NSString * _Nullable)method completion:(void (^ _Nonnull)(id _Nullable, NSError * _Nullable))completion;
|
||||
@end
|
||||
|
||||
@protocol FBSKAdNetworkReporting;
|
||||
@protocol FBSDKDataPersisting;
|
||||
@class NSURL;
|
||||
@class NSNumber;
|
||||
|
||||
SWIFT_CLASS_NAMED("AEMReporter")
|
||||
@interface FBAEMReporter : NSObject
|
||||
+ (void)configureWithNetworker:(id <FBAEMNetworking> _Nullable)networker appID:(NSString * _Nullable)appID reporter:(id <FBSKAdNetworkReporting> _Nullable)reporter;
|
||||
+ (void)configureWithNetworker:(id <FBAEMNetworking> _Nullable)networker appID:(NSString * _Nullable)appID reporter:(id <FBSKAdNetworkReporting> _Nullable)reporter analyticsAppID:(NSString * _Nullable)analyticsAppID store:(id <FBSDKDataPersisting> _Nullable)store;
|
||||
/// Enable AEM reporting. This function won’t work and AEM APIs will early return.
|
||||
/// This function should be called in application(_:open:options:) from ApplicationDelegate.
|
||||
+ (void)enable;
|
||||
/// Control whether to enable conversion filtering
|
||||
/// This function should be called in <code>application(_:open:options:)</code> from ApplicationDelegate
|
||||
+ (void)setConversionFilteringEnabled:(BOOL)enabled;
|
||||
/// Control whether to enable catalog matching
|
||||
/// This function should be called in <code>application(_:open:options:)</code> from ApplicationDelegate
|
||||
+ (void)setCatalogMatchingEnabled:(BOOL)enabled;
|
||||
/// Control whether to enable advertiser rule match enabled in server side. This is expected
|
||||
/// to be called internally by FB SDK and will be removed in the future
|
||||
/// This function should be called in <code>application(_:open:options:)</code> from ApplicationDelegate
|
||||
+ (void)setAdvertiserRuleMatchInServerEnabled:(BOOL)enabled;
|
||||
/// Handle deeplink
|
||||
/// This function should be called in <code>application(_:open:options:) </code>from ApplicationDelegate
|
||||
+ (void)handle:(NSURL * _Nullable)url;
|
||||
/// Calculate the conversion value for the app event based on the AEM configuration
|
||||
/// This function should be called when you log any in-app events
|
||||
+ (void)recordAndUpdateEvent:(NSString * _Nonnull)event currency:(NSString * _Nullable)currency value:(NSNumber * _Nullable)value parameters:(NSDictionary<NSString *, id> * _Nullable)parameters;
|
||||
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
||||
@end
|
||||
|
||||
|
||||
SWIFT_PROTOCOL_NAMED("SKAdNetworkReporting")
|
||||
@protocol FBSKAdNetworkReporting
|
||||
- (BOOL)shouldCutoff SWIFT_WARN_UNUSED_RESULT;
|
||||
- (BOOL)isReportingEvent:(NSString * _Nonnull)event SWIFT_WARN_UNUSED_RESULT;
|
||||
- (void)checkAndRevokeTimer;
|
||||
@end
|
||||
|
||||
#endif
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error unsupported Swift architecture
|
||||
#endif
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,32 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
|
||||
// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name FBAEMKit
|
||||
import CommonCrypto
|
||||
import CommonCrypto.CommonHMAC
|
||||
import FBSDKCoreKit_Basics
|
||||
import Foundation
|
||||
import Swift
|
||||
import _Concurrency
|
||||
import _StringProcessing
|
||||
import _SwiftConcurrencyShims
|
||||
public typealias FBGraphRequestCompletion = (Any?, (any Swift.Error)?) -> Swift.Void
|
||||
@objc(FBAEMNetworking) public protocol AEMNetworking {
|
||||
@objc(startGraphRequestWithGraphPath:parameters:tokenString:HTTPMethod:completion:) func startGraphRequest(withGraphPath graphPath: Swift.String, parameters: [Swift.String : Any], tokenString: Swift.String?, httpMethod method: Swift.String?, completion: @escaping FBAEMKit.FBGraphRequestCompletion)
|
||||
}
|
||||
@_inheritsConvenienceInitializers @objcMembers @objc(FBAEMReporter) final public class AEMReporter : ObjectiveC.NSObject {
|
||||
@objc public static func configure(networker: (any FBAEMKit.AEMNetworking)?, appID: Swift.String?, reporter: (any FBAEMKit.SKAdNetworkReporting)?)
|
||||
@objc public static func configure(networker: (any FBAEMKit.AEMNetworking)?, appID: Swift.String?, reporter: (any FBAEMKit.SKAdNetworkReporting)?, analyticsAppID: Swift.String?, store: (any FBSDKCoreKit_Basics.DataPersisting)?)
|
||||
@objc public static func enable()
|
||||
@objc public static func setConversionFilteringEnabled(_ enabled: Swift.Bool)
|
||||
@objc public static func setCatalogMatchingEnabled(_ enabled: Swift.Bool)
|
||||
@objc public static func setAdvertiserRuleMatchInServerEnabled(_ enabled: Swift.Bool)
|
||||
@objc public static func handle(_ url: Foundation.URL?)
|
||||
@objc(recordAndUpdateEvent:currency:value:parameters:) public static func recordAndUpdate(event: Swift.String, currency: Swift.String?, value: Foundation.NSNumber?, parameters: [Swift.String : Any]?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
@objc(FBSKAdNetworkReporting) public protocol SKAdNetworkReporting {
|
||||
@objc func shouldCutoff() -> Swift.Bool
|
||||
@objc(isReportingEvent:) func isReportingEvent(_ event: Swift.String) -> Swift.Bool
|
||||
@objc func checkAndRevokeTimer()
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
// swift-interface-format-version: 1.0
|
||||
// swift-compiler-version: Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
|
||||
// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name FBAEMKit
|
||||
import CommonCrypto
|
||||
import CommonCrypto.CommonHMAC
|
||||
import FBSDKCoreKit_Basics
|
||||
import Foundation
|
||||
import Swift
|
||||
import _Concurrency
|
||||
import _StringProcessing
|
||||
import _SwiftConcurrencyShims
|
||||
public typealias FBGraphRequestCompletion = (Any?, (any Swift.Error)?) -> Swift.Void
|
||||
@objc(FBAEMNetworking) public protocol AEMNetworking {
|
||||
@objc(startGraphRequestWithGraphPath:parameters:tokenString:HTTPMethod:completion:) func startGraphRequest(withGraphPath graphPath: Swift.String, parameters: [Swift.String : Any], tokenString: Swift.String?, httpMethod method: Swift.String?, completion: @escaping FBAEMKit.FBGraphRequestCompletion)
|
||||
}
|
||||
@_inheritsConvenienceInitializers @objcMembers @objc(FBAEMReporter) final public class AEMReporter : ObjectiveC.NSObject {
|
||||
@objc public static func configure(networker: (any FBAEMKit.AEMNetworking)?, appID: Swift.String?, reporter: (any FBAEMKit.SKAdNetworkReporting)?)
|
||||
@objc public static func configure(networker: (any FBAEMKit.AEMNetworking)?, appID: Swift.String?, reporter: (any FBAEMKit.SKAdNetworkReporting)?, analyticsAppID: Swift.String?, store: (any FBSDKCoreKit_Basics.DataPersisting)?)
|
||||
@objc public static func enable()
|
||||
@objc public static func setConversionFilteringEnabled(_ enabled: Swift.Bool)
|
||||
@objc public static func setCatalogMatchingEnabled(_ enabled: Swift.Bool)
|
||||
@objc public static func setAdvertiserRuleMatchInServerEnabled(_ enabled: Swift.Bool)
|
||||
@objc public static func handle(_ url: Foundation.URL?)
|
||||
@objc(recordAndUpdateEvent:currency:value:parameters:) public static func recordAndUpdate(event: Swift.String, currency: Swift.String?, value: Foundation.NSNumber?, parameters: [Swift.String : Any]?)
|
||||
@objc override dynamic public init()
|
||||
@objc deinit
|
||||
}
|
||||
@objc(FBSKAdNetworkReporting) public protocol SKAdNetworkReporting {
|
||||
@objc func shouldCutoff() -> Swift.Bool
|
||||
@objc(isReportingEvent:) func isReportingEvent(_ event: Swift.String) -> Swift.Bool
|
||||
@objc func checkAndRevokeTimer()
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
framework module FBAEMKit {
|
||||
header "FBAEMKit-Swift.h"
|
||||
requires objc
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?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>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>CA92.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,207 @@
|
||||
<?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/FBAEMKit-Swift.h</key>
|
||||
<data>
|
||||
XwfElLRDNnpKKn0PH/hO9BM6QRU=
|
||||
</data>
|
||||
<key>Info.plist</key>
|
||||
<data>
|
||||
keqCaHSrv/mwHCr1no4rXUyhyFE=
|
||||
</data>
|
||||
<key>Modules/FBAEMKit.swiftmodule/arm64-apple-ios.abi.json</key>
|
||||
<data>
|
||||
YWbOfBFVn5JUeNQEx4BAeqPwru0=
|
||||
</data>
|
||||
<key>Modules/FBAEMKit.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
|
||||
<data>
|
||||
vuOt4lh95Y0TvldvN/y3KNDKZfs=
|
||||
</data>
|
||||
<key>Modules/FBAEMKit.swiftmodule/arm64-apple-ios.swiftdoc</key>
|
||||
<data>
|
||||
nb9852QDL6O4NKXWpLS4zgC6tQ8=
|
||||
</data>
|
||||
<key>Modules/FBAEMKit.swiftmodule/arm64-apple-ios.swiftinterface</key>
|
||||
<data>
|
||||
vuOt4lh95Y0TvldvN/y3KNDKZfs=
|
||||
</data>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<data>
|
||||
Ci3QIdviXpIzxSC88i1rGvW2cSs=
|
||||
</data>
|
||||
<key>PrivacyInfo.xcprivacy</key>
|
||||
<data>
|
||||
Fo7sebV/R02g8kqyPtqICO8eVyI=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Headers/FBAEMKit-Swift.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
XwfElLRDNnpKKn0PH/hO9BM6QRU=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
GImGAI1xnOe3jvV+cbROfPGbUXhQPKpIfyqbrRqfgOI=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/FBAEMKit.swiftmodule/arm64-apple-ios.abi.json</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
YWbOfBFVn5JUeNQEx4BAeqPwru0=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
ANkIis4h+Ut8SDlWkE2LarDII1c4vENq22rY7QNEKZA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/FBAEMKit.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
vuOt4lh95Y0TvldvN/y3KNDKZfs=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
z/WKCqfpEndXznM7q+3+k6CfNqCAVHFlJQ+73I3leD0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/FBAEMKit.swiftmodule/arm64-apple-ios.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
nb9852QDL6O4NKXWpLS4zgC6tQ8=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
wyQas2yzjsYVhwrz030g2aq0yBDc4YNETg4qd+GtQ+Y=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/FBAEMKit.swiftmodule/arm64-apple-ios.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
vuOt4lh95Y0TvldvN/y3KNDKZfs=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
z/WKCqfpEndXznM7q+3+k6CfNqCAVHFlJQ+73I3leD0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
Ci3QIdviXpIzxSC88i1rGvW2cSs=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
jq+nSulDKiN4tenILjgXg82TzM040TCurYFTCVRKXxM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>PrivacyInfo.xcprivacy</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
Fo7sebV/R02g8kqyPtqICO8eVyI=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
ZFIpWmrSklTJLGaAOPLGos/UQMB82oH4FOmWrCFbhBU=
|
||||
</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>
|
||||
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: adf3ef51e3eb44d37a56af4f1a7da1e9
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAutoSetup.h>
|
||||
|
||||
@protocol FBSDKSwizzling;
|
||||
@protocol FBSDKAEMReporter;
|
||||
@protocol FBSDKAutoSetup;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AEMManager)
|
||||
@interface FBSDKAEMManager : NSObject <FBSDKAutoSetup>
|
||||
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
/// The shared instance of AEMManager.
|
||||
@property (class, nonatomic, readonly, strong) FBSDKAEMManager *shared;
|
||||
|
||||
- (void)configureWithSwizzler:(nonnull Class<FBSDKSwizzling>)swizzler
|
||||
aemReporter:(nonnull Class<FBSDKAEMReporter>)aemReporter
|
||||
eventLogger:(nonnull id<FBSDKEventLogging>)eventLogger
|
||||
crashHandler:(nonnull id<FBSDKCrashHandler>)crashHandler
|
||||
featureChecker:(nonnull id<FBSDKFeatureDisabling>)featureChecker
|
||||
appEventsUtility:(nonnull id<FBSDKAppEventsUtility>)appEventsUtility
|
||||
NS_SWIFT_NAME(configure(swizzler:reporter:eventLogger:crashHandler:featureChecker:appEventsUtility:));
|
||||
|
||||
- (void)enableAutoSetup:(BOOL)proxyEnabled;
|
||||
|
||||
- (void)logAutoSetupStatus:(BOOL)optin
|
||||
source:(NSString *)source;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol FBSDKATEPublishing;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_ATEPublisherCreating)
|
||||
@protocol FBSDKATEPublisherCreating
|
||||
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (nullable id<FBSDKATEPublishing>)createPublisherWithAppID:(NSString *)appID
|
||||
NS_SWIFT_NAME(createPublisher(appID:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol FBSDKDataPersisting;
|
||||
@protocol FBSDKGraphRequestFactory;
|
||||
@protocol FBSDKSettings;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_ATEPublisherFactory)
|
||||
@interface FBSDKATEPublisherFactory : NSObject <FBSDKATEPublisherCreating>
|
||||
|
||||
@property (nonatomic) id<FBSDKDataPersisting> dataStore;
|
||||
@property (nonatomic) id<FBSDKGraphRequestFactory> graphRequestFactory;
|
||||
@property (nonatomic) id<FBSDKSettings> settings;
|
||||
@property (nonatomic) id<FBSDKDeviceInformationProviding> deviceInformationProvider;
|
||||
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
- (instancetype)initWithDataStore:(id<FBSDKDataPersisting>)dataStore
|
||||
graphRequestFactory:(id<FBSDKGraphRequestFactory>)graphRequestFactory
|
||||
settings:(id<FBSDKSettings>)settings
|
||||
deviceInformationProvider:(id<FBSDKDeviceInformationProviding>)deviceInformationProvider;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,207 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAccessTokenProviding.h>
|
||||
#import <FBSDKCoreKit/FBSDKTokenStringProviding.h>
|
||||
#import <FBSDKCoreKit/FBSDKGraphRequestConnection.h>
|
||||
#import <FBSDKCoreKit/FBSDKTokenCaching.h>
|
||||
|
||||
@protocol FBSDKGraphRequestConnectionFactory;
|
||||
@protocol FBSDKGraphRequestPiggybackManaging;
|
||||
@protocol FBSDKErrorCreating;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Notification indicating that the `currentAccessToken` has changed.
|
||||
|
||||
the userInfo dictionary of the notification will contain keys
|
||||
`FBSDKAccessTokenChangeOldKey` and
|
||||
`FBSDKAccessTokenChangeNewKey`.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSNotificationName const FBSDKAccessTokenDidChangeNotification
|
||||
NS_SWIFT_NAME(AccessTokenDidChange);
|
||||
|
||||
/**
|
||||
A key in the notification's userInfo that will be set
|
||||
if and only if the user ID changed between the old and new tokens.
|
||||
|
||||
Token refreshes can occur automatically with the SDK
|
||||
which do not change the user. If you're only interested in user
|
||||
changes (such as logging out), you should check for the existence
|
||||
of this key. The value is a NSNumber with a boolValue.
|
||||
|
||||
On a fresh start of the app where the SDK reads in the cached value
|
||||
of an access token, this key will also exist since the access token
|
||||
is moving from a null state (no user) to a non-null state (user).
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidChangeUserIDKey
|
||||
NS_SWIFT_NAME(AccessTokenDidChangeUserIDKey);
|
||||
|
||||
/*
|
||||
key in notification's userInfo object for getting the old token.
|
||||
|
||||
If there was no old token, the key will not be present.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAccessTokenChangeOldKey
|
||||
NS_SWIFT_NAME(AccessTokenChangeOldKey);
|
||||
|
||||
/*
|
||||
key in notification's userInfo object for getting the new token.
|
||||
|
||||
If there is no new token, the key will not be present.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAccessTokenChangeNewKey
|
||||
NS_SWIFT_NAME(AccessTokenChangeNewKey);
|
||||
|
||||
/*
|
||||
A key in the notification's userInfo that will be set
|
||||
if and only if the token has expired.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidExpireKey
|
||||
NS_SWIFT_NAME(AccessTokenDidExpireKey);
|
||||
|
||||
/// Represents an immutable access token for using Facebook services.
|
||||
NS_SWIFT_NAME(AccessToken)
|
||||
@interface FBSDKAccessToken : NSObject <NSCopying, NSObject, NSSecureCoding, FBSDKAccessTokenProviding, FBSDKTokenStringProviding>
|
||||
|
||||
/**
|
||||
The "global" access token that represents the currently logged in user.
|
||||
|
||||
The `currentAccessToken` is a convenient representation of the token of the
|
||||
current user and is used by other SDK components (like `FBSDKLoginManager`).
|
||||
*/
|
||||
@property (class, nullable, nonatomic, copy) FBSDKAccessToken *currentAccessToken NS_SWIFT_NAME(current);
|
||||
|
||||
/// Returns YES if currentAccessToken is not nil AND currentAccessToken is not expired
|
||||
@property (class, nonatomic, readonly, getter = isCurrentAccessTokenActive, assign) BOOL currentAccessTokenIsActive;
|
||||
|
||||
/**
|
||||
Internal Type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
@property (class, nullable, nonatomic, copy) id<FBSDKTokenCaching> tokenCache;
|
||||
|
||||
/// Returns the app ID.
|
||||
@property (nonatomic, readonly, copy) NSString *appID;
|
||||
|
||||
/// Returns the expiration date for data access
|
||||
@property (nonatomic, readonly, copy) NSDate *dataAccessExpirationDate;
|
||||
|
||||
/// Returns the known declined permissions.
|
||||
@property (nonatomic, readonly, copy) NSSet<NSString *> *declinedPermissions
|
||||
NS_REFINED_FOR_SWIFT;
|
||||
|
||||
/// Returns the known declined permissions.
|
||||
@property (nonatomic, readonly, copy) NSSet<NSString *> *expiredPermissions
|
||||
NS_REFINED_FOR_SWIFT;
|
||||
|
||||
/// Returns the expiration date.
|
||||
@property (nonatomic, readonly, copy) NSDate *expirationDate;
|
||||
|
||||
/// Returns the known granted permissions.
|
||||
@property (nonatomic, readonly, copy) NSSet<NSString *> *permissions
|
||||
NS_REFINED_FOR_SWIFT;
|
||||
|
||||
/// Returns the date the token was last refreshed.
|
||||
@property (nonatomic, readonly, copy) NSDate *refreshDate;
|
||||
|
||||
/// Returns the opaque token string.
|
||||
@property (nonatomic, readonly, copy) NSString *tokenString;
|
||||
|
||||
/// Returns the user ID.
|
||||
@property (nonatomic, readonly, copy) NSString *userID;
|
||||
|
||||
/// Returns whether the access token is expired by checking its expirationDate property
|
||||
@property (nonatomic, readonly, getter = isExpired, assign) BOOL expired;
|
||||
|
||||
/// Returns whether user data access is still active for the given access token
|
||||
@property (nonatomic, readonly, getter = isDataAccessExpired, assign) BOOL dataAccessExpired;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
/**
|
||||
Initializes a new instance.
|
||||
@param tokenString the opaque token string.
|
||||
@param permissions the granted permissions. Note this is converted to NSSet and is only
|
||||
an NSArray for the convenience of literal syntax.
|
||||
@param declinedPermissions the declined permissions. Note this is converted to NSSet and is only
|
||||
an NSArray for the convenience of literal syntax.
|
||||
@param expiredPermissions the expired permissions. Note this is converted to NSSet and is only
|
||||
an NSArray for the convenience of literal syntax.
|
||||
@param appID the app ID.
|
||||
@param userID the user ID.
|
||||
@param expirationDate the optional expiration date (defaults to distantFuture).
|
||||
@param refreshDate the optional date the token was last refreshed (defaults to today).
|
||||
@param dataAccessExpirationDate the date which data access will expire for the given user
|
||||
(defaults to distantFuture).
|
||||
|
||||
This initializer should only be used for advanced apps that
|
||||
manage tokens explicitly. Typical login flows only need to use `FBSDKLoginManager`
|
||||
along with `+currentAccessToken`.
|
||||
*/
|
||||
- (instancetype)initWithTokenString:(NSString *)tokenString
|
||||
permissions:(NSArray<NSString *> *)permissions
|
||||
declinedPermissions:(NSArray<NSString *> *)declinedPermissions
|
||||
expiredPermissions:(NSArray<NSString *> *)expiredPermissions
|
||||
appID:(NSString *)appID
|
||||
userID:(NSString *)userID
|
||||
expirationDate:(nullable NSDate *)expirationDate
|
||||
refreshDate:(nullable NSDate *)refreshDate
|
||||
dataAccessExpirationDate:(nullable NSDate *)dataAccessExpirationDate
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/**
|
||||
Convenience getter to determine if a permission has been granted
|
||||
@param permission The permission to check.
|
||||
*/
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (BOOL)hasGranted:(NSString *)permission
|
||||
NS_SWIFT_NAME(hasGranted(permission:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
/**
|
||||
Compares the receiver to another FBSDKAccessToken
|
||||
@param token The other token
|
||||
@return YES if the receiver's values are equal to the other token's values; otherwise NO
|
||||
*/
|
||||
- (BOOL)isEqualToAccessToken:(FBSDKAccessToken *)token;
|
||||
|
||||
/**
|
||||
Refresh the current access token's permission state and extend the token's expiration date,
|
||||
if possible.
|
||||
@param completion an optional callback handler that can surface any errors related to permission refreshing.
|
||||
|
||||
On a successful refresh, the currentAccessToken will be updated so you typically only need to
|
||||
observe the `FBSDKAccessTokenDidChangeNotification` notification.
|
||||
|
||||
If a token is already expired, it cannot be refreshed.
|
||||
*/
|
||||
+ (void)refreshCurrentAccessTokenWithCompletion:(nullable FBSDKGraphRequestCompletion)completion;
|
||||
|
||||
/**
|
||||
Internal method exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
+ (void)configureWithTokenCache:(id<FBSDKTokenCaching>)tokenCache
|
||||
graphRequestConnectionFactory:(id<FBSDKGraphRequestConnectionFactory>)graphRequestConnectionFactory
|
||||
graphRequestPiggybackManager:(id<FBSDKGraphRequestPiggybackManaging>)graphRequestPiggybackManager
|
||||
errorFactory:(id<FBSDKErrorCreating>)errorFactory
|
||||
NS_SWIFT_NAME(configure(tokenCache:graphRequestConnectionFactory:graphRequestPiggybackManager:errorFactory:));
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class FBSDKAccessToken;
|
||||
@protocol FBSDKTokenCaching;
|
||||
|
||||
/**
|
||||
Internal Type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AccessTokenProviding)
|
||||
@protocol FBSDKAccessTokenProviding
|
||||
|
||||
@property (class, nullable, nonatomic, copy) FBSDKAccessToken *currentAccessToken NS_SWIFT_NAME(current);
|
||||
@property (class, nullable, nonatomic, copy) id<FBSDKTokenCaching> tokenCache;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AdvertiserIDProviding)
|
||||
@protocol FBSDKAdvertiserIDProviding
|
||||
|
||||
@property (nullable, nonatomic, readonly, copy) NSString *advertiserID;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal Type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, FBSDKAdvertisingTrackingStatus) {
|
||||
FBSDKAdvertisingTrackingAllowed,
|
||||
FBSDKAdvertisingTrackingDisallowed,
|
||||
FBSDKAdvertisingTrackingUnspecified,
|
||||
} NS_SWIFT_NAME(AdvertisingTrackingStatus);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NS_SWIFT_NAME(AppAvailabilityChecker)
|
||||
@protocol FBSDKAppAvailabilityChecker
|
||||
|
||||
/**
|
||||
Internal Type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
@property (nonatomic, readonly, assign) BOOL isMessengerAppInstalled;
|
||||
/**
|
||||
Internal Type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
@property (nonatomic, readonly, assign) BOOL isFacebookAppInstalled;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventDropDetermining)
|
||||
@protocol FBSDKAppEventDropDetermining
|
||||
|
||||
@property (nonatomic, readonly) BOOL shouldDropAppEvents;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
@methodgroup Predefined event names for logging events common to many apps. Logging occurs through the `logEvent` family of methods on `FBSDKAppEvents`.
|
||||
Common event parameters are provided in the `FBSDKAppEventParameterName` constants.
|
||||
*/
|
||||
|
||||
/// typedef for FBSDKAppEventName
|
||||
typedef NSString *FBSDKAppEventName NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(AppEvents.Name);
|
||||
|
||||
// MARK: - General Purpose
|
||||
|
||||
/// Log this event when the user clicks an ad.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameAdClick;
|
||||
|
||||
/// Log this event when the user views an ad.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameAdImpression;
|
||||
|
||||
/// Log this event when a user has completed registration with the app.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameCompletedRegistration;
|
||||
|
||||
/// Log this event when the user has completed a tutorial in the app.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameCompletedTutorial;
|
||||
|
||||
/// A telephone/SMS, email, chat or other type of contact between a customer and your business.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameContact;
|
||||
|
||||
/// The customization of products through a configuration tool or other application your business owns.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameCustomizeProduct;
|
||||
|
||||
/// The donation of funds to your organization or cause.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameDonate;
|
||||
|
||||
/// When a person finds one of your locations via web or application, with an intention to visit (example: find product at a local store).
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameFindLocation;
|
||||
|
||||
/// Log this event when the user has rated an item in the app. The valueToSum passed to logEvent should be the numeric rating.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameRated;
|
||||
|
||||
/// The booking of an appointment to visit one of your locations.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameSchedule;
|
||||
|
||||
/// Log this event when a user has performed a search within the app.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameSearched;
|
||||
|
||||
/// The start of a free trial of a product or service you offer (example: trial subscription).
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameStartTrial;
|
||||
|
||||
/// The submission of an application for a product, service or program you offer (example: credit card, educational program or job).
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameSubmitApplication;
|
||||
|
||||
/// The start of a paid subscription for a product or service you offer.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameSubscribe;
|
||||
|
||||
/// Log this event when a user has viewed a form of content in the app.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameViewedContent;
|
||||
|
||||
// MARK: - E-Commerce
|
||||
|
||||
/// Log this event when the user has entered their payment info.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameAddedPaymentInfo;
|
||||
|
||||
/// Log this event when the user has added an item to their cart. The valueToSum passed to logEvent should be the item's price.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameAddedToCart;
|
||||
|
||||
/// Log this event when the user has added an item to their wishlist. The valueToSum passed to logEvent should be the item's price.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameAddedToWishlist;
|
||||
|
||||
/// Log this event when the user has entered the checkout process. The valueToSum passed to logEvent should be the total price in the cart.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameInitiatedCheckout;
|
||||
|
||||
/// Log this event when the user has completed a transaction. The valueToSum passed to logEvent should be the total price of the transaction.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNamePurchased;
|
||||
|
||||
// MARK: - Gaming
|
||||
|
||||
/// Log this event when the user has achieved a level in the app.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameAchievedLevel;
|
||||
|
||||
/// Log this event when the user has unlocked an achievement in the app.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameUnlockedAchievement;
|
||||
|
||||
/// Log this event when the user has spent app credits. The valueToSum passed to logEvent should be the number of credits spent.
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameSpentCredits;
|
||||
|
||||
// MARK: - Internal
|
||||
|
||||
/**
|
||||
Internal values exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameInitializeSDK;
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameBackgroundStatusAvailable;
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameBackgroundStatusDenied;
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameBackgroundStatusRestricted;
|
||||
FOUNDATION_EXPORT FBSDKAppEventName const FBSDKAppEventNameSDKSettingsChanged;
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
@methodgroup Predefined event name parameters for common additional information to accompany events logged through the `logEvent` family
|
||||
of methods on `FBSDKAppEvents`. Common event names are provided in the `FBAppEventName*` constants.
|
||||
*/
|
||||
|
||||
/// typedef for FBSDKAppEventParameterName
|
||||
typedef NSString *FBSDKAppEventParameterName NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(AppEvents.ParameterName);
|
||||
|
||||
/**
|
||||
* Parameter key used to specify data for the one or more pieces of content being logged about.
|
||||
* Data should be a JSON encoded string.
|
||||
* Example:
|
||||
* "[{\"id\": \"1234\", \"quantity\": 2, \"item_price\": 5.99}, {\"id\": \"5678\", \"quantity\": 1, \"item_price\": 9.99}]"
|
||||
*/
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameContent;
|
||||
|
||||
/// Parameter key used to specify an ID for the specific piece of content being logged about. Could be an EAN, article identifier, etc., depending on the nature of the app.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameContentID;
|
||||
|
||||
/// Parameter key used to specify a generic content type/family for the logged event, e.g. "music", "photo", "video". Options to use will vary based upon what the app is all about.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameContentType;
|
||||
|
||||
/// Parameter key used to specify currency used with logged event. E.g. "USD", "EUR", "GBP". See ISO-4217 for specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameCurrency;
|
||||
|
||||
/// Parameter key used to specify a description appropriate to the event being logged. E.g., the name of the achievement unlocked in the `FBAppEventNameAchievementUnlocked` event.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameDescription;
|
||||
|
||||
/// Parameter key used to specify the level achieved in a `FBAppEventNameAchieved` event.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameLevel;
|
||||
|
||||
/// Parameter key used to specify the maximum rating available for the `FBAppEventNameRate` event. E.g., "5" or "10".
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameMaxRatingValue;
|
||||
|
||||
/// Parameter key used to specify how many items are being processed for an `FBAppEventNameInitiatedCheckout` or `FBAppEventNamePurchased` event.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameNumItems;
|
||||
|
||||
/// Parameter key used to specify whether payment info is available for the `FBAppEventNameInitiatedCheckout` event. `FBSDKAppEventParameterValueYes` and `FBSDKAppEventParameterValueNo` are good canonical values to use for this parameter.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNamePaymentInfoAvailable;
|
||||
|
||||
/// Parameter key used to specify method user has used to register for the app, e.g., "Facebook", "email", "Twitter", etc
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameRegistrationMethod;
|
||||
|
||||
/// Parameter key used to specify the string provided by the user for a search operation.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameSearchString;
|
||||
|
||||
/// Parameter key used to specify whether the activity being logged about was successful or not. `FBSDKAppEventParameterValueYes` and `FBSDKAppEventParameterValueNo` are good canonical values to use for this parameter.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameSuccess;
|
||||
|
||||
/** Parameter key used to specify the type of ad in an FBSDKAppEventNameAdImpression
|
||||
* or FBSDKAppEventNameAdClick event.
|
||||
* E.g. "banner", "interstitial", "rewarded_video", "native" */
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameAdType;
|
||||
|
||||
/** Parameter key used to specify the unique ID for all events within a subscription
|
||||
* in an FBSDKAppEventNameSubscribe or FBSDKAppEventNameStartTrial event. */
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameOrderID;
|
||||
|
||||
/// Parameter key used to specify event name.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameEventName;
|
||||
|
||||
/// Parameter key used to specify event log time.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterName const FBSDKAppEventParameterNameLogTime;
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/// @methodgroup Predefined event name parameters for common additional information to accompany events logged through the `logProductItem` method on `FBSDKAppEvents`.
|
||||
|
||||
/// typedef for FBSDKAppEventParameterProduct
|
||||
typedef NSString *const FBSDKAppEventParameterProduct NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(AppEvents.ParameterProduct);
|
||||
|
||||
/// Parameter key used to specify the product item's category.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductCategory;
|
||||
|
||||
/// Parameter key used to specify the product item's custom label 0.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductCustomLabel0;
|
||||
|
||||
/// Parameter key used to specify the product item's custom label 1.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductCustomLabel1;
|
||||
|
||||
/// Parameter key used to specify the product item's custom label 2.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductCustomLabel2;
|
||||
|
||||
/// Parameter key used to specify the product item's custom label 3.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductCustomLabel3;
|
||||
|
||||
/// Parameter key used to specify the product item's custom label 4.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductCustomLabel4;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app URL for iOS.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkIOSUrl;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app ID for iOS App Store.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkIOSAppStoreID;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app name for iOS.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkIOSAppName;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app URL for iPhone.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkIPhoneUrl;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app ID for iPhone App Store.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkIPhoneAppStoreID;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app name for iPhone.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkIPhoneAppName;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app URL for iPad.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkIPadUrl;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app ID for iPad App Store.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkIPadAppStoreID;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app name for iPad.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkIPadAppName;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app URL for Android.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkAndroidUrl;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink fully-qualified package name for intent generation.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkAndroidPackage;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app name for Android.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkAndroidAppName;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app URL for Windows Phone.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkWindowsPhoneUrl;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app ID, as a GUID, for App Store.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkWindowsPhoneAppID;
|
||||
|
||||
/// Parameter key used to specify the product item's AppLink app name for Windows Phone.
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterProduct FBSDKAppEventParameterProductAppLinkWindowsPhoneAppName;
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*
|
||||
@methodgroup Predefined values to assign to event parameters that accompany events logged through the `logEvent` family
|
||||
of methods on `FBSDKAppEvents`. Common event parameters are provided in the `FBSDKAppEventParameterName*` constants.
|
||||
*/
|
||||
|
||||
/// typedef for FBSDKAppEventParameterValue
|
||||
typedef NSString *const FBSDKAppEventParameterValue NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(AppEvents.ParameterValue);
|
||||
|
||||
/// Yes-valued parameter value to be used with parameter keys that need a Yes/No value
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterValue FBSDKAppEventParameterValueYes;
|
||||
|
||||
/// No-valued parameter value to be used with parameter keys that need a Yes/No value
|
||||
FOUNDATION_EXPORT FBSDKAppEventParameterValue FBSDKAppEventParameterValueNo;
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventParametersExtracting)
|
||||
@protocol FBSDKAppEventParametersExtracting
|
||||
|
||||
- (NSMutableDictionary<NSString *, NSString *> *)activityParametersDictionaryForEvent:(NSString *)eventCategory
|
||||
shouldAccessAdvertisingID:(BOOL)shouldAccessAdvertisingID
|
||||
userID:(nullable NSString *)userID
|
||||
userData:(nullable NSString *)userData;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef NSString *const FBSDKAppEventUserDataType NS_TYPED_EXTENSIBLE_ENUM;
|
||||
|
||||
/// Parameter key used to specify user's email.
|
||||
FOUNDATION_EXPORT FBSDKAppEventUserDataType FBSDKAppEventEmail;
|
||||
|
||||
/// Parameter key used to specify user's first name.
|
||||
FOUNDATION_EXPORT FBSDKAppEventUserDataType FBSDKAppEventFirstName;
|
||||
|
||||
/// Parameter key used to specify user's last name.
|
||||
FOUNDATION_EXPORT FBSDKAppEventUserDataType FBSDKAppEventLastName;
|
||||
|
||||
/// Parameter key used to specify user's phone.
|
||||
FOUNDATION_EXPORT FBSDKAppEventUserDataType FBSDKAppEventPhone;
|
||||
|
||||
/// Parameter key used to specify user's date of birth.
|
||||
FOUNDATION_EXPORT FBSDKAppEventUserDataType FBSDKAppEventDateOfBirth;
|
||||
|
||||
/// Parameter key used to specify user's gender.
|
||||
FOUNDATION_EXPORT FBSDKAppEventUserDataType FBSDKAppEventGender;
|
||||
|
||||
/// Parameter key used to specify user's city.
|
||||
FOUNDATION_EXPORT FBSDKAppEventUserDataType FBSDKAppEventCity;
|
||||
|
||||
/// Parameter key used to specify user's state.
|
||||
FOUNDATION_EXPORT FBSDKAppEventUserDataType FBSDKAppEventState;
|
||||
|
||||
/// Parameter key used to specify user's zip.
|
||||
FOUNDATION_EXPORT FBSDKAppEventUserDataType FBSDKAppEventZip;
|
||||
|
||||
/// Parameter key used to specify user's country.
|
||||
FOUNDATION_EXPORT FBSDKAppEventUserDataType FBSDKAppEventCountry;
|
||||
|
||||
/// Parameter key used to specify user's external id.
|
||||
FOUNDATION_EXPORT FBSDKAppEventUserDataType FBSDKAppEventExternalId;
|
||||
@@ -0,0 +1,538 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
#import <WebKit/WebKit.h>
|
||||
#endif
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAppEventName.h>
|
||||
#import <FBSDKCoreKit/FBSDKAppEventParameterName.h>
|
||||
#import <FBSDKCoreKit/FBSDKAppEventsConfiguring.h>
|
||||
#import <FBSDKCoreKit/FBSDKAppEventsFlushBehavior.h>
|
||||
#import <FBSDKCoreKit/FBSDKAppEventUserDataType.h>
|
||||
#import <FBSDKCoreKit/FBSDKApplicationActivating.h>
|
||||
#import <FBSDKCoreKit/FBSDKApplicationLifecycleObserving.h>
|
||||
#import <FBSDKCoreKit/FBSDKApplicationStateSetting.h>
|
||||
#import <FBSDKCoreKit/FBSDKEventLogging.h>
|
||||
#import <FBSDKCoreKit/FBSDKGraphRequest.h>
|
||||
#import <FBSDKCoreKit/FBSDKGraphRequestConnection.h>
|
||||
#import <FBSDKCoreKit/FBSDKProductAvailability.h>
|
||||
#import <FBSDKCoreKit/FBSDKProductCondition.h>
|
||||
#import <FBSDKCoreKit/FBSDKSourceApplicationTracking.h>
|
||||
#import <FBSDKCoreKit/FBSDKUserIDProviding.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class FBSDKAccessToken;
|
||||
|
||||
/// Optional plist key ("FacebookLoggingOverrideAppID") for setting `loggingOverrideAppID`
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAppEventsOverrideAppIDBundleKey
|
||||
NS_SWIFT_NAME(AppEventsOverrideAppIDBundleKey);
|
||||
|
||||
/**
|
||||
Client-side event logging for specialized application analytics available through Facebook App Insights
|
||||
and for use with Facebook Ads conversion tracking and optimization.
|
||||
|
||||
The `FBSDKAppEvents` static class has a few related roles:
|
||||
|
||||
+ Logging predefined and application-defined events to Facebook App Insights with a
|
||||
numeric value to sum across a large number of events, and an optional set of key/value
|
||||
parameters that define "segments" for this event (e.g., 'purchaserStatus' : 'frequent', or
|
||||
'gamerLevel' : 'intermediate')
|
||||
|
||||
+ Logging events to later be used for ads optimization around lifetime value.
|
||||
|
||||
+ Methods that control the way in which events are flushed out to the Facebook servers.
|
||||
|
||||
Here are some important characteristics of the logging mechanism provided by `FBSDKAppEvents`:
|
||||
|
||||
+ Events are not sent immediately when logged. They're cached and flushed out to the Facebook servers
|
||||
in a number of situations:
|
||||
- when an event count threshold is passed (currently 100 logged events).
|
||||
- when a time threshold is passed (currently 15 seconds).
|
||||
- when an app has gone to background and is then brought back to the foreground.
|
||||
|
||||
+ Events will be accumulated when the app is in a disconnected state, and sent when the connection is
|
||||
restored and one of the above 'flush' conditions are met.
|
||||
|
||||
+ The `FBSDKAppEvents` class is thread-safe in that events may be logged from any of the app's threads.
|
||||
|
||||
+ The developer can set the `flushBehavior` on `FBSDKAppEvents` to force the flushing of events to only
|
||||
occur on an explicit call to the `flush` method.
|
||||
|
||||
+ The developer can turn on console debug output for event logging and flushing to the server by using
|
||||
the `FBSDKLoggingBehaviorAppEvents` value in `[FBSettings setLoggingBehavior:]`.
|
||||
|
||||
Some things to note when logging events:
|
||||
|
||||
+ There is a limit on the number of unique event names an app can use, on the order of 1000.
|
||||
+ There is a limit to the number of unique parameter names in the provided parameters that can
|
||||
be used per event, on the order of 25. This is not just for an individual call, but for all
|
||||
invocations for that eventName.
|
||||
+ Event names and parameter names (the keys in the NSDictionary) must be between 2 and 40 characters, and
|
||||
must consist of alphanumeric characters, _, -, or spaces.
|
||||
+ The length of each parameter value can be no more than on the order of 100 characters.
|
||||
*/
|
||||
NS_SWIFT_NAME(AppEvents)
|
||||
@interface FBSDKAppEvents : NSObject <
|
||||
FBSDKEventLogging,
|
||||
FBSDKAppEventsConfiguring,
|
||||
FBSDKApplicationActivating,
|
||||
FBSDKApplicationLifecycleObserving,
|
||||
FBSDKApplicationStateSetting,
|
||||
FBSDKSourceApplicationTracking,
|
||||
FBSDKUserIDProviding
|
||||
>
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
/// The shared instance of AppEvents.
|
||||
@property (class, nonatomic, readonly, strong) FBSDKAppEvents *shared;
|
||||
|
||||
/// Control over event batching/flushing
|
||||
|
||||
/// The current event flushing behavior specifying when events are sent back to Facebook servers.
|
||||
@property (nonatomic) FBSDKAppEventsFlushBehavior flushBehavior;
|
||||
|
||||
/**
|
||||
Set the 'override' App ID for App Event logging.
|
||||
|
||||
In some cases, apps want to use one Facebook App ID for login and social presence and another
|
||||
for App Event logging. (An example is if multiple apps from the same company share an app ID for login, but
|
||||
want distinct logging.) By default, this value is `nil`, and defers to the `FBSDKAppEventsOverrideAppIDBundleKey`
|
||||
plist value. If that's not set, it defaults to `Settings.shared.appID`.
|
||||
|
||||
This should be set before any other calls are made to `AppEvents`. Thus, you should set it in your application
|
||||
delegate's `application(_:didFinishLaunchingWithOptions:)` method.
|
||||
*/
|
||||
@property (nullable, nonatomic, copy) NSString *loggingOverrideAppID;
|
||||
|
||||
/**
|
||||
The custom user ID to associate with all app events.
|
||||
|
||||
The userID is persisted until it is cleared by passing `nil`.
|
||||
*/
|
||||
@property (nullable, nonatomic, copy) NSString *userID;
|
||||
|
||||
/// Returns generated anonymous id that persisted with current install of the app
|
||||
@property (nonatomic, readonly) NSString *anonymousID;
|
||||
|
||||
/*
|
||||
* Basic event logging
|
||||
*/
|
||||
|
||||
/**
|
||||
Log an event with just an event name.
|
||||
|
||||
@param eventName The name of the event to record. Limitations on number of events and name length
|
||||
are given in the `AppEvents` documentation.
|
||||
*/
|
||||
- (void)logEvent:(FBSDKAppEventName)eventName;
|
||||
|
||||
/**
|
||||
Log an event with an event name and a numeric value to be aggregated with other events of this name.
|
||||
|
||||
@param eventName The name of the event to record. Limitations on number of events and name length
|
||||
are given in the `AppEvents` documentation. Common event names are provided in `AppEvents.Name` constants.
|
||||
|
||||
@param valueToSum Amount to be aggregated into all events of this event name, and App Insights will report
|
||||
the cumulative and average value of this amount.
|
||||
*/
|
||||
- (void)logEvent:(FBSDKAppEventName)eventName
|
||||
valueToSum:(double)valueToSum;
|
||||
|
||||
/**
|
||||
Log an event with an event name and a set of key/value pairs in the parameters dictionary.
|
||||
Parameter limitations are described above.
|
||||
|
||||
@param eventName The name of the event to record. Limitations on number of events and name construction
|
||||
are given in the `AppEvents` documentation. Common event names are provided in `AppEvents.Name` constants.
|
||||
|
||||
@param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
|
||||
be `NSString`s, and the values are expected to be `NSString` or `NSNumber`. Limitations on the number of
|
||||
parameters and name construction are given in the `AppEvents` documentation. Commonly used parameter names
|
||||
are provided in `AppEvents.ParameterName` constants.
|
||||
*/
|
||||
- (void)logEvent:(FBSDKAppEventName)eventName
|
||||
parameters:(nullable NSDictionary<FBSDKAppEventParameterName, id> *)parameters;
|
||||
|
||||
/**
|
||||
Log an event with an event name, a numeric value to be aggregated with other events of this name,
|
||||
and a set of key/value pairs in the parameters dictionary.
|
||||
|
||||
@param eventName The name of the event to record. Limitations on number of events and name construction
|
||||
are given in the `AppEvents` documentation. Common event names are provided in `AppEvents.Name` constants.
|
||||
|
||||
@param valueToSum Amount to be aggregated into all events of this event name, and App Insights will report
|
||||
the cumulative and average value of this amount.
|
||||
|
||||
@param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
|
||||
be `NSString`s, and the values are expected to be `NSString` or `NSNumber`. Limitations on the number of
|
||||
parameters and name construction are given in the `AppEvents` documentation. Commonly used parameter names
|
||||
are provided in `AppEvents.ParameterName` constants.
|
||||
*/
|
||||
- (void)logEvent:(FBSDKAppEventName)eventName
|
||||
valueToSum:(double)valueToSum
|
||||
parameters:(nullable NSDictionary<FBSDKAppEventParameterName, id> *)parameters;
|
||||
|
||||
/**
|
||||
Log an event with an event name, a numeric value to be aggregated with other events of this name,
|
||||
and a set of key/value pairs in the parameters dictionary.
|
||||
|
||||
@param eventName The name of the event to record. Limitations on number of events and name construction
|
||||
are given in the `AppEvents` documentation. Common event names are provided in `AppEvents.Name` constants.
|
||||
|
||||
@param valueToSum Amount to be aggregated into all events of this eventName, and App Insights will report
|
||||
the cumulative and average value of this amount. Note that this is an `NSNumber`, and a value of `nil` denotes
|
||||
that this event doesn't have a value associated with it for summation.
|
||||
|
||||
@param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
|
||||
be `NSString`s, and the values are expected to be `NSString` or `NSNumber`. Limitations on the number of
|
||||
parameters and name construction are given in the `AppEvents` documentation. Commonly used parameter names
|
||||
are provided in `AppEvents.ParameterName` constants.
|
||||
|
||||
@param accessToken The optional access token to log the event as.
|
||||
*/
|
||||
- (void)logEvent:(FBSDKAppEventName)eventName
|
||||
valueToSum:(nullable NSNumber *)valueToSum
|
||||
parameters:(nullable NSDictionary<FBSDKAppEventParameterName, id> *)parameters
|
||||
accessToken:(nullable FBSDKAccessToken *)accessToken;
|
||||
|
||||
/*
|
||||
* Purchase logging
|
||||
*/
|
||||
|
||||
/**
|
||||
Log a purchase of the specified amount, in the specified currency.
|
||||
|
||||
@param purchaseAmount Purchase amount to be logged, as expressed in the specified currency. This value
|
||||
will be rounded to the thousandths place (e.g., 12.34567 becomes 12.346).
|
||||
|
||||
@param currency Currency string (e.g., "USD", "EUR", "GBP"); see ISO-4217 for
|
||||
specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>.
|
||||
|
||||
This event immediately triggers a flush of the `AppEvents` event queue, unless the `flushBehavior` is set
|
||||
to `FBSDKAppEventsFlushBehaviorExplicitOnly`.
|
||||
*/
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)logPurchase:(double)purchaseAmount currency:(NSString *)currency
|
||||
NS_SWIFT_NAME(logPurchase(amount:currency:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
/**
|
||||
Log a purchase of the specified amount, in the specified currency, also providing a set of
|
||||
additional characteristics describing the purchase.
|
||||
|
||||
@param purchaseAmount Purchase amount to be logged, as expressed in the specified currency.This value
|
||||
will be rounded to the thousandths place (e.g., 12.34567 becomes 12.346).
|
||||
|
||||
@param currency Currency string (e.g., "USD", "EUR", "GBP"); see ISO-4217 for
|
||||
specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>.
|
||||
|
||||
@param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
|
||||
be `NSString`s, and the values are expected to be `NSString` or `NSNumber`. Limitations on the number of
|
||||
parameters and name construction are given in the `AppEvents` documentation. Commonly used parameter names
|
||||
are provided in `AppEvents.ParameterName` constants.
|
||||
|
||||
This event immediately triggers a flush of the `AppEvents` event queue, unless the `flushBehavior` is set
|
||||
to `FBSDKAppEventsFlushBehaviorExplicitOnly`.
|
||||
*/
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)logPurchase:(double)purchaseAmount
|
||||
currency:(NSString *)currency
|
||||
parameters:(nullable NSDictionary<FBSDKAppEventParameterName, id> *)parameters
|
||||
NS_SWIFT_NAME(logPurchase(amount:currency:parameters:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
/**
|
||||
Log a purchase of the specified amount, in the specified currency, also providing a set of
|
||||
additional characteristics describing the purchase.
|
||||
|
||||
@param purchaseAmount Purchase amount to be logged, as expressed in the specified currency.This value
|
||||
will be rounded to the thousandths place (e.g., 12.34567 becomes 12.346).
|
||||
|
||||
@param currency Currency string (e.g., "USD", "EUR", "GBP"); see ISO-4217 for
|
||||
specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>.
|
||||
|
||||
@param parameters Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
|
||||
be `NSString`s, and the values are expected to be `NSString` or `NSNumber`. Limitations on the number of
|
||||
parameters and name construction are given in the `AppEvents` documentation. Commonly used parameter names
|
||||
are provided in `AppEvents.ParameterName` constants.
|
||||
|
||||
@param accessToken The optional access token to log the event as.
|
||||
|
||||
This event immediately triggers a flush of the `AppEvents` event queue, unless the `flushBehavior` is set
|
||||
to `FBSDKAppEventsFlushBehaviorExplicitOnly`.
|
||||
*/
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)logPurchase:(double)purchaseAmount
|
||||
currency:(NSString *)currency
|
||||
parameters:(nullable NSDictionary<FBSDKAppEventParameterName, id> *)parameters
|
||||
accessToken:(nullable FBSDKAccessToken *)accessToken
|
||||
NS_SWIFT_NAME(logPurchase(amount:currency:parameters:accessToken:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
/*
|
||||
* Push Notifications Logging
|
||||
*/
|
||||
|
||||
/**
|
||||
Log an app event that tracks that the application was open via Push Notification.
|
||||
|
||||
@param payload Notification payload received via `UIApplicationDelegate`.
|
||||
*/
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)logPushNotificationOpen:(NSDictionary<NSString *, id> *)payload
|
||||
NS_SWIFT_NAME(logPushNotificationOpen(payload:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
/**
|
||||
Log an app event that tracks that a custom action was taken from a push notification.
|
||||
|
||||
@param payload Notification payload received via `UIApplicationDelegate`.
|
||||
@param action Name of the action that was taken.
|
||||
*/
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)logPushNotificationOpen:(NSDictionary<NSString *, id> *)payload action:(NSString *)action
|
||||
NS_SWIFT_NAME(logPushNotificationOpen(payload:action:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
/**
|
||||
Uploads product catalog product item as an app event
|
||||
|
||||
@param itemID Unique ID for the item. Can be a variant for a product.
|
||||
Max size is 100.
|
||||
@param availability If item is in stock. Accepted values are:
|
||||
in stock - Item ships immediately
|
||||
out of stock - No plan to restock
|
||||
preorder - Available in future
|
||||
available for order - Ships in 1-2 weeks
|
||||
discontinued - Discontinued
|
||||
@param condition Product condition: new, refurbished or used.
|
||||
@param description Short text describing product. Max size is 5000.
|
||||
@param imageLink Link to item image used in ad.
|
||||
@param link Link to merchant's site where someone can buy the item.
|
||||
@param title Title of item.
|
||||
@param priceAmount Amount of purchase, in the currency specified by the 'currency'
|
||||
parameter. This value will be rounded to the thousandths place
|
||||
(e.g., 12.34567 becomes 12.346).
|
||||
@param currency Currency string (e.g., "USD", "EUR", "GBP"); see ISO-4217 for
|
||||
specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>.
|
||||
@param gtin Global Trade Item Number including UPC, EAN, JAN and ISBN
|
||||
@param mpn Unique manufacture ID for product
|
||||
@param brand Name of the brand
|
||||
Note: Either gtin, mpn or brand is required.
|
||||
@param parameters Optional fields for deep link specification.
|
||||
*/
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)logProductItem:(NSString *)itemID
|
||||
availability:(FBSDKProductAvailability)availability
|
||||
condition:(FBSDKProductCondition)condition
|
||||
description:(NSString *)description
|
||||
imageLink:(NSString *)imageLink
|
||||
link:(NSString *)link
|
||||
title:(NSString *)title
|
||||
priceAmount:(double)priceAmount
|
||||
currency:(NSString *)currency
|
||||
gtin:(nullable NSString *)gtin
|
||||
mpn:(nullable NSString *)mpn
|
||||
brand:(nullable NSString *)brand
|
||||
parameters:(nullable NSDictionary<NSString *, id> *)parameters
|
||||
NS_SWIFT_NAME(logProductItem(id:availability:condition:description:imageLink:link:title:priceAmount:currency:gtin:mpn:brand:parameters:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
/**
|
||||
Notifies the events system that the app has launched and, when appropriate, logs an "activated app" event.
|
||||
This function is called automatically from FBSDKApplicationDelegate applicationDidBecomeActive, unless
|
||||
one overrides 'FacebookAutoLogAppEventsEnabled' key to false in the project info plist file.
|
||||
In case 'FacebookAutoLogAppEventsEnabled' is set to false, then it should typically be placed in the
|
||||
app delegates' `applicationDidBecomeActive:` method.
|
||||
|
||||
This method also takes care of logging the event indicating the first time this app has been launched, which, among other things, is used to
|
||||
track user acquisition and app install ads conversions.
|
||||
|
||||
`activateApp` will not log an event on every app launch, since launches happen every time the app is backgrounded and then foregrounded.
|
||||
"activated app" events will be logged when the app has not been active for more than 60 seconds. This method also causes a "deactivated app"
|
||||
event to be logged when sessions are "completed", and these events are logged with the session length, with an indication of how much
|
||||
time has elapsed between sessions, and with the number of background/foreground interruptions that session had. This data
|
||||
is all visible in your app's App Events Insights.
|
||||
*/
|
||||
- (void)activateApp;
|
||||
|
||||
/*
|
||||
* Push Notifications Registration and Uninstall Tracking
|
||||
*/
|
||||
|
||||
/**
|
||||
Sets and sends device token to register the current application for push notifications.
|
||||
|
||||
Sets and sends a device token from the `Data` representation that you get from
|
||||
`UIApplicationDelegate.application(_:didRegisterForRemoteNotificationsWithDeviceToken:)`.
|
||||
|
||||
@param deviceToken Device token data.
|
||||
*/
|
||||
- (void)setPushNotificationsDeviceToken:(nullable NSData *)deviceToken;
|
||||
|
||||
/**
|
||||
Sets and sends device token string to register the current application for push notifications.
|
||||
|
||||
Sets and sends a device token string
|
||||
|
||||
@param deviceTokenString Device token string.
|
||||
*/
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)setPushNotificationsDeviceTokenString:(nullable NSString *)deviceTokenString
|
||||
NS_SWIFT_NAME(setPushNotificationsDeviceToken(_:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
/**
|
||||
Explicitly kick off flushing of events to Facebook. This is an asynchronous method, but it does initiate an immediate
|
||||
kick off. Server failures will be reported through the NotificationCenter with notification ID `FBSDKAppEventsLoggingResultNotification`.
|
||||
*/
|
||||
- (void)flush;
|
||||
|
||||
/**
|
||||
Creates a request representing the Graph API call to retrieve a Custom Audience "third party ID" for the app's Facebook user.
|
||||
Callers will send this ID back to their own servers, collect up a set to create a Facebook Custom Audience with,
|
||||
and then use the resultant Custom Audience to target ads.
|
||||
|
||||
The JSON in the request's response will include a "custom_audience_third_party_id" key/value pair with the value being the ID retrieved.
|
||||
This ID is an encrypted encoding of the Facebook user's ID and the invoking Facebook app ID.
|
||||
Multiple calls with the same user will return different IDs, thus these IDs cannot be used to correlate behavior
|
||||
across devices or applications, and are only meaningful when sent back to Facebook for creating Custom Audiences.
|
||||
|
||||
The ID retrieved represents the Facebook user identified in the following way: if the specified access token is valid,
|
||||
the ID will represent the user associated with that token; otherwise the ID will represent the user logged into the
|
||||
native Facebook app on the device. If there is no native Facebook app, no one is logged into it, or the user has opted out
|
||||
at the iOS level from ad tracking, then a `nil` ID will be returned.
|
||||
|
||||
This method returns `nil` if either the user has opted-out (via iOS) from Ad Tracking, the app itself has limited event usage
|
||||
via the `Settings.shared.isEventDataUsageLimited` flag, or a specific Facebook user cannot be identified.
|
||||
|
||||
@param accessToken The access token to use to establish the user's identity for users logged into Facebook through this app.
|
||||
If `nil`, then `AccessToken.current` is used.
|
||||
*/
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (nullable FBSDKGraphRequest *)requestForCustomAudienceThirdPartyIDWithAccessToken:(nullable FBSDKAccessToken *)accessToken
|
||||
NS_SWIFT_NAME(requestForCustomAudienceThirdPartyID(accessToken:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
/**
|
||||
Sets custom user data to associate with all app events. All user data are hashed
|
||||
and used to match Facebook user from this instance of an application.
|
||||
|
||||
The user data will be persisted between application instances.
|
||||
|
||||
@param email user's email
|
||||
@param firstName user's first name
|
||||
@param lastName user's last name
|
||||
@param phone user's phone
|
||||
@param dateOfBirth user's date of birth
|
||||
@param gender user's gender
|
||||
@param city user's city
|
||||
@param state user's state
|
||||
@param zip user's zip
|
||||
@param country user's country
|
||||
*/
|
||||
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)setUserEmail:(nullable NSString *)email
|
||||
firstName:(nullable NSString *)firstName
|
||||
lastName:(nullable NSString *)lastName
|
||||
phone:(nullable NSString *)phone
|
||||
dateOfBirth:(nullable NSString *)dateOfBirth
|
||||
gender:(nullable NSString *)gender
|
||||
city:(nullable NSString *)city
|
||||
state:(nullable NSString *)state
|
||||
zip:(nullable NSString *)zip
|
||||
country:(nullable NSString *)country
|
||||
NS_SWIFT_NAME(setUser(email:firstName:lastName:phone:dateOfBirth:gender:city:state:zip:country:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
/// Returns the set user data else nil
|
||||
- (nullable NSString *)getUserData;
|
||||
|
||||
/// Clears the current user data
|
||||
- (void)clearUserData;
|
||||
|
||||
/**
|
||||
Sets custom user data to associate with all app events. All user data are hashed
|
||||
and used to match Facebook user from this instance of an application.
|
||||
|
||||
The user data will be persisted between application instances.
|
||||
|
||||
@param data data
|
||||
@param type data type, e.g. FBSDKAppEventEmail, FBSDKAppEventPhone
|
||||
*/
|
||||
- (void)setUserData:(nullable NSString *)data
|
||||
forType:(FBSDKAppEventUserDataType)type;
|
||||
|
||||
/// Clears the current user data of certain type
|
||||
- (void)clearUserDataForType:(FBSDKAppEventUserDataType)type;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
/**
|
||||
Intended to be used as part of a hybrid webapp.
|
||||
If you call this method, the FB SDK will inject a new JavaScript object into your webview.
|
||||
If the FB Pixel is used within the webview, and references the app ID of this app,
|
||||
then it will detect the presence of this injected JavaScript object
|
||||
and pass Pixel events back to the FB SDK for logging using the AppEvents framework.
|
||||
|
||||
@param webView The webview to augment with the additional JavaScript behavior
|
||||
*/
|
||||
- (void)augmentHybridWebView:(WKWebView *)webView;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Unity helper functions
|
||||
*/
|
||||
|
||||
/**
|
||||
Set whether Unity is already initialized.
|
||||
|
||||
@param isUnityInitialized Whether Unity is initialized.
|
||||
*/
|
||||
- (void)setIsUnityInitialized:(BOOL)isUnityInitialized;
|
||||
|
||||
/// Send event bindings to Unity
|
||||
- (void)sendEventBindingsToUnity;
|
||||
|
||||
/*
|
||||
* SDK Specific Event Logging
|
||||
* Do not call directly outside of the SDK itself.
|
||||
*/
|
||||
|
||||
/**
|
||||
Internal Type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
- (void)logInternalEvent:(FBSDKAppEventName)eventName
|
||||
parameters:(nullable NSDictionary<FBSDKAppEventParameterName, id> *)parameters
|
||||
isImplicitlyLogged:(BOOL)isImplicitlyLogged;
|
||||
|
||||
/**
|
||||
Internal Type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
- (void)logInternalEvent:(FBSDKAppEventName)eventName
|
||||
parameters:(nullable NSDictionary<FBSDKAppEventParameterName, id> *)parameters
|
||||
isImplicitlyLogged:(BOOL)isImplicitlyLogged
|
||||
accessToken:(nullable FBSDKAccessToken *)accessToken;
|
||||
|
||||
- (void)flushForReason:(FBSDKAppEventsFlushReason)flushReason;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAdvertisingTrackingStatus.h>
|
||||
#import <FBSDKCoreKit/FBSDKAppEventsConfigurationProtocol.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsConfiguration)
|
||||
@interface FBSDKAppEventsConfiguration : NSObject <NSCopying, NSObject, NSSecureCoding, FBSDKAppEventsConfiguration>
|
||||
|
||||
@property (nonatomic, readonly, assign) FBSDKAdvertisingTrackingStatus defaultATEStatus;
|
||||
@property (nonatomic, readonly, assign) BOOL advertiserIDCollectionEnabled;
|
||||
@property (nonatomic, readonly, assign) BOOL eventCollectionEnabled;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
- (instancetype)initWithJSON:(nullable NSDictionary<NSString *, id> *)dict;
|
||||
|
||||
+ (instancetype)defaultConfiguration;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAppEventsConfigurationProviding.h>
|
||||
|
||||
typedef void (^FBSDKAppEventsConfigurationManagerBlock)(void);
|
||||
@protocol FBSDKDataPersisting;
|
||||
@protocol FBSDKSettings;
|
||||
@protocol FBSDKGraphRequestFactory;
|
||||
@protocol FBSDKGraphRequestConnectionFactory;
|
||||
@protocol FBSDKAppEventsConfiguration;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsConfigurationManager)
|
||||
@interface FBSDKAppEventsConfigurationManager : NSObject <FBSDKAppEventsConfigurationProviding>
|
||||
|
||||
@property (class, nonatomic, readonly) FBSDKAppEventsConfigurationManager *shared;
|
||||
|
||||
@property (nonatomic, readonly) id<FBSDKAppEventsConfiguration> cachedAppEventsConfiguration;
|
||||
|
||||
#if !DEBUG
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
#endif
|
||||
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void) configureWithStore:(id<FBSDKDataPersisting>)store
|
||||
settings:(id<FBSDKSettings>)settings
|
||||
graphRequestFactory:(id<FBSDKGraphRequestFactory>)graphRequestFactory
|
||||
graphRequestConnectionFactory:(id<FBSDKGraphRequestConnectionFactory>)graphRequestConnectionFactory
|
||||
NS_SWIFT_NAME(configure(store:settings:graphRequestFactory:graphRequestConnectionFactory:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
- (void)loadAppEventsConfigurationWithBlock:(FBSDKAppEventsConfigurationManagerBlock)block;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsConfigurationProtocol)
|
||||
@protocol FBSDKAppEventsConfiguration
|
||||
|
||||
@property (nonatomic, readonly, assign) FBSDKAdvertisingTrackingStatus defaultATEStatus;
|
||||
@property (nonatomic, readonly, assign) BOOL advertiserIDCollectionEnabled;
|
||||
@property (nonatomic, readonly, assign) BOOL eventCollectionEnabled;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
- (instancetype)initWithJSON:(nullable NSDictionary<NSString *, id> *)dict;
|
||||
+ (instancetype)defaultConfiguration;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsConfigurationProvidingBlock)
|
||||
typedef void (^FBSDKAppEventsConfigurationProvidingBlock)(void);
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol FBSDKAppEventsConfiguration;
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsConfigurationProviding)
|
||||
@protocol FBSDKAppEventsConfigurationProviding
|
||||
|
||||
@property (nonatomic, readonly) id<FBSDKAppEventsConfiguration> cachedAppEventsConfiguration;
|
||||
|
||||
- (void)loadAppEventsConfigurationWithBlock:(FBSDKAppEventsConfigurationProvidingBlock)block;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol FBSDKAEMReporter;
|
||||
@protocol FBSDKGateKeeperManaging;
|
||||
@protocol FBSDKAppEventsConfigurationProviding;
|
||||
@protocol FBSDKSourceApplicationTracking;
|
||||
@protocol FBSDKServerConfigurationProviding;
|
||||
@protocol FBSDKGraphRequestFactory;
|
||||
@protocol FBSDKFeatureChecking;
|
||||
@protocol FBSDKDataPersisting;
|
||||
@protocol FBSDKInternalUtility;
|
||||
@protocol FBSDKLogging;
|
||||
@protocol FBSDKSettings;
|
||||
@protocol FBSDKPaymentObserving;
|
||||
@protocol FBSDKTimeSpentRecording;
|
||||
@protocol FBSDKAppEventsStatePersisting;
|
||||
@protocol FBSDKAppEventsParameterProcessing;
|
||||
@protocol FBSDKAppEventsParameterProcessing;
|
||||
@protocol FBSDKATEPublisherCreating;
|
||||
@protocol FBSDKAppEventsStateProviding;
|
||||
@protocol FBSDKAdvertiserIDProviding;
|
||||
@protocol FBSDKUserDataPersisting;
|
||||
@protocol FBSDKLoggingNotifying;
|
||||
@protocol FBSDKAppEventsUtility;
|
||||
@protocol FBSDKAppEventDropDetermining;
|
||||
@protocol FBSDKCAPIReporter;
|
||||
@protocol FBSDKAppEventParametersExtracting;
|
||||
@protocol FBSDKMACARuleMatching;
|
||||
@protocol FBSDKEventsProcessing;
|
||||
#if !TARGET_OS_TV
|
||||
@protocol FBSDKEventProcessing;
|
||||
@protocol FBSDKMetadataIndexing;
|
||||
@protocol FBSDKAppEventsReporter;
|
||||
@protocol FBSDKCodelessIndexing;
|
||||
@protocol FBSDKSwizzling;
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsConfiguring)
|
||||
@protocol FBSDKAppEventsConfiguring
|
||||
|
||||
- (void) configureWithGateKeeperManager:(Class<FBSDKGateKeeperManaging>)gateKeeperManager
|
||||
appEventsConfigurationProvider:(id<FBSDKAppEventsConfigurationProviding>)appEventsConfigurationProvider
|
||||
serverConfigurationProvider:(id<FBSDKServerConfigurationProviding>)serverConfigurationProvider
|
||||
graphRequestFactory:(id<FBSDKGraphRequestFactory>)graphRequestFactory
|
||||
featureChecker:(id<FBSDKFeatureChecking>)featureChecker
|
||||
primaryDataStore:(id<FBSDKDataPersisting>)primaryDataStore
|
||||
logger:(Class<FBSDKLogging>)logger
|
||||
settings:(id<FBSDKSettings>)settings
|
||||
paymentObserver:(id<FBSDKPaymentObserving>)paymentObserver
|
||||
timeSpentRecorder:(id<FBSDKSourceApplicationTracking, FBSDKTimeSpentRecording>)timeSpentRecorder
|
||||
appEventsStateStore:(id<FBSDKAppEventsStatePersisting>)appEventsStateStore
|
||||
eventDeactivationParameterProcessor:(id<FBSDKAppEventsParameterProcessing>)eventDeactivationParameterProcessor
|
||||
restrictiveDataFilterParameterProcessor:(id<FBSDKAppEventsParameterProcessing>)restrictiveDataFilterParameterProcessor
|
||||
atePublisherFactory:(id<FBSDKATEPublisherCreating>)atePublisherFactory
|
||||
appEventsStateProvider:(id<FBSDKAppEventsStateProviding>)appEventsStateProvider
|
||||
advertiserIDProvider:(id<FBSDKAdvertiserIDProviding>)advertiserIDProvider
|
||||
userDataStore:(id<FBSDKUserDataPersisting>)userDataStore
|
||||
appEventsUtility:(id<FBSDKAppEventDropDetermining, FBSDKAppEventParametersExtracting, FBSDKAppEventsUtility, FBSDKLoggingNotifying>)appEventsUtility
|
||||
internalUtility:(id<FBSDKInternalUtility>)internalUtility
|
||||
capiReporter:(id<FBSDKCAPIReporter>)capiReporter
|
||||
protectedModeManager:(id<FBSDKAppEventsParameterProcessing>)protectedModeManager
|
||||
macaRuleMatchingManager:(id<FBSDKMACARuleMatching>)macaRuleMatchingManager
|
||||
blocklistEventsManager:(nonnull id<FBSDKEventsProcessing>)blocklistEventsManager
|
||||
redactedEventsManager:(nonnull id<FBSDKEventsProcessing>)redactedEventsManager
|
||||
sensitiveParamsManager:(nonnull id<FBSDKAppEventsParameterProcessing>)sensitiveParamsManager
|
||||
NS_SWIFT_NAME(configure(gateKeeperManager:appEventsConfigurationProvider:serverConfigurationProvider:graphRequestFactory:featureChecker:primaryDataStore:logger:settings:paymentObserver:timeSpentRecorder:appEventsStateStore:eventDeactivationParameterProcessor:restrictiveDataFilterParameterProcessor:atePublisherFactory:appEventsStateProvider:advertiserIDProvider:userDataStore:appEventsUtility:internalUtility:capiReporter:protectedModeManager:macaRuleMatchingManager:blocklistEventsManager:redactedEventsManager:sensitiveParamsManager:));
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)configureNonTVComponentsWithOnDeviceMLModelManager:(id<FBSDKEventProcessing>)modelManager
|
||||
metadataIndexer:(id<FBSDKMetadataIndexing>)metadataIndexer
|
||||
skAdNetworkReporter:(nullable id<FBSDKAppEventsReporter>)skAdNetworkReporter
|
||||
skAdNetworkReporterV2:(nullable id<FBSDKAppEventsReporter>)skAdNetworkReporterV2
|
||||
codelessIndexer:(Class<FBSDKCodelessIndexing>)codelessIndexer
|
||||
swizzler:(Class<FBSDKSwizzling>)swizzler
|
||||
aemReporter:(Class<FBSDKAEMReporter>)aemReporter
|
||||
NS_SWIFT_NAME(configureNonTVComponents(onDeviceMLModelManager:metadataIndexer:skAdNetworkReporter:skAdNetworkReporterV2:codelessIndexer:swizzler:aemReporter:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKDeviceInformationProviding.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsDeviceInfo)
|
||||
@interface FBSDKAppEventsDeviceInfo : NSObject <FBSDKDeviceInformationProviding>
|
||||
|
||||
@property (class, nonnull, nonatomic, readonly) FBSDKAppEventsDeviceInfo *shared;
|
||||
|
||||
@property (nullable, nonatomic, readonly) id<FBSDKSettings> settings;
|
||||
|
||||
// Ephemeral data, may change during the lifetime of an app. We collect them in different
|
||||
// 'group' frequencies - group1 may gets collected once every 30 minutes.
|
||||
|
||||
// group1
|
||||
@property (nonatomic) NSString *carrierName;
|
||||
@property (nonatomic) NSString *timeZoneAbbrev;
|
||||
@property (nonatomic) NSString *timeZoneName;
|
||||
|
||||
// Persistent data, but we maintain it to make rebuilding the device info as fast as possible.
|
||||
@property (nonatomic) NSString *bundleIdentifier;
|
||||
@property (nonatomic) NSString *longVersion;
|
||||
@property (nonatomic) NSString *shortVersion;
|
||||
@property (nonatomic) NSString *sysVersion;
|
||||
@property (nonatomic) NSString *machine;
|
||||
@property (nonatomic) NSString *language;
|
||||
@property (nonatomic) unsigned long long coreCount;
|
||||
@property (nonatomic) CGFloat width;
|
||||
@property (nonatomic) CGFloat height;
|
||||
@property (nonatomic) CGFloat density;
|
||||
|
||||
#if !DEBUG
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
#endif
|
||||
|
||||
- (void)configureWithSettings:(id<FBSDKSettings>)settings
|
||||
NS_SWIFT_NAME(configure(settings:));
|
||||
|
||||
#if DEBUG
|
||||
- (void)resetDependencies;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
NS_ENUM (NSUInteger, FBSDKAppEventsFlushBehavior)
|
||||
|
||||
Specifies when `FBSDKAppEvents` sends log events to the server.
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, FBSDKAppEventsFlushBehavior) {
|
||||
/// Flush automatically: periodically (once a minute or every 100 logged events) and always at app reactivation.
|
||||
FBSDKAppEventsFlushBehaviorAuto = 0,
|
||||
|
||||
/** Only flush when the `flush` method is called. When an app is moved to background/terminated, the
|
||||
events are persisted and re-established at activation, but they will only be written with an
|
||||
explicit call to `flush`. */
|
||||
FBSDKAppEventsFlushBehaviorExplicitOnly,
|
||||
} NS_SWIFT_NAME(AppEvents.FlushBehavior);
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
Internal Type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
|
||||
typedef NS_ENUM(NSUInteger, FBSDKAppEventsFlushReason) {
|
||||
FBSDKAppEventsFlushReasonExplicit,
|
||||
FBSDKAppEventsFlushReasonTimer,
|
||||
FBSDKAppEventsFlushReasonSessionChange,
|
||||
FBSDKAppEventsFlushReasonPersistedEvents,
|
||||
FBSDKAppEventsFlushReasonEventThreshold,
|
||||
FBSDKAppEventsFlushReasonEagerlyFlushingEvent,
|
||||
} NS_SWIFT_NAME(AppEvents.FlushReason);
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/// NSNotificationCenter name indicating a result of a failed log flush attempt. The posted object will be an NSError instance.
|
||||
FOUNDATION_EXPORT NSNotificationName const FBSDKAppEventsLoggingResultNotification
|
||||
NS_SWIFT_NAME(AppEventsLoggingResult);
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAppEventName.h>
|
||||
#import <FBSDKCoreKit/FBSDKAppEventParameterName.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsParameterProcessing)
|
||||
@protocol FBSDKAppEventsParameterProcessing
|
||||
|
||||
- (void)enable;
|
||||
- (nullable NSDictionary<FBSDKAppEventParameterName, id> *)processParameters:(nullable NSDictionary<FBSDKAppEventParameterName, id> *)parameters
|
||||
eventName:(nullable FBSDKAppEventName)eventName;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsReporter)
|
||||
@protocol FBSDKAppEventsReporter
|
||||
|
||||
- (void)enable;
|
||||
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)recordAndUpdateEvent:(NSString *)event
|
||||
currency:(nullable NSString *)currency
|
||||
value:(nullable NSNumber *)value
|
||||
parameters:(nullable NSDictionary<NSString *, id> *)parameters
|
||||
NS_SWIFT_NAME(recordAndUpdate(event:currency:value:parameters:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKEventsProcessing.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
// this type is not thread safe.
|
||||
NS_SWIFT_NAME(_AppEventsState)
|
||||
@interface FBSDKAppEventsState : NSObject <NSCopying, NSSecureCoding>
|
||||
|
||||
@property (class, nullable, nonatomic) NSArray<id<FBSDKEventsProcessing>> *eventProcessors;
|
||||
|
||||
@property (nonatomic, readonly, copy) NSArray<NSDictionary<NSString *, id> *> *events;
|
||||
@property (nonatomic, readonly, assign) NSUInteger numSkipped;
|
||||
@property (nonatomic, readonly, copy) NSString *tokenString;
|
||||
@property (nonatomic, readonly, copy) NSString *appID;
|
||||
@property (nonatomic, readonly, getter = areAllEventsImplicit) BOOL allEventsImplicit;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
- (instancetype)initWithToken:(nullable NSString *)tokenString appID:(nullable NSString *)appID NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (void)addEvent:(NSDictionary<NSString *, id> *)eventDictionary isImplicit:(BOOL)isImplicit;
|
||||
- (void)addEventsFromAppEventState:(FBSDKAppEventsState *)appEventsState;
|
||||
- (BOOL)isCompatibleWithAppEventsState:(nullable FBSDKAppEventsState *)appEventsState;
|
||||
- (BOOL)isCompatibleWithTokenString:(NSString *)tokenString appID:(NSString *)appID;
|
||||
- (NSString *)JSONStringForEventsIncludingImplicitEvents:(BOOL)includeImplicitEvents;
|
||||
- (NSString *)extractReceiptData;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAppEventsStatePersisting.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class FBSDKAppEventsState;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsStateManager)
|
||||
@interface FBSDKAppEventsStateManager : NSObject <FBSDKAppEventsStatePersisting>
|
||||
|
||||
@property (class, nonatomic, readonly) FBSDKAppEventsStateManager *shared;
|
||||
|
||||
- (void)clearPersistedAppEventsStates;
|
||||
|
||||
// reads all saved event states, appends the param, and writes them all.
|
||||
- (void)persistAppEventsData:(FBSDKAppEventsState *)appEventsState;
|
||||
|
||||
// returns the array of saved app event states and deletes them.
|
||||
- (NSArray<FBSDKAppEventsState *> *)retrievePersistedAppEventsStates;
|
||||
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class FBSDKAppEventsState;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsStatePersisting)
|
||||
@protocol FBSDKAppEventsStatePersisting
|
||||
|
||||
- (void)clearPersistedAppEventsStates;
|
||||
- (void)persistAppEventsData:(FBSDKAppEventsState *)appEventsState;
|
||||
// patternlint-disable-next-line objc-headers-collection-generics
|
||||
- (NSArray<id> *)retrievePersistedAppEventsStates; // NSArray<FBSDKAppEventsState *>
|
||||
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class FBSDKAppEventsState;
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsStateProviding)
|
||||
@protocol FBSDKAppEventsStateProviding
|
||||
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (FBSDKAppEventsState *)createStateWithToken:(NSString *)tokenString appID:(NSString *)appID
|
||||
NS_SWIFT_NAME(createState(tokenString:appID:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAppEventParametersExtracting.h>
|
||||
#import <FBSDKCoreKit/FBSDKAppEventsFlushReason.h>
|
||||
#import <FBSDKCoreKit/FBSDKAppEventsUtilityProtocol.h>
|
||||
#import <FBSDKCoreKit/FBSDKLoggingNotifying.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsUtility)
|
||||
@interface FBSDKAppEventsUtility : NSObject <FBSDKAdvertiserIDProviding, FBSDKAppEventDropDetermining, FBSDKAppEventParametersExtracting, FBSDKAppEventsUtility, FBSDKLoggingNotifying>
|
||||
|
||||
#if !DEBUG
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
#endif
|
||||
|
||||
@property (class, nonatomic) FBSDKAppEventsUtility *shared;
|
||||
@property (nullable, nonatomic, readonly, copy) NSString *advertiserID;
|
||||
@property (nonatomic, readonly) BOOL isDebugBuild;
|
||||
@property (nonatomic, readonly) BOOL shouldDropAppEvents;
|
||||
@property (nullable, nonatomic) id<FBSDKAppEventsConfigurationProviding> appEventsConfigurationProvider;
|
||||
@property (nullable, nonatomic) id<FBSDKDeviceInformationProviding> deviceInformationProvider;
|
||||
@property (nullable, nonatomic) id<FBSDKSettings> settings;
|
||||
@property (nullable, nonatomic) id<FBSDKInternalUtility> internalUtility;
|
||||
@property (nullable, nonatomic) id<FBSDKErrorCreating> errorFactory;
|
||||
@property (nullable, nonatomic) id<FBSDKDataPersisting> dataStore;
|
||||
|
||||
- (BOOL)isSensitiveUserData:(NSString *)text;
|
||||
- (BOOL)isStandardEvent:(nullable NSString *)event;
|
||||
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)configureWithAppEventsConfigurationProvider:(id<FBSDKAppEventsConfigurationProviding>)appEventsConfigurationProvider
|
||||
deviceInformationProvider:(id<FBSDKDeviceInformationProviding>)deviceInformationProvider
|
||||
settings:(id<FBSDKSettings>)settings
|
||||
internalUtility:(id<FBSDKInternalUtility>)internalUtility
|
||||
errorFactory:(id<FBSDKErrorCreating>)errorFactory
|
||||
dataStore:(id<FBSDKDataPersisting>)dataStore
|
||||
NS_SWIFT_NAME(configure(appEventsConfigurationProvider:deviceInformationProvider:settings:internalUtility:errorFactory:dataStore:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
#if DEBUG
|
||||
- (void)reset;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAccessToken.h>
|
||||
#import <FBSDKCoreKit/FBSDKAppEventsFlushReason.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppEventsUtilityProtocol)
|
||||
@protocol FBSDKAppEventsUtility
|
||||
|
||||
@property (nonatomic, readonly) NSTimeInterval unixTimeNow;
|
||||
|
||||
- (void)ensureOnMainThread:(NSString *)methodName className:(NSString *)className;
|
||||
- (NSTimeInterval)convertToUnixTime:(nullable NSDate *)date;
|
||||
- (BOOL)validateIdentifier:(nullable NSString *)identifier;
|
||||
- (nullable NSString *)tokenStringToUseFor:(nullable FBSDKAccessToken *)token
|
||||
loggingOverrideAppID:(nullable NSString *)loggingOverrideAppID;
|
||||
- (NSString *)flushReasonToString:(FBSDKAppEventsFlushReason)flushReason;
|
||||
- (void)saveCampaignIDs:(NSURL *)url;
|
||||
- (nullable NSString *)getCampaignIDs;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
@protocol FBSDKAppLink;
|
||||
@protocol FBSDKAppLinkTarget;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppLinkCreating)
|
||||
@protocol FBSDKAppLinkCreating
|
||||
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (id<FBSDKAppLink>)createAppLinkWithSourceURL:(nullable NSURL *)sourceURL
|
||||
targets:(NSArray<id<FBSDKAppLinkTarget>> *)targets
|
||||
webURL:(nullable NSURL *)webURL
|
||||
isBackToReferrer:(BOOL)isBackToReferrer
|
||||
NS_SWIFT_NAME(createAppLink(sourceURL:targets:webURL:isBackToReferrer:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppLinkEventPosting)
|
||||
@protocol FBSDKAppLinkEventPosting
|
||||
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (void)postNotificationForEventName:(NSString *)name
|
||||
args:(NSDictionary<NSString *, id> *)args
|
||||
NS_SWIFT_NAME(postNotification(eventName:arguments:));
|
||||
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAppLinkNavigationType.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Describes the callback for appLinkFromURLInBackground.
|
||||
@param navType the FBSDKAppLink representing the deferred App Link
|
||||
@param error the error during the request, if any
|
||||
*/
|
||||
typedef void (^ FBSDKAppLinkNavigationBlock)(FBSDKAppLinkNavigationType navType, NSError *_Nullable error)
|
||||
NS_SWIFT_NAME(AppLinkNavigationBlock);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/// The result of calling navigate on a FBSDKAppLinkNavigation
|
||||
typedef NS_ENUM(NSInteger, FBSDKAppLinkNavigationType) {
|
||||
/// Indicates that the navigation failed and no app was opened
|
||||
FBSDKAppLinkNavigationTypeFailure,
|
||||
/// Indicates that the navigation succeeded by opening the URL in the browser
|
||||
FBSDKAppLinkNavigationTypeBrowser,
|
||||
/// Indicates that the navigation succeeded by opening the URL in an app on the device
|
||||
FBSDKAppLinkNavigationTypeApp,
|
||||
} NS_SWIFT_NAME(AppLinkNavigationType);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol FBSDKAppLinkTarget;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppLinkProtocol)
|
||||
@protocol FBSDKAppLink
|
||||
|
||||
/// The URL from which this FBSDKAppLink was derived
|
||||
@property (nullable, nonatomic, readonly, strong) NSURL *sourceURL;
|
||||
|
||||
/**
|
||||
The ordered list of targets applicable to this platform that will be used
|
||||
for navigation.
|
||||
*/
|
||||
@property (nonatomic, readonly, copy) NSArray<id<FBSDKAppLinkTarget>> *targets;
|
||||
|
||||
/// The fallback web URL to use if no targets are installed on this device.
|
||||
@property (nullable, nonatomic, readonly, strong) NSURL *webURL;
|
||||
|
||||
/// return if this AppLink is to go back to referrer.
|
||||
@property (nonatomic, readonly, getter = isBackToReferrer, assign) BOOL backToReferrer;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal Protocol exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppLinkResolverRequestBuilding)
|
||||
@protocol FBSDKAppLinkResolverRequestBuilding
|
||||
|
||||
- (id<FBSDKGraphRequest>)requestForURLs:(NSArray<NSURL *> *)urls;
|
||||
- (nullable NSString *)getIdiomSpecificField;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class FBSDKAppLink;
|
||||
|
||||
/**
|
||||
Describes the callback for appLinkFromURLInBackground.
|
||||
@param appLink the FBSDKAppLink representing the deferred App Link
|
||||
@param error the error during the request, if any
|
||||
*/
|
||||
typedef void (^ FBSDKAppLinkBlock)(FBSDKAppLink *_Nullable appLink, NSError *_Nullable error)
|
||||
NS_SWIFT_NAME(AppLinkBlock);
|
||||
|
||||
/**
|
||||
Implement this protocol to provide an alternate strategy for resolving
|
||||
App Links that may include pre-fetching, caching, or querying for App Link
|
||||
data from an index provided by a service provider.
|
||||
*/
|
||||
NS_SWIFT_NAME(AppLinkResolving)
|
||||
@protocol FBSDKAppLinkResolving <NSObject>
|
||||
|
||||
/**
|
||||
Asynchronously resolves App Link data for a given URL.
|
||||
|
||||
@param url The URL to resolve into an App Link.
|
||||
@param handler The completion block that will return an App Link for the given URL.
|
||||
*/
|
||||
- (void)appLinkFromURL:(NSURL *)url handler:(FBSDKAppLinkBlock)handler
|
||||
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension");
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
#import <FBSDKCoreKit/FBSDKAppLinkTargetProtocol.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppLinkTargetCreating)
|
||||
@protocol FBSDKAppLinkTargetCreating
|
||||
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
- (id<FBSDKAppLinkTarget>)createAppLinkTargetWithURL:(nullable NSURL *)url
|
||||
appStoreId:(nullable NSString *)appStoreId
|
||||
appName:(NSString *)appName
|
||||
NS_SWIFT_NAME(createAppLinkTarget(url:appStoreId:appName:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// A protocol to describe an AppLinkTarget
|
||||
NS_SWIFT_NAME(AppLinkTargetProtocol)
|
||||
@protocol FBSDKAppLinkTarget
|
||||
|
||||
// UNCRUSTIFY_FORMAT_OFF
|
||||
+ (instancetype)appLinkTargetWithURL:(nullable NSURL *)url
|
||||
appStoreId:(nullable NSString *)appStoreId
|
||||
appName:(NSString *)appName
|
||||
NS_SWIFT_NAME(init(url:appStoreId:appName:));
|
||||
// UNCRUSTIFY_FORMAT_ON
|
||||
|
||||
/// The URL prefix for this app link target
|
||||
@property (nullable, nonatomic, readonly) NSURL *URL;
|
||||
|
||||
/// The app ID for the app store
|
||||
@property (nullable, nonatomic, readonly, copy) NSString *appStoreId;
|
||||
|
||||
/// The name of the app
|
||||
@property (nonatomic, readonly, copy) NSString *appName;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppLinkURLProtocol)
|
||||
@protocol FBSDKAppLinkURL
|
||||
|
||||
@property (nullable, nonatomic, readonly, strong) NSDictionary<NSString *, id> *appLinkExtras;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol FBSDKAppLinkURL;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Internal type exposed to facilitate transition to Swift.
|
||||
API Subject to change or removal without warning. Do not use.
|
||||
|
||||
@warning INTERNAL - DO NOT USE
|
||||
*/
|
||||
NS_SWIFT_NAME(_AppLinkURLCreating)
|
||||
@protocol FBSDKAppLinkURLCreating
|
||||
|
||||
- (id<FBSDKAppLinkURL>)createAppLinkURLWithURL:(NSURL *)url;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAppLinkDataParameterName;
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAppLinkTargetKeyName;
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAppLinkUserAgentKeyName;
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAppLinkExtrasKeyName;
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAppLinkVersionKeyName;
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAppLinkRefererAppLink;
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAppLinkRefererAppName;
|
||||
FOUNDATION_EXPORT NSString *const FBSDKAppLinkRefererUrl;
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user