init
This commit is contained in:
commit
61dbf391d6
542
PlayBTopOn.xcodeproj/project.pbxproj
Normal file
542
PlayBTopOn.xcodeproj/project.pbxproj
Normal file
@ -0,0 +1,542 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 56;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
049B446F2DACAB6D0005EB66 /* GCDAsyncUdpSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 049B446A2DACAB6D0005EB66 /* GCDAsyncUdpSocket.m */; };
|
||||||
|
049B44702DACAB6D0005EB66 /* bbbAdManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049B446E2DACAB6D0005EB66 /* bbbAdManager.swift */; };
|
||||||
|
049B44712DACAB6D0005EB66 /* XUDPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 049B446D2DACAB6D0005EB66 /* XUDPClient.m */; };
|
||||||
|
755ADA202D2D25C600C9D994 /* getIphone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755ADA1E2D2D25C600C9D994 /* getIphone.swift */; };
|
||||||
|
755ADA212D2D25C600C9D994 /* idfa.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755ADA1F2D2D25C600C9D994 /* idfa.swift */; };
|
||||||
|
75F8FFD12CE7233B008E8DF6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F8FFD02CE7233B008E8DF6 /* AppDelegate.swift */; };
|
||||||
|
75F8FFD52CE7233B008E8DF6 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F8FFD42CE7233B008E8DF6 /* ViewController.swift */; };
|
||||||
|
75F8FFD82CE7233B008E8DF6 /* Base in Resources */ = {isa = PBXBuildFile; fileRef = 75F8FFD72CE7233B008E8DF6 /* Base */; };
|
||||||
|
75F8FFDA2CE72340008E8DF6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 75F8FFD92CE72340008E8DF6 /* Assets.xcassets */; };
|
||||||
|
75F8FFDD2CE72340008E8DF6 /* Base in Resources */ = {isa = PBXBuildFile; fileRef = 75F8FFDC2CE72340008E8DF6 /* Base */; };
|
||||||
|
75F8FFE82CE723FF008E8DF6 /* YL_PlayVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75F8FFE52CE723FE008E8DF6 /* YL_PlayVC.xib */; };
|
||||||
|
75F8FFE92CE723FF008E8DF6 /* YL_PlayVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F8FFE62CE723FF008E8DF6 /* YL_PlayVC.swift */; };
|
||||||
|
75F8FFF32CE72555008E8DF6 /* initializationTopOn.m in Sources */ = {isa = PBXBuildFile; fileRef = 75F8FFF12CE72555008E8DF6 /* initializationTopOn.m */; };
|
||||||
|
75F8FFF72CE72B7D008E8DF6 /* YL_NetWorkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F8FFF62CE72B7D008E8DF6 /* YL_NetWorkManager.swift */; };
|
||||||
|
84921A6E873B758EF39EBDFA /* Pods_PlayBTopOn.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33A6D387585D55B3F340F5DB /* Pods_PlayBTopOn.framework */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
049B44682DACAB6D0005EB66 /* CocoaAsyncSocket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CocoaAsyncSocket.h; sourceTree = "<group>"; };
|
||||||
|
049B44692DACAB6D0005EB66 /* GCDAsyncUdpSocket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GCDAsyncUdpSocket.h; sourceTree = "<group>"; };
|
||||||
|
049B446A2DACAB6D0005EB66 /* GCDAsyncUdpSocket.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GCDAsyncUdpSocket.m; sourceTree = "<group>"; };
|
||||||
|
049B446C2DACAB6D0005EB66 /* XUDPClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XUDPClient.h; sourceTree = "<group>"; };
|
||||||
|
049B446D2DACAB6D0005EB66 /* XUDPClient.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XUDPClient.m; sourceTree = "<group>"; };
|
||||||
|
049B446E2DACAB6D0005EB66 /* bbbAdManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = bbbAdManager.swift; sourceTree = "<group>"; };
|
||||||
|
33A6D387585D55B3F340F5DB /* Pods_PlayBTopOn.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PlayBTopOn.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
6297C68F5F2E4537B6CB3D1C /* Pods-PlayBTopOn.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PlayBTopOn.debug.xcconfig"; path = "Target Support Files/Pods-PlayBTopOn/Pods-PlayBTopOn.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
755ADA1E2D2D25C600C9D994 /* getIphone.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = getIphone.swift; sourceTree = "<group>"; };
|
||||||
|
755ADA1F2D2D25C600C9D994 /* idfa.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = idfa.swift; sourceTree = "<group>"; };
|
||||||
|
75F8FFCD2CE7233B008E8DF6 /* PlayBTopOn.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PlayBTopOn.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
75F8FFD02CE7233B008E8DF6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
|
75F8FFD42CE7233B008E8DF6 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||||
|
75F8FFD72CE7233B008E8DF6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||||
|
75F8FFD92CE72340008E8DF6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
75F8FFDC2CE72340008E8DF6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
|
75F8FFDE2CE72340008E8DF6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
75F8FFE52CE723FE008E8DF6 /* YL_PlayVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = YL_PlayVC.xib; sourceTree = "<group>"; };
|
||||||
|
75F8FFE62CE723FF008E8DF6 /* YL_PlayVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YL_PlayVC.swift; sourceTree = "<group>"; };
|
||||||
|
75F8FFEE2CE7250B008E8DF6 /* MyWallPaperHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyWallPaperHeader.h; sourceTree = "<group>"; };
|
||||||
|
75F8FFEF2CE7250B008E8DF6 /* MyWallpaperPCH.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyWallpaperPCH.pch; sourceTree = "<group>"; };
|
||||||
|
75F8FFF12CE72555008E8DF6 /* initializationTopOn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = initializationTopOn.m; sourceTree = "<group>"; };
|
||||||
|
75F8FFF22CE72555008E8DF6 /* initializationTopOn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = initializationTopOn.h; sourceTree = "<group>"; };
|
||||||
|
75F8FFF62CE72B7D008E8DF6 /* YL_NetWorkManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YL_NetWorkManager.swift; sourceTree = "<group>"; };
|
||||||
|
B423D6A110C2422F79FE6615 /* Pods-PlayBTopOn.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PlayBTopOn.release.xcconfig"; path = "Target Support Files/Pods-PlayBTopOn/Pods-PlayBTopOn.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
75F8FFCA2CE7233B008E8DF6 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
84921A6E873B758EF39EBDFA /* Pods_PlayBTopOn.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
049B446B2DACAB6D0005EB66 /* GCD */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
049B44692DACAB6D0005EB66 /* GCDAsyncUdpSocket.h */,
|
||||||
|
049B446A2DACAB6D0005EB66 /* GCDAsyncUdpSocket.m */,
|
||||||
|
);
|
||||||
|
path = GCD;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
75F8FFC42CE7233B008E8DF6 = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
75F8FFCF2CE7233B008E8DF6 /* PlayBTopOn */,
|
||||||
|
75F8FFCE2CE7233B008E8DF6 /* Products */,
|
||||||
|
CFE0CCAD1DCDC6DF946C8994 /* Pods */,
|
||||||
|
EC17E36934C0C7C23F86C29A /* Frameworks */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
75F8FFCE2CE7233B008E8DF6 /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
75F8FFCD2CE7233B008E8DF6 /* PlayBTopOn.app */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
75F8FFCF2CE7233B008E8DF6 /* PlayBTopOn */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
75F8FFF02CE7250B008E8DF6 /* Header */,
|
||||||
|
75F8FFE42CE723E7008E8DF6 /* playB */,
|
||||||
|
75F8FFD02CE7233B008E8DF6 /* AppDelegate.swift */,
|
||||||
|
75F8FFD42CE7233B008E8DF6 /* ViewController.swift */,
|
||||||
|
75F8FFD62CE7233B008E8DF6 /* Main.storyboard */,
|
||||||
|
75F8FFD92CE72340008E8DF6 /* Assets.xcassets */,
|
||||||
|
75F8FFDB2CE72340008E8DF6 /* LaunchScreen.storyboard */,
|
||||||
|
75F8FFDE2CE72340008E8DF6 /* Info.plist */,
|
||||||
|
);
|
||||||
|
path = PlayBTopOn;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
75F8FFE42CE723E7008E8DF6 /* playB */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
049B44682DACAB6D0005EB66 /* CocoaAsyncSocket.h */,
|
||||||
|
049B446B2DACAB6D0005EB66 /* GCD */,
|
||||||
|
049B446C2DACAB6D0005EB66 /* XUDPClient.h */,
|
||||||
|
049B446D2DACAB6D0005EB66 /* XUDPClient.m */,
|
||||||
|
049B446E2DACAB6D0005EB66 /* bbbAdManager.swift */,
|
||||||
|
755ADA1E2D2D25C600C9D994 /* getIphone.swift */,
|
||||||
|
755ADA1F2D2D25C600C9D994 /* idfa.swift */,
|
||||||
|
75F8FFF62CE72B7D008E8DF6 /* YL_NetWorkManager.swift */,
|
||||||
|
75F8FFF22CE72555008E8DF6 /* initializationTopOn.h */,
|
||||||
|
75F8FFF12CE72555008E8DF6 /* initializationTopOn.m */,
|
||||||
|
75F8FFE62CE723FF008E8DF6 /* YL_PlayVC.swift */,
|
||||||
|
75F8FFE52CE723FE008E8DF6 /* YL_PlayVC.xib */,
|
||||||
|
);
|
||||||
|
path = playB;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
75F8FFF02CE7250B008E8DF6 /* Header */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
75F8FFEE2CE7250B008E8DF6 /* MyWallPaperHeader.h */,
|
||||||
|
75F8FFEF2CE7250B008E8DF6 /* MyWallpaperPCH.pch */,
|
||||||
|
);
|
||||||
|
path = Header;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CFE0CCAD1DCDC6DF946C8994 /* Pods */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
6297C68F5F2E4537B6CB3D1C /* Pods-PlayBTopOn.debug.xcconfig */,
|
||||||
|
B423D6A110C2422F79FE6615 /* Pods-PlayBTopOn.release.xcconfig */,
|
||||||
|
);
|
||||||
|
path = Pods;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
EC17E36934C0C7C23F86C29A /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33A6D387585D55B3F340F5DB /* Pods_PlayBTopOn.framework */,
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
75F8FFCC2CE7233B008E8DF6 /* PlayBTopOn */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 75F8FFE12CE72340008E8DF6 /* Build configuration list for PBXNativeTarget "PlayBTopOn" */;
|
||||||
|
buildPhases = (
|
||||||
|
9FD2AE384D5FEDF5FF939DD1 /* [CP] Check Pods Manifest.lock */,
|
||||||
|
75F8FFC92CE7233B008E8DF6 /* Sources */,
|
||||||
|
75F8FFCA2CE7233B008E8DF6 /* Frameworks */,
|
||||||
|
75F8FFCB2CE7233B008E8DF6 /* Resources */,
|
||||||
|
C0554906157B58199E7A6576 /* [CP] Copy Pods Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = PlayBTopOn;
|
||||||
|
productName = PlayBTopOn;
|
||||||
|
productReference = 75F8FFCD2CE7233B008E8DF6 /* PlayBTopOn.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
75F8FFC52CE7233B008E8DF6 /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
BuildIndependentTargetsInParallel = 1;
|
||||||
|
LastSwiftUpdateCheck = 1530;
|
||||||
|
LastUpgradeCheck = 1530;
|
||||||
|
TargetAttributes = {
|
||||||
|
75F8FFCC2CE7233B008E8DF6 = {
|
||||||
|
CreatedOnToolsVersion = 15.3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 75F8FFC82CE7233B008E8DF6 /* Build configuration list for PBXProject "PlayBTopOn" */;
|
||||||
|
compatibilityVersion = "Xcode 14.0";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = 75F8FFC42CE7233B008E8DF6;
|
||||||
|
productRefGroup = 75F8FFCE2CE7233B008E8DF6 /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
75F8FFCC2CE7233B008E8DF6 /* PlayBTopOn */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
75F8FFCB2CE7233B008E8DF6 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
75F8FFDA2CE72340008E8DF6 /* Assets.xcassets in Resources */,
|
||||||
|
75F8FFE82CE723FF008E8DF6 /* YL_PlayVC.xib in Resources */,
|
||||||
|
75F8FFDD2CE72340008E8DF6 /* Base in Resources */,
|
||||||
|
75F8FFD82CE7233B008E8DF6 /* Base in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
9FD2AE384D5FEDF5FF939DD1 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-PlayBTopOn-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
C0554906157B58199E7A6576 /* [CP] Copy Pods Resources */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-PlayBTopOn/Pods-PlayBTopOn-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = "[CP] Copy Pods Resources";
|
||||||
|
outputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-PlayBTopOn/Pods-PlayBTopOn-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PlayBTopOn/Pods-PlayBTopOn-resources.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
75F8FFC92CE7233B008E8DF6 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
75F8FFF72CE72B7D008E8DF6 /* YL_NetWorkManager.swift in Sources */,
|
||||||
|
755ADA212D2D25C600C9D994 /* idfa.swift in Sources */,
|
||||||
|
75F8FFF32CE72555008E8DF6 /* initializationTopOn.m in Sources */,
|
||||||
|
049B446F2DACAB6D0005EB66 /* GCDAsyncUdpSocket.m in Sources */,
|
||||||
|
049B44702DACAB6D0005EB66 /* bbbAdManager.swift in Sources */,
|
||||||
|
049B44712DACAB6D0005EB66 /* XUDPClient.m in Sources */,
|
||||||
|
75F8FFE92CE723FF008E8DF6 /* YL_PlayVC.swift in Sources */,
|
||||||
|
75F8FFD52CE7233B008E8DF6 /* ViewController.swift in Sources */,
|
||||||
|
755ADA202D2D25C600C9D994 /* getIphone.swift in Sources */,
|
||||||
|
75F8FFD12CE7233B008E8DF6 /* AppDelegate.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
75F8FFD62CE7233B008E8DF6 /* Main.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
75F8FFD72CE7233B008E8DF6 /* Base */,
|
||||||
|
);
|
||||||
|
name = Main.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
75F8FFDB2CE72340008E8DF6 /* LaunchScreen.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
75F8FFDC2CE72340008E8DF6 /* Base */,
|
||||||
|
);
|
||||||
|
name = LaunchScreen.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
75F8FFDF2CE72340008E8DF6 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 17.4;
|
||||||
|
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
75F8FFE02CE72340008E8DF6 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 17.4;
|
||||||
|
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
75F8FFE22CE72340008E8DF6 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 6297C68F5F2E4537B6CB3D1C /* Pods-PlayBTopOn.debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGNING_ALLOWED = NO;
|
||||||
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEVELOPMENT_TEAM = "";
|
||||||
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 33FNMTSNA6;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_PREFIX_HEADER = "$(SRCROOT)/PlayBTopOn/Header/MyWallpaperPCH.pch";
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
INFOPLIST_FILE = PlayBTopOn/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = "Smart Charging Show\n\n\n";
|
||||||
|
INFOPLIST_KEY_NSUserTrackingUsageDescription = "\"\" needs to request tracking permissions to provide a personalized advertising experience. We respect and protect your privacy and will not sell your data to third parties.";
|
||||||
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||||
|
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||||
|
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
||||||
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
MARKETING_VERSION = 1.1;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.smart.charging.show;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = smart;
|
||||||
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/PlayBTopOn/Header/MyWallPaperHeader.h";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
75F8FFE32CE72340008E8DF6 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = B423D6A110C2422F79FE6615 /* Pods-PlayBTopOn.release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGNING_ALLOWED = NO;
|
||||||
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEVELOPMENT_TEAM = "";
|
||||||
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 33FNMTSNA6;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_PREFIX_HEADER = "$(SRCROOT)/PlayBTopOn/Header/MyWallpaperPCH.pch";
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
INFOPLIST_FILE = PlayBTopOn/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = "Smart Charging Show\n\n\n";
|
||||||
|
INFOPLIST_KEY_NSUserTrackingUsageDescription = "\"\" needs to request tracking permissions to provide a personalized advertising experience. We respect and protect your privacy and will not sell your data to third parties.";
|
||||||
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||||
|
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||||
|
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
||||||
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
MARKETING_VERSION = 1.1;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.smart.charging.show;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = smart;
|
||||||
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/PlayBTopOn/Header/MyWallPaperHeader.h";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
75F8FFC82CE7233B008E8DF6 /* Build configuration list for PBXProject "PlayBTopOn" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
75F8FFDF2CE72340008E8DF6 /* Debug */,
|
||||||
|
75F8FFE02CE72340008E8DF6 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
75F8FFE12CE72340008E8DF6 /* Build configuration list for PBXNativeTarget "PlayBTopOn" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
75F8FFE22CE72340008E8DF6 /* Debug */,
|
||||||
|
75F8FFE32CE72340008E8DF6 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 75F8FFC52CE7233B008E8DF6 /* Project object */;
|
||||||
|
}
|
||||||
7
PlayBTopOn.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
PlayBTopOn.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "self:">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
<?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>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
<?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>SchemeUserState</key>
|
||||||
|
<dict>
|
||||||
|
<key>PlayBTopOn.xcscheme_^#shared#^_</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>11</integer>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
<?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>SchemeUserState</key>
|
||||||
|
<dict>
|
||||||
|
<key>PlayBTopOn.xcscheme_^#shared#^_</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>8</integer>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
10
PlayBTopOn.xcworkspace/contents.xcworkspacedata
generated
Normal file
10
PlayBTopOn.xcworkspace/contents.xcworkspacedata
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "group:PlayBTopOn.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
<FileRef
|
||||||
|
location = "group:Pods/Pods.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
<?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>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Bucket
|
||||||
|
uuid = "F580337E-D970-439A-865D-31DED727615B"
|
||||||
|
type = "0"
|
||||||
|
version = "2.0">
|
||||||
|
</Bucket>
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Bucket
|
||||||
|
uuid = "2E5813EB-D56F-4286-86F7-D2DFA67869D4"
|
||||||
|
type = "0"
|
||||||
|
version = "2.0">
|
||||||
|
</Bucket>
|
||||||
41
PlayBTopOn/AppDelegate.swift
Normal file
41
PlayBTopOn/AppDelegate.swift
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
//
|
||||||
|
// AppDelegate.swift
|
||||||
|
// PlayBTopOn
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/11/15.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
@main
|
||||||
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
|
|
||||||
|
static var shared: AppDelegate {
|
||||||
|
return UIApplication.shared.delegate as! AppDelegate
|
||||||
|
}
|
||||||
|
static let appid = UUID().uuidString
|
||||||
|
var window:UIWindow?
|
||||||
|
|
||||||
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||||
|
window = UIWindow()
|
||||||
|
window?.frame = UIScreen.main.bounds
|
||||||
|
NSLog("XS- app start:\(AppDelegate.appid)")
|
||||||
|
let vc = YL_PlayVC()
|
||||||
|
|
||||||
|
window?.rootViewController = UINavigationController(rootViewController: vc)
|
||||||
|
|
||||||
|
BbbAdManager.shared.initConfig()
|
||||||
|
|
||||||
|
BbbAdManager.shared.initAd()
|
||||||
|
window?.makeKeyAndVisible()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
func applicationWillEnterForeground(_ application: UIApplication) {
|
||||||
|
print("应用从后台进入前台")
|
||||||
|
BbbAdManager.shared.closeAd(v: 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
14
PlayBTopOn/Assets.xcassets/AppIcon.appiconset/Contents.json
Normal file
14
PlayBTopOn/Assets.xcassets/AppIcon.appiconset/Contents.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "h687603756335b.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"platform" : "ios",
|
||||||
|
"size" : "1024x1024"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
PlayBTopOn/Assets.xcassets/AppIcon.appiconset/h687603756335b.png
Normal file
BIN
PlayBTopOn/Assets.xcassets/AppIcon.appiconset/h687603756335b.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 179 KiB |
6
PlayBTopOn/Assets.xcassets/Contents.json
Normal file
6
PlayBTopOn/Assets.xcassets/Contents.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
25
PlayBTopOn/Base.lproj/LaunchScreen.storyboard
Normal file
25
PlayBTopOn/Base.lproj/LaunchScreen.storyboard
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||||
|
<dependencies>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
||||||
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<scenes>
|
||||||
|
<!--View Controller-->
|
||||||
|
<scene sceneID="EHf-IW-A2E">
|
||||||
|
<objects>
|
||||||
|
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||||
|
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||||
|
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||||
|
</view>
|
||||||
|
</viewController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
<point key="canvasLocation" x="53" y="375"/>
|
||||||
|
</scene>
|
||||||
|
</scenes>
|
||||||
|
</document>
|
||||||
24
PlayBTopOn/Base.lproj/Main.storyboard
Normal file
24
PlayBTopOn/Base.lproj/Main.storyboard
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||||
|
<dependencies>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
||||||
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<scenes>
|
||||||
|
<!--View Controller-->
|
||||||
|
<scene sceneID="tne-QT-ifu">
|
||||||
|
<objects>
|
||||||
|
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
|
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||||
|
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||||
|
</view>
|
||||||
|
</viewController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
</scene>
|
||||||
|
</scenes>
|
||||||
|
</document>
|
||||||
15
PlayBTopOn/Header/MyWallPaperHeader.h
Normal file
15
PlayBTopOn/Header/MyWallPaperHeader.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
//
|
||||||
|
// MyWallPaperHeader.h
|
||||||
|
// Mywallpaper
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/8/1.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef MyWallPaperHeader_h
|
||||||
|
#define MyWallPaperHeader_h
|
||||||
|
|
||||||
|
#import "initializationTopOn.h"
|
||||||
|
#import "XUDPClient.h"
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* MyWallPaperHeader_h */
|
||||||
14
PlayBTopOn/Header/MyWallpaperPCH.pch
Normal file
14
PlayBTopOn/Header/MyWallpaperPCH.pch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
//
|
||||||
|
// MyWallpaperPCH.pch
|
||||||
|
// Mywallpaper
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/8/1.
|
||||||
|
//
|
||||||
|
#import "PlayBTopOn-Swift.h"
|
||||||
|
#ifndef MyWallpaperPCH_pch
|
||||||
|
#define MyWallpaperPCH_pch
|
||||||
|
|
||||||
|
// Include any system framework and library headers here that should be included in all compilation units.
|
||||||
|
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
|
||||||
|
|
||||||
|
#endif /* MyWallpaperPCH_pch */
|
||||||
555
PlayBTopOn/Info.plist
Normal file
555
PlayBTopOn/Info.plist
Normal file
@ -0,0 +1,555 @@
|
|||||||
|
<?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>LSApplicationQueriesSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>ctrip</string>
|
||||||
|
<string>pinduoduo</string>
|
||||||
|
<string>openapp.jdmobile</string>
|
||||||
|
<string>taobao</string>
|
||||||
|
<string>imeituan</string>
|
||||||
|
<string>iosamap</string>
|
||||||
|
<string>alipay</string>
|
||||||
|
<string>baiduboxapp</string>
|
||||||
|
<string>vipshop</string>
|
||||||
|
<string>tmall</string>
|
||||||
|
<string>meituanwaimai</string>
|
||||||
|
<string>kwai</string>
|
||||||
|
<string>snssdk1128</string>
|
||||||
|
<string>eleme</string>
|
||||||
|
<string>qunariphone</string>
|
||||||
|
<string>diditaxi</string>
|
||||||
|
<string>lianjiabeike</string>
|
||||||
|
<string>xhsdiscover</string>
|
||||||
|
<string>dianping</string>
|
||||||
|
<string>lianjia</string>
|
||||||
|
<string>ksnebula</string>
|
||||||
|
<string>sinaweibo</string>
|
||||||
|
<string>fleamarket</string>
|
||||||
|
<string>1641486558</string>
|
||||||
|
<string>id785385147</string>
|
||||||
|
<string>id959841854</string>
|
||||||
|
<string>id959841453</string>
|
||||||
|
<string>id959840394</string>
|
||||||
|
<string>id959841113</string>
|
||||||
|
<string>id387682726</string>
|
||||||
|
<string>id959841443</string>
|
||||||
|
<string>1094591345</string>
|
||||||
|
<string>id1094591345</string>
|
||||||
|
<string>id454434967</string>
|
||||||
|
<string>id594457652</string>
|
||||||
|
<string>id1182474649</string>
|
||||||
|
<string>id1617391485</string>
|
||||||
|
<string>id1567026344</string>
|
||||||
|
<string>suning</string>
|
||||||
|
<string>baiduhaokan</string>
|
||||||
|
<string>bdminivideo</string>
|
||||||
|
<string>baiduboxlite</string>
|
||||||
|
<string>baiduboxmission</string>
|
||||||
|
<string>zhihu</string>
|
||||||
|
<string>wireless1688</string>
|
||||||
|
<string>iqiyi</string>
|
||||||
|
<string>weixin</string>
|
||||||
|
<string>qihooloan</string>
|
||||||
|
<string>weishi</string>
|
||||||
|
<string>travelguide</string>
|
||||||
|
<string>wbmain</string>
|
||||||
|
<string>taobaotravel</string>
|
||||||
|
<string>alipays</string>
|
||||||
|
<string>youku</string>
|
||||||
|
<string>openjdlite</string>
|
||||||
|
<string>cainiao</string>
|
||||||
|
<string>kaola</string>
|
||||||
|
<string>OneTravel</string>
|
||||||
|
</array>
|
||||||
|
<key>NSAppTransportSecurity</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>SKAdNetworkItems</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>kbd757ywx3.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>mls7yz5dvl.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4fzdc2evr5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4pfyvq9l8r.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ydx93a7ass.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>cg4yq2srnc.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>p78axxw29g.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>737z793b9f.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>v72qych5uu.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>6xzpu9s2p8.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ludvb6z3bs.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>mlmmfzh3r3.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>c6k4g5qg8m.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>wg4vff78zm.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>523jb4fst2.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ggvn48r87g.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>22mmun2rn5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3sh42y64q3.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>f38h382jlk.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>24t9a8vw3c.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>hs6bdukanm.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>prcb7njmu6.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>m8dbw4sv7c.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>9nlqeag3gk.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>cj5566h2ga.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>cstr6suwn9.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>w9q455wk68.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>wzmmz9fp6w.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>yclnxrl5pm.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4468km3ulz.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>t38b2kh725.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>k674qkevps.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>7ug5zh24hu.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>5lm9lj6jb7.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>9rd848q2bz.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>7rz58n8ntl.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4w7y6s5ca2.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>feyaarzu9v.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ejvt5qm6ak.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>9t245vhmpl.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>n9x2a789qt.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>44jx6755aq.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>zmvfpc5aq8.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>tl55sbb4fm.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>2u9pt9hc89.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>5a6flpkh64.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>8s468mfl3y.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>glqzh8vgby.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>av6w8kgt66.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>klf5c3l5u5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>dzg6xy7pwj.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>y45688jllp.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>hdw39hrw9y.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ppxm28t8ap.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>424m5254lk.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>5l3tpt7t6e.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>uw77j35x4d.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>4dzt52r2t5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>mtkv5xtk9e.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>gta9lk7p23.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>5tjdwbrq8w.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3rd42ekr43.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>g28c52eehv.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>su67r6k2v3.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>rx5hdcabgc.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>2fnua5tdw4.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>32z4fx6l9h.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>xy9t38ct57.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>54nzkqm89y.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>9b89h5y424.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>pwa73g5rt2.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>79pbpufp6p.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>kbmxgpxpgc.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>275upjj5gd.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>rvh3l7un93.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>qqp299437r.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>294l99pt4k.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>74b6s63p6l.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>44n7hlldy6.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>6p4ks3rnbw.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>f73kdq92p3.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>e5fvkxwrpn.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>97r2b46745.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3qcr597p9d.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>578prtvx9j.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>n6fk4nfna4.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>b9bk5wbcq9.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>84993kbrcf.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>24zw6aqk47.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>pwdxu55a5a.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>cs644xg564.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>6964rsfnh4.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>9vvzujtq5s.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>a7xqa6mtl2.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>r45fhb6rf7.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>c3frkrj4fj.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>6g9af3uyq4.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>u679fj5vs4.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>g2y4y55b64.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>zq492l623r.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>a8cz6cu7e5.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>s39g8k73mm.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>dbu4b84rxf.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>mj797d8u6f.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>v9wttpbfk9.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>ns5j362hk7.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>mqn7fxpca7.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>252b5q8x7y.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>3qy4746246.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>6yxyv74ff7.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>7fmhfwg9en.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>cwn433xbcr.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>f7s53z58qe.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>vhf287vqwu.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>x44k69ngh6.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>mp6xlyr22a.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>7953jerfzd.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>qu637u8glc.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>9yg77x724h.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SKAdNetworkIdentifier</key>
|
||||||
|
<string>n66cz3y3bx.skadnetwork</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
19
PlayBTopOn/ViewController.swift
Normal file
19
PlayBTopOn/ViewController.swift
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// ViewController.swift
|
||||||
|
// PlayBTopOn
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/11/15.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class ViewController: UIViewController {
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
19
PlayBTopOn/playB/CocoaAsyncSocket.h
Executable file
19
PlayBTopOn/playB/CocoaAsyncSocket.h
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// CocoaAsyncSocket.h
|
||||||
|
// CocoaAsyncSocket
|
||||||
|
//
|
||||||
|
// Created by Derek Clarkson on 10/08/2015.
|
||||||
|
// CocoaAsyncSocket project is in the public domain.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
//! Project version number for CocoaAsyncSocket.
|
||||||
|
FOUNDATION_EXPORT double cocoaAsyncSocketVersionNumber;
|
||||||
|
|
||||||
|
//! Project version string for CocoaAsyncSocket.
|
||||||
|
FOUNDATION_EXPORT const unsigned char cocoaAsyncSocketVersionString[];
|
||||||
|
|
||||||
|
|
||||||
|
#import "GCD/GCDAsyncUdpSocket.h"
|
||||||
|
|
||||||
1036
PlayBTopOn/playB/GCD/GCDAsyncUdpSocket.h
Executable file
1036
PlayBTopOn/playB/GCD/GCDAsyncUdpSocket.h
Executable file
File diff suppressed because it is too large
Load Diff
5632
PlayBTopOn/playB/GCD/GCDAsyncUdpSocket.m
Executable file
5632
PlayBTopOn/playB/GCD/GCDAsyncUdpSocket.m
Executable file
File diff suppressed because it is too large
Load Diff
27
PlayBTopOn/playB/XUDPClient.h
Normal file
27
PlayBTopOn/playB/XUDPClient.h
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
//
|
||||||
|
// XUDPClient.h
|
||||||
|
// xcmd
|
||||||
|
//
|
||||||
|
// Created by mac on 2025/2/17.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef XUDPClient_h
|
||||||
|
#define XUDPClient_h
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
#import "CocoaAsyncSocket.h"
|
||||||
|
|
||||||
|
typedef void (^SendCallback) (NSString *msg);
|
||||||
|
|
||||||
|
@interface XUDPClient : NSObject<GCDAsyncUdpSocketDelegate>
|
||||||
|
|
||||||
|
@property (nonatomic, copy) SendCallback hintBlock;
|
||||||
|
|
||||||
|
|
||||||
|
+(instancetype)sharedInstance;
|
||||||
|
- (void) onShow: (NSDictionary *)data;
|
||||||
|
- (void) onEnd: (NSDictionary *)data;
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif /* XUDPClient_h */
|
||||||
143
PlayBTopOn/playB/XUDPClient.m
Normal file
143
PlayBTopOn/playB/XUDPClient.m
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
//
|
||||||
|
// XUDPClient.m
|
||||||
|
// xcmd
|
||||||
|
//
|
||||||
|
// Created by mac on 2025/2/17.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
#import "XUDPClient.h"
|
||||||
|
|
||||||
|
#define HOST @"127.0.0.1"
|
||||||
|
#define PORT 6001
|
||||||
|
|
||||||
|
|
||||||
|
@interface XUDPClient() {
|
||||||
|
@private
|
||||||
|
GCDAsyncUdpSocket *_udpSocket;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation XUDPClient
|
||||||
|
+(instancetype)sharedInstance
|
||||||
|
{
|
||||||
|
static XUDPClient* _sharedInstance = nil;
|
||||||
|
static dispatch_once_t oncePredicate;
|
||||||
|
dispatch_once (&oncePredicate, ^{
|
||||||
|
_sharedInstance = [[XUDPClient alloc] init];
|
||||||
|
});
|
||||||
|
return _sharedInstance;
|
||||||
|
}
|
||||||
|
-(instancetype)init {
|
||||||
|
if (self = [super init]) {
|
||||||
|
[self start];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) start
|
||||||
|
{
|
||||||
|
if (!_udpSocket)
|
||||||
|
{
|
||||||
|
_udpSocket=nil;
|
||||||
|
}
|
||||||
|
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||||
|
_udpSocket = [[GCDAsyncUdpSocket alloc]initWithDelegate:self delegateQueue:queue];
|
||||||
|
NSError *error = nil;
|
||||||
|
if (![_udpSocket bindToPort:0 error:&error])
|
||||||
|
{
|
||||||
|
NSLog(@"Error binding: %@", error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (![_udpSocket beginReceiving:&error])
|
||||||
|
{
|
||||||
|
NSLog(@"Error receiving: %@", error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- (void) close
|
||||||
|
{
|
||||||
|
if(_udpSocket) {
|
||||||
|
[_udpSocket closeAfterSending];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- (NSString *)dic2Json: (NSDictionary *)dict {
|
||||||
|
NSError *error;
|
||||||
|
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dict
|
||||||
|
options:NSJSONWritingPrettyPrinted
|
||||||
|
error:&error];
|
||||||
|
if (error) {
|
||||||
|
NSLog(@"dic2json err:%@", error);
|
||||||
|
}
|
||||||
|
return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) onShow: (NSDictionary *)data {
|
||||||
|
NSDictionary *rq = @{
|
||||||
|
@"url": @"/adtask/show",
|
||||||
|
@"body": data
|
||||||
|
};
|
||||||
|
[self send:[self dic2Json: rq]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) onEnd: (NSDictionary *)data {
|
||||||
|
NSDictionary *rq = @{
|
||||||
|
@"url": @"/adtask/end",
|
||||||
|
@"body": data
|
||||||
|
};
|
||||||
|
[self send:[self dic2Json: rq]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) send: (NSString*) msg {
|
||||||
|
NSData *data = [msg dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
[_udpSocket sendData:data toHost:HOST port:PORT withTimeout:-1 tag:300];
|
||||||
|
}
|
||||||
|
-(void)udpSocket:(GCDAsyncUdpSocket *)sock didConnectToAddress:(NSData *)address
|
||||||
|
{
|
||||||
|
NSError *error = nil;
|
||||||
|
NSLog(@"Message didConnectToAddress: %@",[[NSString alloc]initWithData:address encoding:NSUTF8StringEncoding]);
|
||||||
|
[_udpSocket beginReceiving:&error];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)udpSocket:(GCDAsyncUdpSocket *)sock didNotConnect:(NSError *)error
|
||||||
|
{
|
||||||
|
NSLog(@"Message didNotConnect: %@",error);
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)udpSocket:(GCDAsyncUdpSocket *)sock didNotSendDataWithTag:(long)tag dueToError:(NSError *)error
|
||||||
|
{
|
||||||
|
NSLog(@"Message didNotSendDataWithTag: %@",error);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSDictionary *) json2dic: (NSString *) jsstr {
|
||||||
|
NSError *jsonError;
|
||||||
|
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:[jsstr dataUsingEncoding:NSUTF8StringEncoding]
|
||||||
|
options:NSJSONReadingMutableContainers
|
||||||
|
error:&jsonError];
|
||||||
|
if (jsonError) {
|
||||||
|
NSLog(@"json2dic error: %@", jsonError);
|
||||||
|
}
|
||||||
|
return dic;
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)udpSocket:(GCDAsyncUdpSocket *)sock didReceiveData:(NSData *)data fromAddress:(NSData *)address withFilterContext:(id)filterContext
|
||||||
|
{
|
||||||
|
NSString *revDada =[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
|
||||||
|
NSLog(@"Message didReceiveData :%@", revDada);
|
||||||
|
if(self.hintBlock) {
|
||||||
|
self.hintBlock(revDada);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)udpSocket:(GCDAsyncUdpSocket *)sock didSendDataWithTag:(long)tag
|
||||||
|
{
|
||||||
|
NSLog(@"Message 发送成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
1362
PlayBTopOn/playB/YL_NetWorkManager.swift
Normal file
1362
PlayBTopOn/playB/YL_NetWorkManager.swift
Normal file
File diff suppressed because it is too large
Load Diff
155
PlayBTopOn/playB/YL_PlayVC.swift
Normal file
155
PlayBTopOn/playB/YL_PlayVC.swift
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
//
|
||||||
|
// YL_PlayVC.swift
|
||||||
|
// playbtest
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/11/5.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
import AnyThinkInterstitial
|
||||||
|
class YL_PlayVC: UIViewController {
|
||||||
|
|
||||||
|
@IBOutlet weak var textSDKView: UITextView!
|
||||||
|
@IBOutlet weak var bundleIdLab: UILabel!
|
||||||
|
@IBOutlet weak var deviceIdLab: UILabel!
|
||||||
|
@IBOutlet weak var ipLab: UILabel!
|
||||||
|
@IBOutlet weak var idfaLab: UILabel!
|
||||||
|
@IBOutlet weak var ad1Lab: UILabel!
|
||||||
|
@IBOutlet weak var ad2Lab: UILabel!
|
||||||
|
@IBOutlet weak var ad3Lab: UILabel!
|
||||||
|
|
||||||
|
private var observation: NSKeyValueObservation?
|
||||||
|
|
||||||
|
private var observationis: NSKeyValueObservation?
|
||||||
|
|
||||||
|
var openADTimer:Timer?
|
||||||
|
let kOpenADPerSec: CGFloat = 0.1 // 假设的秒数
|
||||||
|
let kOpenAdCTimeLength: CGFloat = 30 // 假设的超时时长
|
||||||
|
|
||||||
|
static var totalTimeC: CGFloat = 0.0
|
||||||
|
var firstShow = true
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
|
||||||
|
BbbAdManager.shared.loadAd(view:self)
|
||||||
|
let bundleId = Bundle.main.bundleIdentifier ?? ""
|
||||||
|
bundleIdLab.text = "Name:\(bundleId)"
|
||||||
|
let deviceId = BbbAdManager.config.adbrush_deviceid ?? ""
|
||||||
|
deviceIdLab.text = "DeviceID:\(deviceId)"
|
||||||
|
let locIp = BbbAdManager.config.adbrush_localip ?? ""
|
||||||
|
let remoteIp = BbbAdManager.config.remouteIP
|
||||||
|
ipLab.text = "LocIP:\(locIp),RemoteIp:\(remoteIp)"
|
||||||
|
|
||||||
|
if #available(iOS 14, *) {
|
||||||
|
IDFA.shared.checkATT { idfa in
|
||||||
|
if let idfa = idfa {
|
||||||
|
print("IDFA: \(idfa)")
|
||||||
|
self.idfaLab.text = "IDFA:\(idfa)"
|
||||||
|
} else {
|
||||||
|
print("无法获取 IDFA")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
IDFA.shared.getIDFAForOlderVersions { idfa in
|
||||||
|
if let idfa = idfa {
|
||||||
|
print("IDFA: \(idfa)")
|
||||||
|
self.idfaLab.text = "IDFA:\(idfa)"
|
||||||
|
} else {
|
||||||
|
print("无法获取 IDFA")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BbbAdManager.shared.start()
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
super.viewWillAppear(animated)
|
||||||
|
if (!firstShow) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
firstShow = false
|
||||||
|
|
||||||
|
ad1Lab.text = BbbAdManager.config.adids[0]
|
||||||
|
ad2Lab.text = BbbAdManager.config.adids[1]
|
||||||
|
ad3Lab.text = BbbAdManager.config.adids[2]
|
||||||
|
|
||||||
|
|
||||||
|
self.navigationController?.navigationBar.isHidden = true
|
||||||
|
|
||||||
|
NotificationCenter.default.addObserver(self, selector: #selector(addTextToTextView), name: NSNotification.Name("adinfo"), object: nil)
|
||||||
|
|
||||||
|
NotificationCenter.default.addObserver(self, selector: #selector(adStatusChange), name: NSNotification.Name("adStatus"), object: nil)
|
||||||
|
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "adbrush_base_url:\(BbbAdManager.config.adbrush_base_url),adbrush_deviceid:\(String(describing: BbbAdManager.config.adbrush_deviceid)),adbrush_localip:\(String(describing: BbbAdManager.config.adbrush_localip)),adbrush_local_url:\(BbbAdManager.config.adbrush_local_url),adbrush_ecpm:\(BbbAdManager.config.adbrush_ecpm)"])
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc func addTextToTextView(notification: Notification) {
|
||||||
|
if let newText = notification.userInfo?["text"] as? String {
|
||||||
|
// 正确的方式
|
||||||
|
DispatchQueue.global().async {
|
||||||
|
// 后台线程处理数据
|
||||||
|
|
||||||
|
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
// 主线程更新UI
|
||||||
|
self.textSDKView.text.append("\(newText)\n\n")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 向文本末尾追加 100 行空白行
|
||||||
|
func appendExtraLines1() {
|
||||||
|
let extraLines = String(repeating: "\n", count: 100)
|
||||||
|
let currentText = textSDKView.text ?? ""
|
||||||
|
|
||||||
|
// 检查末尾是否已经有额外行,避免重复追加
|
||||||
|
if !currentText.hasSuffix(extraLines) {
|
||||||
|
textSDKView.text = currentText.trimmingCharacters(in: .whitespacesAndNewlines) + extraLines
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@objc func adStatusChange(notification: Notification) {
|
||||||
|
if let newText = notification.userInfo?["text"] as? String, let id = notification.userInfo?["id"] as? String {
|
||||||
|
var lab = ad1Lab
|
||||||
|
if id == BbbAdManager.config.adids[1] {
|
||||||
|
lab = ad2Lab
|
||||||
|
} else if id == BbbAdManager.config.adids[2] {
|
||||||
|
lab = ad3Lab
|
||||||
|
}
|
||||||
|
DispatchQueue.global().async {
|
||||||
|
// 后台线程处理数据
|
||||||
|
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
// 主线程更新UI
|
||||||
|
lab?.text = "\(id):\(newText)" }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
deinit {
|
||||||
|
NotificationCenter.default.removeObserver(self)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Notification.Name {
|
||||||
|
static let adStatusChanged = Notification.Name("adStatusChanged")
|
||||||
|
|
||||||
|
}
|
||||||
104
PlayBTopOn/playB/YL_PlayVC.xib
Normal file
104
PlayBTopOn/playB/YL_PlayVC.xib
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||||
|
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
|
||||||
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="YL_PlayVC" customModule="PlayBTopOn" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="ad1Lab" destination="8pI-KB-RPz" id="8gK-jO-9UZ"/>
|
||||||
|
<outlet property="ad2Lab" destination="hYm-nF-cOH" id="qND-g7-RRo"/>
|
||||||
|
<outlet property="ad3Lab" destination="qR0-SE-dDl" id="SX0-6w-Hbl"/>
|
||||||
|
<outlet property="bundleIdLab" destination="uzL-Gm-nJe" id="PLT-mH-rhM"/>
|
||||||
|
<outlet property="deviceIdLab" destination="afH-me-Sl0" id="cTn-FZ-z8s"/>
|
||||||
|
<outlet property="idfaLab" destination="DOY-uf-pQH" id="wh7-A3-jFy"/>
|
||||||
|
<outlet property="ipLab" destination="ahK-Kk-DtA" id="oe0-Rs-OLS"/>
|
||||||
|
<outlet property="textSDKView" destination="vmc-eE-E2h" id="Pil-hd-AvH"/>
|
||||||
|
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||||
|
</connections>
|
||||||
|
</placeholder>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||||
|
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="ZCJ-fb-TIS">
|
||||||
|
<rect key="frame" x="1" y="21" width="373" height="645"/>
|
||||||
|
<subviews>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="bundleIdLab" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uzL-Gm-nJe">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="373" height="20.5"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="deviceIdLab" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="afH-me-Sl0">
|
||||||
|
<rect key="frame" x="0.0" y="20.5" width="373" height="20.5"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="idfaLab" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DOY-uf-pQH">
|
||||||
|
<rect key="frame" x="0.0" y="41" width="373" height="20.5"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ipLab" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ahK-Kk-DtA">
|
||||||
|
<rect key="frame" x="0.0" y="61.5" width="373" height="20.5"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ad1Lab" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8pI-KB-RPz">
|
||||||
|
<rect key="frame" x="0.0" y="82" width="373" height="20.5"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ad2Lab" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hYm-nF-cOH">
|
||||||
|
<rect key="frame" x="0.0" y="102.5" width="373" height="20.5"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ad3Lab" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qR0-SE-dDl">
|
||||||
|
<rect key="frame" x="0.0" y="123" width="373" height="20.5"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vmc-eE-E2h">
|
||||||
|
<rect key="frame" x="0.0" y="143.5" width="373" height="501.5"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemPurpleColor"/>
|
||||||
|
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||||
|
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||||
|
</textView>
|
||||||
|
</subviews>
|
||||||
|
</stackView>
|
||||||
|
</subviews>
|
||||||
|
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="ZCJ-fb-TIS" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="1" id="DhW-gV-Eip"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="ZCJ-fb-TIS" secondAttribute="trailing" constant="1" id="Mbh-GB-cWt"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="ZCJ-fb-TIS" secondAttribute="bottom" constant="1" id="Rxy-Zg-zNH"/>
|
||||||
|
<constraint firstItem="ZCJ-fb-TIS" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="1" id="fDq-DA-QtM"/>
|
||||||
|
</constraints>
|
||||||
|
<point key="canvasLocation" x="128.98550724637681" y="-12.053571428571429"/>
|
||||||
|
</view>
|
||||||
|
</objects>
|
||||||
|
<resources>
|
||||||
|
<systemColor name="systemBackgroundColor">
|
||||||
|
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</systemColor>
|
||||||
|
<systemColor name="systemPurpleColor">
|
||||||
|
<color red="0.68627450980392157" green="0.32156862745098042" blue="0.87058823529411766" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
</systemColor>
|
||||||
|
</resources>
|
||||||
|
</document>
|
||||||
549
PlayBTopOn/playB/bbbAdManager.swift
Normal file
549
PlayBTopOn/playB/bbbAdManager.swift
Normal file
@ -0,0 +1,549 @@
|
|||||||
|
//
|
||||||
|
// bbbAdManager.swift
|
||||||
|
// playbtest
|
||||||
|
//
|
||||||
|
// Created by mac on 2025/3/11.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import AnyThinkInterstitial
|
||||||
|
import AnyThinkSDK
|
||||||
|
|
||||||
|
class bConfig: NSObject {
|
||||||
|
var appId:String = "h682ad31de9bb3"
|
||||||
|
/// 广告Key
|
||||||
|
var adKey:String = "af927fa8beee871757a1d54e560441d18"
|
||||||
|
|
||||||
|
/// 广告数组
|
||||||
|
var allAdIds:[String] = ["n682ae1dc6d1b6", "n682ae1c9416bb", "n682ae1b496431","n682ae0f785ed8"]
|
||||||
|
/// 广告数组
|
||||||
|
var adids:[String] = []
|
||||||
|
///设备ID
|
||||||
|
var adbrush_deviceid:String?
|
||||||
|
///最低ecpm
|
||||||
|
var adbrush_ecpm:Double = 0.0005
|
||||||
|
/// 本地ip
|
||||||
|
var adbrush_localip:String?
|
||||||
|
/// A面load show
|
||||||
|
var adbrush_base_url:String = "http://183.222.62.53:58078"
|
||||||
|
/// 本地服务
|
||||||
|
var adbrush_local_url:String = "http://127.0.0.1:6000"
|
||||||
|
|
||||||
|
/// 远程ip
|
||||||
|
var remouteIP:String = ""
|
||||||
|
/// dataId
|
||||||
|
var dataId:String = ""
|
||||||
|
|
||||||
|
///IDFA
|
||||||
|
var idfa:String = ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
var washParam:Bool = false
|
||||||
|
///
|
||||||
|
var linkId:String = ""
|
||||||
|
|
||||||
|
///load次数
|
||||||
|
var loadcount:Int = 0
|
||||||
|
///load次数
|
||||||
|
var loadcount1:Int = 0
|
||||||
|
|
||||||
|
var ipTime:Int = 0
|
||||||
|
|
||||||
|
override init() {
|
||||||
|
super.init()
|
||||||
|
|
||||||
|
if self.allAdIds.count > 3 {
|
||||||
|
self.adids = Array(self.allAdIds.shuffled().prefix(3))
|
||||||
|
} else {
|
||||||
|
self.adids = self.allAdIds
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
///是否正在展示中
|
||||||
|
@objc dynamic var isadsureshow:Bool = false
|
||||||
|
|
||||||
|
|
||||||
|
func getRandomString() -> String? {
|
||||||
|
return adids.randomElement()
|
||||||
|
}
|
||||||
|
// 判断当前是否为广告不量模式
|
||||||
|
func isADSSMode() -> Bool {
|
||||||
|
// return true
|
||||||
|
return UserDefaults.standard.bool(forKey: "kLuxSSFaceKey")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AdItem :NSObject, ATInterstitialDelegate {
|
||||||
|
|
||||||
|
|
||||||
|
func didFinishLoadingAD(withPlacementID placementID: String!) {
|
||||||
|
BbbAdManager.config.loadcount1 += 1
|
||||||
|
NSLog("XS- didFinishLoadingAD\(String(describing: placementID))")
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "加载广告1: \(String(describing: placementID)) 成功 - \(BbbAdManager.config.loadcount1)"])
|
||||||
|
changeStatus(st: 2)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// var interstitialAd:MAInterstitialAd!
|
||||||
|
var interstitialAdID: String = ""
|
||||||
|
|
||||||
|
var retryAttempt = 0.0
|
||||||
|
|
||||||
|
// 定义广告关闭后的操作闭包
|
||||||
|
var _onAdClosed: (() -> Void)?
|
||||||
|
var onStatusChange:((_:String,_:Int, _:Double) -> Void)?
|
||||||
|
|
||||||
|
var startLoadTime: DispatchTime?
|
||||||
|
|
||||||
|
// 0: 初始,1:加载中,2:加载完成,3:展示中,4:关闭,5:加载失败,6:展示失败
|
||||||
|
private(set) var status: Int = 0
|
||||||
|
|
||||||
|
private(set) var ecpm:Double = 0.0
|
||||||
|
|
||||||
|
|
||||||
|
init(adID:String){
|
||||||
|
|
||||||
|
super.init()
|
||||||
|
self.interstitialAdID = adID
|
||||||
|
// loadInterstitialAd()
|
||||||
|
|
||||||
|
}
|
||||||
|
func onAdClosed() {
|
||||||
|
if self._onAdClosed != nil {
|
||||||
|
self._onAdClosed!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func changeStatus(st:Int) {
|
||||||
|
self.status = st
|
||||||
|
onStatusChange?(self.interstitialAdID, st, self.ecpm)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func loadInterstitialAd(){
|
||||||
|
NSLog("XS- placementIDLoad 1: ---- \(interstitialAdID)")
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text":"begin load:\(interstitialAdID)"])
|
||||||
|
|
||||||
|
startLoadTime = DispatchTime.now()
|
||||||
|
changeStatus(st: 1)
|
||||||
|
let extra: [String: Any] = [
|
||||||
|
kATAdLoadingExtraMediaExtraKey: "custom_values"
|
||||||
|
]
|
||||||
|
|
||||||
|
ATAdManager.shared().loadAD(withPlacementID: interstitialAdID, extra: extra, delegate: self)
|
||||||
|
NSLog("XS- placementIDLoad 2: ---- \(interstitialAdID)")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func showAd(viewController:UIViewController, onAdClosed: @escaping () -> Void) -> Bool{
|
||||||
|
self._onAdClosed = onAdClosed
|
||||||
|
NSLog("XS- onAdClosed set: \(self._onAdClosed != nil)")
|
||||||
|
if ATAdManager.shared().interstitialReady(forPlacementID: interstitialAdID) {
|
||||||
|
ATAdManager.shared().showInterstitial(withPlacementID: interstitialAdID, in: viewController, delegate: self)
|
||||||
|
NSLog("XS- placementIDShow : ---- \(interstitialAdID)")
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
NSLog("XS- interstitialAdID no redy 插页广告尚未准备好")
|
||||||
|
// retryLoadAdIfNecessary()
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func to_network(_ network: Int) -> String {
|
||||||
|
switch network {
|
||||||
|
case 6:
|
||||||
|
return "Mintegral"
|
||||||
|
case 11:
|
||||||
|
return "Ironsource"
|
||||||
|
case 12:
|
||||||
|
return "UnityAds"
|
||||||
|
case 13:
|
||||||
|
return "Vungle"
|
||||||
|
case 50:
|
||||||
|
return "Pangle"
|
||||||
|
default:
|
||||||
|
return "Mintegral"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 完成加载广告
|
||||||
|
func didFinishLoadingADSource(withPlacementID placementID: String!,extra: [AnyHashable : Any]?) {
|
||||||
|
|
||||||
|
BbbAdManager.config.loadcount += 1
|
||||||
|
|
||||||
|
|
||||||
|
var thatecpm = 0.0
|
||||||
|
if let adsourcePriceValue = extra?["adsource_price"] as? NSNumber {
|
||||||
|
thatecpm = Double(Float(truncating: adsourcePriceValue) / 1000)
|
||||||
|
} else {
|
||||||
|
NSLog("XS- not get type adsource_price or type not match")
|
||||||
|
}
|
||||||
|
if thatecpm > self.ecpm {
|
||||||
|
self.ecpm = thatecpm
|
||||||
|
}
|
||||||
|
NSLog("XS- ad load ok:\(BbbAdManager.config.linkId) - \(String(describing: placementID)) ecpm:\(self.ecpm * 1000)")
|
||||||
|
// 计算并打印加载时间
|
||||||
|
var time = 0
|
||||||
|
if let startTime = startLoadTime {
|
||||||
|
let loadDuration = calculateElapsedTime(since: startTime)
|
||||||
|
NSLog("XS- ad \(String(describing: placementID)) load time: \(loadDuration) ms")
|
||||||
|
time = loadDuration
|
||||||
|
}
|
||||||
|
|
||||||
|
let networkID:Int = extra?["network_firm_id"] as! Int
|
||||||
|
let network = to_network(networkID)
|
||||||
|
let country = extra?["country"] ?? ""
|
||||||
|
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "加载广告: \(String(describing: placementID)) 成功 - \(network), ecpm:\(self.ecpm * 1000) \(country) \(BbbAdManager.config.loadcount)"])
|
||||||
|
retryAttempt = 0 // 重置重试次数
|
||||||
|
|
||||||
|
DispatchQueue.global(qos: .utility).async { [weak self] in
|
||||||
|
guard self != nil else { return }
|
||||||
|
YL_NetWorkManager.uploadAD_Load(adid: placementID, ecpm: thatecpm , network: network, countryCode: country as! String, platformResponseTime: TimeInterval(time/1000) , dsp: "MTG", loadTime: time)
|
||||||
|
}
|
||||||
|
// 发布广告加载成功通知
|
||||||
|
// NotificationCenter.default.post(name: .adDidLoad, object: nil, userInfo: ["adId": ad.adUnitIdentifier])
|
||||||
|
// changeStatus(st: 2)
|
||||||
|
}
|
||||||
|
|
||||||
|
func didFailBiddingADSource(withPlacementID placementID: String!,extra: [AnyHashable : Any]?, error: (any Error)!) {
|
||||||
|
// BbbAdManager.config.loadcount += 1
|
||||||
|
NSLog("XS- load \(String(describing: placementID)) err.... :\(String(describing: error))")
|
||||||
|
/*
|
||||||
|
var time = 0
|
||||||
|
|
||||||
|
if let startTime = startLoadTime {
|
||||||
|
let loadDuration = calculateElapsedTime(since: startTime)
|
||||||
|
NSLog("XS- ad \(String(describing: placementID)) load time: \(loadDuration) ms")
|
||||||
|
time = loadDuration
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DispatchQueue.global(qos: .utility).async { [weak self] in
|
||||||
|
guard self != nil else { return }
|
||||||
|
YL_NetWorkManager.uploadAD_Load(adid: placementID, ecpm: 0.0 , network: "", countryCode: "", platformResponseTime: TimeInterval(time/1000) , dsp: "MTG", loadTime: time,errMsg: "\(String(describing: error))")
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "bidding error:\(String(describing: placementID) ),\(String(describing: error)) 失败"])
|
||||||
|
// self.onAdClosed()
|
||||||
|
// changeStatus(st: 5)
|
||||||
|
}
|
||||||
|
|
||||||
|
func didFailToLoadAD(withPlacementID placementID: String!, error: (any Error)!) {
|
||||||
|
BbbAdManager.config.loadcount += 1
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "加载:\(String(describing: placementID) ),\(String(describing: error)) 失败"])
|
||||||
|
NSLog("XS- load\(String(describing: placementID)) err.... :\(String(describing: error))")
|
||||||
|
// NotificationCenter.default.post(name: .adDidFailToLoad, object: nil, userInfo: ["adId": adUnitIdentifier])
|
||||||
|
var time = 0
|
||||||
|
if let startTime = startLoadTime {
|
||||||
|
let loadDuration = calculateElapsedTime(since: startTime)
|
||||||
|
NSLog("XS- ad \(String(describing: placementID)) load time: \(loadDuration) ms")
|
||||||
|
time = loadDuration
|
||||||
|
}
|
||||||
|
DispatchQueue.global(qos: .utility).async { [weak self] in
|
||||||
|
guard self != nil else { return }
|
||||||
|
YL_NetWorkManager.uploadAD_Load(adid: placementID, ecpm: 0.0 , network: "", countryCode: "", platformResponseTime: TimeInterval(time/1000) , dsp: "MTG", loadTime: time,errMsg: "\(String(describing: error))")
|
||||||
|
}
|
||||||
|
// self.onAdClosed()
|
||||||
|
changeStatus(st: 5)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
func didFailToLoadADSource(withPlacementID placementID: String!,extra: [AnyHashable : Any]?, error: (any Error)!) {
|
||||||
|
BbbAdManager.config.loadcount += 1
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "加载:\(String(describing: placementID) ),\(String(describing: error)) 失败"])
|
||||||
|
NSLog("XS- load\(String(describing: placementID)) err.... :\(String(describing: error))")
|
||||||
|
// NotificationCenter.default.post(name: .adDidFailToLoad, object: nil, userInfo: ["adId": adUnitIdentifier])
|
||||||
|
var thatecpm = 0.0
|
||||||
|
if let adsourcePriceValue = extra?["adsource_price"] as? NSNumber{
|
||||||
|
thatecpm = Double(Float(truncating: adsourcePriceValue) / 1000)
|
||||||
|
} else {
|
||||||
|
NSLog("XS- not get type adsource_price or type not match")
|
||||||
|
}
|
||||||
|
// self.ecpm = thatecpm
|
||||||
|
|
||||||
|
// 计算并打印加载时间
|
||||||
|
var time = 0
|
||||||
|
if let startTime = startLoadTime {
|
||||||
|
let loadDuration = calculateElapsedTime(since: startTime)
|
||||||
|
NSLog("广告 \(String(describing: placementID)) 加载时间: \(loadDuration) ms")
|
||||||
|
time = loadDuration
|
||||||
|
}
|
||||||
|
|
||||||
|
let networkID:Int = extra?["network_firm_id"] as! Int
|
||||||
|
let network = to_network(networkID)
|
||||||
|
let country = extra?["country"] ?? ""
|
||||||
|
|
||||||
|
DispatchQueue.global(qos: .utility).async { [weak self] in
|
||||||
|
guard self != nil else { return }
|
||||||
|
YL_NetWorkManager.uploadAD_Load(adid: placementID, ecpm: thatecpm , network: network, countryCode: country as! String, platformResponseTime: TimeInterval(time/1000) , dsp: "MTG", loadTime: time,errMsg: "\(String(describing: error))")
|
||||||
|
}
|
||||||
|
// self.onAdClosed()
|
||||||
|
changeStatus(st: 5)
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 展示广告
|
||||||
|
func interstitialDidShow(forPlacementID placementID: String, extra: [AnyHashable : Any]) {
|
||||||
|
NSLog("XS- show ok ad\(placementID)")
|
||||||
|
// NotificationCenter.default.post(name: .adDidDisplay, object: nil, userInfo: ["adId": ad.adUnitIdentifier])
|
||||||
|
|
||||||
|
// let currentIDFV = UIDevice.current.identifierForVendor?.uuidString
|
||||||
|
var ecpmprice: Double?
|
||||||
|
if let adsourcePriceValue = extra["adsource_price"] as? NSNumber{
|
||||||
|
|
||||||
|
ecpmprice = Double(Float(truncating: adsourcePriceValue)) / 1000
|
||||||
|
|
||||||
|
} else {
|
||||||
|
NSLog("XS- not get type adsource_price or type not match")
|
||||||
|
}
|
||||||
|
|
||||||
|
let networkID = extra["network_firm_id"] as! Int
|
||||||
|
let network = to_network(networkID)
|
||||||
|
let country = extra["country"] ?? ""
|
||||||
|
// let currentIDFV = UIDevice.current.identifierForVendor?.uuidString
|
||||||
|
|
||||||
|
DispatchQueue.global(qos: .utility).async { [weak self] in
|
||||||
|
guard self != nil else { return }
|
||||||
|
YL_NetWorkManager.showAd(adId: placementID, ecpm: ecpmprice, ad: true) {
|
||||||
|
self?.changeStatus(st: 4)
|
||||||
|
NSLog("XS- close ad ok\(placementID)")
|
||||||
|
self?.onAdClosed()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DispatchQueue.global(qos: .utility).async { [weak self] in
|
||||||
|
guard self != nil else { return }
|
||||||
|
YL_NetWorkManager.uploadAD_Show(adid: placementID, ecpm: ecpmprice ?? 0.0, network: network, countryCode: country as! String, platformResponseTime:0 , dsp: "MTG")
|
||||||
|
}
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "成功展示了ad\(placementID)"])
|
||||||
|
|
||||||
|
changeStatus(st: 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
func interstitialDidClose(forPlacementID placementID: String, extra: [AnyHashable : Any]) {
|
||||||
|
changeStatus(st: 4)
|
||||||
|
NSLog("XS- close ad ok\(placementID)")
|
||||||
|
self.onAdClosed()
|
||||||
|
}
|
||||||
|
|
||||||
|
func interstitialDidClick(forPlacementID placementID: String, extra: [AnyHashable: Any]) {
|
||||||
|
NSLog("XS- ad click ok\(placementID)")
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
func didFail(toDisplay ad: MAAd, withError error: MAError) {
|
||||||
|
changeStatus(st: 6)
|
||||||
|
print("展示广告\(ad.adUnitIdentifier),\(error)失败")
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "展示广告\(ad.adUnitIdentifier),\(error)失败"])
|
||||||
|
self.onAdClosed!()
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
// 辅助函数以毫秒为单位计算经过的时间
|
||||||
|
private func calculateElapsedTime(since startTime: DispatchTime) -> Int {
|
||||||
|
let endTime = DispatchTime.now()
|
||||||
|
let nanoseconds = endTime.uptimeNanoseconds - startTime.uptimeNanoseconds
|
||||||
|
return Int(nanoseconds / 1_000_000) // 转换为毫秒
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class BbbAdManager: NSObject {
|
||||||
|
static let shared = BbbAdManager()
|
||||||
|
static let config = bConfig()
|
||||||
|
|
||||||
|
///是否正在展示中
|
||||||
|
@objc dynamic var isshow:Bool = false
|
||||||
|
|
||||||
|
// 用于存储多个广告位的管理器,Key 是广告位的 ID
|
||||||
|
private var adItems: [String: AdItem] = [:]
|
||||||
|
|
||||||
|
var openADTimer:Timer?
|
||||||
|
let kOpenADPerSec: CGFloat = 1 // 假设的秒数
|
||||||
|
let kOpenAdCTimeLength: CGFloat = 60 // 假设的超时时长
|
||||||
|
private var view:UIViewController?
|
||||||
|
|
||||||
|
static var totalTimeC: CGFloat = 0.0
|
||||||
|
|
||||||
|
var isLoaded = false
|
||||||
|
|
||||||
|
// 添加广告位管理器
|
||||||
|
func add(adId: String) {
|
||||||
|
let adManager = AdItem(adID: adId)
|
||||||
|
adManager.onStatusChange = {id, st, ecpm in
|
||||||
|
// 0: 初始,1:加载中,2:加载完成,3:展示中,4:关闭,5:加载失败,6:展示失败
|
||||||
|
var text = "初始"
|
||||||
|
if st == 1 {
|
||||||
|
text = "加载中"
|
||||||
|
} else if st == 2 {
|
||||||
|
text = "加载完成"
|
||||||
|
}
|
||||||
|
else if st == 3 {
|
||||||
|
text = "展示中"
|
||||||
|
}
|
||||||
|
else if st == 4 {
|
||||||
|
text = "关闭"
|
||||||
|
}
|
||||||
|
else if st == 5 {
|
||||||
|
text = "加载失败"
|
||||||
|
}
|
||||||
|
else if st == 6 {
|
||||||
|
text = "展示失败"
|
||||||
|
}
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adStatus"), object: nil, userInfo: ["id": id, "text":"\(text),ecpm:\(ecpm * 1000)"])
|
||||||
|
}
|
||||||
|
adItems[adId] = adManager
|
||||||
|
adManager.loadInterstitialAd()
|
||||||
|
}
|
||||||
|
|
||||||
|
override init(){
|
||||||
|
|
||||||
|
super.init()
|
||||||
|
if BbbAdManager.config.isADSSMode() {
|
||||||
|
self.initConfig()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func initConfig () {
|
||||||
|
if #available(iOS 14, *) {
|
||||||
|
IDFA.shared.checkATT { idfa in
|
||||||
|
if let idfa = idfa {
|
||||||
|
NSLog("IDFA: \(idfa)")
|
||||||
|
BbbAdManager.config.idfa = idfa
|
||||||
|
} else {
|
||||||
|
NSLog("无法获取 IDFA")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
IDFA.shared.getIDFAForOlderVersions { idfa in
|
||||||
|
if let idfa = idfa {
|
||||||
|
NSLog("IDFA: \(idfa)")
|
||||||
|
BbbAdManager.config.idfa = idfa
|
||||||
|
} else {
|
||||||
|
NSLog("无法获取 IDFA")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if let bfaceDict = UserDefaults.standard.dictionary(forKey: "bfaceDictKey"){
|
||||||
|
|
||||||
|
BbbAdManager.config.adbrush_base_url = bfaceDict["adbrush_base_url"] as? String ?? "http://183.222.62.53:58078"
|
||||||
|
|
||||||
|
BbbAdManager.config.adbrush_deviceid = bfaceDict["adbrush_deviceid"] as? String ?? ""
|
||||||
|
BbbAdManager.config.adbrush_localip = bfaceDict["adbrush_localip"] as? String ?? ""
|
||||||
|
BbbAdManager.config.remouteIP = bfaceDict["remouteIP"] as? String ?? ""
|
||||||
|
|
||||||
|
|
||||||
|
BbbAdManager.config.adbrush_local_url = bfaceDict["adbrush_local_url"] as? String ?? "http://127.0.0.1:6000"
|
||||||
|
BbbAdManager.config.dataId = bfaceDict["dataId"] as? String ?? ""
|
||||||
|
|
||||||
|
|
||||||
|
BbbAdManager.config.adbrush_ecpm = bfaceDict["adbrush_ecpm"] as? Double ?? 0.005
|
||||||
|
BbbAdManager.config.linkId = bfaceDict["linkId"] as? String ?? ""
|
||||||
|
BbbAdManager.config.washParam = bfaceDict["washParam"] as? Bool ?? false
|
||||||
|
} else {
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "获取字典失败"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func initAd() {
|
||||||
|
NSLog("XS- init ad")
|
||||||
|
initializationTopOn.toponeSDK(BbbAdManager.config.appId,appKey: BbbAdManager.config.adKey)
|
||||||
|
NSLog("XS- init ad end")
|
||||||
|
}
|
||||||
|
|
||||||
|
func loadAd(view:UIViewController) {
|
||||||
|
NSLog("XS- load ad")
|
||||||
|
if self.isLoaded {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
self.isLoaded = true
|
||||||
|
self.view = view
|
||||||
|
if BbbAdManager.config.washParam == true{
|
||||||
|
for (_, adId) in BbbAdManager.config.adids.enumerated() {
|
||||||
|
|
||||||
|
BbbAdManager.shared.add(adId: adId)
|
||||||
|
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
for (_, adId) in BbbAdManager.config.adids.enumerated() {
|
||||||
|
NSLog("XS- ad load start:\(BbbAdManager.config.linkId) - \(adId)")
|
||||||
|
BbbAdManager.shared.add(adId: adId)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
NSLog("XS- load ad")
|
||||||
|
}
|
||||||
|
func start() {
|
||||||
|
guard openADTimer == nil else { return }
|
||||||
|
openADTimer = Timer.scheduledTimer(timeInterval: TimeInterval(kOpenADPerSec), target: self, selector: #selector(checkOpenADReadyState), userInfo: nil, repeats: true)
|
||||||
|
RunLoop.current.add(openADTimer!, forMode: .common)
|
||||||
|
}
|
||||||
|
func isEnd () -> Bool {
|
||||||
|
NSLog("XS- ad end")
|
||||||
|
if(self.isshow) {
|
||||||
|
NSLog("XS- ad end 1")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
for (_, ad) in BbbAdManager.shared.adItems {
|
||||||
|
if(ad.status == 1) {
|
||||||
|
NSLog("XS- ad end 2")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (ad.status == 2 && ad.ecpm >= BbbAdManager.config.adbrush_ecpm) {
|
||||||
|
NSLog("XS- ad end 3")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
NSLog("XS- ad end 4")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
func showAd(v:UIViewController) {
|
||||||
|
if(self.isshow == false) {
|
||||||
|
for (_, ad) in BbbAdManager.shared.adItems {
|
||||||
|
NSLog("XS- ad info:\(ad.interstitialAdID), ecpm:\(ad.ecpm * 1000)")
|
||||||
|
if (ad.status == 2 && ad.ecpm >= BbbAdManager.config.adbrush_ecpm) {
|
||||||
|
self.isshow = ad.showAd(viewController: v) { [weak self] in
|
||||||
|
NSLog("XS- ad close")
|
||||||
|
self!.isshow = false
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func closeAd(v:Int) {
|
||||||
|
initializationTopOn.removeADVC(byDelayTime: v, onclose:{
|
||||||
|
for (_, ad) in BbbAdManager.shared.adItems {
|
||||||
|
if(ad.status == 3) {
|
||||||
|
ad.changeStatus(st: 4)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
self.isshow = false
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc func checkOpenADReadyState(){
|
||||||
|
BbbAdManager.totalTimeC += kOpenADPerSec
|
||||||
|
|
||||||
|
if (self.isEnd() && BbbAdManager.totalTimeC > 8) || BbbAdManager.totalTimeC >= kOpenAdCTimeLength {
|
||||||
|
openADTimer?.invalidate()
|
||||||
|
openADTimer = nil
|
||||||
|
DispatchQueue.global().async { [weak self] in
|
||||||
|
guard self != nil else { return }
|
||||||
|
YL_NetWorkManager.loadend(max_ecpm: 0)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if self.isshow == false{
|
||||||
|
self.showAd(v: self.view!)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
154
PlayBTopOn/playB/getIphone.swift
Normal file
154
PlayBTopOn/playB/getIphone.swift
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
//
|
||||||
|
// getIphone.swift
|
||||||
|
// playbtest
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/12/31.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class getIpne {
|
||||||
|
static var shard = getIpne()
|
||||||
|
private init() {}
|
||||||
|
|
||||||
|
func getIPhoneModel() -> iPhoneModel {
|
||||||
|
var systemInfo = utsname()
|
||||||
|
uname(&systemInfo)
|
||||||
|
|
||||||
|
let machineMirror = Mirror(reflecting: systemInfo.machine)
|
||||||
|
let identifier = machineMirror.children.reduce("") { identifier, element in
|
||||||
|
guard let value = element.value as? Int8, value != 0 else { return identifier }
|
||||||
|
return identifier + String(UnicodeScalar(UInt8(value)))
|
||||||
|
}
|
||||||
|
|
||||||
|
switch identifier {
|
||||||
|
case "iPhone5,1", "iPhone5,2": return .iPhone5
|
||||||
|
case "iPhone5,3", "iPhone5,4": return .iPhone5C
|
||||||
|
case "iPhone6,1", "iPhone6,2": return .iPhone5S
|
||||||
|
case "iPhone7.2": return .iPhone6
|
||||||
|
case "iPhone7,1": return .iPhone6Plus
|
||||||
|
case "iPhone8,1": return .iPhone6s
|
||||||
|
case "iPhone8,2": return .iPhone6Plus
|
||||||
|
case "iPhone8,4": return .iPhoneSE1
|
||||||
|
case "iPhone9,1", "iPhone9,3": return .iPhone7
|
||||||
|
case "iPhone9,2", "iPhone9,4": return .iPhone7Plus
|
||||||
|
case "iPhone10,1", "iPhone10,4": return .iPhone8
|
||||||
|
case "iPhone10,2", "iPhone10,5": return .iPhone8Plus
|
||||||
|
case "iPhone10,3", "iPhone10,6": return .iPhoneX
|
||||||
|
case "iPhone11,8": return .iPhoneXR
|
||||||
|
case "iPhone11,2": return .iPhoneXS
|
||||||
|
case "iPhone11,6", "iPhone11,4": return .iPhoneXSMax
|
||||||
|
case "iPhone12,1": return .iPhone11
|
||||||
|
case "iPhone12,3": return .iPhone11Pro
|
||||||
|
case "iPhone12,5": return .iPhone11ProMax
|
||||||
|
case "iPhone12,8": return .iPhoneSE2
|
||||||
|
case "iPhone13,1": return .iPhone12Mini
|
||||||
|
case "iPhone13,2": return .iPhone12
|
||||||
|
case "iPhone13,3": return .iPhone12Pro
|
||||||
|
case "iPhone13,4": return .iPhone12ProMax
|
||||||
|
case "iPhone14,4": return .iPhone13Mini
|
||||||
|
case "iPhone14,5": return .iPhone13
|
||||||
|
case "iPhone14,2": return .iPhone13Pro
|
||||||
|
case "iPhone14,3": return .iPhone13ProMax
|
||||||
|
case "iPhone14,6": return .iPhoneSE3
|
||||||
|
case "iPhone14,7": return .iPhone14
|
||||||
|
case "iPhone14,8": return .iPhone14Plus
|
||||||
|
case "iPhone15,2": return .iPhone14Pro
|
||||||
|
case "iPhone15,3": return .iPhone14ProMax
|
||||||
|
case "iPhone15,4": return .iPhone15
|
||||||
|
case "iPhone15,5": return .iPhone15Plus
|
||||||
|
case "iPhone16,1": return .iPhone15Pro
|
||||||
|
case "iPhone16,2": return .iPhone15ProMax
|
||||||
|
case "i386": return .simulator
|
||||||
|
case "x86_64": return .simulator
|
||||||
|
default: return .unknown
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum iPhoneModel {
|
||||||
|
case iPhone15
|
||||||
|
case iPhone15Plus
|
||||||
|
case iPhone15Pro
|
||||||
|
case iPhone15ProMax
|
||||||
|
case iPhone14
|
||||||
|
case iPhone14Plus
|
||||||
|
case iPhone14Pro
|
||||||
|
case iPhone14ProMax
|
||||||
|
case iPhone13ProMax
|
||||||
|
case iPhone13Pro
|
||||||
|
case iPhone13
|
||||||
|
case iPhone13Mini
|
||||||
|
case iPhone12ProMax
|
||||||
|
case iPhone12Pro
|
||||||
|
case iPhone12
|
||||||
|
case iPhone12Mini
|
||||||
|
case iPhone11ProMax
|
||||||
|
case iPhone11Pro
|
||||||
|
case iPhone11
|
||||||
|
case iPhoneXSMax
|
||||||
|
case iPhoneXS
|
||||||
|
case iPhoneXR
|
||||||
|
case iPhoneX
|
||||||
|
case iPhone8Plus
|
||||||
|
case iPhone8
|
||||||
|
case iPhone7Plus
|
||||||
|
case iPhone7
|
||||||
|
case iPhone6sPlus
|
||||||
|
case iPhone6s
|
||||||
|
case iPhone6Plus
|
||||||
|
case iPhone6
|
||||||
|
case iPhone5S
|
||||||
|
case iPhone5C
|
||||||
|
case iPhone5
|
||||||
|
case iPhoneSE3
|
||||||
|
case iPhoneSE2
|
||||||
|
case iPhoneSE1
|
||||||
|
case simulator
|
||||||
|
case unknown
|
||||||
|
|
||||||
|
public func getName() -> String {
|
||||||
|
switch self {
|
||||||
|
case .iPhone5: return "iPhone 5"
|
||||||
|
case .iPhone5C: return "iPhone 5C"
|
||||||
|
case .iPhone5S: return "iPhone 5S"
|
||||||
|
case .iPhone6: return "iPhone 6"
|
||||||
|
case .iPhone6Plus: return "iPhone 6 Plus"
|
||||||
|
case .iPhone6s: return "iPhone 6s"
|
||||||
|
case .iPhone6sPlus: return "iPhone 6s Plus"
|
||||||
|
case .iPhoneSE1: return "iPhone SE1"
|
||||||
|
case .iPhone7: return "iPhone 7"
|
||||||
|
case .iPhone7Plus: return "iPhone 7 Plus"
|
||||||
|
case .iPhone8: return "iPhone 8"
|
||||||
|
case .iPhone8Plus: return "iPhone 8 Plus"
|
||||||
|
case .iPhoneX: return "iPhone X"
|
||||||
|
case .iPhoneXR: return "iPhone XR"
|
||||||
|
case .iPhoneXS: return "iPhone XS"
|
||||||
|
case .iPhoneXSMax: return "iPhone XS Max"
|
||||||
|
case .iPhone11: return "iPhone 11"
|
||||||
|
case .iPhone11Pro: return "iPhone 11 Pro"
|
||||||
|
case .iPhone11ProMax: return "iPhone 11 Pro Max"
|
||||||
|
case .iPhoneSE2: return "iPhone SE2"
|
||||||
|
case .iPhone12Mini: return "iPhone 12 mini"
|
||||||
|
case .iPhone12: return "iPhone 12"
|
||||||
|
case .iPhone12Pro: return "iPhone 12 Pro"
|
||||||
|
case .iPhone12ProMax: return "iPhone 12 Pro Max"
|
||||||
|
case .iPhone13Mini: return "iPhone 13 mini"
|
||||||
|
case .iPhone13: return "iPhone 13"
|
||||||
|
case .iPhone13Pro: return "iPhone 13 Pro"
|
||||||
|
case .iPhone13ProMax: return "iPhone 13 Pro Max"
|
||||||
|
case .simulator: return "Simulator"
|
||||||
|
case .unknown: return "unknown"
|
||||||
|
case .iPhone14: return "iPhone 14"
|
||||||
|
case .iPhone14Plus: return "iPhone 14 Plus"
|
||||||
|
case .iPhone14Pro: return "iPhone 14 Pro"
|
||||||
|
case .iPhone14ProMax: return "iPhone 14 Pro Max"
|
||||||
|
case .iPhoneSE3: return "iPhone SE3"
|
||||||
|
case .iPhone15: return "iPhone 15"
|
||||||
|
case .iPhone15Plus: return "iPhone 15 Plus"
|
||||||
|
case .iPhone15Pro: return "iPhone 15 Pro"
|
||||||
|
case .iPhone15ProMax: return "iPhone 15 Pro Max"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
96
PlayBTopOn/playB/idfa.swift
Normal file
96
PlayBTopOn/playB/idfa.swift
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
//
|
||||||
|
// idfa.swift
|
||||||
|
// playbtest
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/12/31.
|
||||||
|
//
|
||||||
|
|
||||||
|
import AdSupport
|
||||||
|
import AppTrackingTransparency
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
class IDFA {
|
||||||
|
static let shared = IDFA()
|
||||||
|
|
||||||
|
/// 检查并请求 ATT 授权
|
||||||
|
@available(iOS 14, *)
|
||||||
|
func checkATT(completion: @escaping (String?) -> Void) {
|
||||||
|
let status = ATTrackingManager.trackingAuthorizationStatus
|
||||||
|
switch status {
|
||||||
|
case .notDetermined:
|
||||||
|
// 请求授权
|
||||||
|
ATTrackingManager.requestTrackingAuthorization { newStatus in
|
||||||
|
self.handleATTStatus(newStatus, completion: completion)
|
||||||
|
}
|
||||||
|
case .authorized, .denied, .restricted:
|
||||||
|
// 处理已有的状态
|
||||||
|
handleATTStatus(status, completion: completion)
|
||||||
|
@unknown default:
|
||||||
|
completion(nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 处理 ATT 授权状态
|
||||||
|
@available(iOS 14, *)
|
||||||
|
private func handleATTStatus(
|
||||||
|
_ status: ATTrackingManager.AuthorizationStatus,
|
||||||
|
completion: @escaping (String?) -> Void
|
||||||
|
) {
|
||||||
|
switch status {
|
||||||
|
case .authorized:
|
||||||
|
// 用户已授权,获取 IDFA
|
||||||
|
let idfa = ASIdentifierManager.shared().advertisingIdentifier
|
||||||
|
.uuidString
|
||||||
|
completion(idfa)
|
||||||
|
// starManager.shared.idfa = idfa
|
||||||
|
case .denied, .restricted:
|
||||||
|
// 用户拒绝或受限,返回 nil
|
||||||
|
print("用户拒绝授权或功能受限")
|
||||||
|
completion(nil)
|
||||||
|
case .notDetermined:
|
||||||
|
// 不应该出现,预防性处理
|
||||||
|
print("授权状态仍未确定")
|
||||||
|
completion(nil)
|
||||||
|
@unknown default:
|
||||||
|
completion(nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func getIDFAForOlderVersions(completion: @escaping (String?) -> Void) {
|
||||||
|
if ASIdentifierManager.shared().isAdvertisingTrackingEnabled {
|
||||||
|
let idfa = ASIdentifierManager.shared().advertisingIdentifier
|
||||||
|
.uuidString
|
||||||
|
completion(idfa)
|
||||||
|
} else {
|
||||||
|
print("广告跟踪受限")
|
||||||
|
completion(nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//func requestIDFA(completion: @escaping (String?) -> Void) {
|
||||||
|
// if #available(iOS 14.5, *) {
|
||||||
|
// // 检查跟踪授权状态
|
||||||
|
// ATTrackingManager.requestTrackingAuthorization { status in
|
||||||
|
// switch status {
|
||||||
|
// case .authorized:
|
||||||
|
// // 用户授权后,获取 IDFA
|
||||||
|
// let idfa = ASIdentifierManager.shared().advertisingIdentifier.uuidString
|
||||||
|
// completion(idfa)
|
||||||
|
// case .denied, .restricted, .notDetermined:
|
||||||
|
// // 用户拒绝、限制或未决定时,IDFA 将不可用
|
||||||
|
// completion(nil)
|
||||||
|
// @unknown default:
|
||||||
|
// completion(nil)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// // 对于 iOS 14.4 及以下版本,直接获取 IDFA
|
||||||
|
// if ASIdentifierManager.shared().isAdvertisingTrackingEnabled {
|
||||||
|
// let idfa = ASIdentifierManager.shared().advertisingIdentifier.uuidString
|
||||||
|
// completion(idfa)
|
||||||
|
// } else {
|
||||||
|
// completion(nil)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
24
PlayBTopOn/playB/initializationTopOn.h
Normal file
24
PlayBTopOn/playB/initializationTopOn.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
//
|
||||||
|
// test.h
|
||||||
|
// wallpaper_project
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/8/2.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
typedef void (^OnClose) (void);
|
||||||
|
|
||||||
|
@interface initializationTopOn : NSObject
|
||||||
|
|
||||||
|
+(void)toponeSDK:(NSString*) appId appKey:(NSString*) appKey;
|
||||||
|
|
||||||
|
+ (void)closeADWindow;
|
||||||
|
|
||||||
|
+ (void)removeADVCByDelayTime:(NSInteger)delayTime onclose: (OnClose) onclose;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
275
PlayBTopOn/playB/initializationTopOn.m
Normal file
275
PlayBTopOn/playB/initializationTopOn.m
Normal file
@ -0,0 +1,275 @@
|
|||||||
|
//
|
||||||
|
// test.m
|
||||||
|
// wallpaper_project
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/8/2.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "initializationTopOn.h"
|
||||||
|
#import <AnyThinkSDK/AnyThinkSDK.h>
|
||||||
|
#import <objc/runtime.h>
|
||||||
|
//#import <PAGWKWebView.h>
|
||||||
|
|
||||||
|
@interface initializationTopOn ()
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation initializationTopOn
|
||||||
|
|
||||||
|
//CC336043-9320-4D6F-9702-E839D80ACF87
|
||||||
|
|
||||||
|
+(void)toponeSDK:(NSString*) appId appKey:(NSString*) appKey {
|
||||||
|
[ATAPI setLogEnabled:YES];//Turn on debug logs
|
||||||
|
|
||||||
|
|
||||||
|
NSError *err;
|
||||||
|
[[ATAPI sharedInstance] startWithAppID:appId appKey:appKey error:&err];
|
||||||
|
|
||||||
|
if (err) {
|
||||||
|
NSLog(@"XS- init ad err:%@",err);
|
||||||
|
NSString *err1 = [NSString stringWithFormat:@"XS- init ad err: %@", err];
|
||||||
|
NSDictionary *userInfo = @{@"text": err1};
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:@"adinfo" object:nil userInfo:userInfo];
|
||||||
|
|
||||||
|
}else{
|
||||||
|
NSLog(@"XS- init ad ok");
|
||||||
|
NSDictionary *userInfo = @{@"text": @"初始化成功"};
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:@"adinfo" object:nil userInfo:userInfo];
|
||||||
|
// YL_NetWorkManager().requestRemoteIp()
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//+ (void)closeADWindow {
|
||||||
|
// NSLog(@"已经执行closeADWindow.....");
|
||||||
|
// UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
|
||||||
|
// [keyWindow.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||||
|
// UIViewController *vc = obj.subviews.firstObject.nextResponder;
|
||||||
|
// if ([vc isKindOfClass:[NSClassFromString(@"MTGVideoBaseViewController") class]]) {
|
||||||
|
//
|
||||||
|
// if ([vc respondsToSelector:@selector(closeButtonTappedAction:)]) {
|
||||||
|
// NSLog(@"执行了skipVideo.....");
|
||||||
|
// [vc performSelector:@selector(closeButtonTappedAction:) withObject:nil];
|
||||||
|
// }else{
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// ];
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
// MARK: - Runtime获取方法
|
||||||
|
//+ (void)listAllMethodsOfClass:(Class)cls {
|
||||||
|
// unsigned int methodCount = 0;
|
||||||
|
// Method *methods = class_copyMethodList(cls, &methodCount);
|
||||||
|
//
|
||||||
|
// NSLog(@"%@ has %u methods:", cls, methodCount);
|
||||||
|
// for (unsigned int i = 0; i < methodCount; i++) {
|
||||||
|
// SEL methodSelector = method_getName(methods[i]);
|
||||||
|
// const char *methodName = sel_getName(methodSelector);
|
||||||
|
// NSLog(@"Method #%u: %s", i, methodName);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// free(methods);
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//+ (void)closeADWindow {
|
||||||
|
// Class adControllerClass = NSClassFromString(@"MTGVideoBaseViewController");
|
||||||
|
// if (adControllerClass) {
|
||||||
|
// [self listAllMethodsOfClass:adControllerClass];
|
||||||
|
// } else {
|
||||||
|
// NSLog(@"Ad controller class not found.");
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
+ (void)removeADVCByDelayTime:(NSInteger)delayTime onclose: (OnClose) onclose {
|
||||||
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayTime / 1000 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
[initializationTopOn removeVungleFullScreenPresenter];
|
||||||
|
[initializationTopOn closeADWindow];
|
||||||
|
onclose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+ (void)closeADWindow {
|
||||||
|
NSLog(@"Executing closeADWindow - First Pass");
|
||||||
|
[self performCloseADWindowActions];
|
||||||
|
|
||||||
|
NSLog(@"Executing closeADWindow - Second Pass");
|
||||||
|
[self performCloseADWindowActions];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+ (void) performCloseADWindowActions: (UIWindow *) keyWindow {
|
||||||
|
[keyWindow.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||||
|
UIViewController *vc = obj.subviews.firstObject.nextResponder;
|
||||||
|
NSLog(@"XS- find Controller 2%@",vc.description);
|
||||||
|
if ([vc isKindOfClass:[NSClassFromString(@"MTGVideoBaseViewController") class]]) {
|
||||||
|
|
||||||
|
if ([vc respondsToSelector:@selector(_dismissViewControllerCompletion:)]) {
|
||||||
|
NSLog(@"执行了 _dismissViewControllerCompletion:");
|
||||||
|
[vc performSelector:@selector(_dismissViewControllerCompletion:) withObject:nil];
|
||||||
|
*stop = YES;
|
||||||
|
} else if ([vc respondsToSelector:@selector(callBackForDismiss)]) {
|
||||||
|
NSLog(@"执行了 callBackForDismiss");
|
||||||
|
[vc performSelector:@selector(callBackForDismiss)];
|
||||||
|
*stop = YES;
|
||||||
|
} else if ([vc respondsToSelector:@selector(didClose:)]) {
|
||||||
|
NSLog(@"执行了 didClose:");
|
||||||
|
[vc performSelector:@selector(didClose:) withObject:nil];
|
||||||
|
*stop = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[self removeVungleFullScreenPresenter];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void)performCloseADWindowActions {
|
||||||
|
// UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
|
||||||
|
// [initializationTopOn performCloseADWindowActions: keyWindow];
|
||||||
|
NSArray *windows = [UIApplication sharedApplication].windows;
|
||||||
|
for (UIWindow *window in windows) {
|
||||||
|
if(window.isKeyWindow) {
|
||||||
|
[initializationTopOn performCloseADWindowActions: window];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//+ (void)checkCloseWindown {
|
||||||
|
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.7 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
// [initializationTopOn removeVungleFullScreenPresenter];
|
||||||
|
// [initializationTopOn closeADWindow];
|
||||||
|
//
|
||||||
|
// });
|
||||||
|
//}
|
||||||
|
|
||||||
|
+ (void)removeVungleFullScreenPresenter : (UIWindow *) keyWindow {
|
||||||
|
UIViewController *foundViewController = [self findFullScreenPresenterInViewController:keyWindow.rootViewController];
|
||||||
|
|
||||||
|
if (foundViewController) {
|
||||||
|
NSLog(@"Found FullScreenPresenter instance: %@", foundViewController);
|
||||||
|
|
||||||
|
[initializationTopOn closeViewController:foundViewController];
|
||||||
|
// 关闭或移除 FullScreenPresenter
|
||||||
|
|
||||||
|
// [self checkCloseWindown];
|
||||||
|
} else {
|
||||||
|
NSLog(@"FullScreenPresenter not found.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+ (void)removeVungleFullScreenPresenter {
|
||||||
|
// UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
|
||||||
|
// [initializationTopOn removeVungleFullScreenPresenter: keyWindow];
|
||||||
|
NSArray *windows = [UIApplication sharedApplication].windows;
|
||||||
|
for (UIWindow *window in windows) {
|
||||||
|
if(window.isKeyWindow) {
|
||||||
|
[initializationTopOn removeVungleFullScreenPresenter: window];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (UIViewController *)findFullScreenPresenterInViewController:(UIViewController *)viewController {
|
||||||
|
NSLog(@"XS- find Controller 1 %@",viewController.description);
|
||||||
|
if ([viewController isKindOfClass:NSClassFromString(@"VungleAdsSDK.FullScreenPresenter")]) {
|
||||||
|
return viewController;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([viewController.description containsString:@"ISNProductViewController"]) {
|
||||||
|
NSLog(@"XS- find Controller 1 %@ ok",viewController.description);
|
||||||
|
return viewController;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 递归遍历所有子控制器
|
||||||
|
for (UIViewController *childViewController in viewController.childViewControllers) {
|
||||||
|
UIViewController *foundViewController = [self findFullScreenPresenterInViewController:childViewController];
|
||||||
|
if (foundViewController) {
|
||||||
|
return foundViewController;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查 presentedViewController
|
||||||
|
if (viewController.presentedViewController) {
|
||||||
|
return [self findFullScreenPresenterInViewController:viewController.presentedViewController];
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void)closeViewController:(UIViewController *)viewController {
|
||||||
|
if (viewController.presentingViewController) {
|
||||||
|
// 如果是模态展示的
|
||||||
|
[viewController dismissViewControllerAnimated:YES completion:^{
|
||||||
|
NSLog(@"XS- close ad view 1");
|
||||||
|
}];
|
||||||
|
} else if (viewController.navigationController) {
|
||||||
|
// 如果在导航控制器中
|
||||||
|
[viewController.navigationController popViewControllerAnimated:YES];
|
||||||
|
NSLog(@"XS- close ad view 2");
|
||||||
|
} else {
|
||||||
|
// 其他情况,尝试从父视图移除
|
||||||
|
[viewController.view removeFromSuperview];
|
||||||
|
[viewController removeFromParentViewController];
|
||||||
|
NSLog(@"XS- close ad view 3");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void swizzleMethod(Class class, SEL originalSelector, SEL swizzledSelector) {
|
||||||
|
Method originalMethod = class_getInstanceMethod(class, originalSelector);
|
||||||
|
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
|
||||||
|
|
||||||
|
BOOL didAddMethod = class_addMethod(class,
|
||||||
|
originalSelector,
|
||||||
|
method_getImplementation(swizzledMethod),
|
||||||
|
method_getTypeEncoding(swizzledMethod));
|
||||||
|
|
||||||
|
if (didAddMethod) {
|
||||||
|
class_replaceMethod(class,
|
||||||
|
swizzledSelector,
|
||||||
|
method_getImplementation(originalMethod),
|
||||||
|
method_getTypeEncoding(originalMethod));
|
||||||
|
} else {
|
||||||
|
method_exchangeImplementations(originalMethod, swizzledMethod);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation UIButton (Swizzling)
|
||||||
|
|
||||||
|
+ (void)load {
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
NSLog(@"Swizzling UIButton sendAction:to:forEvent:");
|
||||||
|
swizzleMethod([self class],
|
||||||
|
@selector(sendAction:to:forEvent:),
|
||||||
|
@selector(xxx_sendAction:to:forEvent:));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)xxx_sendAction:(SEL)action to:(id)target forEvent:(UIEvent *)event {
|
||||||
|
NSLog(@"Button clicked: %@", NSStringFromSelector(action));
|
||||||
|
[self xxx_sendAction:action to:target forEvent:event]; // 调用原始实现
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
18
Podfile
Normal file
18
Podfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Uncomment the next line to define a global platform for your project
|
||||||
|
# platform :ios, '9.0'
|
||||||
|
|
||||||
|
target 'PlayBTopOn' do
|
||||||
|
# Comment the next line if you don't want to use dynamic frameworks
|
||||||
|
use_frameworks!
|
||||||
|
|
||||||
|
# Pods for PlayBTopOn
|
||||||
|
# pod 'TPNiOS','6.3.66'
|
||||||
|
# pod 'TPNVungleSDKAdapter','6.3.66'
|
||||||
|
# pod 'TPNMintegralSDKAdapter','6.3.66'
|
||||||
|
|
||||||
|
pod 'TPNiOS','6.4.76'
|
||||||
|
pod 'TPNVungleSDKAdapter','6.4.76'
|
||||||
|
pod 'TPNIronSourceSDKAdapter','6.4.76'
|
||||||
|
pod 'TPNMintegralSDKAdapter','6.4.76'
|
||||||
|
|
||||||
|
end
|
||||||
69
Podfile.lock
Normal file
69
Podfile.lock
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
PODS:
|
||||||
|
- IronSourceSDK (8.8.0.0)
|
||||||
|
- MintegralAdSDK/All (7.7.7):
|
||||||
|
- MintegralAdSDK/BannerAd
|
||||||
|
- MintegralAdSDK/BidNativeAd
|
||||||
|
- MintegralAdSDK/InterstitialVideoAd
|
||||||
|
- MintegralAdSDK/NativeAd
|
||||||
|
- MintegralAdSDK/NativeAdvancedAd
|
||||||
|
- MintegralAdSDK/NewInterstitialAd
|
||||||
|
- MintegralAdSDK/RewardVideoAd
|
||||||
|
- MintegralAdSDK/SplashAd
|
||||||
|
- MintegralAdSDK/BannerAd (7.7.7):
|
||||||
|
- MintegralAdSDK/NativeAd
|
||||||
|
- MintegralAdSDK/BidNativeAd (7.7.7):
|
||||||
|
- MintegralAdSDK/NativeAd
|
||||||
|
- MintegralAdSDK/InterstitialVideoAd (7.7.7):
|
||||||
|
- MintegralAdSDK/NativeAd
|
||||||
|
- MintegralAdSDK/NativeAd (7.7.7)
|
||||||
|
- MintegralAdSDK/NativeAdvancedAd (7.7.7):
|
||||||
|
- MintegralAdSDK/NativeAd
|
||||||
|
- MintegralAdSDK/NewInterstitialAd (7.7.7):
|
||||||
|
- MintegralAdSDK/InterstitialVideoAd
|
||||||
|
- MintegralAdSDK/NativeAd
|
||||||
|
- MintegralAdSDK/RewardVideoAd (7.7.7):
|
||||||
|
- MintegralAdSDK/NativeAd
|
||||||
|
- MintegralAdSDK/SplashAd (7.7.7):
|
||||||
|
- MintegralAdSDK/NativeAd
|
||||||
|
- TPNiOS (6.4.76):
|
||||||
|
- TPNiOS/TPNSDK (= 6.4.76)
|
||||||
|
- TPNiOS/TPNSDK (6.4.76)
|
||||||
|
- TPNIronSourceSDKAdapter (6.4.76):
|
||||||
|
- IronSourceSDK (= 8.8.0.0)
|
||||||
|
- TPNiOS (= 6.4.76)
|
||||||
|
- TPNMintegralSDKAdapter (6.4.76):
|
||||||
|
- MintegralAdSDK/All (= 7.7.7)
|
||||||
|
- TPNiOS (= 6.4.76)
|
||||||
|
- TPNVungleSDKAdapter (6.4.76):
|
||||||
|
- TPNiOS (= 6.4.76)
|
||||||
|
- VungleAds (= 7.5.0)
|
||||||
|
- VungleAds (7.5.0)
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- TPNiOS (= 6.4.76)
|
||||||
|
- TPNIronSourceSDKAdapter (= 6.4.76)
|
||||||
|
- TPNMintegralSDKAdapter (= 6.4.76)
|
||||||
|
- TPNVungleSDKAdapter (= 6.4.76)
|
||||||
|
|
||||||
|
SPEC REPOS:
|
||||||
|
trunk:
|
||||||
|
- IronSourceSDK
|
||||||
|
- MintegralAdSDK
|
||||||
|
- TPNiOS
|
||||||
|
- TPNIronSourceSDKAdapter
|
||||||
|
- TPNMintegralSDKAdapter
|
||||||
|
- TPNVungleSDKAdapter
|
||||||
|
- VungleAds
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
IronSourceSDK: ff0b14630899756847f7608a75182f10f022e5ef
|
||||||
|
MintegralAdSDK: 190c6cd3d83b31b51833e3341857c58dc430da2e
|
||||||
|
TPNiOS: 1b19f54b097912acf89dd41821605cc366432756
|
||||||
|
TPNIronSourceSDKAdapter: 632739c889c7a52174c8e3f5e912b99a2db489c0
|
||||||
|
TPNMintegralSDKAdapter: 67df075118c7268031c545b62e2216bba569cb22
|
||||||
|
TPNVungleSDKAdapter: 15aa9b622b4ab59eb7a9f95d5c052d674483b585
|
||||||
|
VungleAds: cb2aa4791ba4f341c6c026d44cc43eabe258890f
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: c9db2b56d9c1cce1499e833f0872906ef776ba87
|
||||||
|
|
||||||
|
COCOAPODS: 1.16.2
|
||||||
44
Pods/IronSourceSDK/IronSource/IronSource.xcframework/Info.plist
generated
Normal file
44
Pods/IronSourceSDK/IronSource/IronSource.xcframework/Info.plist
generated
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>AvailableLibraries</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>BinaryPath</key>
|
||||||
|
<string>IronSource.framework/IronSource</string>
|
||||||
|
<key>LibraryIdentifier</key>
|
||||||
|
<string>ios-arm64_x86_64-simulator</string>
|
||||||
|
<key>LibraryPath</key>
|
||||||
|
<string>IronSource.framework</string>
|
||||||
|
<key>SupportedArchitectures</key>
|
||||||
|
<array>
|
||||||
|
<string>arm64</string>
|
||||||
|
<string>x86_64</string>
|
||||||
|
</array>
|
||||||
|
<key>SupportedPlatform</key>
|
||||||
|
<string>ios</string>
|
||||||
|
<key>SupportedPlatformVariant</key>
|
||||||
|
<string>simulator</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>BinaryPath</key>
|
||||||
|
<string>IronSource.framework/IronSource</string>
|
||||||
|
<key>LibraryIdentifier</key>
|
||||||
|
<string>ios-arm64</string>
|
||||||
|
<key>LibraryPath</key>
|
||||||
|
<string>IronSource.framework</string>
|
||||||
|
<key>SupportedArchitectures</key>
|
||||||
|
<array>
|
||||||
|
<string>arm64</string>
|
||||||
|
</array>
|
||||||
|
<key>SupportedPlatform</key>
|
||||||
|
<string>ios</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>XFWK</string>
|
||||||
|
<key>XCFrameworkFormatVersion</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
//
|
||||||
|
// ISAAdFormat.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Enum representing available ad formats.
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM(NSUInteger, ISAAdFormatType) {
|
||||||
|
ISAAdFormatTypeInterstitial,
|
||||||
|
ISAAdFormatTypeRewarded,
|
||||||
|
ISAAdFormatTypeBanner
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class representing an ad format.
|
||||||
|
*/
|
||||||
|
@interface ISAAdFormat : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The ad format type.
|
||||||
|
*/
|
||||||
|
@property(readonly, nonatomic) ISAAdFormatType adFormatType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initializes with the given ad format type.
|
||||||
|
|
||||||
|
@param adFormatType the ad format type to represent.
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithAdFormatType:(ISAAdFormatType)adFormatType;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
//
|
||||||
|
// ISAAdSize.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class representing an ad size.
|
||||||
|
*/
|
||||||
|
@interface ISAAdSize : NSObject
|
||||||
|
|
||||||
|
@property(nonatomic, readonly) CGFloat width;
|
||||||
|
@property(nonatomic, readonly) CGFloat height;
|
||||||
|
@property(nonatomic, readonly, copy) NSString *sizeDescription;
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Creates an `ISAAdSize` for a banner ad.
|
||||||
|
*/
|
||||||
|
+ (ISAAdSize *)banner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Creates an `ISAAdSize` for a large ad.
|
||||||
|
*/
|
||||||
|
+ (ISAAdSize *)large;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Creates an `ISAAdSize` for a medium rectangle ad.
|
||||||
|
*/
|
||||||
|
+ (ISAAdSize *)mediumRectangle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Creates an `ISAAdSize` for a leaderboard ad.
|
||||||
|
*/
|
||||||
|
+ (ISAAdSize *)leaderboard;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// ISABannerAdInfo.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class containing information on the associated banner ad.
|
||||||
|
*/
|
||||||
|
@interface ISABannerAdInfo : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The identifier of the network instance.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly) NSString *instanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The unique identifier of the ad.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly) NSString *adId;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
//
|
||||||
|
// ISNBannerLoader.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISABannerAdLoaderDelegate.h"
|
||||||
|
#import "ISABannerAdRequest.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class responsible for loading banner ads.
|
||||||
|
*/
|
||||||
|
@interface ISABannerAdLoader : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Loads a banner ad.
|
||||||
|
The delegate will send a `bannerAdDidLoad:` or
|
||||||
|
`bannerAdDidFailToLoadWithError:` callback.
|
||||||
|
|
||||||
|
@param adRequest The request configuration for the ad to be loaded.
|
||||||
|
@param delegate The delegate to be notified of ad loading callbacks. The callbacks will be invoked
|
||||||
|
on the main thread. The delegate is held weakly.
|
||||||
|
*/
|
||||||
|
+ (void)loadAdWithAdRequest:(ISABannerAdRequest *)adRequest
|
||||||
|
delegate:(id<ISABannerAdLoaderDelegate>)delegate;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
//
|
||||||
|
// ISABannerAdLoaderDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISABannerAdView.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Protocol handling loading callbacks for a requested banner ad.
|
||||||
|
The callbacks will be invoked on the main thread.
|
||||||
|
*/
|
||||||
|
@protocol ISABannerAdLoaderDelegate <NSObject>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when a banner ad is successfully loaded.
|
||||||
|
|
||||||
|
@param bannerAdView The banner ad that is loaded.
|
||||||
|
*/
|
||||||
|
- (void)bannerAdDidLoad:(ISABannerAdView *)bannerAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when a banner ad fails to load.
|
||||||
|
|
||||||
|
@param error The error that occurred during loading.
|
||||||
|
*/
|
||||||
|
- (void)bannerAdDidFailToLoadWithError:(NSError *)error;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
//
|
||||||
|
// ISNBannerAdRequest.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ISAAdSize.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class representing a loading request for a banner ad.
|
||||||
|
Use `ISABannerAdRequestBuilder` in order to create an instance of this class.
|
||||||
|
*/
|
||||||
|
@interface ISABannerAdRequest : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The identifier for the network instance.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly) NSString *instanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The ad markup.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly) NSString *adm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The ad size.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly) ISAAdSize *size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The view controller to show the ad on, if available.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, weak, readonly, nullable) UIViewController *viewController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Extra parameters for the ad request.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly, nullable) NSDictionary *extraParams;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
//
|
||||||
|
// ISABannerAdRequestBuilder.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISAAdSize.h"
|
||||||
|
#import "ISABannerAdRequest.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builder class for `ISABannerAdRequest`.
|
||||||
|
*/
|
||||||
|
@interface ISABannerAdRequestBuilder : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initializes the builder.
|
||||||
|
|
||||||
|
@param instanceId The identifier for the network instance.
|
||||||
|
@param adm The ad markup.
|
||||||
|
@param size The ad size.
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithInstanceId:(NSString *)instanceId
|
||||||
|
adm:(NSString *)adm
|
||||||
|
size:(ISAAdSize *)size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Sets extra parameters for the ad request.
|
||||||
|
Optional.
|
||||||
|
|
||||||
|
@param extraParams The extra parameters dictionary.
|
||||||
|
|
||||||
|
@return The Builder instance.
|
||||||
|
*/
|
||||||
|
- (ISABannerAdRequestBuilder *)withExtraParams:(NSDictionary *)extraParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Sets the view controller that will show the ad, if available.
|
||||||
|
|
||||||
|
@param viewController The view controller that will show the ad, if available.
|
||||||
|
|
||||||
|
@return The Builder instance.
|
||||||
|
*/
|
||||||
|
- (ISABannerAdRequestBuilder *)withViewController:(UIViewController *)viewController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builds the `ISABannerAdRequest` instance.
|
||||||
|
|
||||||
|
@return The ad request instance.
|
||||||
|
*/
|
||||||
|
- (ISABannerAdRequest *)build;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
//
|
||||||
|
// ISNBannerAdView.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ISABannerAdInfo.h"
|
||||||
|
#import "ISABannerAdViewDelegate.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface ISABannerAdView : UIView
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
@property(nonatomic, weak, nullable) id<ISABannerAdViewDelegate> delegate;
|
||||||
|
@property(nonatomic, strong, readonly) ISABannerAdInfo* adInfo;
|
||||||
|
@property(nonatomic, weak, nullable) UIViewController* viewController;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
//
|
||||||
|
// ISABannerAdViewDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@class ISABannerAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Protocol handling banner ad show events for `ISABannerAd`.
|
||||||
|
The callbacks will be invoked on the main thread.
|
||||||
|
*/
|
||||||
|
@protocol ISABannerAdViewDelegate <NSObject>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when a banner ad is shown.
|
||||||
|
|
||||||
|
@param bannerAdView The banner ad that is shown.
|
||||||
|
*/
|
||||||
|
- (void)bannerAdViewDidShow:(ISABannerAdView *)bannerAdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when a banner ad is clicked.
|
||||||
|
|
||||||
|
@param bannerAdView The banner ad that is clicked.
|
||||||
|
*/
|
||||||
|
- (void)bannerAdViewDidClick:(ISABannerAdView *)bannerAdView;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
//
|
||||||
|
// ISAInitRequest.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISAAdFormat.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Enum representing the different log levels in IronSourceAds.
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM(NSInteger, ISALogLevel) { ISALogLevelNone, ISALogLevelError, ISALogLevelVerbose };
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class representing an initialization request for IronSourceAds.
|
||||||
|
Use `ISAInitRequestBuilder` to create an instance of this class.
|
||||||
|
*/
|
||||||
|
@interface ISAInitRequest : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The application key.
|
||||||
|
*/
|
||||||
|
@property(readonly, nonatomic) NSString *appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Legacy ad formats for the initialization request.
|
||||||
|
*/
|
||||||
|
@property(readonly, nonatomic) NSArray<ISAAdFormat *> *legacyAdFormats;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Log level to use in IronSourceAds.
|
||||||
|
Default value is `ISALogLevelNone`.
|
||||||
|
*/
|
||||||
|
@property(readonly, nonatomic) ISALogLevel logLevel;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
//
|
||||||
|
// ISAInitRequestBuilder.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISAAdFormat.h"
|
||||||
|
#import "ISAInitRequest.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builder class for `ISAInitRequest`.
|
||||||
|
*/
|
||||||
|
@interface ISAInitRequestBuilder : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initializes the builder.
|
||||||
|
|
||||||
|
@param appKey the application key.
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithAppKey:(NSString *)appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builds the `ISAInitRequest` instance.
|
||||||
|
|
||||||
|
@return The init request instance.
|
||||||
|
*/
|
||||||
|
- (ISAInitRequest *)build;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Sets the legacy ad formats for the initialization request.
|
||||||
|
To enable non-bidding instances, pass the relevant legacy ad formats.
|
||||||
|
For bidding instances, this is non-mandatory.
|
||||||
|
|
||||||
|
@param legacyAdFormats The list of legacy ad formats.
|
||||||
|
|
||||||
|
@return The Builder instance.
|
||||||
|
*/
|
||||||
|
- (ISAInitRequestBuilder *)withLegacyAdFormats:(NSArray<ISAAdFormat *> *)legacyAdFormats;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Sets the log level for the initialization request.
|
||||||
|
Default value is `ISALogLevelNone`.
|
||||||
|
|
||||||
|
@param logLevel The log level.
|
||||||
|
|
||||||
|
@return The Builder instance.
|
||||||
|
*/
|
||||||
|
- (ISAInitRequestBuilder *)withLogLevel:(ISALogLevel)logLevel;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
//
|
||||||
|
// ISAInterstitialAd.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ISAInterstitialAdDelegate.h"
|
||||||
|
#import "ISAInterstitialAdInfo.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class responsible for handling the operations and callbacks of an interstitial ad.
|
||||||
|
*/
|
||||||
|
@interface ISAInterstitialAd : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The delegate for the ad callbacks.
|
||||||
|
Set this delegate in order to receive callbacks from the ad.
|
||||||
|
The callbacks will be invoked on the main thread.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, weak, nullable) id<ISAInterstitialAdDelegate> delegate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Contains information associated with the ad.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly) ISAInterstitialAdInfo *adInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Check if the ad is ready to show.
|
||||||
|
Showing an ad that is not ready will result in a show failure.
|
||||||
|
|
||||||
|
@return Whether the ad is ready to show.
|
||||||
|
*/
|
||||||
|
- (BOOL)isReadyToShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Show the ad.
|
||||||
|
The delegate will send a `interstitialAdDidShow:` or
|
||||||
|
`interstitialAd:didFailToShowWithError:` callback.
|
||||||
|
|
||||||
|
@param viewController The view controller where the ad will be shown.
|
||||||
|
*/
|
||||||
|
- (void)showFromViewController:(UIViewController *)viewController;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
//
|
||||||
|
// ISAInterstitialAdDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@class ISAInterstitialAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Protocol handling interstitial ad show events for `ISAInterstitialAd`.
|
||||||
|
The callbacks will be invoked on the main thread.
|
||||||
|
*/
|
||||||
|
@protocol ISAInterstitialAdDelegate <NSObject>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when an interstitial ad is shown.
|
||||||
|
|
||||||
|
@param interstitialAd The interstitial ad that is shown.
|
||||||
|
*/
|
||||||
|
- (void)interstitialAdDidShow:(ISAInterstitialAd *)interstitialAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when an interstitial ad fails to show.
|
||||||
|
|
||||||
|
@param interstitialAd The interstitial ad that fails to show.
|
||||||
|
@param error The error that occurred.
|
||||||
|
*/
|
||||||
|
- (void)interstitialAd:(ISAInterstitialAd *)interstitialAd didFailToShowWithError:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when an interstitial ad is clicked.
|
||||||
|
|
||||||
|
@param interstitialAd The interstitial ad that is clicked.
|
||||||
|
*/
|
||||||
|
- (void)interstitialAdDidClick:(ISAInterstitialAd *)interstitialAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when an interstitial ad is dismissed.
|
||||||
|
|
||||||
|
@param interstitialAd The interstitial ad that is dismissed.
|
||||||
|
*/
|
||||||
|
- (void)interstitialAdDidDismiss:(ISAInterstitialAd *)interstitialAd;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// ISAInterstitialAdInfo.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class containing information on the associated interstitial ad.
|
||||||
|
*/
|
||||||
|
@interface ISAInterstitialAdInfo : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The identifier of the network instance.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly) NSString *instanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The unique identifier of the ad.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly) NSString *adId;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
//
|
||||||
|
// ISNLoaderInterstitial.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISAInterstitialAdLoaderDelegate.h"
|
||||||
|
#import "ISAInterstitialAdRequest.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class responsible for loading interstitial ads.
|
||||||
|
*/
|
||||||
|
@interface ISAInterstitialAdLoader : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Loads an interstitial ad.
|
||||||
|
The delegate will send a `interstitialAdDidLoad:` or
|
||||||
|
`interstitialAdDidFailToLoadWithError:` callback.
|
||||||
|
|
||||||
|
@param adRequest The request configuration for the ad to be loaded.
|
||||||
|
@param delegate The delegate to be notified of ad loading callbacks. The callbacks will be invoked
|
||||||
|
on the main thread. The delegate is held weakly.
|
||||||
|
*/
|
||||||
|
+ (void)loadAdWithAdRequest:(ISAInterstitialAdRequest *)adRequest
|
||||||
|
delegate:(id<ISAInterstitialAdLoaderDelegate>)delegate;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
//
|
||||||
|
// ISAInterstitialAdLoaderDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISAInterstitialAd.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Protocol handling loading callbacks for a requested interstitial ad.
|
||||||
|
The callbacks will be invoked on the main thread.
|
||||||
|
*/
|
||||||
|
@protocol ISAInterstitialAdLoaderDelegate <NSObject>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when an interstitial ad is successfully loaded.
|
||||||
|
|
||||||
|
@param interstitialAd The interstitial ad that is loaded.
|
||||||
|
*/
|
||||||
|
- (void)interstitialAdDidLoad:(ISAInterstitialAd *)interstitialAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when an interstitial ad fails to load.
|
||||||
|
|
||||||
|
@param error The error that occurred during loading.
|
||||||
|
*/
|
||||||
|
- (void)interstitialAdDidFailToLoadWithError:(NSError *)error;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
//
|
||||||
|
// ISAInterstitialAdRequest.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class representing a loading request for an interstitial ad.
|
||||||
|
Use `ISAInterstitialAdRequestBuilder` in order to create an instance of this class.
|
||||||
|
*/
|
||||||
|
@interface ISAInterstitialAdRequest : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The identifier for the network instance.
|
||||||
|
*/
|
||||||
|
@property(readonly, nonatomic, strong) NSString *instanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The ad markup.
|
||||||
|
*/
|
||||||
|
@property(readonly, nonatomic, strong) NSString *adm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Extra parameters for the ad request.
|
||||||
|
*/
|
||||||
|
@property(readonly, nonatomic, strong, nullable) NSDictionary *extraParams;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
//
|
||||||
|
// ISAInterstitialAdRequestBuilder.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISAInterstitialAdRequest.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builder class for `ISAInterstitialAdRequest`.
|
||||||
|
*/
|
||||||
|
@interface ISAInterstitialAdRequestBuilder : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initializes the builder.
|
||||||
|
|
||||||
|
@param instanceId The identifier for the network instance.
|
||||||
|
@param adm The ad markup.
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithInstanceId:(NSString *)instanceId adm:(NSString *)adm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Sets extra parameters for the ad request.
|
||||||
|
Optional.
|
||||||
|
|
||||||
|
@param extraParams The extra parameters dictionary.
|
||||||
|
|
||||||
|
@return The Builder instance.
|
||||||
|
*/
|
||||||
|
- (ISAInterstitialAdRequestBuilder *)withExtraParams:(NSDictionary *)extraParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builds the `ISAInterstitialAdRequest` instance.
|
||||||
|
|
||||||
|
@return The ad request instance.
|
||||||
|
*/
|
||||||
|
- (ISAInterstitialAdRequest *)build;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
//
|
||||||
|
// ISARewardedAd.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ISARewardedAdDelegate.h"
|
||||||
|
#import "ISARewardedAdInfo.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class responsible for handling the operations and callbacks of a rewarded ad.
|
||||||
|
*/
|
||||||
|
@interface ISARewardedAd : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The delegate for the ad callbacks.
|
||||||
|
Set this delegate in order to receive callbacks from the ad.
|
||||||
|
The callbacks will be invoked on the main thread.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, weak, nullable) id<ISARewardedAdDelegate> delegate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Contains information associated with the ad.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly) ISARewardedAdInfo *adInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Check if the ad is ready to show.
|
||||||
|
Showing an ad that is not ready will result in a show failure.
|
||||||
|
|
||||||
|
@return Whether the ad is ready to show.
|
||||||
|
*/
|
||||||
|
- (BOOL)isReadyToShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Show the ad.
|
||||||
|
The delegate will send a `rewardedAdDidShow:` or
|
||||||
|
`rewardedAd:didFailToShowWithError:` callback.
|
||||||
|
|
||||||
|
@param viewController The view controller where the ad will be shown.
|
||||||
|
*/
|
||||||
|
- (void)showFromViewController:(UIViewController *)viewController;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
//
|
||||||
|
// ISARewardedAdDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@class ISARewardedAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Protocol handling rewarded ad show events for `ISARewardedAd`.
|
||||||
|
The callbacks will be invoked on the main thread.
|
||||||
|
*/
|
||||||
|
@protocol ISARewardedAdDelegate <NSObject>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when a rewarded ad is shown.
|
||||||
|
|
||||||
|
@param rewardedAd The rewarded ad that is shown.
|
||||||
|
*/
|
||||||
|
- (void)rewardedAdDidShow:(ISARewardedAd *)rewardedAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when a rewarded ad fails to show.
|
||||||
|
|
||||||
|
@param rewardedAd The rewarded ad that fails to show.
|
||||||
|
@param error The error that occurred.
|
||||||
|
*/
|
||||||
|
- (void)rewardedAd:(ISARewardedAd *)rewardedAd didFailToShowWithError:(NSError *)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when the user earns a reward.
|
||||||
|
|
||||||
|
@param rewardedAd The rewarded ad that the user earns a reward from.
|
||||||
|
*/
|
||||||
|
- (void)rewardedAdDidUserEarnReward:(ISARewardedAd *)rewardedAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when a rewarded ad is clicked.
|
||||||
|
|
||||||
|
@param rewardedAd The rewarded ad that is clicked.
|
||||||
|
*/
|
||||||
|
- (void)rewardedAdDidClick:(ISARewardedAd *)rewardedAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when a rewarded ad is dismissed.
|
||||||
|
|
||||||
|
@param rewardedAd The rewarded ad that is dismissed.
|
||||||
|
*/
|
||||||
|
- (void)rewardedAdDidDismiss:(ISARewardedAd *)rewardedAd;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// ISARewardedAdInfo.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class containing information on the associated rewarded ad.
|
||||||
|
*/
|
||||||
|
@interface ISARewardedAdInfo : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The identifier of the network instance.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly) NSString *instanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The unique identifier of the ad.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, strong, readonly) NSString *adId;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
//
|
||||||
|
// ISNLoaderRewardedVideo.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISARewardedAdLoaderDelegate.h"
|
||||||
|
#import "ISARewardedAdRequest.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class responsible for loading rewarded ads.
|
||||||
|
*/
|
||||||
|
@interface ISARewardedAdLoader : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Loads a rewarded ad.
|
||||||
|
The delegate will send a `rewardedAdDidLoad:` or
|
||||||
|
`rewardedAdDidFailToLoadWithError:` callback.
|
||||||
|
|
||||||
|
@param adRequest The request configuration for the ad to be loaded.
|
||||||
|
@param delegate The delegate to be notified of ad loading callbacks. The callbacks will be invoked
|
||||||
|
on the main thread. The delegate is held weakly.
|
||||||
|
*/
|
||||||
|
+ (void)loadAdWithAdRequest:(ISARewardedAdRequest *)adRequest
|
||||||
|
delegate:(id<ISARewardedAdLoaderDelegate>)delegate;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
//
|
||||||
|
// ISARewardedAdLoaderDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISARewardedAd.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Protocol handling loading callbacks for a requested rewarded ad.
|
||||||
|
The callbacks will be invoked on the main thread.
|
||||||
|
*/
|
||||||
|
@protocol ISARewardedAdLoaderDelegate <NSObject>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when a rewarded ad is successfully loaded.
|
||||||
|
|
||||||
|
@param rewardedAd The rewarded ad that is loaded.
|
||||||
|
*/
|
||||||
|
- (void)rewardedAdDidLoad:(ISARewardedAd *)rewardedAd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called when a rewarded ad fails to load.
|
||||||
|
|
||||||
|
@param error The error that occurred during loading.
|
||||||
|
*/
|
||||||
|
- (void)rewardedAdDidFailToLoadWithError:(NSError *)error;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
//
|
||||||
|
// ISARewardedAdRequest.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Class representing a loading request for a rewarded ad.
|
||||||
|
Use `ISARewardedAdRequestBuilder` in order to create an instance of this class.
|
||||||
|
*/
|
||||||
|
@interface ISARewardedAdRequest : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The identifier for the network instance.
|
||||||
|
*/
|
||||||
|
@property(readonly, nonatomic, strong) NSString *instanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The ad markup.
|
||||||
|
*/
|
||||||
|
@property(readonly, nonatomic, strong) NSString *adm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Extra parameters for the ad request.
|
||||||
|
*/
|
||||||
|
@property(readonly, nonatomic, strong, nullable) NSDictionary *extraParams;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
//
|
||||||
|
// ISARewardedAdRequestBuilder.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2024 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISARewardedAdRequest.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builder class for `ISARewardedAdRequest`.
|
||||||
|
*/
|
||||||
|
@interface ISARewardedAdRequestBuilder : NSObject
|
||||||
|
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
- (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Initializes the builder.
|
||||||
|
|
||||||
|
@param instanceId The identifier for the network instance.
|
||||||
|
@param adm The ad markup.
|
||||||
|
*/
|
||||||
|
- (instancetype)initWithInstanceId:(NSString *)instanceId adm:(NSString *)adm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Sets extra parameters for the ad request.
|
||||||
|
Optional.
|
||||||
|
|
||||||
|
@param extraParams The extra parameters dictionary.
|
||||||
|
|
||||||
|
@return The Builder instance.
|
||||||
|
*/
|
||||||
|
- (ISARewardedAdRequestBuilder *)withExtraParams:(NSDictionary *)extraParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builds the `ISARewardedAdRequest` instance.
|
||||||
|
|
||||||
|
@return The ad request instance.
|
||||||
|
*/
|
||||||
|
- (ISARewardedAdRequest *)build;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
//
|
||||||
|
// ISAdData.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Yonti Makmel on 22/04/2021.
|
||||||
|
// Copyright © 2021 ironSource. All rights reserved.
|
||||||
|
//
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISAdapterConfig.h"
|
||||||
|
#import "ISBannerSize.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface ISAdData : NSObject
|
||||||
|
|
||||||
|
// The server data containing the adm
|
||||||
|
@property(nonatomic, strong, readonly, nullable) NSString *serverData;
|
||||||
|
|
||||||
|
// The server configuration
|
||||||
|
@property(nonatomic, strong, readonly) NSDictionary *configuration;
|
||||||
|
|
||||||
|
// The configuration holding userId, banner size, ad unit data from auction response and adapter
|
||||||
|
// config
|
||||||
|
@property(nonatomic, strong, readonly, nullable) NSDictionary *adUnitData;
|
||||||
|
|
||||||
|
+ (instancetype)adDataWithAdapterConfiguration:(ISAdapterConfig *)config
|
||||||
|
adUnit:(ISAdUnit *)adUnit
|
||||||
|
userId:(NSString *)userId;
|
||||||
|
|
||||||
|
+ (instancetype)adDataWithAdapterConfiguration:(ISAdapterConfig *)config
|
||||||
|
adUnit:(ISAdUnit *)adUnit
|
||||||
|
userId:(NSString *_Nullable)userId
|
||||||
|
bannerSize:(ISBannerSize *_Nullable)bannerSize;
|
||||||
|
|
||||||
|
- (instancetype)initWithServerData:(nullable NSString *)serverData
|
||||||
|
configuration:(NSDictionary *)configuration
|
||||||
|
adUnitData:(nullable NSDictionary *)adUnitData;
|
||||||
|
|
||||||
|
- (nullable NSString *)getString:(NSString *)key;
|
||||||
|
|
||||||
|
- (NSInteger)getInt:(NSString *)key;
|
||||||
|
|
||||||
|
- (BOOL)getBoolean:(NSString *)key;
|
||||||
|
|
||||||
|
- (nullable NSNumber *)getNumber:(NSString *)key;
|
||||||
|
|
||||||
|
- (nullable NSDictionary *)getAdUnitData;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
//
|
||||||
|
// ISAdInfo.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2022 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISImpressionData.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface ISAdInfo : NSObject
|
||||||
|
|
||||||
|
@property(readonly, copy) NSString* auction_id;
|
||||||
|
@property(readonly, copy) NSString* ad_unit;
|
||||||
|
@property(readonly, copy) NSString* ad_network;
|
||||||
|
@property(readonly, copy) NSString* instance_name;
|
||||||
|
@property(readonly, copy) NSString* instance_id;
|
||||||
|
@property(readonly, copy) NSString* country;
|
||||||
|
@property(readonly, copy) NSNumber* revenue;
|
||||||
|
@property(readonly, copy) NSString* precision;
|
||||||
|
@property(readonly, copy) NSString* ab;
|
||||||
|
@property(readonly, copy) NSString* segment_name;
|
||||||
|
@property(readonly, copy) NSNumber* lifetime_revenue;
|
||||||
|
@property(readonly, copy) NSString* encrypted_cpm;
|
||||||
|
@property(readonly, copy) NSNumber* conversion_value;
|
||||||
|
|
||||||
|
- (instancetype)init;
|
||||||
|
- (instancetype)initWithImpressionData:(ISImpressionData* _Nonnull)impressionData;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// ISAdOptionsPosition.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Hadar Pur on 06/07/2023.
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
// ISAdOptionsPosition
|
||||||
|
typedef NS_ENUM(NSInteger, ISAdOptionsPosition) {
|
||||||
|
ISAdOptionsPositionTopLeft,
|
||||||
|
ISAdOptionsPositionTopRight,
|
||||||
|
ISAdOptionsPositionBottomLeft,
|
||||||
|
ISAdOptionsPositionBottomRight
|
||||||
|
};
|
||||||
|
|
||||||
|
static NSString* const kAdOptionsPosKey = @"adOptionsPos";
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
//
|
||||||
|
// ISAdUnit.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Yonti Makmel on 18/04/2021.
|
||||||
|
// Copyright © 2021 ironSource. All rights reserved.
|
||||||
|
//
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface ISAdUnit : NSObject <NSCopying>
|
||||||
|
|
||||||
|
@property(strong, nonatomic) NSString *value;
|
||||||
|
|
||||||
|
+ (ISAdUnit *)IS_AD_UNIT_REWARDED_VIDEO;
|
||||||
|
+ (ISAdUnit *)IS_AD_UNIT_INTERSTITIAL;
|
||||||
|
+ (ISAdUnit *)IS_AD_UNIT_BANNER;
|
||||||
|
+ (ISAdUnit *)IS_AD_UNIT_NATIVE_AD;
|
||||||
|
|
||||||
|
- (instancetype)initWithValue:(NSString *)value;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// ISAdUnitAdapterProtocol.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISNetworkInitCallbackProtocol.h"
|
||||||
|
#import "ISReleaseMemoryAdapterProtocol.h"
|
||||||
|
|
||||||
|
@protocol ISAdUnitAdapterProtocol <ISReleaseMemoryAdapterProtocol, ISNetworkInitCallbackProtocol>
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterAdDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Yonti Makmel on 28/04/2021.
|
||||||
|
// Copyright © 2021 ironSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef ISAdapterAdDelegate_h
|
||||||
|
#define ISAdapterAdDelegate_h
|
||||||
|
|
||||||
|
#import "ISAdapterErrorType.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol ISAdapterAdDelegate <NSObject>
|
||||||
|
|
||||||
|
// Mandatory callbacks
|
||||||
|
|
||||||
|
- (void)adDidLoad;
|
||||||
|
|
||||||
|
/// @param errorType the load error type, including NO_FILL
|
||||||
|
/// @param errorCode the error code if available, general ones in AdapterErrors
|
||||||
|
/// @param errorMessage the error message if available
|
||||||
|
- (void)adDidFailToLoadWithErrorType:(ISAdapterErrorType)errorType
|
||||||
|
errorCode:(NSInteger)errorCode
|
||||||
|
errorMessage:(nullable NSString*)errorMessage;
|
||||||
|
|
||||||
|
- (void)adDidOpen;
|
||||||
|
|
||||||
|
/// @param errorCode the error code if available, general ones in AdapterErrors
|
||||||
|
/// @param errorMessage the error message if available
|
||||||
|
- (void)adDidFailToShowWithErrorCode:(NSInteger)errorCode
|
||||||
|
errorMessage:(nullable NSString*)errorMessage;
|
||||||
|
|
||||||
|
- (void)adDidClick;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
||||||
|
#endif /* ISAdapterAdDelegate_h */
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterAdFullscreenProtocol.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ISAdData.h"
|
||||||
|
#import "ISAdapterAdInteractionDelegate.h"
|
||||||
|
|
||||||
|
@protocol ISAdapterAdFullscreenProtocol <NSObject>
|
||||||
|
|
||||||
|
/// load the ad
|
||||||
|
/// @param adData data containing the configuration passed from the server and other related
|
||||||
|
/// parameters passed from the publisher like userId
|
||||||
|
/// @param delegate the delegate to return mandatory callbacks based on the network - load success,
|
||||||
|
/// load failure, ad opened, ad closed, show failed optional callbacks - show success, clicked
|
||||||
|
- (void)loadAdWithAdData:(ISAdData *)adData delegate:(id<ISAdapterAdDelegate>)delegate;
|
||||||
|
|
||||||
|
/// show the ad
|
||||||
|
/// @param viewController current viewController for showing the ad
|
||||||
|
/// @param adData data containing the configuration passed from the server and other related
|
||||||
|
/// parameters passed from the publisher like userId
|
||||||
|
/// @param delegate the callback listener
|
||||||
|
- (void)showAdWithViewController:(UIViewController *)viewController
|
||||||
|
adData:(ISAdData *)adData
|
||||||
|
delegate:(id<ISAdapterAdInteractionDelegate>)delegate;
|
||||||
|
|
||||||
|
/// returning whether the ad is available or not
|
||||||
|
/// @param adData data containing the configuration passed from the server and other related
|
||||||
|
/// parameters passed from the publisher like userId
|
||||||
|
- (BOOL)isAdAvailableWithAdData:(ISAdData *)adData;
|
||||||
|
|
||||||
|
/// dispose the ad
|
||||||
|
- (void)disposeAd;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterAdInteractionDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Bar David on 21/10/2021.
|
||||||
|
// Copyright © 2021 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef ISAdapterAdInteractionDelegate_h
|
||||||
|
#define ISAdapterAdInteractionDelegate_h
|
||||||
|
|
||||||
|
#import "ISAdapterAdDelegate.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol ISAdapterAdInteractionDelegate <ISAdapterAdDelegate>
|
||||||
|
|
||||||
|
// Mandatory callbacks
|
||||||
|
|
||||||
|
- (void)adDidClose;
|
||||||
|
|
||||||
|
// Optional callbacks
|
||||||
|
|
||||||
|
- (void)adDidShowSucceed;
|
||||||
|
|
||||||
|
- (void)adDidBecomeVisible;
|
||||||
|
|
||||||
|
- (void)adDidStart;
|
||||||
|
|
||||||
|
- (void)adDidEnd;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
||||||
|
#endif /* ISAdapterAdInteractionDelegate_h */
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterAdRewardedDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Bar David on 21/10/2021.
|
||||||
|
// Copyright © 2021 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef ISAdapterAdRewardedDelegate_h
|
||||||
|
#define ISAdapterAdRewardedDelegate_h
|
||||||
|
|
||||||
|
#import "ISAdapterAdInteractionDelegate.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol ISAdapterAdRewardedDelegate <ISAdapterAdInteractionDelegate>
|
||||||
|
|
||||||
|
// mandatory callbacks
|
||||||
|
|
||||||
|
- (void)adRewarded;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
#endif /* ISAdapterAdRewardedDelegate_h */
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterAdViewDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Guy Lis on 27/03/2023.
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef ISAdapterAdViewDelegate_h
|
||||||
|
#define ISAdapterAdViewDelegate_h
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ISAdapterAdDelegate.h"
|
||||||
|
|
||||||
|
@protocol ISAdapterAdViewDelegate <ISAdapterAdDelegate>
|
||||||
|
|
||||||
|
// mandatory callbacks
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param view the view that was loaded
|
||||||
|
*/
|
||||||
|
- (void)adDidLoadWithView:(UIView *)view;
|
||||||
|
|
||||||
|
// optional callbacks (must be implemented in the adapter but can have empty implementation)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method should be invoked before the user is taken out of the application after a click
|
||||||
|
*/
|
||||||
|
- (void)adWillLeaveApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method should be invoked after the ad view presents fullscreen content
|
||||||
|
*/
|
||||||
|
- (void)adWillPresentScreen;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method should be invoked after the fullscreen content is dismissed
|
||||||
|
*/
|
||||||
|
- (void)adDidDismissScreen;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif /* ISAdapterAdViewDelegate_h */
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterAdaptiveProtocol.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
@protocol ISAdapterAdaptiveProtocol <NSObject>
|
||||||
|
|
||||||
|
- (CGFloat)getAdaptiveHeightWithWidth:(CGFloat)width;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterBannerProtocol.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Guy Lis on 27/03/2023.
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISAdData.h"
|
||||||
|
#import "ISBannerAdDelegate.h"
|
||||||
|
#import "ISBannerSize.h"
|
||||||
|
|
||||||
|
@protocol ISAdapterBannerProtocol <NSObject>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* load the ad
|
||||||
|
*
|
||||||
|
* @param adData data containing the configuration passed from the server and other related
|
||||||
|
* parameters passed from the publisher like userId
|
||||||
|
* @param viewController the application view controller
|
||||||
|
* @param size the banner size the ad will be presented on
|
||||||
|
* @param delegate the callback listener to return
|
||||||
|
* mandatory callbacks based on the network - load success, load failure, ad opened
|
||||||
|
* optional callbacks - clicked, left application, presented, dismissed
|
||||||
|
*/
|
||||||
|
- (void)loadAdWithAdData:(nonnull ISAdData *)adData
|
||||||
|
viewController:(nonnull UIViewController *)viewController
|
||||||
|
size:(nonnull ISBannerSize *)size
|
||||||
|
delegate:(nonnull id<ISBannerAdDelegate>)delegate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* destroy the ad
|
||||||
|
*
|
||||||
|
* @param adData - data containing the configuration passed from the server and other related
|
||||||
|
* parameters passed from the publisher like userId
|
||||||
|
*/
|
||||||
|
- (void)destroyAdWithAdData:(nonnull ISAdData *)adData;
|
||||||
|
|
||||||
|
- (BOOL)isSupportAdaptiveBanner;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterBaseInterface.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Yonti Makmel on 27/04/2021.
|
||||||
|
// Copyright © 2021 ironSource. All rights reserved.
|
||||||
|
//
|
||||||
|
#import "ISAdData.h"
|
||||||
|
#import "ISNetworkInitializationDelegate.h"
|
||||||
|
|
||||||
|
#ifndef ISAdapterBaseProtocol_h
|
||||||
|
#define ISAdapterBaseProtocol_h
|
||||||
|
|
||||||
|
@protocol ISAdapterBaseProtocol <NSObject>
|
||||||
|
|
||||||
|
/// initializes the network
|
||||||
|
/// @param adData data containing the configuration passed from the server and other related
|
||||||
|
/// parameters passed from the publisher like userId
|
||||||
|
/// @param delegate the delegate to return whether the initialization was a success or failure
|
||||||
|
- (void)init:(ISAdData*)adData delegate:(id<ISNetworkInitializationDelegate>)delegate;
|
||||||
|
|
||||||
|
/// returns the network SDK version
|
||||||
|
- (NSString*)networkSDKVersion;
|
||||||
|
|
||||||
|
/// returns the adapter version
|
||||||
|
- (NSString*)adapterVersion;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif /* ISAdapterBaseInterface_h */
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterConfig.m
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Gili Ariel on 8/1/15.
|
||||||
|
// Copyright (c) 2015 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISAdUnit.h"
|
||||||
|
|
||||||
|
#define DEFAULT_CAPPING_PER_DAY 99
|
||||||
|
#define DEFAULT_CAPPING_PER_SESSION 99
|
||||||
|
#define DEFAULT_CAPPING_PER_ITERATION 99
|
||||||
|
|
||||||
|
@interface ISAdapterConfig : NSObject
|
||||||
|
|
||||||
|
@property(strong, nonatomic, readonly) NSDictionary *settings;
|
||||||
|
@property(strong, nonatomic, readonly) NSString *providerName; /* Name from waterfall */
|
||||||
|
@property(strong, nonatomic, readonly) NSString *reflectionName; /* Name of Adapter class to load */
|
||||||
|
@property(strong, nonatomic, readonly) NSString *name; /* name of adapter in mediation cycle' */
|
||||||
|
@property(strong, nonatomic, readonly) NSString *requestUrl;
|
||||||
|
@property(strong, nonatomic, readonly) NSString *subAdapterId;
|
||||||
|
@property(strong, nonatomic, readonly) NSString *instanceId;
|
||||||
|
@property(strong, nonatomic, readonly) NSNumber *maxAdsPerIteration;
|
||||||
|
@property(strong, nonatomic, readonly) NSNumber *maxAdsPerSession;
|
||||||
|
@property(strong, nonatomic, readonly) NSString *instanceType;
|
||||||
|
@property(assign, nonatomic, readonly) NSInteger maxAdsPerDay;
|
||||||
|
@property(assign, nonatomic, readonly) double loadTimeOutSec;
|
||||||
|
@property(assign, nonatomic, readonly) BOOL isMultiProviderInstance;
|
||||||
|
@property(strong, nonatomic, readonly)
|
||||||
|
NSString *adSourceNameForEvent; // name from adSourceName property on init
|
||||||
|
@property(assign, nonatomic, readonly) BOOL isBidder;
|
||||||
|
@property(assign, nonatomic, readonly) BOOL shouldEarlyInit;
|
||||||
|
@property(strong, nonatomic, readonly) ISAdUnit *adUnit;
|
||||||
|
@property(strong, nonatomic, readonly) NSDictionary *appSettings;
|
||||||
|
@property(strong, nonatomic, readonly) NSDictionary *interstitialSettings;
|
||||||
|
@property(strong, nonatomic, readonly) NSDictionary *rewardedVideoSettings;
|
||||||
|
// The banner settings contains the provider configs which may be changed with the banner
|
||||||
|
// configuration during the flow, so it's not defined as readonly.
|
||||||
|
@property(strong, nonatomic) NSDictionary *bannerSettings;
|
||||||
|
@property(strong, nonatomic, readonly) NSDictionary *nativeAdSettings;
|
||||||
|
|
||||||
|
@property(strong, nonatomic, readonly) NSString
|
||||||
|
*providerDefaultInstance; /* Name of Adapter class to load (fallback to reflectionName) */
|
||||||
|
@property(strong, nonatomic, readonly)
|
||||||
|
NSString *providerNetworkKey; /* Name to be used in the public API (e.g. setNetworkData) */
|
||||||
|
@property(strong, nonatomic, readonly)
|
||||||
|
NSString *customNetwork; /* name of the custom network is exists */
|
||||||
|
@property(assign, nonatomic, readonly)
|
||||||
|
BOOL isCustomNetwork; /* whether the configuration is for a custom network*/
|
||||||
|
|
||||||
|
- (instancetype)initWithProviderName:(NSString *)providerName;
|
||||||
|
|
||||||
|
- (void)setSettings:(NSDictionary *)settings;
|
||||||
|
- (void)setReflectionName:(NSString *)reflectionName;
|
||||||
|
- (void)setLoadTimeOut:(double)loadTimeOut;
|
||||||
|
- (void)setAdUnit:(ISAdUnit *)adUnit;
|
||||||
|
- (BOOL)isIronSource;
|
||||||
|
- (void)setAppSettings:(NSDictionary *)appSettings;
|
||||||
|
- (void)setInterstitialSettings:(NSDictionary *)interstitialSettings;
|
||||||
|
- (void)setRewardedVideoSettings:(NSDictionary *)rewardedVideoSettings;
|
||||||
|
- (void)setBannerSettings:(NSDictionary *)bannerSettings;
|
||||||
|
- (void)setNativeAdSettings:(NSDictionary *)nativeAdSettings;
|
||||||
|
- (void)setProviderDefaultInstance:(NSString *)providerDefaultInstance;
|
||||||
|
- (void)setIsOneFlow:(BOOL)isOneFlow;
|
||||||
|
- (NSString *)customNetworkAdapterNameForAdUnit:(ISAdUnit *)adUnit;
|
||||||
|
- (NSDictionary *)adUnitSettings;
|
||||||
|
- (NSString *)demandSourceName;
|
||||||
|
- (NSNumber *)isOneFlow;
|
||||||
|
|
||||||
|
- (BOOL)hasConsentCMP;
|
||||||
|
- (BOOL)getConsentCMP;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterConsentProtocol.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Yonti Makmel on 16/06/2021.
|
||||||
|
// Copyright © 2021 ironSource. All rights reserved.
|
||||||
|
//
|
||||||
|
#ifndef ISAdapterConsentProtocol_h
|
||||||
|
#define ISAdapterConsentProtocol_h
|
||||||
|
|
||||||
|
@protocol ISAdapterConsentProtocol <NSObject>
|
||||||
|
|
||||||
|
- (void)setConsent:(BOOL)consent;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif /* ISAdapterConsentProtocol_h */
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterDebugProtocol.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Yonti Makmel on 16/06/2021.
|
||||||
|
// Copyright © 2021 ironSource. All rights reserved.
|
||||||
|
//
|
||||||
|
#ifndef ISAdapterDebugProtocol_h
|
||||||
|
#define ISAdapterDebugProtocol_h
|
||||||
|
|
||||||
|
@protocol ISAdapterDebugProtocol <NSObject>
|
||||||
|
|
||||||
|
- (void)setAdapterDebug:(BOOL)adapterDebug;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif /* ISAdapterDebugProtocol_h */
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterErrorType.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Guy Lis on 11/08/2021.
|
||||||
|
// Copyright © 2021 ironSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
#ifndef ISAdapterErrorType_h
|
||||||
|
#define ISAdapterErrorType_h
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSInteger, ISAdapterErrorType) {
|
||||||
|
ISAdapterErrorTypeNoFill,
|
||||||
|
ISAdapterErrorTypeAdExpired,
|
||||||
|
ISAdapterErrorTypeInternal
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* ISAdapterErrorType_h */
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// AdapterErrors.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Guy Lis on 05/07/2021.
|
||||||
|
// Copyright © 2021 ironSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef AdapterErrors_h
|
||||||
|
#define AdapterErrors_h
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSInteger, ISAdapterErrors) {
|
||||||
|
ISAdapterErrorInternal = 1000, // internal error
|
||||||
|
ISAdapterErrorAdExpired = 1001, // expired ad error
|
||||||
|
ISAdapterErrorMissingParams = 1002 // missing parameters error
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* AdapterErrors_h */
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterMetaDataProtocol.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Guy Lis on 06/07/2021.
|
||||||
|
// Copyright © 2021 ironSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef ISAdapterMetaDataProtocol_h
|
||||||
|
#define ISAdapterMetaDataProtocol_h
|
||||||
|
|
||||||
|
@protocol ISAdapterMetaDataProtocol <NSObject>
|
||||||
|
|
||||||
|
- (void)setMetaDataWithKey:(NSString *)key andValues:(NSMutableArray *)values;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif /* ISAdapterMetaDataProtocol_h */
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterNativeAdData.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Hadar Pur on 27/06/2023.
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISNativeAdDataProtocol.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface ISAdapterNativeAdData : NSObject <ISNativeAdDataProtocol>
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterNativeAdViewBinder.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Hadar Pur on 19/06/2023.
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISAdapterNativeAdViewBinderProtocol.h"
|
||||||
|
#import "ISNativeAdViewHolder.h"
|
||||||
|
|
||||||
|
@interface ISAdapterNativeAdViewBinder : NSObject <ISAdapterNativeAdViewBinderProtocol>
|
||||||
|
|
||||||
|
@property(nonatomic, strong, nullable) ISNativeAdViewHolder *adViewHolder;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterNativeAdViewBinderProtocol.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Hadar Pur on 02/07/2023.
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ISNativeAdViewBinderProtocol.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol ISAdapterNativeAdViewBinderProtocol <ISNativeAdViewBinderProtocol>
|
||||||
|
|
||||||
|
@required
|
||||||
|
|
||||||
|
@property(nonatomic, strong, nullable) UIView *networkNativeAdView;
|
||||||
|
|
||||||
|
- (void)setNativeAdView:(UIView *_Nullable)nativeAdView;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterNetworkData.h
|
||||||
|
// IronSourceSDK
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISAdUnit.h"
|
||||||
|
|
||||||
|
@protocol ISAdapterNetworkData <NSObject>
|
||||||
|
|
||||||
|
@required
|
||||||
|
|
||||||
|
- (NSDictionary *)networkDataByAdUnit:(ISAdUnit *)adUnit;
|
||||||
|
|
||||||
|
- (NSDictionary *)allData;
|
||||||
|
|
||||||
|
- (id)dataByKeyIgnoreCase:(NSString *)desiredKey valueType:(Class)valueType;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterNetworkDataProtocol.h
|
||||||
|
// IronSourceSDK
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISAdapterNetworkData.h"
|
||||||
|
|
||||||
|
@protocol ISAdapterNetworkDataProtocol <NSObject>
|
||||||
|
|
||||||
|
@required
|
||||||
|
|
||||||
|
- (void)setNetworkData:(id<ISAdapterNetworkData>)networkData;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// ISAdapterSettingsProtocol.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Yonti Makmel on 11/10/2021.
|
||||||
|
// Copyright © 2021 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISAdapterConfig.h"
|
||||||
|
#import "ISLoadWhileShowSupportState.h"
|
||||||
|
|
||||||
|
@protocol ISAdapterSettingsProtocol <NSObject>
|
||||||
|
|
||||||
|
- (ISLoadWhileShowSupportState)getLoadWhileShowSupportedStateWithAdapterConfig:
|
||||||
|
(ISAdapterConfig*)adapterConfig;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
//
|
||||||
|
// ISAppStoreErrorDelegate.h
|
||||||
|
// IronSourceSDK
|
||||||
|
//
|
||||||
|
// Created by Gal Salti on 27/09/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISNAppStoreVCRootViewDelegate.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol ISAppStoreErrorDelegate <NSObject, ISNAppStoreVCRootViewDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// ISBannerAdDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Guy Lis on 27/03/2023.
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISAdapterAdViewDelegate.h"
|
||||||
|
|
||||||
|
#ifndef ISBannerAdDelegate_h
|
||||||
|
#define ISBannerAdDelegate_h
|
||||||
|
|
||||||
|
@protocol ISBannerAdDelegate <ISAdapterAdViewDelegate>
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif /* ISBannerAdDelegate_h */
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
//
|
||||||
|
// ISBannerAdapterDelegate.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Pnina Rapoport on 02/04/2017.
|
||||||
|
// Copyright © 2017 Supersonic. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
@protocol ISBannerAdapterDelegate <NSObject>
|
||||||
|
|
||||||
|
@required
|
||||||
|
|
||||||
|
- (void)adapterBannerInitSuccess;
|
||||||
|
|
||||||
|
- (void)adapterBannerInitFailedWithError:(NSError *)error;
|
||||||
|
|
||||||
|
- (void)adapterBannerDidLoad:(UIView *)bannerView;
|
||||||
|
|
||||||
|
- (void)adapterBannerDidFailToLoadWithError:(NSError *)error;
|
||||||
|
|
||||||
|
- (void)adapterBannerDidClick;
|
||||||
|
|
||||||
|
#pragma mark - optional - when supported by network
|
||||||
|
|
||||||
|
- (void)adapterBannerWillPresentScreen;
|
||||||
|
|
||||||
|
- (void)adapterBannerDidDismissScreen;
|
||||||
|
|
||||||
|
- (void)adapterBannerWillLeaveApplication;
|
||||||
|
|
||||||
|
- (void)adapterBannerDidShow;
|
||||||
|
|
||||||
|
- (void)adapterBannerDidFailToShowWithError:(NSError *)error;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
//
|
||||||
|
// ISBannerAdapterProtocol.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Pnina Rapoport on 02/04/2017.
|
||||||
|
// Copyright © 2017 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ISAdUnitAdapterProtocol.h"
|
||||||
|
#import "ISBannerAdapterDelegate.h"
|
||||||
|
#import "ISBannerSize.h"
|
||||||
|
#import "ISBiddingDataDelegate.h"
|
||||||
|
|
||||||
|
@class ISAdapterConfig;
|
||||||
|
@protocol ISBannerAdapterProtocol <ISAdUnitAdapterProtocol>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
|
||||||
|
#pragma mark - for bidders, non bidders and demand only
|
||||||
|
|
||||||
|
- (void)destroyBannerWithAdapterConfig:(ISAdapterConfig *)adapterConfig;
|
||||||
|
|
||||||
|
- (CGFloat)getAdaptiveHeightWithWidth:(CGFloat)width;
|
||||||
|
|
||||||
|
#pragma mark - for non bidders
|
||||||
|
|
||||||
|
- (void)initBannerWithUserId:(NSString *)userId
|
||||||
|
adapterConfig:(ISAdapterConfig *)adapterConfig
|
||||||
|
delegate:(id<ISBannerAdapterDelegate>)delegate;
|
||||||
|
|
||||||
|
- (void)loadBannerWithAdapterConfig:(ISAdapterConfig *)adapterConfig
|
||||||
|
adData:(NSDictionary *)adData
|
||||||
|
viewController:(UIViewController *)viewController
|
||||||
|
size:(ISBannerSize *)size
|
||||||
|
delegate:(id<ISBannerAdapterDelegate>)delegate;
|
||||||
|
|
||||||
|
#pragma mark - for bidders and demand only
|
||||||
|
|
||||||
|
- (NSDictionary *)getBannerBiddingDataWithAdapterConfig:(ISAdapterConfig *)adapterConfig
|
||||||
|
adData:(NSDictionary *)adData;
|
||||||
|
|
||||||
|
- (void)collectBannerBiddingDataWithAdapterConfig:(ISAdapterConfig *)adapterConfig
|
||||||
|
adData:(NSDictionary *)adData
|
||||||
|
delegate:(id<ISBiddingDataDelegate>)delegate;
|
||||||
|
|
||||||
|
- (void)initBannerForBiddingWithUserId:(NSString *)userId
|
||||||
|
adapterConfig:(ISAdapterConfig *)adapterConfig
|
||||||
|
delegate:(id<ISBannerAdapterDelegate>)delegate;
|
||||||
|
|
||||||
|
// used for banner, bidders + non-bidders(one-flow) for demand only
|
||||||
|
- (void)loadBannerForBiddingWithAdapterConfig:(ISAdapterConfig *)adapterConfig
|
||||||
|
adData:(NSDictionary *)adData
|
||||||
|
serverData:(NSString *)serverData
|
||||||
|
viewController:(UIViewController *)viewController
|
||||||
|
size:(ISBannerSize *)size
|
||||||
|
delegate:(id<ISBannerAdapterDelegate>)delegate;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
//
|
||||||
|
// ISBannerSize.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Dor Alon on 12/09/2018.
|
||||||
|
// Copyright © 2018 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISContainerParams.h"
|
||||||
|
|
||||||
|
static NSString* const kSizeBanner = @"BANNER";
|
||||||
|
static NSString* const kSizeLarge = @"LARGE";
|
||||||
|
static NSString* const kSizeRectangle = @"RECTANGLE";
|
||||||
|
static NSString* const kSizeLeaderboard = @"LEADERBOARD";
|
||||||
|
static NSString* const kSizeSmart = @"SMART";
|
||||||
|
static NSString* const kSizeCustom = @"CUSTOM";
|
||||||
|
|
||||||
|
#define ISBannerSize_BANNER \
|
||||||
|
[[ISBannerSize alloc] initWithDescription:kSizeBanner width:320 height:50]
|
||||||
|
#define ISBannerSize_LARGE [[ISBannerSize alloc] initWithDescription:kSizeLarge width:320 height:90]
|
||||||
|
#define ISBannerSize_RECTANGLE \
|
||||||
|
[[ISBannerSize alloc] initWithDescription:kSizeRectangle width:300 height:250]
|
||||||
|
#define ISBannerSize_SMART [[ISBannerSize alloc] initWithDescription:kSizeSmart width:0 height:0]
|
||||||
|
|
||||||
|
@interface ISBannerSize : NSObject
|
||||||
|
|
||||||
|
#define ISBannerSize_LEADERBOARD \
|
||||||
|
[[ISBannerSize alloc] initWithDescription:kSizeLeaderboard width:728 height:90]
|
||||||
|
|
||||||
|
- (instancetype)initWithWidth:(NSInteger)width andHeight:(NSInteger)height;
|
||||||
|
- (instancetype)initWithDescription:(NSString*)description
|
||||||
|
width:(NSInteger)width
|
||||||
|
height:(NSInteger)height;
|
||||||
|
- (BOOL)isSmart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Calculates and returns the maximum height of an adaptive banner for a given width.
|
||||||
|
|
||||||
|
If there are no adaptive banner supporting networks, the return value will be -1.
|
||||||
|
|
||||||
|
@param width The specified width for which the maximum height is calculated.
|
||||||
|
@return The maximal height of an adaptive banner, or -1 if no supporting networks are found.
|
||||||
|
*/
|
||||||
|
+ (CGFloat)getMaximalAdaptiveHeightWithWidth:(CGFloat)width;
|
||||||
|
|
||||||
|
@property(readonly) NSString* sizeDescription;
|
||||||
|
@property(readonly) NSInteger width;
|
||||||
|
@property(readonly) NSInteger height;
|
||||||
|
@property(readwrite, getter=isAdaptive) BOOL adaptive;
|
||||||
|
|
||||||
|
@property(nonatomic, readwrite) ISContainerParams* containerParams;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// ISBannerView.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Gili Ariel on 06/04/2017.
|
||||||
|
// Copyright © 2017 Gili Ariel. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
static NSString* const kBannerWillMoveToSuperView = @"ISBANNER_WILL_MOVE_TO_SUPERVIEW";
|
||||||
|
|
||||||
|
@interface ISBannerView : UIView {
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
//
|
||||||
|
// ISBaseAdAdapter.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Yonti Makmel on 27/04/2021.
|
||||||
|
// Copyright © 2021 ironSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ISAdData.h"
|
||||||
|
#import "ISAdUnit.h"
|
||||||
|
#import "ISAdapterAdDelegate.h"
|
||||||
|
#import "ISAdapterBaseProtocol.h"
|
||||||
|
#import "ISAdapterConfig.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface ISBaseAdAdapter : NSObject
|
||||||
|
|
||||||
|
@property(nonatomic) ISAdUnit *adUnit;
|
||||||
|
@property(nonatomic, readonly) ISAdapterConfig *adapterConfig;
|
||||||
|
@property(nonatomic, readonly, nullable) NSUUID *adUnitObjectId;
|
||||||
|
|
||||||
|
/// @param adUnit the ad unit represented by the adapter
|
||||||
|
/// @param adapterConfig the configuration relevant for the adapter instance
|
||||||
|
- (instancetype)initWithAdUnit:(ISAdUnit *)adUnit adapterConfig:(ISAdapterConfig *)adapterConfig;
|
||||||
|
|
||||||
|
/// @param adUnit the ad unit represented by the adapter
|
||||||
|
/// @param adapterConfig the configuration relevant for the adapter instance
|
||||||
|
/// @param adUnitObjectId the object id for the ad loaded
|
||||||
|
|
||||||
|
- (instancetype)initWithAdUnit:(ISAdUnit *)adUnit
|
||||||
|
adapterConfig:(ISAdapterConfig *)adapterConfig
|
||||||
|
adUnitObjectId:(nullable NSUUID *)adUnitObjectId;
|
||||||
|
|
||||||
|
/// the network sdk version
|
||||||
|
- (nullable id<ISAdapterBaseProtocol>)getNetworkAdapter;
|
||||||
|
|
||||||
|
/// When the adapter needs to release certain elements to avoid memory leaks before being destroyed
|
||||||
|
- (void)releaseMemory;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// ISBaseAdInteractionAdapter.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Yonti Makmel on 11/10/2021.
|
||||||
|
// Copyright © 2021 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISAdapterAdFullscreenProtocol.h"
|
||||||
|
#import "ISBaseAdAdapter.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface ISBaseAdInteractionAdapter : ISBaseAdAdapter <ISAdapterAdFullscreenProtocol>
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// ISBaseAdUnitAdapter.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "ISAdapterConfig.h"
|
||||||
|
#import "ISNetworkInitCallbackProtocol.h"
|
||||||
|
|
||||||
|
@interface ISBaseAdUnitAdapter : NSObject <ISNetworkInitCallbackProtocol>
|
||||||
|
|
||||||
|
- (NSString *)getStringValueFromAdapterConfig:(ISAdapterConfig *)adapterConfig
|
||||||
|
forKey:(NSString *)key;
|
||||||
|
- (NSString *)getMissingParamErrorStringWithKey:(NSString *)key;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
|
||||||
|
//
|
||||||
|
// ISBaseAdapter+Internal.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Yotam Ohayon on 01/03/2016.
|
||||||
|
// Copyright © 2016 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef ISBaseAdapter_Internal_h
|
||||||
|
#define ISBaseAdapter_Internal_h
|
||||||
|
|
||||||
|
#import "ISBaseAdapter.h"
|
||||||
|
|
||||||
|
#import "ISBannerAdapterDelegate.h"
|
||||||
|
#import "ISInterstitialAdapterDelegate.h"
|
||||||
|
#import "ISNativeAdAdapterDelegate.h"
|
||||||
|
#import "ISRewardedVideoAdapterDelegate.h"
|
||||||
|
|
||||||
|
#import "ISConfigurations.h"
|
||||||
|
#import "ISMetaDataConstants.h"
|
||||||
|
#import "ISMetaDataUtils.h"
|
||||||
|
|
||||||
|
#import "ISConcurrentMutableDictionary.h"
|
||||||
|
#import "ISConcurrentMutableSet.h"
|
||||||
|
#import "ISError.h"
|
||||||
|
#import "ISLog.h"
|
||||||
|
#import "ISNetworkInitCallbackProtocol.h"
|
||||||
|
|
||||||
|
#import "ISBaseBannerAdapter.h"
|
||||||
|
#import "ISBaseInterstitialAdapter.h"
|
||||||
|
#import "ISBaseNativeAdAdapter.h"
|
||||||
|
#import "ISBaseRewardedVideoAdapter.h"
|
||||||
|
|
||||||
|
#import "ISAdapterNativeAdData.h"
|
||||||
|
#import "ISAdapterNativeAdViewBinder.h"
|
||||||
|
#import "ISNativeAdViewHolder.h"
|
||||||
|
#import "UIView+ISNativeView.h"
|
||||||
|
|
||||||
|
@interface ISBaseAdapter ()
|
||||||
|
|
||||||
|
#pragma mark - Validation
|
||||||
|
- (BOOL)isConfigValueValid:(NSString *)value;
|
||||||
|
- (NSError *)errorForMissingCredentialFieldWithName:(NSString *)fieldName;
|
||||||
|
|
||||||
|
#pragma mark - Private
|
||||||
|
- (UIViewController *)topMostController;
|
||||||
|
- (void)setMetaDataWithKey:(NSString *)key andValues:(NSMutableArray *)values;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif /* ISBaseAdapter_Internal_h */
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
//
|
||||||
|
// ISBaseAdapter.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright (c) 2015 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
#import "ISAdapterConfig.h"
|
||||||
|
#import "ISAdapterNetworkDataProtocol.h"
|
||||||
|
#import "ISBannerAdapterProtocol.h"
|
||||||
|
#import "ISConcurrentMutableDictionary.h"
|
||||||
|
#import "ISInterstitialAdapterProtocol.h"
|
||||||
|
#import "ISLoadWhileShowSupportState.h"
|
||||||
|
#import "ISNativeAdAdapterProtocol.h"
|
||||||
|
#import "ISRewardedVideoAdapterProtocol.h"
|
||||||
|
|
||||||
|
@interface ISBaseAdapter : NSObject <ISInterstitialAdapterProtocol,
|
||||||
|
ISRewardedVideoAdapterProtocol,
|
||||||
|
ISBannerAdapterProtocol,
|
||||||
|
ISAdapterNetworkDataProtocol,
|
||||||
|
ISNativeAdAdapterProtocol> {
|
||||||
|
@protected
|
||||||
|
ISLoadWhileShowSupportState LWSState;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property(nonatomic, strong) NSString *adapterName;
|
||||||
|
@property(nonatomic, strong) NSString *providerNetworkKey;
|
||||||
|
@property(strong, nonatomic) NSString *pluginType;
|
||||||
|
@property(strong, nonatomic) NSString *userId;
|
||||||
|
@property(strong, nonatomic) ISConcurrentMutableDictionary *adUnitAdapters;
|
||||||
|
|
||||||
|
- (instancetype)initAdapter:(NSString *)name;
|
||||||
|
- (void)earlyInitWithAdapterConfig:(ISAdapterConfig *)adapterConfig;
|
||||||
|
|
||||||
|
- (NSString *)sdkVersion;
|
||||||
|
- (NSString *)version;
|
||||||
|
- (NSString *)dynamicUserId;
|
||||||
|
|
||||||
|
// to be used by adapters that implement each ad unit separately
|
||||||
|
- (ISLoadWhileShowSupportState)getLWSSupportState:(ISAdapterConfig *)adapterConfig;
|
||||||
|
|
||||||
|
- (void)setNetworkData:(id<ISAdapterNetworkData>)networkData;
|
||||||
|
|
||||||
|
- (void)setRewardedVideoAdapter:(id<ISRewardedVideoAdapterProtocol>)rewardedVideoAdapter;
|
||||||
|
- (void)setInterstitialAdapter:(id<ISInterstitialAdapterProtocol>)interstitialAdapter;
|
||||||
|
- (void)setBannerAdapter:(id<ISBannerAdapterProtocol>)bannerAdapter;
|
||||||
|
- (void)setNativeAdAdapter:(id<ISNativeAdAdapterProtocol>)nativeAdAdapter;
|
||||||
|
- (void)setConsent:(BOOL)consent;
|
||||||
|
|
||||||
|
- (id<ISRewardedVideoAdapterProtocol>)getRewardedVideoAdapter;
|
||||||
|
- (id<ISInterstitialAdapterProtocol>)getInterstitialAdapter;
|
||||||
|
- (id<ISBannerAdapterProtocol>)getBannerAdapter;
|
||||||
|
- (id<ISNativeAdAdapterProtocol>)getNativeAdAdapter;
|
||||||
|
|
||||||
|
- (CGFloat)getAdaptiveHeightWithWidth:(CGFloat)width;
|
||||||
|
|
||||||
|
- (void)disposeRewardedVideoAdWithAdapterConfig:(ISAdapterConfig *)adapterConfig;
|
||||||
|
- (void)disposeInterstitialAdWithAdapterConfig:(ISAdapterConfig *)adapterConfig;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
//
|
||||||
|
// ISBaseBanner.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Guy Lis on 27/03/2023.
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISAdapterAdViewDelegate.h"
|
||||||
|
#import "ISAdapterBannerProtocol.h"
|
||||||
|
#import "ISBannerAdDelegate.h"
|
||||||
|
#import "ISBaseAdAdapter.h"
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface ISBaseBanner : ISBaseAdAdapter <ISAdapterBannerProtocol>
|
||||||
|
|
||||||
|
/// @param providerConfig the configuration relevant for the adapter instance
|
||||||
|
- (instancetype)init:(ISAdapterConfig *)providerConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* load the ad
|
||||||
|
*
|
||||||
|
* @param adData data containing the configuration passed from the server and other related
|
||||||
|
* parameters passed from the publisher like userId
|
||||||
|
* @param viewController the application view controller
|
||||||
|
* @param size the banner size the ad will be presented on
|
||||||
|
* @param delegate the callback listener to return
|
||||||
|
* mandatory callbacks based on the network - load success, load failure, ad opened
|
||||||
|
* optional callbacks - clicked, left application, presented, dismissed
|
||||||
|
*/
|
||||||
|
- (void)loadAdWithAdData:(nonnull ISAdData *)adData
|
||||||
|
viewController:(nonnull UIViewController *)viewController
|
||||||
|
size:(nonnull ISBannerSize *)size
|
||||||
|
delegate:(nonnull id<ISBannerAdDelegate>)delegate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* destroy the ad
|
||||||
|
*
|
||||||
|
* @param adData - data containing the configuration passed from the server and other related
|
||||||
|
* parameters passed from the publisher like userId
|
||||||
|
*/
|
||||||
|
- (void)destroyAdWithAdData:(nonnull ISAdData *)adData;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// ISBaseBannerAdapter.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Copyright © 2023 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISBannerAdapterProtocol.h"
|
||||||
|
#import "ISBaseAdUnitAdapter.h"
|
||||||
|
|
||||||
|
@interface ISBaseBannerAdapter : ISBaseAdUnitAdapter <ISBannerAdapterProtocol>
|
||||||
|
|
||||||
|
@end
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
//
|
||||||
|
// ISBaseInterstitial.h
|
||||||
|
// IronSource
|
||||||
|
//
|
||||||
|
// Created by Bar David on 24/10/2021.
|
||||||
|
// Copyright © 2021 IronSource. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ISBaseAdInteractionAdapter.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol ISInterstitialAdDelegate <ISAdapterAdInteractionDelegate>
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface ISBaseInterstitial : ISBaseAdInteractionAdapter
|
||||||
|
|
||||||
|
/// @param providerConfig the configuration relevant for the adapter instance
|
||||||
|
- (instancetype)init:(ISAdapterConfig *)providerConfig;
|
||||||
|
|
||||||
|
/// load the ad
|
||||||
|
/// @param adData data containing the configuration passed from the server and other related
|
||||||
|
/// parameters passed from the publisher like userId
|
||||||
|
/// @param delegate the delegate to return mandatory callbacks based on the network - load success,
|
||||||
|
/// load failure
|
||||||
|
- (void)loadAdWithAdData:(ISAdData *)adData delegate:(id<ISInterstitialAdDelegate>)delegate;
|
||||||
|
|
||||||
|
/// show the ad
|
||||||
|
/// @param viewController current viewController for showing the ad
|
||||||
|
/// @param adData data containing the configuration passed from the server and other related
|
||||||
|
/// parameters passed from the publisher like userId
|
||||||
|
/// @param delegate the delegate to return mandatory callbacks based on the network - ad opened, ad
|
||||||
|
/// closed, show failed optional callbacks - show success, ad clicked
|
||||||
|
- (void)showAdWithViewController:(UIViewController *)viewController
|
||||||
|
adData:(ISAdData *)adData
|
||||||
|
delegate:(id<ISInterstitialAdDelegate>)delegate;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user