1.3.8
This commit is contained in:
parent
6c61ad1b5d
commit
649de50973
@ -1,44 +0,0 @@
|
||||
<?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>AppLovinSDK.framework/AppLovinSDK</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AppLovinSDK.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>AppLovinSDK.framework/AppLovinSDK</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AppLovinSDK.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>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -1,11 +0,0 @@
|
||||
{
|
||||
"states": [{
|
||||
"id": 14,
|
||||
"is_initial_state": true,
|
||||
"type": "att",
|
||||
"destination_state_id": 99
|
||||
}, {
|
||||
"id": 99,
|
||||
"type": "reinit"
|
||||
}]
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
{
|
||||
"states": [{
|
||||
"id": 1,
|
||||
"is_initial_state": true,
|
||||
"type": "alert",
|
||||
"title": {
|
||||
"key": "PP_TITLE",
|
||||
"key_unified_flow": "PP_TITLE_UNIFIED_FLOW",
|
||||
"replacements": ["<APP_NAME>"]
|
||||
},
|
||||
"message": {
|
||||
"key": "AGREE_MESSAGE",
|
||||
"key_unified_flow": "AGREE_MESSAGE_UNIFIED_FLOW"
|
||||
},
|
||||
"transitions": [{
|
||||
"title": {
|
||||
"key": "AGREE_TO_TERMS_BUTTON_TITLE",
|
||||
"key_unified_flow": "CONTINUE_BUTTON_TITLE_UNIFIED_FLOW"
|
||||
},
|
||||
"style": "default",
|
||||
"destination_state_id": 12
|
||||
}]
|
||||
}, {
|
||||
"id": 12,
|
||||
"type": "event",
|
||||
"name": "tos_ok",
|
||||
"destination_state_id": 99
|
||||
}, {
|
||||
"id": 99,
|
||||
"type": "reinit"
|
||||
}]
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
{
|
||||
"states": [{
|
||||
"id": 1,
|
||||
"is_initial_state": true,
|
||||
"type": "alert",
|
||||
"title": {
|
||||
"key": "PP_TITLE",
|
||||
"key_unified_flow": "PP_TITLE_UNIFIED_FLOW",
|
||||
"replacements": ["<APP_NAME>"]
|
||||
},
|
||||
"message": {
|
||||
"key": "AGREE_MESSAGE",
|
||||
"key_unified_flow": "AGREE_MESSAGE_UNIFIED_FLOW"
|
||||
},
|
||||
"transitions": [{
|
||||
"title": {
|
||||
"key": "AGREE_TO_TERMS_BUTTON_TITLE",
|
||||
"key_unified_flow": "CONTINUE_BUTTON_TITLE_UNIFIED_FLOW"
|
||||
},
|
||||
"style": "default",
|
||||
"destination_state_id": 12
|
||||
}]
|
||||
}, {
|
||||
"id": 12,
|
||||
"type": "event",
|
||||
"name": "tos_ok",
|
||||
"destination_state_id": 14
|
||||
}, {
|
||||
"id": 14,
|
||||
"type": "att",
|
||||
"destination_state_id": 99
|
||||
}, {
|
||||
"id": 99,
|
||||
"type": "reinit"
|
||||
}]
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
{
|
||||
"states": [{
|
||||
"id": 1,
|
||||
"is_initial_state": true,
|
||||
"type": "alert",
|
||||
"title": {
|
||||
"key": "PP_AND_TOS_TITLE",
|
||||
"key_unified_flow": "PP_AND_TOS_TITLE_UNIFIED_FLOW",
|
||||
"replacements": ["<APP_NAME>"]
|
||||
},
|
||||
"message": {
|
||||
"key": "AGREE_MESSAGE",
|
||||
"key_unified_flow": "AGREE_MESSAGE_UNIFIED_FLOW"
|
||||
},
|
||||
"transitions": [{
|
||||
"title": {
|
||||
"key": "AGREE_TO_TERMS_BUTTON_TITLE",
|
||||
"key_unified_flow": "CONTINUE_BUTTON_TITLE_UNIFIED_FLOW"
|
||||
},
|
||||
"style": "default",
|
||||
"destination_state_id": 12
|
||||
}]
|
||||
}, {
|
||||
"id": 12,
|
||||
"type": "event",
|
||||
"name": "tos_ok",
|
||||
"destination_state_id": 99
|
||||
}, {
|
||||
"id": 99,
|
||||
"type": "reinit"
|
||||
}]
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
{
|
||||
"states": [{
|
||||
"id": 1,
|
||||
"is_initial_state": true,
|
||||
"type": "alert",
|
||||
"title": {
|
||||
"key": "PP_AND_TOS_TITLE",
|
||||
"key_unified_flow": "PP_AND_TOS_TITLE_UNIFIED_FLOW",
|
||||
"replacements": ["<APP_NAME>"]
|
||||
},
|
||||
"message": {
|
||||
"key": "AGREE_MESSAGE",
|
||||
"key_unified_flow": "AGREE_MESSAGE_UNIFIED_FLOW"
|
||||
},
|
||||
"transitions": [{
|
||||
"title": {
|
||||
"key": "AGREE_TO_TERMS_BUTTON_TITLE",
|
||||
"key_unified_flow": "CONTINUE_BUTTON_TITLE_UNIFIED_FLOW"
|
||||
},
|
||||
"style": "default",
|
||||
"destination_state_id": 12
|
||||
}]
|
||||
}, {
|
||||
"id": 12,
|
||||
"type": "event",
|
||||
"name": "tos_ok",
|
||||
"destination_state_id": 14
|
||||
}, {
|
||||
"id": 14,
|
||||
"type": "att",
|
||||
"destination_state_id": 99
|
||||
}, {
|
||||
"id": 99,
|
||||
"type": "reinit"
|
||||
}]
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
{
|
||||
"states": [{
|
||||
"is_initial_state": true,
|
||||
"id": 1000,
|
||||
"type": "decision",
|
||||
"decision_type": "is_al_gdpr",
|
||||
"destination_state_id_true": 20,
|
||||
"destination_state_id_false": 500
|
||||
}, {
|
||||
"id": 20,
|
||||
"type": "cmp_load",
|
||||
"decision_type": "cmp_load_success",
|
||||
"destination_state_id_true": 21,
|
||||
"destination_state_id_false": 500
|
||||
}, {
|
||||
"id": 21,
|
||||
"type": "cmp_show",
|
||||
"destination_state_id": 13
|
||||
}, {
|
||||
"id": 13,
|
||||
"type": "event",
|
||||
"name": "gdpr_ok",
|
||||
"destination_state_id": 1001
|
||||
}, {
|
||||
"id": 1001,
|
||||
"type": "decision",
|
||||
"decision_type": "is_user_eligible_for_att_alert",
|
||||
"destination_state_id_true": 14,
|
||||
"destination_state_id_false": 99
|
||||
}, {
|
||||
"id": 14,
|
||||
"type": "att",
|
||||
"destination_state_id": 99
|
||||
}, {
|
||||
"id": 500,
|
||||
"type": "terms_flow"
|
||||
}, {
|
||||
"id": 99,
|
||||
"type": "reinit"
|
||||
}]
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,81 +0,0 @@
|
||||
Open Measurement (OM) License, V 1.0
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
“Ad Verification” shall mean methods and practices for determining whether ads appear on intended sites, reach the targeted audience, and/or are viewable.
|
||||
|
||||
“Approve” “Approved” and “Approval” shall mean Licensor’s written approval, which may be granted or withheld in Licensor’s sole discretion.
|
||||
|
||||
“License” or “OM License” shall mean the terms and conditions for use, reproduction, and distribution as defined herein in this Open Measurement License, Version 1.0 or (at Your option) any later version of the Open Measurement License published by Licensor on the Licensor Website. For the avoidance of doubt, You may elect to use the OM Work under any version of the OM License that has been published by Licensor on the Licensor Website at the time of such use but must give any other recipients of the Work a copy of the OM License version you have elected in connection with any such distribution as required by Section 4 (Redistribution) below.
|
||||
|
||||
“Licensor” shall mean the copyright owners or entity authorized by the copyright owners of the Work that are granting the License, which authorized representative shall initially be IAB Technology Laboratory, Inc.
|
||||
|
||||
“Licensor Website” shall mean https://iabtechlab.com/specifications-guidelines/open-measurement-sdk/ or any other website subsequently identified by Licensor.
|
||||
|
||||
“Legal Entity” shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of more than fifty percent (50%) of the outstanding shares of such entity, or (iii) beneficial ownership of such entity.
|
||||
|
||||
“You” (or “Your”) shall mean an individual or Legal Entity exercising the permitted rights granted by this License.
|
||||
|
||||
“Source” form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
“SDK” shall mean a software development kit to enable use of the Object form of the Work for mobile Ad Verification purposes.
|
||||
|
||||
“SSP” shall mean a mobile advertising supply-side platform that operates an advertising SDK to monetize mobile applications mobile ads.
|
||||
|
||||
“Object” form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
“OMWG” shall mean the Open Measurement Working Group.
|
||||
|
||||
“Work” shall mean the OMWG mobile application Ad Verification software and related SDK made available under this License in Object form (unless otherwise expressly stated herein).
|
||||
|
||||
“Derivative Works” shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work, including without limitation such code as is required for integration of the SDK by an implementer thereof.
|
||||
|
||||
“Contribution” shall mean any work of authorship or other intellectual property, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is or was intentionally submitted to the Licensor by a member of the OMWG, or other Contributor, for inclusion in the Work where it will be licensed as part of the Work under the OM License. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the owner as “Not a Contribution.”
|
||||
|
||||
“Contributor” shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License.
|
||||
|
||||
(a) Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, royalty-free, irrevocable (except as stated in this License) copyright license to use, reproduce, publicly display, publicly perform, sublicense, and distribute the Work in Object form only. For clarity, this grant does not include the right to prepare, reproduce, publicly display, publicly perform, sublicense, or distribute Derivative Works.
|
||||
|
||||
(b) Notwithstanding the generality of the foregoing, except as otherwise Approved, the license to the Work is limited to the use of the Work and Work integrations by mobile application publishers implementing the Object form of the Work in their mobile apps for mobile Ad Verification purposes and SSPs implementing within their advertising monetization SDKs that are integrated by app publishers to serve advertisements that are subject to verification via the Work.
|
||||
|
||||
(c) In addition, subject to Approval, this License shall also include use of the Object form of the Work in an Approved proprietary mobile application plug-in, so long as it is either bundled within the official binary that is distributed by or under authority of Licensor, or is otherwise modular / additive to such official binary and does not require modification to the Source form of the Work (whether to the official binary or otherwise).
|
||||
|
||||
(d) In addition, You shall have a license to access or use the Source form of the Work only if specifically Approved by Licensor, but then only to the extent Approved and for such limited Approved purpose(s) (such as may be the case for purposes of merging Approved Contributions into the Work), which approval is revocable at any time by Licensor. The Source form of the Work shall be Licensor’s confidential information and shall not be used, distributed or disclosed except as Approved or authorized under Section 2(e) of this License; provided, however, individual Contributors retain all of their rights to their respective Contributions outside of the Work. In the event of any Source form modifications, whether for bug fixes or otherwise, the modifications must be submitted back to the Licensor as a Contribution within three (3) business days of completion and unless exigent circumstances reasonably require, before any public use, or otherwise upon request by Licensor.
|
||||
|
||||
(e) You acknowledge that the Source form of the Work is the confidential information of the Licensor and Contributors, as applicable. You may not disclose the Source form of the Work without prior written consent of Licensor, except (a) to Your employees, subcontractors and professional advisors under a strict duty of confidentiality, (b) to third parties only as expressly provided for herein, or (c) if and as required by court order, law or governmental or regulatory agency (after, if permitted, giving reasonable notice to the Licensor and using commercially reasonable efforts to provide Licensor with the opportunity to seek a protective order or the equivalent (at Licensor’s expense)). In the event that such protective order or other remedy is not obtained, or that Licensor waives compliance with the provisions hereof, You shall furnish only that portion of the Work which You are advised by counsel is legally required to be disclosed, and You shall use commercially reasonable efforts to ensure that confidential treatment shall be afforded such disclosed portion of the Work.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as set forth in this License) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work, subject to the terms and conditions of this License, solely without modifications in any medium, and in Object form only, provided that (a) You give any other recipients of the Work a copy of this License and (b) if the Work includes a “NOTICE” text file as part of its distribution, then any copies of the Work that You distribute must include a copy of that NOTICE file.
|
||||
|
||||
5. Submission of Contributions. Any Contribution You intentionally submit, or are otherwise required by this License or an Approval to submit, for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. For the avoidance of doubt, all Contributions to the Work are licensed and not assigned.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor nor any Contributor, except as required for reasonable and customary use in describing the origin of the Work.
|
||||
|
||||
7. Disclaimer of Warranty. Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any and all risks associated with Your exercise of permissions and rights under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Licensor or Contributor be liable to You for any damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if Licensor or any such Contributor has been advised of the possibility of such damages. You are obligated to comply with all applicable local, state, federal, national, and/or international laws and regulations (as applicable) in the course of using the Work, including, without limitation, all applicable data privacy laws and regulations (including, without limitation, any applicable self-regulatory guidelines) relevant to Your collection, use, and transfer of any data collected by the Work. Additionally, You acknowledge that use of the Work must follow appropriate guidance on use of parameters in the SDK, for example, as defined in relevant documentation associated with SDK and Work usage.
|
||||
|
||||
9. Indemnity.
|
||||
|
||||
(a) You will indemnify, defend (at the Licensor’s option) and hold Licensor, each Contributor and their related Legal Entities harmless against any claim, costs, losses, damages, liabilities, judgments, fees (including reasonable fees of attorneys and other professionals), and expenses arising out of or in connection with any claim, action or proceeding (any and all of which are “Claims”) by a third party arising out of Your (i) breach of the confidentiality provisions set forth in this License, (ii) intentional misconduct with respect to this License or the Work, (iii) unauthorized use or distribution of the Work, and/or (iv) use of the Work to collect, send, and/or use personal data in violation of applicable privacy laws or regulations (including, without limitation, any applicable self-regulatory guidelines).
|
||||
|
||||
(b) Except for (i) Claims by a third party arising out of Your intentional misconduct with respect to this License or the Work, including, without limitation, intentional violation of applicable privacy laws or regulations (including, without limitation, any applicable self-regulatory guidelines), and/or (ii) breach of any confidentiality obligation set forth herein, Your liability for defense and indemnity under this License will not exceed $10,000,000.
|
||||
|
||||
(c) The indemnified entity may, at its sole discretion, elect for You to assume control of the defense of the Claim for which you are required to indemnify the indemnified entity and related Legal Entities under this Section 9. If the defense or settlement is assumed by You, the indemnified entity may at any time thereafter elect to appoint its own counsel (at its own expense); or the indemnified entity may take over control of the defense and settlement of such Claim. You will not settle any Claim without the indemnified entity’s prior written consent.
|
||||
|
||||
10. Accepting Warranty or Additional Liability. While redistributing the Work, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of Licensor or any other Contributor, and only if You agree to indemnify, defend, and hold Licensor, each Contributor and their related Legal Entities harmless for any liability incurred by, or claims asserted against, such Licensor or Contributor or related Legal Entities by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
11. Termination.
|
||||
|
||||
(a) In the event that You materially breach this License, You shall promptly stop using the Work and submit written notice of the material breach to Licensor using the contact information for Licensor identified on the Licensor Website. If the breach is curable, You may attempt to cure the breach within 30 days. If either (i) You are not able to cure the breach within 30 days to the reasonable satisfaction of Licensor or (ii) the breach is not curable, then this License shall immediately terminate and You must destroy all copies of the Work unless Licensor Approves a different resolution in writing.
|
||||
|
||||
(b) If You commit a non-material breach of this License, You shall promptly provide written notice of the breach to Licensor using the contact information for Licensor identified on the Licensor Website and attempt to cure the non-material breach within 30 days. If You fail to cure the non-material breach within the 30 day period, this License shall terminate at the end of such 30 day period and You shall immediately stop using and destroy all copies of the Work unless Licensor Approves a different resolution in writing.
|
||||
|
||||
(c) Termination of Your rights under this section does not terminate the licenses of parties who have received copies of the Work or rights from You under this License prior to that termination.
|
||||
|
||||
12. Miscellaneous. This License will be binding upon, inure to the benefit of, and be enforceable by and against, the permitted successors and transferees of the parties; provided that any such successor and/or transferee agrees, and by downloading or using the Work agrees, like all other licensees of the Work, to be bound by the terms of this OM License. This License will be governed by, and construed in accordance with, the laws of the State of New York applicable to contracts executed in and to be performed entirely within that state, without reference to conflicts of laws provisions. The parties hereby agree that the exclusive venue for any disputes hereunder will be in the state and federal courts in the City of New York in the State of New York, and the parties waive any objection based on inconvenient forum and/or all other choice of forum issues. This License contains and constitutes the entire agreement among the parties with respect to the subject matter hereof and supersedes all prior negotiations, agreements and understandings of the parties, whether written or oral. If any term or provision of this License is determined to be invalid, illegal or incapable of being enforced by any rule of law, public policy or other reason, all other conditions and provisions of this License will nevertheless remain in full force and effect, and the invalid or unenforceable term or provision will be deemed replaced by a term or provision as determined by a court to be valid and enforceable to the maximum extent possible, and to express the intention of the parties with respect to the invalid or unenforceable term or provision. No failure or delay by any party in exercising any right, power or privilege under this License will operate as a waiver of such right, power or privilege unless such waiver is made in an instrument in writing signed on behalf of the waiving party. A single or partial exercise of any right, power or privilege will not preclude any other or further exercise of such right, power or privilege or the exercise of any other right, power or privilege. The rights and remedies provided in this License will be cumulative and not exclusive of any rights or remedies provided by law. The parties are independent contractors, and this License does not create an agency, partnership, joint venture, or other legal entity. There are no third-party beneficiaries to this License.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,87 +0,0 @@
|
||||
;(function(omidGlobal) {
|
||||
var m;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function p(a){var b='undefined'!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if('number'==typeof a.length)return{next:aa(a)};throw Error(String(a)+' is not an iterable or ArrayLike');}function q(a){if(!(a instanceof Array)){a=p(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}
|
||||
var ba='function'==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},r='function'==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
||||
function ca(a){a=['object'==typeof globalThis&&globalThis,a,'object'==typeof window&&window,'object'==typeof self&&self,'object'==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error('Cannot find global object');}var da=ca(this);function u(a,b){if(b)a:{var c=da;a=a.split('.');for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&r(c,a,{configurable:!0,writable:!0,value:b})}}var ea;
|
||||
if('function'==typeof Object.setPrototypeOf)ea=Object.setPrototypeOf;else{var fa;a:{var ha={a:!0},ia={};try{ia.__proto__=ha;fa=ia.a;break a}catch(a){}fa=!1}ea=fa?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+' is not extensible');return a}:null}var ja=ea;
|
||||
function v(a,b){a.prototype=ba(b.prototype);a.prototype.constructor=a;if(ja)ja(a,b);else for(var c in b)if('prototype'!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ia=b.prototype}function w(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}function x(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
||||
var ka='function'==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)x(d,e)&&(a[e]=d[e])}return a};u('Object.assign',function(a){return a||ka});
|
||||
u('Symbol',function(a){function b(f){if(this instanceof b)throw new TypeError('Symbol is not a constructor');return new c(d+(f||'')+'_'+e++,f)}function c(f,k){this.g=f;r(this,'description',{configurable:!0,writable:!0,value:k})}if(a)return a;c.prototype.toString=function(){return this.g};var d='jscomp_symbol_'+(1E9*Math.random()>>>0)+'_',e=0;return b});
|
||||
u('Symbol.iterator',function(a){if(a)return a;a=Symbol('Symbol.iterator');for(var b='Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' '),c=0;c<b.length;c++){var d=da[b[c]];'function'===typeof d&&'function'!=typeof d.prototype[a]&&r(d.prototype,a,{configurable:!0,writable:!0,value:function(){return la(aa(this))}})}return a});function la(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
||||
u('WeakMap',function(a){function b(h){this.g=(g+=Math.random()+1).toString();if(h){h=p(h);for(var l;!(l=h.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(h){var l=typeof h;return'object'===l&&null!==h||'function'===l}function e(h){if(!x(h,k)){var l=new c;r(h,k,{value:l})}}function f(h){var l=Object[h];l&&(Object[h]=function(n){if(n instanceof c)return n;Object.isExtensible(n)&&e(n);return l(n)})}if(function(){if(!a||!Object.seal)return!1;try{var h=Object.seal({}),l=Object.seal({}),
|
||||
n=new a([[h,2],[l,3]]);if(2!=n.get(h)||3!=n.get(l))return!1;n.delete(h);n.set(l,4);return!n.has(h)&&4==n.get(l)}catch(t){return!1}}())return a;var k='$jscomp_hidden_'+Math.random();f('freeze');f('preventExtensions');f('seal');var g=0;b.prototype.set=function(h,l){if(!d(h))throw Error('Invalid WeakMap key');e(h);if(!x(h,k))throw Error('WeakMap key fail: '+h);h[k][this.g]=l;return this};b.prototype.get=function(h){return d(h)&&x(h,k)?h[k][this.g]:void 0};b.prototype.has=function(h){return d(h)&&x(h,
|
||||
k)&&x(h[k],this.g)};b.prototype.delete=function(h){return d(h)&&x(h,k)&&x(h[k],this.g)?delete h[k][this.g]:!1};return b});
|
||||
u('Map',function(a){function b(){var g={};return g.H=g.next=g.head=g}function c(g,h){var l=g.g;return la(function(){if(l){for(;l.head!=g.g;)l=l.H;for(;l.next!=l.head;)return l=l.next,{done:!1,value:h(l)};l=null}return{done:!0,value:void 0}})}function d(g,h){var l=h&&typeof h;'object'==l||'function'==l?f.has(h)?l=f.get(h):(l=''+ ++k,f.set(h,l)):l='p_'+h;var n=g.h[l];if(n&&x(g.h,l))for(g=0;g<n.length;g++){var t=n[g];if(h!==h&&t.key!==t.key||h===t.key)return{id:l,list:n,index:g,B:t}}return{id:l,list:n,
|
||||
index:-1,B:void 0}}function e(g){this.h={};this.g=b();this.size=0;if(g){g=p(g);for(var h;!(h=g.next()).done;)h=h.value,this.set(h[0],h[1])}}if(function(){if(!a||'function'!=typeof a||!a.prototype.entries||'function'!=typeof Object.seal)return!1;try{var g=Object.seal({x:4}),h=new a(p([[g,'s']]));if('s'!=h.get(g)||1!=h.size||h.get({x:4})||h.set({x:4},'t')!=h||2!=h.size)return!1;var l=h.entries(),n=l.next();if(n.done||n.value[0]!=g||'s'!=n.value[1])return!1;n=l.next();return n.done||4!=n.value[0].x||
|
||||
't'!=n.value[1]||!l.next().done?!1:!0}catch(t){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(g,h){g=0===g?0:g;var l=d(this,g);l.list||(l.list=this.h[l.id]=[]);l.B?l.B.value=h:(l.B={next:this.g,H:this.g.H,head:this.g,key:g,value:h},l.list.push(l.B),this.g.H.next=l.B,this.g.H=l.B,this.size++);return this};e.prototype.delete=function(g){g=d(this,g);return g.B&&g.list?(g.list.splice(g.index,1),g.list.length||delete this.h[g.id],g.B.H.next=g.B.next,g.B.next.H=g.B.H,g.B.head=null,this.size--,
|
||||
!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.H=b();this.size=0};e.prototype.has=function(g){return!!d(this,g).B};e.prototype.get=function(g){return(g=d(this,g).B)&&g.value};e.prototype.entries=function(){return c(this,function(g){return[g.key,g.value]})};e.prototype.keys=function(){return c(this,function(g){return g.key})};e.prototype.values=function(){return c(this,function(g){return g.value})};e.prototype.forEach=function(g,h){for(var l=this.entries(),n;!(n=l.next()).done;)n=n.value,
|
||||
g.call(h,n[1],n[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var k=0;return e});u('Object.values',function(a){return a?a:function(b){var c=[],d;for(d in b)x(b,d)&&c.push(b[d]);return c}});function ma(a,b){a instanceof String&&(a+='');var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}u('Array.prototype.keys',function(a){return a?a:function(){return ma(this,function(b){return b})}});
|
||||
u('Set',function(a){function b(c){this.g=new Map;if(c){c=p(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||'function'!=typeof a||!a.prototype.entries||'function'!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(p([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
||||
f.value[1]!=f.value[0]?!1:e.next().done}catch(k){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
|
||||
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});u('Object.is',function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});u('Array.prototype.includes',function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});
|
||||
u('String.prototype.includes',function(a){return a?a:function(b,c){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(b instanceof RegExp)throw new TypeError('First argument to String.prototype.includes must not be a regular expression');return-1!==this.indexOf(b,c||0)}});u('Object.entries',function(a){return a?a:function(b){var c=[],d;for(d in b)x(b,d)&&c.push([d,b[d]]);return c}});
|
||||
u('Array.prototype.values',function(a){return a?a:function(){return ma(this,function(b,c){return c})}});
|
||||
var z={wa:'loaded',Da:'start',qa:'firstQuartile',ya:'midpoint',Ea:'thirdQuartile',oa:'complete',za:'pause',Ba:'resume',na:'bufferStart',ma:'bufferFinish',Ca:'skipped',Ga:'volumeChange',Aa:'playerStateChange',ja:'adUserInteraction'},na={ta:'generic',Fa:'video',xa:'media'},oa={ba:'native',ua:'html',V:'javascript'},pa={ba:'native',V:'javascript',NONE:'none'},qa={sa:'full',pa:'domain',va:'limited'},ra={la:'backgrounded',ra:'foregrounded'},sa={ka:'app',Ha:'web'};function A(a,b){this.x=null!=a.x?a.x:a.left;this.y=null!=a.y?a.y:a.top;this.width=a.width;this.height=a.height;this.endX=this.x+this.width;this.endY=this.y+this.height;this.adSessionId=a.adSessionId||void 0;this.isFriendlyObstructionFor=a.isFriendlyObstructionFor||[];this.h=a.friendlyObstructionClass||void 0;this.i=a.friendlyObstructionPurpose||void 0;this.j=a.friendlyObstructionReason||void 0;this.clipsToBounds=void 0!==a.clipsToBounds?!0===a.clipsToBounds:!0;this.m=void 0!==a.hasWindowFocus?!0===
|
||||
a.hasWindowFocus:!0;this.notVisibleReason=a.notVisibleReason||void 0;this.noOutputDevice=a.noOutputDevice||void 0;this.childViews=a.childViews||[];this.isCreative=a.isCreative||!1;this.g=b}function ta(a){var b={};return b.width=a.width,b.height=a.height,b}function B(a){var b={};return Object.assign({},ta(a),(b.x=a.x,b.y=a.y,b))}function E(a){var b=B(a),c={};return Object.assign({},b,(c.endX=a.endX,c.endY=a.endY,c))}function ua(a,b,c){a.x+=b;a.y+=c;a.endX+=b;a.endY+=c}
|
||||
A.prototype.M=function(a){if(null==a)return!1;a=B(a);var b=a.y,c=a.width,d=a.height;return this.x===a.x&&this.y===b&&this.width===c&&this.height===d};function va(a){return a.width*a.height}function F(a){return 0===a.width||0===a.height};function wa(a,b){a=B(a);for(var c=[],d=[],e=0;e<b.length;e++){var f=B(b[e]);f=xa(a,f);I(c,f.x);I(c,f.endX);I(d,f.y);I(d,f.endY)}c=c.sort(function(k,g){return k-g});d=d.sort(function(k,g){return k-g});return{ha:c,ia:d}}function xa(a,b){return{x:Math.max(a.x,b.x),y:Math.max(a.y,b.y),endX:Math.min(a.x+a.width,b.x+b.width),endY:Math.min(a.y+a.height,b.y+b.height)}}function I(a,b){-1===a.indexOf(b)&&a.push(b)};function J(){this.h=this.g=this.D=this.u=this.m=this.s=void 0;this.A=0;this.l=[];this.v=[];this.C=0;this.o=[];this.j=[];this.i=[]}J.prototype.M=function(a){return null==a?!1:JSON.stringify(ya(this))===JSON.stringify(ya(a))};
|
||||
function ya(a){var b=[],c=[],d={viewport:a.s,adView:{percentageInView:a.A,pixelsInView:a.C,reasons:a.i},declaredFriendlyObstructions:a.l.length};if(void 0!==a.g){d.adView.geometry=B(a.g);d.adView.geometry.pixels=va(a.g);d.adView.onScreenGeometry=B(a.h);d.adView.onScreenGeometry.pixels=za(a);for(var e=0;e<a.j.length;e++)b.push(B(a.j[e]));for(e=0;e<a.v.length;e++){var f=a.v[e],k=f,g={};k.h&&(g.obstructionClass=k.h);k.i&&(g.obstructionPurpose=k.i);k.j&&(g.obstructionReason=k.j);f=xa(a.g,f);c.push(Object.assign({},
|
||||
{x:f.x,y:f.y,width:f.endX-f.x,height:f.endY-f.y},g))}d.adView.onScreenGeometry.obstructions=b;d.adView.onScreenGeometry.friendlyObstructions=c;void 0!==a.u&&void 0!==a.D&&(d.adView.containerGeometry=B(a.u),d.adView.onScreenContainerGeometry=B(a.D),d.adView.measuringElement=!0)}return d}function Aa(a,b){b=ta(b);a.s={};a.s.width=b.width;a.s.height=b.height;a.m={};a.m.x=0;a.m.y=0;a.m.width=b.width;a.m.height=b.height;a.m.endX=b.width;a.m.endY=b.height}
|
||||
function Ba(){return{x:0,y:0,endX:0,endY:0,width:0,height:0}}function Ca(a,b){var c={};c.x=Math.max(a.x,b.x);c.y=Math.max(a.y,b.y);c.endX=Math.min(a.endX,b.endX);c.endY=Math.min(a.endY,b.endY);c.width=Math.max(0,c.endX-c.x);c.height=Math.max(0,c.endY-c.y);return c}function Da(a,b){return.01<b.width-a.width||.01<b.height-a.height}function Ea(a){if(-1!==a.i.indexOf('backgrounded'))a.A=0,a.C=0;else{var b=va(a.g);if(0!==b){var c=za(a);a.A=Math.round(c/b*100);a.C=c}}}
|
||||
function Fa(a,b){if(F(b)||!a.h)b=!1;else{var c=E(a.h),d=c.y,e=c.endX;a=c.endY;var f=b.endX;c=c.x;(f=f<c||.01>Math.abs(f-c))||(f=b.x,f=f>e||.01>Math.abs(f-e));(e=f)||(e=b.endY,e=e<d||.01>Math.abs(e-d));(d=e)||(b=b.y,d=b>a||.01>Math.abs(b-a));b=!d}return b}function K(a,b){for(var c=!1,d=0;d<a.i.length;d++)a.i[d]===b&&(c=!0);c||a.i.push(b)}
|
||||
function za(a){var b=Math,c=b.max,d=va(a.h),e=a.j,f=0;if(0<e.length){var k=wa(a.h,e);a=k.ha;k=k.ia;for(var g=0;g<a.length-1;g++)for(var h=(a[g]+(a[g]+1))/2,l=a[g+1]-a[g],n=0;n<k.length-1;n++){for(var t=(k[n]+(k[n]+1))/2,C=k[n+1]-k[n],y=!1,G=0;G<e.length;G++){var H=B(e[G]);if(H.x<h&&H.x+H.width>h&&H.y<t&&H.y+H.height>t){y=!0;break}}y&&(f+=Math.round(l)*Math.round(C))}}return c.call(b,0,d-f)};function Ga(){};function Ha(){}
|
||||
function Ia(a,b,c,d,e){var f=new J;b=new A(b,!1);Aa(f,b);Ja(a,b,f,d);if(!e)return f.i=['unmeasurable'],f.s=void 0,f.A=0,f.j=[],f.g&&(a=f.g,c={},a=new A((c.x=0,c.y=0,c.width=a.width,c.height=a.height,c),a.g),f.g=a),f.h=Ba(),f;b.noOutputDevice&&(K(f,'backgrounded'),K(f,'noOutputDevice'));if('backgrounded'===c)K(f,'backgrounded');else if(void 0!==f.g){for(a=0;a<f.l.length;a++)Fa(f,f.l[a])&&f.v.push(f.l[a]);for(a=0;a<f.o.length;a++){if(c=Fa(f,f.o[a])){a:{c=f.o[a];for(d=0;d<f.j.length;d++)if(f.j[d].M(c)){c=!0;
|
||||
break a}c=!1}c=!c}c&&(K(f,'obstructed'),f.j.push(f.o[a]))}Ea(f)}else K(f,'notFound');return f}
|
||||
function Ja(a,b,c,d){var e=b.isCreative?!0:b.adSessionId===d;if(e){c.g=b;var f=E(c.g);a=Ca(c.m,f);var k=c.g;'notAttached'===k.notVisibleReason||'noWindowFocus'===k.notVisibleReason||'noAdView'===k.notVisibleReason?(K(c,'notFound'),c.h=new A(Ba(),!1)):(k=c.g,'viewInvisible'===k.notVisibleReason||'viewGone'===k.notVisibleReason||'viewNotVisible'===k.notVisibleReason||'viewAlphaZero'===k.notVisibleReason||'viewHidden'===k.notVisibleReason||void 0!==c.g.notVisibleReason||F(c.g)?(K(c,'hidden'),c.h=new A(Ba(),
|
||||
!1)):(c.g.m||(K(c,'backgrounded'),K(c,'noWindowFocus')),Da(a,f)&&K(c,'clipped'),c.h=new A(a,!1)))}else if(f=!0,b.g&&(f=-1!==b.isFriendlyObstructionFor.indexOf(d)?!1:!1===b.clipsToBounds),f){k=b.childViews;for(var g=0;g<k.length;g++)f=void 0!==c.g,Ja(a,new A(k[g],f),c,d)}e||void 0===c.g||(b.g?-1!==b.isFriendlyObstructionFor.indexOf(d)?c.l.push(b):c.o.push(b):(e=E(b),d=E(c.h),B(c.h),!F(c.h)&&b.clipsToBounds&&(b=Ca(d,e),Da(b,d)&&(K(c,'clipped'),c.h=new A(b,!1)))))};function Ka(){this.h=new Map;this.g=null}function La(){Ma||(Ma=new Ka);return Ma}var Ma=null;function Na(a,b){this.y=this.x=0;this.width=a;this.height=b};function Oa(){this.adSessionId=null;this.o={apiVersion:'1.0',accessMode:'limited',environment:'app',omidJsInfo:{omidImplementer:'omsdk',serviceVersion:'1.4.12-iab4299'}};this.C=null;this.A='foregrounded';this.u=this.l='none';this.s=this.j=this.i=this.m=this.h=this.g=this.J=this.D=null;this.I=!0;this.v=new Map}
|
||||
function Pa(a,b){void 0!==b.contentUrl&&(a.C=b.contentUrl,b.contentUrl=void 0);var c=a.o||{};b.omidJsInfo=Object.assign({},c.omidJsInfo||{},b.omidJsInfo||{});b=Object.assign({},c,b);a.I||(null!=a.j?(b.videoElement=a.j,b.accessMode='full'):null!=a.i&&(b.slotElement=a.i,b.accessMode='full'));a.o=b};var L=function(){if('undefined'!==typeof omidGlobal&&omidGlobal)return omidGlobal;if('undefined'!==typeof global&&global)return global;if('undefined'!==typeof window&&window)return window;if('undefined'!==typeof globalThis&&globalThis)return globalThis;var a=Function('return this')();if(a)return a;throw Error('Could not determine global object context.');}();function Qa(a,b){this.g=a;this.h=b}da.Object.defineProperties(Qa.prototype,{event:{configurable:!0,enumerable:!0,get:function(){return this.g}},origin:{configurable:!0,enumerable:!0,get:function(){return this.h}}});function M(){var a=w.apply(0,arguments);Ra(function(){throw new (Function.prototype.bind.apply(Error,[null,'Could not complete the test successfully - '].concat(q(a))));},function(){return console.error.apply(console,q(a))})}function Sa(){var a=w.apply(0,arguments);Ra(function(){},function(){return console.error.apply(console,q(a))})}function Ra(a,b){'undefined'!==typeof jasmine&&jasmine?a():'undefined'!==typeof console&&console&&console.error&&b()};function Ta(a){this.g=a;this.m=[];this.i=[];this.j=[];this.l=[];this.o={}}function Ua(a,b){if(void 0!==a.g&&a.g.adSessionId&&!1!==Va(a,b)){var c=b.event;a.j.filter(function(d){return d.type===c.type}).forEach(function(d){a.h(d.G,c)})}}function Wa(a,b){a.m.push(b);Ua(a,b)}function Xa(a,b,c){void 0!==a.g&&a.g.adSessionId&&a.m.filter(function(d){return d.event.type===b&&Va(a,d)}).map(function(d){return d.event}).forEach(function(d){a.h(c.G,d)})}
|
||||
function Va(a,b){var c=b.event.type,d=-1!==Object.values(z).indexOf(c)&&'volumeChange'!==c;return'impression'===c||'loaded'===c&&a.g.h?b.origin===a.g.u:d?b.origin===a.g.l:!0}function Ya(a,b,c){Object.keys(z).forEach(function(d){d=z[d];var e={type:d,P:c,G:b};a.j.push(e);Xa(a,d,e)})}function Za(a,b,c,d){var e={U:c,P:d,G:b};a.l.push(e);a.i.forEach(function(f){var k=$a(f);'sessionStart'===f.event.type&&ab(a,k,e);a.h(e.G,k)})}
|
||||
function bb(a,b,c){var d=N(a,'sessionError','native',{errorType:b,message:c});a.i.push(d);a.l.forEach(function(e){a.h(e.G,d.event)})}function cb(a,b){a.o=Object.assign(a.o,b);b=a.g.o;if(void 0!==b){b=Object.assign({},db(eb(a,fb(a,{context:b}),!0)),{supportsLoadedEvent:!!a.g.h||'video'==a.g.g});Object.assign(b,{pageUrl:null,contentUrl:a.g.C});var c=N(a,'sessionStart','native',b);a.i.push(c);a.l.forEach(function(d){var e=$a(c);ab(a,e,d);a.h(d.G,e)},a);gb(a)}}
|
||||
function ab(a,b,c){c.U&&(b.data.verificationParameters=a.o[c.U]);c.P&&(c=a.g.v.get(c.P))&&(b.data.verificationParameters=c.verificationParameters,b.data.context.accessMode=c.accessMode,'full'===c.accessMode&&(a.g.j&&(b.data.context.videoElement=a.g.j),a.g.i&&(b.data.context.slotElement=a.g.i)))}function hb(a){var b=N(a,'sessionFinish','native');a.i.push(b);a.l.forEach(function(c){a.h(c.G,b.event)})}Ta.prototype.h=function(a){var b=w.apply(1,arguments);try{a.apply(null,q(b))}catch(c){Sa(c)}};
|
||||
function ib(a,b){var c=(c=a.g.K)?ya(c):null;c=eb(a,fb(a,c));Wa(a,N(a,'impression',b,c))}function jb(a,b,c){if(a.g.h||'display'!=a.g.g)b=N(a,'loaded',b,eb(a,fb(a,void 0===c?null:c))),Wa(a,b)}
|
||||
function kb(a,b,c,d){'start'!==b&&'volumeChange'!==b||null!=(d&&d.deviceVolume)||(d.deviceVolume=a.g.D);if(d&&('start'===b||'volumeChange'===b)){var e=d.videoPlayerVolume,f=d.mediaPlayerVolume;null!=e?(Object.assign(d,{mediaPlayerVolume:e}),a.g.J=e):null!=f&&(Object.assign(d,{videoPlayerVolume:f}),a.g.J=f)}Wa(a,N(a,b,c,d))}
|
||||
function gb(a){var b=a.m.filter(function(f){return Object.values(z).includes(f.event.type)&&'video'==a.g.g&&f.origin===a.g.l||'loaded'==f.event.type&&'display'==a.g.g&&f.origin===a.g.u?!0:!1}).map(function(f){return f.event}),c=a.g.adSessionId||'',d={};b=p(b);for(var e=b.next();!e.done;d={F:d.F},e=b.next()){d.F=e.value;d.F.adSessionId||(d.F.adSessionId=c);if('loaded'==d.F.type){if(!a.g.h&&'display'==a.g.g)continue;d.F.data=eb(a,fb(a,d.F.data))}a.j.filter(function(f){return function(k){return k.type===
|
||||
f.F.type}}(d)).forEach(function(f){return function(k){return k.G(f.F)}}(d))}}function lb(a,b,c){a:{c=new Set(c);a=p(a.m.concat(a.i));for(var d=a.next();!d.done;d=a.next())if(d=d.value,c.has(d.event.type)&&d.origin!=b){b=!0;break a}b=!1}return b?(M('Event owner cannot be registered after its events have already been published.'),!1):!0}function mb(a,b){lb(a,b,Object.values(z))&&nb(a,b)&&(a.g.l=b)}function ob(a,b){lb(a,b,['impression'])&&pb(a,b)&&(a.g.u=b)}
|
||||
function pb(a,b){var c=a.g.u;return'none'!=c&&c!=b?(M('Impression event is owned by '+(a.g.u+', not ')+(b+'.')),!1):!0}function nb(a,b){var c=a.g.l;return'none'!=c&&c!=b?(M('Media events are owned by '+(a.g.l+', not '+b+'.')),!1):!0}function eb(a,b,c){c=void 0===c?!1:c;b=Object.assign({},b);a.g.g&&Object.assign(b,{mediaType:a.g.g});a.g.h&&(c||'definedByJavaScript'!==a.g.h)&&Object.assign(b,{creativeType:a.g.h});return b}function db(a){var b=La().g;return b?Object.assign({},a,{lastActivity:b}):a}
|
||||
function fb(a,b){return a.g.m?Object.assign({},b,{impressionType:a.g.m}):b}function N(a,b,c,d){return new Qa({adSessionId:a.g.adSessionId||'',timestamp:(new Date).getTime(),type:b,data:d},c)}function $a(a){a=a.event;var b=a.data?Object.assign({},a.data):void 0;'sessionStart'===a.type&&(b.context=Object.assign({},b.context));return{adSessionId:a.adSessionId,timestamp:a.timestamp,type:a.type,data:b}};function qb(a,b,c){this.h=a;this.i=b;this.g=c}
|
||||
function rb(a,b,c){'container'===b&&void 0!==a.g.L&&void 0!==a.g&&null!=a.g.adSessionId&&(a.g.N=Ia(a.i,a.g.L,a.g.A,a.g.adSessionId,!0));b=a.g;var d=b.N,e=b.O;if(d)if(e){b=new J;var f=d.s,k=d.g,g=d.h,h=e.g,l=e.h;f&&k&&g&&h&&l&&(Aa(b,f),b.u=new A(k,!1),b.D=new A(g,!1),b.o=Object.assign([],d.o),b.j=Object.assign([],d.j),b.l=Object.assign([],d.l),b.v=Object.assign([],d.v),b.i=Object.assign([],e.i,d.i),d=b.u.x,e=b.u.y,h=new A(h,!1),l=new A(l,!1),ua(h,d,e),ua(l,d,e),b.g=h,b.h=Ca(l,g),Ea(b))}else b=d;else b=
|
||||
null;g=a.g.K;if(b&&!b.M(g)||c)g=ya(b),c&&(g.adView.reasons=g.adView.reasons||[c]),c=a.h,'audio'!=c.g.h&&Wa(c,N(c,'geometryChange','native',g)),a.g.K=b};function sb(a,b,c){return tb(a,'setInterval')(b,c)}function ub(a,b){tb(a,'clearInterval')(b)}function vb(a,b){tb(a,'clearTimeout')(b)}function tb(a,b){return a.g&&a.g[b]?a.g[b]:wb(a,b)}
|
||||
function xb(a,b,c,d){if(a.g.document&&a.g.document.body){var e=a.g.document.createElement('img');e.width=1;e.height=1;e.style.display='none';e.src=b;c&&e.addEventListener('load',function(){return c()});d&&e.addEventListener('error',function(){return d()});a.g.document.body.appendChild(e)}else wb(a,'sendUrl')(b,c,d)}function wb(a,b){if(a.g&&a.g.omidNative&&a.g.omidNative[b])return a.g.omidNative[b].bind(a.g.omidNative);throw Error('Native interface method "'+b+'" not found.');};function O(a){return'object'===typeof a}function P(a){return'number'===typeof a&&!isNaN(a)&&0<=a}function Q(a){return'string'===typeof a}function R(a,b){return Q(a)&&-1!==Object.values(b).indexOf(a)}function yb(a){return!(!a||!a.tagName||'iframe'!==a.tagName.toLowerCase())};function S(a,b,c,d,e){this.m=a;this.aa=b;this.L=c;this.i=d;this.T=e;this.h=null;this.g=this.j=this.D=void 0;this.O=!0;this.J=void 0;zb(this)}
|
||||
function zb(a){if(!a.h){var b;a:{if((b=a.m.document)&&b.getElementsByClassName&&(b=b.getElementsByClassName('omid-element'))){if(1==b.length){b=b[0];break a}1<b.length&&a.O&&(bb(a.L,'generic',"More than one element with 'omid-element' class name."),a.O=!1)}b=null}if(b&&b.tagName&&'video'===b.tagName.toLowerCase())a.i.j=b;else if(b&&b.tagName)a.i.i=b;else return;Ab(a)}}function Ab(a){a.i.j?(a.h=a.i.j,a.o()):a.i.i&&(a.h=a.i.i,yb(a.h)?a.i.s&&a.o():a.o())}
|
||||
function Bb(a){a.g&&(yb(a.h)?a.i.s&&(a.K(),Cb(a)):(a.K(),Cb(a)))}S.prototype.A=function(){this.J&&(this.m.document.removeEventListener('visibilitychange',this.J),this.J=void 0)};S.prototype.o=function(){};function Cb(a){a.D&&(a.i.O=a.D,rb(a.aa,'creative'))}function Db(a){if(a.g&&a.i.s){var b=new A(a.i.s,!1);ua(b,a.g.x,a.g.y);b.clipsToBounds=!0;return b}};function T(a,b,c,d,e,f){S.call(this,a,c,d,e,f);this.s=b;this.l=void 0}v(T,S);T.prototype.A=function(){void 0!==this.l&&(ub(this.T,this.l),this.l=void 0);S.prototype.A.call(this)};T.prototype.o=function(){var a=this;S.prototype.o.call(this);null==this.h?this.l=void 0:void 0===this.l&&(this.l=sb(this.T,function(){return Eb(a)},200),Eb(this))};
|
||||
T.prototype.K=function(){if(this.j){var a=Db(this);if(a){this.g.isCreative=!1;a.isCreative=!0;for(var b=!1,c=0;c<this.g.childViews.length;c++)if(this.g.childViews[c].isCreative){this.g.childViews[c]=a;b=!0;break}b||this.g.childViews.push(a)}else this.g.isCreative=!0;this.D=Ia(this.s,this.j,this.i.A,this.i.adSessionId,this.I())}};T.prototype.I=function(){return!0};
|
||||
function Eb(a){if(void 0!==a.l){b:{try{var b=a.m.top;var c=0<=b.innerHeight&&0<=b.innerWidth;break b}catch(d){}c=!1}c?(c=a.m.top,c=new A(new Na(c.innerWidth,c.innerHeight),!1)):c=new A(new Na(0,0),!1);b=a.h.getBoundingClientRect();if(null==b.x||isNaN(b.x))b.x=b.left;if(null==b.y||isNaN(b.y))b.y=b.top;b=new A(b,!1);c.M(a.j)&&b.M(a.g)||(a.g=b,a.g.clipsToBounds=!0,a.j=c,a.j.childViews.push(a.g),Bb(a))}};function U(a,b,c,d,e,f){S.call(this,a,c,d,e,f);this.v=this.s=this.u=this.l=void 0;this.N=!1;this.C=void 0}v(U,S);U.prototype.A=function(){this.l&&this.l.disconnect();Fb(this);S.prototype.A.call(this)};U.prototype.o=function(){S.prototype.o.call(this);if(this.h&&(this.l||(this.l=Gb(this)),Hb(this),Ib(this.h)&&Jb(this),'backgrounded'===this.i.A)){var a=Kb(new Na(0,0));this.C=this.g=this.j=a;Bb(this)}};
|
||||
U.prototype.K=function(){if(this.g&&this.C){var a=Db(this);if(a){var b=a;var c=this.C;var d=Math.max(a.x,c.x);var e=Math.max(a.y,c.y),f=Math.min(a.endX,c.endX);a=Math.min(a.endY,c.endY);f<=d||a<=e?d=null:(c={},d=new A((c.x=d,c.y=e,c.width=Math.abs(f-d),c.height=Math.abs(a-e),c),!1));d||(d=new A({x:0,y:0,width:0,height:0},!1))}else b=this.g,d=this.C;e=new J;this.j&&Aa(e,this.j);e.g=b;e.h=d;Ea(e);this.N?F(e.g)?K(e,'hidden'):100===e.A||K(e,'clipped'):K(e,'viewport');this.D=e}};U.prototype.I=function(){return!0};
|
||||
function Fb(a){a.u&&(a.u.disconnect(),a.u=void 0);a.s&&(a.s.disconnect(),a.s=void 0);a.v&&((0,a.m.removeEventListener)('resize',a.v),a.v=void 0)}function Hb(a){a.l&&a.h&&(a.l.unobserve(a.h),a.l.observe(a.h))}function Ib(a){a=a.getBoundingClientRect();return 0==a.width||0==a.height}
|
||||
function Gb(a){return new a.m.IntersectionObserver(function(b){try{if(b.length){for(var c,d=b[0],e=1;e<b.length;e++)b[e].time>d.time&&(d=b[e]);c=d;a.j=Kb(c.rootBounds);a.g=Kb(c.boundingClientRect);a.C=Kb(c.intersectionRect);a.N=!!c.isIntersecting;Bb(a)}}catch(f){a.A(),bb(a.L,'generic','Problem handling IntersectionObserver callback: '+f.message)}},{root:null,rootMargin:'0px',threshold:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]})}
|
||||
function Jb(a){a.m.ResizeObserver?a.u||(a.u=Lb(a,function(){return Mb(a)}),a.u.observe(a.h)):(a.v||(a.v=function(){return Mb(a)},(0,a.m.addEventListener)('resize',a.v)),a.s||(a.s=new MutationObserver(function(){return Mb(a)}),a.s.observe(a.h,{childList:!1,attributes:!0,subtree:!1})))}function Mb(a){a.h&&!Ib(a.h)&&(Hb(a),Fb(a))}function Lb(a,b){return new a.m.ResizeObserver(b)}function Kb(a){if(a&&null!==a.x&&null!==a.y&&null!==a.width&&null!==a.height)return new A(a,!1)};function Ob(a,b){this.h=a;this.g=b};function Pb(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(a){var b=16*Math.random()|0;return'y'===a?(b&3|8).toString(16):b.toString(16)})};function Qb(a,b){var c=void 0===c?L:c;this.j=a;this.g=c;this.i=b;this.h=[]}
|
||||
function Rb(a){if(!a.g||!a.g.document)throw Error('OMID Service Script is not running within a window.');var b=a.h;a.h=[];b.forEach(function(c){try{var d=a.i.I?'limited':'full',e=R(c.accessMode,qa)?c.accessMode:null;var f=e?'full'==e&&'limited'==d?d:'domain'==e?'limited':e:d;c.accessMode=f;a:{var k=c.resourceUrl,g=a.g.location.origin;try{var h=new URL(k,g);break a}catch(G){}try{h=new URL(k);break a}catch(G){}h=null}if(d=h){var l=Pb(),n=a.g.document,t=n.createElement('iframe');t.id='omid-verification-script-frame-'+
|
||||
l;t.style.display='none';['full','limited'].includes(f)?t.srcdoc="<html><head>\n<script type=\"text/javascript\">window['omidVerificationProperties'] = {\n'serviceWindow': window.parent,\n'injectionSource': 'app',\n'injectionId': '"+(l+'\',\n};\x3c/script>\n<script type="text/javascript" src="')+d.href+'">\x3c/script>\n</head><body></body></html>':'domain'==f&&(t.src=Sb(a,l,d).href);['domain','limited'].includes(f)&&(t.sandbox='allow-scripts');n.body.appendChild(t);La().h.set(l,t);var C=c.vendorKey,
|
||||
y=c.verificationParameters;C=void 0===C?'':C;y=void 0===y?'':y;C&&'string'===typeof C&&''!==C&&y&&'string'===typeof y&&''!==y&&(a.j.o[C]=y);a.i.v.set(l,c)}}catch(G){Sa('OMID verification script '+c.resourceUrl+' failed to load: '+G)}})}
|
||||
function Sb(a,b,c){var d='/.well-known/omid/omloader-v1.html#';(new Map([['verificationScriptUrl',c.href],['injectionId',b]])).forEach(function(e,f){d+=encodeURIComponent(f)+'='+encodeURIComponent(e)+'&'});b=null;try{b=new URL(d,a.g.parent.location.origin)}catch(e){throw Error('OMID Service Script cannot access the parent window.');}return b};function Tb(a,b,c,d,e,f){var k=this;this.g=a;this.h=b;this.j=c;this.i=d;this.l=e;this.o=f;this.m=!1;Ub(this,function(g){if('sessionStart'===g.type){k.m=!0;try{Rb(k.l)}catch(h){M(h.message)}}'sessionFinish'===g.type&&(k.m=!1)})}function Ub(a,b,c,d){Za(a.h,b,c,d)}m=Tb.prototype;m.setSlotElement=function(a){a&&a.tagName?(this.g.i=a,this.i&&Ab(this.i)):M('setSlotElement called with a non-HTMLElement. It will be ignored.')};m.setElementBounds=function(a){this.g.s=a;this.i&&Ab(this.i);this.i&&Bb(this.i)};
|
||||
m.error=function(a,b){bb(this.h,a,b)};m.injectVerificationScriptResources=function(a){var b=this.l;b.h.push.apply(b.h,q(a));if(this.m)try{Rb(this.l)}catch(c){M(c.message)}};m.setCreativeType=function(a,b){b=void 0===b?null:b;if(!this.g.g||this.g.h)this.g.h=a,'video'==a||'audio'==a?this.g.g='video':'htmlDisplay'==a||'nativeDisplay'==a?this.g.g='display':'definedByJavaScript'==a&&b&&(this.g.g='none'==b?'display':'video')};m.setImpressionType=function(a){if(!this.g.g||this.g.h)this.g.m=a};
|
||||
m.setClientInfo=function(a,b,c){var d=this.g.o||{};d.omidJsInfo=Object.assign({},d.omidJsInfo,{sessionClientVersion:a,partnerName:b,partnerVersion:c});this.g.o=d;return this.g.o.omidJsInfo.serviceVersion};function Vb(a,b){if(!b)return a.g;for(var c=p(a.h.values()),d=c.next();!d.done;d=c.next())if(d=d.value,d.g.v.has(b))return d;return a.g}function V(a,b){return null==b?a.g:a.h.get(b)||a.g}function Wb(a){var b=new Oa,c=new Ta(b),d=new Ga,e=new Ha,f=new qb(c,e,b);a=a.i;var k=omidGlobal;d=k?k.IntersectionObserver&&(k.MutationObserver||k.ResizeObserver)?new U(k,d,f,c,b,a):new T(k,e,f,c,b,a):null;return new Tb(b,c,f,d,new Qb(c,b),new Ob(c,b))};function Xb(a){return a&&O(a)?Object.entries(a).reduce(function(b,c){var d=p(c);c=d.next().value;d=d.next().value;return b&&Q(c)&&null!=d&&O(d)&&Q(d.resourceUrl)},!0):!1};function W(a,b,c,d){this.h=a;this.method=b;this.version=c;this.g=d}function Yb(a){return!!a&&void 0!==a.omid_message_guid&&void 0!==a.omid_message_method&&void 0!==a.omid_message_version&&'string'===typeof a.omid_message_guid&&'string'===typeof a.omid_message_method&&'string'===typeof a.omid_message_version&&(void 0===a.omid_message_args||void 0!==a.omid_message_args)}function Zb(a){return new W(a.omid_message_guid,a.omid_message_method,a.omid_message_version,a.omid_message_args)}
|
||||
function $b(a){var b={};b=(b.omid_message_guid=a.h,b.omid_message_method=a.method,b.omid_message_version=a.version,b);void 0!==a.g&&(b.omid_message_args=a.g);return b};function ac(a){this.i=a};function X(a){this.i=a;this.handleExportedMessage=X.prototype.j.bind(this)}v(X,ac);X.prototype.h=function(a,b){b=void 0===b?this.i:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.handleExportedMessage($b(a),this)};X.prototype.j=function(a,b){Yb(a)&&this.g&&this.g(Zb(a),b)};function bc(a){return cc(a,'SessionService.')}function cc(a,b){return(a=a.match(new RegExp('^'+b+'(.*)')))&&a[1]};function dc(a,b){this.i=b=void 0===b?L:b;var c=this;a.addEventListener('message',function(d){if('object'===typeof d.data){var e=d.data;Yb(e)&&d.source&&c.g&&c.g(Zb(e),d.source)}})}v(dc,ac);dc.prototype.h=function(a,b){b=void 0===b?this.i:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.postMessage($b(a),'*')};function ec(a,b){b=void 0===b?{}:b;var c=L.webkit?L.webkit.messageHandlers.omidJsSessionService:L.omidJsSessionService;if(!c)return!1;c.postMessage(JSON.stringify({method:a,data:b}));return!0};function fc(){this.g=gc}m=fc.prototype;m.registerSessionObserver=function(a,b){Ub(V(this.g,a),b)};m.setSlotElement=function(a,b){V(this.g,a).setSlotElement(b)};m.setElementBounds=function(a,b){V(this.g,a).setElementBounds(b)};
|
||||
function hc(a,b,c,d,e){e=void 0===e?null:e;a=V(a.g,b);d?(b=b||Pb(),a.g.adSessionId=b,c.canMeasureVisibility=a.i.I(),Pa(a.g,c),cb(a.h,e),a.i&&zb(a.i)):b?(c.Ja=!0,Pa(a.g,c),ec('startSession',{adSessionId:b})||M('On App, the native-layer JS Session Service must be initialized before starting an ad session using the JS API.')):M('Session client must be updated to start an App session from JS.')}
|
||||
function ic(a,b,c){c?(b=V(a.g,b),a=a.g,a.g=Wb(a),hb(b.h),b.i.A()):b?ec('finishSession',{adSessionId:b})||M('On App, the native-layer JS Session Service must be initialized before finishing an ad session using the JS API.'):M('Session client must be updated to finish an App session from JS.')}m.error=function(a,b,c){V(this.g,a).error(b,c)};
|
||||
function Y(a,b,c,d){a=V(a.g,b);'impression'==c?pb(a.h,'javascript')&&(ib(a.h,'javascript'),a.i&&zb(a.i)):('loaded'==c?(d=void 0===d?null:d,nb(a.h,'javascript')&&jb(a.h,'javascript',d)):nb(a.h,'javascript')&&kb(a.h,c,'javascript',d),['loaded','start'].includes(c)&&a.i&&zb(a.i))}m.injectVerificationScriptResources=function(a,b){V(this.g,a).injectVerificationScriptResources(b)};m.setCreativeType=function(a,b,c){c=void 0===c?null:c;V(this.g,a).setCreativeType(b,c)};
|
||||
m.setImpressionType=function(a,b){V(this.g,a).setImpressionType(b)};m.setClientInfo=function(a,b,c,d){var e=this.g;if(null==a)a=e.g;else{var f=[].concat(q(e.h.values())).includes(e.g)?Wb(e):e.g;e.h.set(a,f);a=f}return a.setClientInfo(b,c,d)};function jc(a){a=a.split('-')[0].split('.');for(var b=['1','0','3'],c=0;3>c;c++){var d=parseInt(a[c],10),e=parseInt(b[c],10);if(d>e)break;else if(d<e)return!1}return!0};function kc(a,b){return/\d+\.\d+\.\d+(-.*)?/.test(a)&&jc(a)?b:JSON.stringify(b)}function lc(a,b){return/\d+\.\d+\.\d+(-.*)?/.test(a)&&jc(a)?b?b:[]:b&&'string'===typeof b?JSON.parse(b):[]};function mc(){var a=nc;var b=void 0===b?omidGlobal:b;this.g=a;this.i=b;this.j=new X;this.i.omid=this.i.omid||{};this.i.omid.v1_SessionServiceCommunication=this.j;this.h=b&&b.addEventListener&&b.postMessage?new dc(b):null;this.j.g=this.m.bind(this);this.h&&(this.h.g=this.l.bind(this))}mc.prototype.m=function(a,b){null!=bc(a.method)&&oc(this,a,b,this.j)};mc.prototype.l=function(a,b){null!=bc(a.method)&&oc(this,a,b,this.h)};
|
||||
function oc(a,b,c,d){function e(){var h=new W(f,'response',g,kc(g,w.apply(0,arguments)));d.h(h,c)}var f=b.h,k=b.method,g=b.version;b=lc(g,b.g);try{pc(a,k,e,b)}catch(h){d.h(new W(f,'error',g,'\n name: '+h.name+'\n message: '+h.message+'\n filename: '+h.filename+'\n lineNumber: '+h.lineNumber+'\n columnNumber: '+h.columnNumber+'\n stack: '+h.stack+'\n toString(): '+h.toString()),c)}}
|
||||
function pc(a,b,c,d){if(null!=bc(b))switch(bc(b)){case 'registerAdEvents':c=p(d).next().value;ob(V(a.g.g,c).h,'javascript');break;case 'registerMediaEvents':c=p(d).next().value;mb(V(a.g.g,c).h,'javascript');break;case 'registerSessionObserver':b=p(d).next().value;a.g.registerSessionObserver(b,c);break;case 'setSlotElement':b=p(d);c=b.next().value;b=b.next().value;a.g.setSlotElement(b,c);break;case 'setVideoElement':b=p(d);c=b.next().value;b=b.next().value;a=V(a.g.g,b);c&&c.tagName&&'video'===c.tagName.toLowerCase()?
|
||||
(a.g.j=c,a.i&&Ab(a.i)):M('setVideoElement called with a non-HTMLVideoElement. It will be ignored.');break;case 'setElementBounds':b=p(d);c=b.next().value;b=b.next().value;a.g.setElementBounds(b,c);break;case 'startSession':b=p(d);c=b.next().value;b=b.next().value;null!=c&&O(c)?(d=c.customReferenceData,c=c.underEvaluation,Q(d)||(d=void 0),'boolean'===typeof c||(c=!1),c={customReferenceData:d,underEvaluation:c}):c=null;if(null==c)break;hc(a.g,b,c,!1);break;case 'finishSession':c=p(d).next().value;ic(a.g,
|
||||
c,!1);break;case 'impressionOccurred':c=p(d).next().value;Y(a.g,c,'impression');break;case 'loaded':b=p(d);c=b.next().value;b=b.next().value;c?(d={skippable:c.isSkippable,autoPlay:c.isAutoPlay,position:c.position},c.isSkippable&&(d.skipOffset=c.skipOffset),Y(a.g,b,'loaded',d)):Y(a.g,b,'loaded');break;case 'start':d=p(d);c=d.next().value;b=d.next().value;d=d.next().value;Y(a.g,d,'start',{duration:c,mediaPlayerVolume:b});break;case 'firstQuartile':c=p(d).next().value;Y(a.g,c,'firstQuartile');break;
|
||||
case 'midpoint':c=p(d).next().value;Y(a.g,c,'midpoint');break;case 'thirdQuartile':c=p(d).next().value;Y(a.g,c,'thirdQuartile');break;case 'complete':c=p(d).next().value;Y(a.g,c,'complete');break;case 'pause':c=p(d).next().value;Y(a.g,c,'pause');break;case 'resume':c=p(d).next().value;Y(a.g,c,'resume');break;case 'bufferStart':c=p(d).next().value;Y(a.g,c,'bufferStart');break;case 'bufferFinish':c=p(d).next().value;Y(a.g,c,'bufferFinish');break;case 'skipped':c=p(d).next().value;Y(a.g,c,'skipped');
|
||||
break;case 'volumeChange':b=p(d);c=b.next().value;b=b.next().value;Y(a.g,b,'volumeChange',{mediaPlayerVolume:c});break;case 'playerStateChange':b=p(d);c=b.next().value;b=b.next().value;Y(a.g,b,'playerStateChange',{state:c});break;case 'adUserInteraction':b=p(d);c=b.next().value;b=b.next().value;Y(a.g,b,'adUserInteraction',{interactionType:c});break;case 'setClientInfo':var e=p(d);b=e.next().value;d=e.next().value;var f=e.next().value;e=e.next().value;a=a.g.setClientInfo(e,b,d,f);c(a);break;case 'injectVerificationScriptResources':b=
|
||||
p(d);c=b.next().value;b=b.next().value;a.g.injectVerificationScriptResources(b,c);break;case 'setCreativeType':b=p(d);c=b.next().value;b=b.next().value;a.g.setCreativeType(b,c);break;case 'setImpressionType':b=p(d);c=b.next().value;b=b.next().value;a.g.setImpressionType(b,c);break;case 'setContentUrl':b=p(d);c=b.next().value;b=b.next().value;V(a.g.g,b).g.C=c;break;case 'sessionError':d=p(d),c=d.next().value,b=d.next().value,d=d.next().value,a.g.error(d,c,b)}};function Z(){this.g=nc}m=Z.prototype;
|
||||
m.ca=function(a,b){if(!(!(a&&O(a)&&R(a.impressionOwner,pa))||'videoEventsOwner'in a&&null!=a.videoEventsOwner&&!R(a.videoEventsOwner,pa)||'mediaEventsOwner'in a&&null!=a.mediaEventsOwner&&!R(a.mediaEventsOwner,pa))){b=V(this.g.g,b);if(a.creativeType&&a.impressionType){var c=a.mediaEventsOwner;null==b.g.h&&b.setCreativeType(a.creativeType,c);null==b.g.m&&(b.g.m=a.impressionType);mb(b.h,c)}else c=a.videoEventsOwner,b.g.g=null==c||'none'===c?'display':'video',b.g.h=null,b.g.m=null,mb(b.h,c);ob(b.h,a.impressionOwner);
|
||||
a&&null!=a.isolateVerificationScripts&&'boolean'===typeof a.isolateVerificationScripts&&(b.g.I=a.isolateVerificationScripts)}};
|
||||
m.$=function(a,b,c,d){b&&'string'===typeof b.adSessionType&&(b.adSessionType=b.adSessionType.toLowerCase());var e;if(O(b)){if(e=R(b.environment,sa)&&R(b.adSessionType,oa))e=b.omidNativeInfo,e=O(e)?Q(e.partnerName)&&Q(e.partnerVersion):!1;e&&(e=b.app,e=O(e)?Q(e.libraryVersion)&&Q(e.appId):!1)}else e=!1;if(e){if(Xb(d)){e=p(Object.values(d));for(var f=e.next();!f.done;f=e.next())f.value.accessMode='limited';V(this.g.g,a).g.v=new Map(Object.entries(d))}hc(this.g,a,b,!0,c)}else M('Native ad session context invalid; session not started.')};
|
||||
m.W=function(a){ic(this.g,a,!0)};m.Z=function(a,b){O(a)&&P(a.x)&&P(a.y)&&P(a.width)&&P(a.height)&&(b=V(this.g.g,b),b.g.L=a,rb(b.j,'container'))};m.ga=function(a,b){R(a,ra)&&(b=V(this.g.g,b),b.g.A=a,'backgrounded'===a?rb(b.j,'container','backgrounded'):rb(b.j,'container'))};m.da=function(a){'impression'===a&&this.S()};m.S=function(a){a=V(this.g.g,a);pb(a.h,'native')&&ib(a.h,'native')};m.X=function(a,b){this.R('loaded',void 0===a?null:a,b)};m.error=function(a,b,c){R(a,na)&&this.g.error(c,a,b)};
|
||||
m.ea=function(a,b,c){this.R(a,b,c)};m.R=function(a,b,c){R(a,z)&&(void 0===b||O(b))&&(c=V(this.g.g,c),nb(c.h,'native')&&('loaded'==a?jb(c.h,'native',b):kb(c.h,a,'native',b)))};m.Y=function(a,b){b=V(this.g.g,b);'none'===b.h.g.l||'number'!==typeof a||isNaN(a)||(b.g.D=a,a=b.o,b=a.g.J,null!=b&&kb(a.h,'volumeChange','native',{mediaPlayerVolume:b,deviceVolume:a.g.D}))};m.fa=function(a){if(a&&O(a)&&P(a.timestamp)){var b=La(),c=(b.g||{}).timestamp;if(!c||c<a.timestamp)b.g=a}};Z.prototype.startSession=Z.prototype.$;
|
||||
Z.prototype.error=Z.prototype.error;Z.prototype.finishSession=Z.prototype.W;Z.prototype.publishAdEvent=Z.prototype.da;Z.prototype.publishImpressionEvent=Z.prototype.S;Z.prototype.publishVideoEvent=Z.prototype.ea;Z.prototype.publishMediaEvent=Z.prototype.R;Z.prototype.publishLoadedEvent=Z.prototype.X;Z.prototype.setNativeViewHierarchy=Z.prototype.Z;Z.prototype.setState=Z.prototype.ga;Z.prototype.setDeviceVolume=Z.prototype.Y;Z.prototype.init=Z.prototype.ca;Z.prototype.setLastActivity=Z.prototype.fa;function qc(a,b,c,d){a=Vb(a.j,d).h;'media'===b||'video'===b?Ya(a,c,d):(c={type:b,P:d,G:c},a.j.push(c),Xa(a,b,c))}function rc(a,b,c,d){a=Vb(a.j,d);Ub(a,b,c,d)}function sc(a,b,c,d){xb(a.g,b,c,d)}function tc(a,b,c,d){wb(a.g,'downloadJavaScriptResource')(b,c,d)}
|
||||
function uc(a,b,c,d){function e(){var D=new W(f,'response',g,kc(g,w.apply(0,arguments)));d.h(D,c)}var f=b.h,k=b.method,g=b.version;b=lc(g,b.g);if(null!=cc(k,'VerificationService.')){k=cc(k,'VerificationService.');try{switch(k){case 'addEventListener':var h=p(b),l=h.next().value,n=h.next().value||vc(c);qc(a,l,e,n);break;case 'addSessionListener':var t=p(b),C=t.next().value,y=t.next().value||vc(c);rc(a,e,C,y);break;case 'sendUrl':var G=p(b).next().value;sc(a,G,function(){return e(!0)},function(){return e(!1)});
|
||||
break;case 'setTimeout':var H=p(b),Ac=H.next().value,Bc=H.next().value;a.l[Ac]=tb(a.g,'setTimeout')(e,Bc);break;case 'clearTimeout':var Cc=p(b).next().value;vb(a.g,a.l[Cc]);break;case 'setInterval':var Nb=p(b),Dc=Nb.next().value,Ec=Nb.next().value;a.m[Dc]=sb(a.g,e,Ec);break;case 'clearInterval':var Fc=p(b).next().value;ub(a.g,a.m[Fc]);break;case 'injectJavaScriptResource':var Gc=p(b).next().value;tc(a,Gc,function(D){return e(!0,D)},function(){return e(!1)});break;case 'getVersion':e('1.4.12-iab4299')}}catch(D){d.h(new W(f,
|
||||
'error',g,'\n name: '+D.name+'\n message: '+D.message+'\n filename: '+D.filename+'\n lineNumber: '+D.lineNumber+'\n columnNumber: '+D.columnNumber+'\n stack: '+D.stack+'\n toString(): '+D.toString()+'\n '),c)}}}
|
||||
function vc(a){for(var b=La().h,c=p(b.keys()),d=c.next();!d.done;d=c.next()){d=d.value;var e=b.get(d);if(e){if(e.contentWindow===a)return d;try{if(e.contentWindow.Object.prototype.isPrototypeOf(a))return d}catch(f){}}}};function wc(a){var b={};return(b.app='omid_v1_present_app',b.web='omid_v1_present_web',b)[a]}function xc(a,b){a.document.write('<iframe style="display:none" id="'+(b+'" name="'+b+'" sandbox></iframe>'))}function yc(a,b){var c=a.document.createElement('iframe');c.id=b;c.name=b;c.style.display='none';c.sandbox='';a.document.body.appendChild(c)}
|
||||
function zc(a,b){var c=new MutationObserver(function(d){d.forEach(function(e){'BODY'===e.addedNodes[0].nodeName&&(e=wc(b),yc(a,'omid_v1_present'),yc(a,e),c.disconnect())})});c.observe(a.document.documentElement,{childList:!0})};var Hc=new function(){var a;this.g=a=void 0===a?omidGlobal:a},gc=new function(){this.i=Hc;this.h=new Map;this.g=Wb(this)},nc=new fc;new function(){var a=gc,b=this;var c=void 0===c?L:c;this.j=a;this.g=Hc;this.l={};this.m={};this.i=new X;c.omid=c.omid||{};c.omid.v1_VerificationServiceCommunication=this.i;this.h=null;c&&c.addEventListener&&c.postMessage&&(this.h=new dc(c));this.i.g=function(d,e){uc(b,d,e,b.i)};this.h&&(this.h.g=function(d,e){b.h&&uc(b,d,e,b.h)})};L.omidBridge=new Z;new mc;
|
||||
(function(a,b){a.frames&&a.document&&!['omid_v1_present','omid_v1_present_web','omid_v1_present_app'].some(function(c){return!!a.frames[c]})&&(null==a.document.body&&'MutationObserver'in a?zc(a,b):(b=wc(b),a.document.body?(yc(a,'omid_v1_present'),yc(a,b)):(xc(a,'omid_v1_present'),xc(a,b))))})(L,'app');
|
||||
}).call(this, this);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -1,52 +0,0 @@
|
||||
//
|
||||
// ALAdDisplayDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Basil on 3/23/12.
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class ALAd;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines a listener for ad display events.
|
||||
*/
|
||||
@protocol ALAdDisplayDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* The SDK invokes this when the ad is displayed in the view.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad Ad that was just displayed.
|
||||
* @param view Ad view in which the ad was displayed.
|
||||
*/
|
||||
- (void)ad:(ALAd *)ad wasDisplayedIn:(UIView *)view;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when the ad is hidden from the view. This occurs when the user "X"es out of an interstitial.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad Ad that was just hidden.
|
||||
* @param view Ad view in which the ad was hidden.
|
||||
*/
|
||||
- (void)ad:(ALAd *)ad wasHiddenIn:(UIView *)view;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when the ad is clicked in the view.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad Ad that was just clicked.
|
||||
* @param view Ad view in which the ad was clicked.
|
||||
*/
|
||||
- (void)ad:(ALAd *)ad wasClickedIn:(UIView *)view;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,41 +0,0 @@
|
||||
//
|
||||
// ALAdLoadDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Basil on 3/23/12.
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
@class ALAd;
|
||||
@class ALAdService;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines a listener for ad load events.
|
||||
*/
|
||||
@protocol ALAdLoadDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when an ad is loaded by the AdService.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param adService AdService that loaded the ad.
|
||||
* @param ad Ad that was loaded.
|
||||
*/
|
||||
- (void)adService:(ALAdService *)adService didLoadAd:(ALAd *)ad;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when an ad load fails.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param adService AdService that failed to load an ad.
|
||||
* @param code An error code that corresponds to one of the constants defined in ALErrorCodes.h.
|
||||
*/
|
||||
- (void)adService:(ALAdService *)adService didFailToLoadAdWithError:(int)code;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,63 +0,0 @@
|
||||
//
|
||||
// ALAdRewardDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
//
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
@class ALAd;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines a listener that listens to rewarded video events.
|
||||
*/
|
||||
@protocol ALAdRewardDelegate <NSObject>
|
||||
|
||||
@required
|
||||
|
||||
/**
|
||||
* The SDK invokes this method if a user viewed a rewarded video and their reward was approved by the AppLovin server.
|
||||
*
|
||||
* If you use reward validation for incentivized videos, the SDK invokes this method if it contacted AppLovin successfully. This means the SDK believes the
|
||||
* reward is legitimate and you should award it.
|
||||
*
|
||||
* <b>Tip:</b> refresh the user’s balance from your server at this point rather than relying on local data that could be tampered with on jailbroken devices.
|
||||
*
|
||||
* The @c response @c NSDictionary will typically include the keys @c "currency" and @c "amount", which point to @c NSStrings that contain the name and amount of the
|
||||
* virtual currency that you may award.
|
||||
*
|
||||
* @param ad Ad that was viewed.
|
||||
* @param response Dictionary that contains response data from the server, including @c "currency" and @c "amount".
|
||||
*/
|
||||
- (void)rewardValidationRequestForAd:(ALAd *)ad didSucceedWithResponse:(NSDictionary *)response;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method if it was able to contact AppLovin, but the user has already received the maximum number of coins you allowed per day in the web
|
||||
* UI, and so is ineligible for a reward.
|
||||
*
|
||||
* @param ad Ad that was viewed.
|
||||
* @param response Dictionary that contains response data from the server.
|
||||
*/
|
||||
- (void)rewardValidationRequestForAd:(ALAd *)ad didExceedQuotaWithResponse:(NSDictionary *)response;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method if the AppLovin server rejected the reward request. The usual cause of this is that the user fails to pass an anti-fraud check.
|
||||
*
|
||||
* @param ad Ad that was viewed.
|
||||
* @param response Dictionary that contains response data from the server.
|
||||
*/
|
||||
- (void)rewardValidationRequestForAd:(ALAd *)ad wasRejectedWithResponse:(NSDictionary *)response;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method if it was unable to contact AppLovin, and so AppLovin will not issue a ping to your S2S rewarded callback server.
|
||||
*
|
||||
* @param ad Ad that was viewed.
|
||||
* @param responseCode A failure code that corresponds to a constant defined in ALErrorCodes.h.
|
||||
*/
|
||||
- (void)rewardValidationRequestForAd:(ALAd *)ad didFailWithError:(NSInteger)responseCode;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,46 +0,0 @@
|
||||
//
|
||||
// ALAdSize.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Basil on 2/27/12.
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class defines the possible sizes of an ad.
|
||||
*/
|
||||
@interface ALAdSize : NSObject
|
||||
|
||||
/**
|
||||
* Represents the size of a 320×50 banner advertisement.
|
||||
*/
|
||||
@property (class, nonatomic, strong, readonly) ALAdSize *banner;
|
||||
|
||||
/**
|
||||
* Represents the size of a 728×90 leaderboard advertisement (for tablets).
|
||||
*/
|
||||
@property (class, nonatomic, strong, readonly) ALAdSize *leader;
|
||||
|
||||
/**
|
||||
* Represents the size of a 300x250 rectangular advertisement.
|
||||
*/
|
||||
@property (class, nonatomic, strong, readonly) ALAdSize *mrec;
|
||||
|
||||
/**
|
||||
* Represents the size of a full-screen advertisement.
|
||||
*/
|
||||
@property (class, nonatomic, strong, readonly) ALAdSize *interstitial;
|
||||
|
||||
/**
|
||||
* Represents a native ad which can be integrated seemlessly into the environment of your app.
|
||||
*/
|
||||
@property (class, nonatomic, strong, readonly) ALAdSize *native;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,45 +0,0 @@
|
||||
//
|
||||
// ALAdType.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class defines the possible types of an interstitial ad (i.e. regular or incentivized/rewarded).
|
||||
*/
|
||||
@interface ALAdType : NSObject
|
||||
|
||||
/**
|
||||
* A standard advertisement that does not provide a reward to the user.
|
||||
*/
|
||||
@property (class, nonatomic, strong, readonly) ALAdType *regular;
|
||||
|
||||
/**
|
||||
* Represents a standard advertisement that does not provide a reward to the user and is shown upon opening the app.
|
||||
*/
|
||||
@property (class, nonatomic, strong, readonly) ALAdType *appOpen;
|
||||
|
||||
/**
|
||||
* A rewarded ad, which will provide the user virtual currency upon completion.
|
||||
*/
|
||||
@property (class, nonatomic, strong, readonly) ALAdType *incentivized;
|
||||
|
||||
/**
|
||||
* A rewarded interstitial ad, which the user can skip or be granted a reward upon successful completion of the ad.
|
||||
*/
|
||||
@property (class, nonatomic, strong, readonly) ALAdType *autoIncentivized;
|
||||
|
||||
/**
|
||||
* Represents a native ad which can be integrated seemlessly into the environment of your app.
|
||||
*/
|
||||
@property (class, nonatomic, strong, readonly) ALAdType *native;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,37 +0,0 @@
|
||||
//
|
||||
// ALAdVideoPlaybackDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
@class ALAd;
|
||||
@class ALAdService;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ALAdVideoPlaybackDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when a video starts playing in an ad.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad Ad in which video playback began.
|
||||
*/
|
||||
- (void)videoPlaybackBeganInAd:(ALAd *)ad;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when a video stops playing in an ad.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad Ad in which video playback ended.
|
||||
* @param percentPlayed How much of the video was watched, as a percent, between 0 and 100.
|
||||
* @param wasFullyWatched Whether or not the video was watched to 95% or more of completion.
|
||||
*/
|
||||
- (void)videoPlaybackEndedInAd:(ALAd *)ad atPlaybackPercent:(NSNumber *)percentPlayed fullyWatched:(BOOL)wasFullyWatched;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,174 +0,0 @@
|
||||
//
|
||||
// ALAdView.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Basil on 3/1/12.
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <AppLovinSDK/ALAdDisplayDelegate.h>
|
||||
#import <AppLovinSDK/ALAdLoadDelegate.h>
|
||||
#import <AppLovinSDK/ALAdViewEventDelegate.h>
|
||||
|
||||
@class ALAd;
|
||||
@class ALSdk;
|
||||
@class ALAdSize;
|
||||
@class ALAdType;
|
||||
@class ALSFSafariViewControllerDelegate;
|
||||
@class SFSafariViewControllerPrewarmingToken;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This interface represents a view-based ad — i.e. banner, MREC, or leader.
|
||||
*/
|
||||
@interface ALAdView : UIView
|
||||
|
||||
/**
|
||||
* @name Ad Delegates
|
||||
*/
|
||||
|
||||
/**
|
||||
* An object that conforms to the @c ALAdLoadDelegate protocol. If you provide a value for @c adLoadDelegate in your instance, the SDK will notify
|
||||
* this delegate of ad load events.
|
||||
*
|
||||
* @warning This delegate is retained strongly and might lead to retain cycles if delegate holds strong reference to this @c ALAdView.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) IBOutlet id<ALAdLoadDelegate> adLoadDelegate;
|
||||
|
||||
/**
|
||||
* An object that conforms to the @c ALAdDisplayDelegate protocol. If you provide a value for @c adDisplayDelegate in your instance, the SDK will
|
||||
* notify this delegate of ad show/hide events.
|
||||
*
|
||||
* @warning This delegate is retained strongly and might lead to retain cycles if delegate holds strong reference to this @c ALAdView.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) IBOutlet id<ALAdDisplayDelegate> adDisplayDelegate;
|
||||
|
||||
/**
|
||||
* An object that conforms to the @c ALAdViewEventDelegate protocol. If you provide a value for @c adEventDelegate in your instance, the SDK will
|
||||
* notify this delegate of @c ALAdView -specific events.
|
||||
*
|
||||
* @warning This delegate is retained strongly and might lead to retain cycles if delegate holds strong reference to this @c ALAdView.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) IBOutlet id<ALAdViewEventDelegate> adEventDelegate;
|
||||
|
||||
/**
|
||||
* @name Ad View Configuration
|
||||
*/
|
||||
|
||||
/**
|
||||
* The size of ads to load within this @c ALAdView.
|
||||
*/
|
||||
@property (nonatomic, strong) ALAdSize *adSize;
|
||||
|
||||
/**
|
||||
* The zone identifier this @c ALAdView was initialized with and is loading ads for, if any.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nullable) NSString *zoneIdentifier;
|
||||
|
||||
/**
|
||||
* Whether or not this ad view should automatically load the ad when iOS inflates it from a StoryBoard or from a nib file (when
|
||||
* @code -[UIView awakeFromNib] @endcode is called). The default value is @c NO which means you are responsible for loading the ad by invoking
|
||||
* @code -[ALAdView loadNextAd] @endcode.
|
||||
*/
|
||||
@property (nonatomic, assign, getter=isAutoloadEnabled, setter=setAutoloadEnabled:) BOOL autoload;
|
||||
|
||||
/**
|
||||
* @c SFSafariViewControllerPrewarmingToken object that corresponds to prewarmed URLs. Must keep a strong reference to this token as long as we expect the prewarmed connections to remain open.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) SFSafariViewControllerPrewarmingToken *prewarmingToken API_AVAILABLE(ios(15.0));
|
||||
|
||||
/**
|
||||
* @c ALSFSafariViewControllerDelegate object for @c SFSafariViewController callbacks.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) ALSFSafariViewControllerDelegate *safariViewControllerDelegate;
|
||||
|
||||
/**
|
||||
* Sets extra info to pass to the SDK.
|
||||
*
|
||||
* @param key Parameter key.
|
||||
* @param value Parameter value.
|
||||
*/
|
||||
- (void)setExtraInfoForKey:(NSString *)key value:(nullable id)value;
|
||||
|
||||
/**
|
||||
* @name Loading and Rendering Ads
|
||||
*/
|
||||
|
||||
/**
|
||||
* Loads <em>and</em> displays an ad into the view. This method returns immediately.
|
||||
*
|
||||
* <b>Note:</b> To load the ad but not display it, use @code +[ALSdk shared] @endcode ⇒ @code -[ALSDK adService] @endcode
|
||||
* ⇒ @code -[ALAdService loadNextAd:andNotify:] @endcode, then @code -[ALAdView render:] @endcode to render it.
|
||||
*/
|
||||
- (void)loadNextAd;
|
||||
|
||||
/**
|
||||
* Renders a specific ad that was loaded via @c ALAdService.
|
||||
*
|
||||
* @param ad Ad to render.
|
||||
*/
|
||||
- (void)render:(ALAd *)ad;
|
||||
|
||||
/**
|
||||
* @name Initialization
|
||||
*/
|
||||
|
||||
/**
|
||||
* Initializes the ad view with a given size.
|
||||
*
|
||||
* @param size @c ALAdSize that represents the size of this ad. For example, @code +[ALAdSize banner] @endcode.
|
||||
*
|
||||
* @return A new instance of @c ALAdView.
|
||||
*/
|
||||
- (instancetype)initWithSize:(ALAdSize *)size;
|
||||
|
||||
/**
|
||||
* Initializes the ad view for a given size and zone.
|
||||
*
|
||||
* @param size @c ALAdSize that represents the size of this ad. For example, @code +[ALAdSize banner] @endcode.
|
||||
* @param zoneIdentifier Identifier for the zone this @c ALAdView should load ads for.
|
||||
*
|
||||
* @return A new instance of @c ALAdView.
|
||||
*/
|
||||
- (instancetype)initWithSize:(ALAdSize *)size zoneIdentifier:(nullable NSString *)zoneIdentifier;
|
||||
|
||||
/**
|
||||
* Initializes the ad view with a given SDK and size.
|
||||
*
|
||||
* @param sdk Instance of @c ALSdk to use.
|
||||
* @param size @c ALAdSize that represents the size of this ad. For example, @code +[ALAdSize banner] @endcode.
|
||||
*
|
||||
* @return A new instance of @c ALAdView.
|
||||
*/
|
||||
- (instancetype)initWithSdk:(ALSdk *)sdk size:(ALAdSize *)size;
|
||||
|
||||
/**
|
||||
* Initializes the ad view with a given SDK, size, and zone.
|
||||
*
|
||||
* @param sdk Instance of @c ALSdk to use.
|
||||
* @param size @c ALAdSize that represents the size of this ad. For example, @code +[ALAdSize banner] @endcode.
|
||||
* @param zoneIdentifier Identifier for the zone that this @c ALAdView should load ads for.
|
||||
*
|
||||
* @return A new instance of @c ALAdView.
|
||||
*/
|
||||
- (instancetype)initWithSdk:(ALSdk *)sdk size:(ALAdSize *)size zoneIdentifier:(nullable NSString *)zoneIdentifier;
|
||||
|
||||
/**
|
||||
* Initializes the ad view with a given frame, ad size, and SDK instance.
|
||||
*
|
||||
* @param frame Describes the position and dimensions of the ad.
|
||||
* @param size @c ALAdSize that represents the size of this ad. For example, @code +[ALAdSize banner] @endcode.
|
||||
* @param sdk Instance of @c ALSdk to use.
|
||||
*
|
||||
* @return A new instance of @c ALAdView.
|
||||
*/
|
||||
- (instancetype)initWithFrame:(CGRect)frame size:(ALAdSize *)size sdk:(ALSdk *)sdk;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,97 +0,0 @@
|
||||
//
|
||||
// ALAdViewEventDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 6/23/17.
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
@class ALAd;
|
||||
@class ALAdView;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This enum contains possible error codes that are returned when the ad view fails to display an ad.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, ALAdViewDisplayErrorCode)
|
||||
{
|
||||
/**
|
||||
* The ad view failed to display an ad for an unspecified reason.
|
||||
*/
|
||||
ALAdViewDisplayErrorCodeUnspecified
|
||||
};
|
||||
|
||||
/**
|
||||
* This protocol defines a listener for ad view events.
|
||||
*/
|
||||
@protocol ALAdViewEventDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
/**
|
||||
* The SDK invokes this method after the ad view begins to present fullscreen content.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* Note: Some banners, when clicked, will expand into fullscreen content, whereupon the SDK will call this method.
|
||||
*
|
||||
* @param ad Ad for which the ad view presented fullscreen content.
|
||||
* @param adView Ad view that presented fullscreen content.
|
||||
*/
|
||||
- (void)ad:(ALAd *)ad didPresentFullscreenForAdView:(ALAdView *)adView;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method as the fullscreen content is about to be dismissed.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad Ad for which the fullscreen content is to be dismissed.
|
||||
* @param adView Ad view that contains the ad for which the fullscreen content is to be dismissed.
|
||||
*/
|
||||
- (void)ad:(ALAd *)ad willDismissFullscreenForAdView:(ALAdView *)adView;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method after the fullscreen content is dismissed.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad Ad for which the fullscreen content is dismissed.
|
||||
* @param adView Ad view that contains the ad for which the fullscreen content is dismissed.
|
||||
*/
|
||||
- (void)ad:(ALAd *)ad didDismissFullscreenForAdView:(ALAdView *)adView;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when the user is about to be taken out of the application after the user clicks on the ad.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad Ad for which the user will be taken out of the application.
|
||||
* @param adView Ad view that contains the ad for which the user will be taken out of the application.
|
||||
*/
|
||||
- (void)ad:(ALAd *)ad willLeaveApplicationForAdView:(ALAdView *)adView;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when the user returns to the application after the user clicks on the ad.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad Ad from which the user will return to the application.
|
||||
* @param adView Ad view that contains the ad from which the user will return to the application.
|
||||
*/
|
||||
- (void)ad:(ALAd *)ad didReturnToApplicationForAdView:(ALAdView *)adView;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method if the ad view fails to display an ad.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad Ad that the ad view failed to display.
|
||||
* @param adView Ad view that failed to display the ad.
|
||||
* @param code Error code that specifies the reason why the ad view failed to display the ad.
|
||||
*/
|
||||
- (void)ad:(ALAd *)ad didFailToDisplayInAdView:(ALAdView *)adView withError:(ALAdViewDisplayErrorCode)code;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,49 +0,0 @@
|
||||
//
|
||||
// ALAtomicBoolean.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 3/5/17.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* A boolean value that may be updated atomically.
|
||||
*
|
||||
* NOTE: This class is used by our adapters (ironSource), do not change API.
|
||||
*/
|
||||
@interface ALAtomicBoolean : NSObject
|
||||
|
||||
/**
|
||||
* Returns the current value.
|
||||
*/
|
||||
- (BOOL)get;
|
||||
|
||||
/**
|
||||
* Unconditionally sets to the given value.
|
||||
*/
|
||||
- (void)set:(BOOL)newValue;
|
||||
|
||||
/**
|
||||
* Atomically sets to the given value and returns the previous value.
|
||||
*/
|
||||
- (BOOL)getAndSet:(BOOL)newValue;
|
||||
|
||||
/**
|
||||
* Atomically sets the value to the given updated value if the current value == the expected value.
|
||||
*
|
||||
* @param expect The expected value.
|
||||
* @param update The new value.
|
||||
*
|
||||
* @return YES if successful. NO return indicates that the actual value was not equal to the expected value.
|
||||
*/
|
||||
- (BOOL)compareAndSet:(BOOL)expect update:(BOOL)update;
|
||||
|
||||
/**
|
||||
* Creates an instance with the default BOOL value.
|
||||
*/
|
||||
- (instancetype)initWithValue:(BOOL)initialValue;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,47 +0,0 @@
|
||||
//
|
||||
// ALAtomicReference.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Alan Cao on 1/5/24.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* An object reference that may be updated atomically.
|
||||
*/
|
||||
@interface ALAtomicReference <ObjectType> : NSObject
|
||||
|
||||
/**
|
||||
* Returns the current value.
|
||||
*/
|
||||
- (nullable ObjectType)get;
|
||||
|
||||
/**
|
||||
* Unconditionally sets to the given value.
|
||||
*/
|
||||
- (void)set:(nullable ObjectType)newValue;
|
||||
|
||||
/**
|
||||
* Atomically sets to the given value and returns the previous value.
|
||||
*/
|
||||
- (nullable ObjectType)getAndSet:(nullable ObjectType)newValue;
|
||||
|
||||
/**
|
||||
* Atomically sets the value to the given updated value if the current value == the expected value.
|
||||
*
|
||||
* @param expect The expected value.
|
||||
* @param update The new value.
|
||||
*
|
||||
* @return @c YES if successful. @c NO return indicates that the actual value was not equal to the expected value.
|
||||
*/
|
||||
- (BOOL)compareAndSet:(nullable ObjectType)expect update:(nullable ObjectType)update;
|
||||
|
||||
/**
|
||||
* Creates an instance with the given initial value.
|
||||
*/
|
||||
- (instancetype)initWithValue:(nullable ObjectType)initialValue;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,60 +0,0 @@
|
||||
//
|
||||
// ALCCommunicator.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 7/4/19.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/ALCSubscriber.h>
|
||||
|
||||
@class ALCCommunicator;
|
||||
@class ALCMessagingService;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This communicator SDK acts as a hub for all SDK pub/sub communication.
|
||||
*/
|
||||
@interface ALCCommunicator : NSObject
|
||||
|
||||
/**
|
||||
* Add the provided subscriber to the set of subscribers for a given topic.
|
||||
*/
|
||||
- (void)subscribe:(id<ALCSubscriber>)subscriber forTopic:(NSString *)topic;
|
||||
|
||||
/**
|
||||
* Add the provided subscriber to the set of subscribers for the given topics.
|
||||
*/
|
||||
- (void)subscribe:(id<ALCSubscriber>)subscriber forTopics:(NSArray<NSString *> *)topics;
|
||||
|
||||
/**
|
||||
* Remove the provided subscriber from the set of subscribers for a given topic.
|
||||
*/
|
||||
- (void)unsubscribe:(id<ALCSubscriber>)subscriber forTopic:(NSString *)topic;
|
||||
|
||||
/**
|
||||
* Remove the provided subscriber from the set of subscribers for the given topics.
|
||||
*/
|
||||
- (void)unsubscribe:(id<ALCSubscriber>)subscriber forTopics:(NSArray<NSString *> *)topics;
|
||||
|
||||
/**
|
||||
* @return @c YES if the SDK will handle a published @c ALCMessage for a given @c topic.
|
||||
*/
|
||||
- (BOOL)respondsToTopic:(NSString *)topic;
|
||||
|
||||
/**
|
||||
* The messaging service for the communicator SDK responsible for relaying messages within the system.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) ALCMessagingService *messagingService;
|
||||
|
||||
/**
|
||||
* Returns the default communicator instance.
|
||||
*/
|
||||
@property (class, strong, readonly) ALCCommunicator *defaultCommunicator;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,23 +0,0 @@
|
||||
//
|
||||
// ALCEntity.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 7/21/19.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol concerns an entity (publisher or subscriber) in the AppLovin pub/sub system.
|
||||
*/
|
||||
@protocol ALCEntity <NSObject>
|
||||
|
||||
/**
|
||||
* Unique identifier representing the entity (publisher or subscriber) in the AppLovin pub/sub system.
|
||||
* Currently used for debugging purposes only - so please provide an easily distinguishable identifier (e.g. "safedk").
|
||||
*/
|
||||
- (NSString *)communicatorIdentifier;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,62 +0,0 @@
|
||||
//
|
||||
// ALCMPError.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 7/26/23.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSInteger, ALCMPErrorCode)
|
||||
{
|
||||
/**
|
||||
* Indicates that an unspecified error has occurred.
|
||||
*/
|
||||
ALCMPErrorCodeUnspecified = -1,
|
||||
|
||||
/**
|
||||
* Indicates that the CMP has not been integrated correctly.
|
||||
*/
|
||||
ALCMPErrorCodeIntegrationError = 1,
|
||||
|
||||
/**
|
||||
* Indicates that the CMP form is unavailable.
|
||||
*/
|
||||
ALCMPErrorCodeFormUnavailable = 2,
|
||||
|
||||
/**
|
||||
* Indicates that the CMP form is not required.
|
||||
*/
|
||||
ALCMPErrorCodeFormNotRequired = 3,
|
||||
};
|
||||
|
||||
@interface ALCMPError : NSObject
|
||||
|
||||
/**
|
||||
* The error code for this error.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) ALCMPErrorCode code;
|
||||
|
||||
/**
|
||||
* The error message for this error.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *message;
|
||||
|
||||
/**
|
||||
* The error code returned by the CMP.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSInteger cmpCode;
|
||||
|
||||
/**
|
||||
* The error message returned by the CMP.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *cmpMessage;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
- (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,42 +0,0 @@
|
||||
//
|
||||
// ALCMPService.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 7/26/23.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class ALCMPError;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class provides direct APIs for interfacing with the Google-certified CMP installed, if any.
|
||||
*/
|
||||
@interface ALCMPService : NSObject
|
||||
|
||||
/**
|
||||
* @param error @c nil if the flow completed successfully. Otherwise, the error object contains more details about the reason for failure.
|
||||
*/
|
||||
typedef void (^ALCMPCompletionHandler) (ALCMPError *_Nullable error);
|
||||
|
||||
/**
|
||||
* Shows the CMP flow to an existing user.
|
||||
* Note that the user's current consent will be reset before the CMP alert is shown.
|
||||
*
|
||||
* @param completion The completion handler that will be called once the flow finishes showing.
|
||||
*/
|
||||
- (void)showCMPForExistingUserWithCompletion:(ALCMPCompletionHandler)completion;
|
||||
|
||||
/**
|
||||
* @return @c YES if a supported CMP is integrated.
|
||||
*/
|
||||
- (BOOL)hasSupportedCMP;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,48 +0,0 @@
|
||||
//
|
||||
// ALCMessage.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 7/4/19.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/ALCPublisher.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Class representing messages passed in the Communicator SDK.
|
||||
*/
|
||||
@interface ALCMessage : NSNotification
|
||||
|
||||
/**
|
||||
* The unique id of the message.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *uniqueIdentifier;
|
||||
|
||||
/**
|
||||
* The topic of the message. A full list of supported topics may be found in ALCTopic.h.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *topic;
|
||||
|
||||
/**
|
||||
* The id of the publisher of the message.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *publisherIdentifier;
|
||||
|
||||
/**
|
||||
* The raw data of the message.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSDictionary<NSString *, id> *data;
|
||||
|
||||
/**
|
||||
* Initialize a message with data in a pre-determined format for a given topic.
|
||||
*/
|
||||
- (instancetype)initWithData:(NSDictionary<NSString *, id> *)data topic:(NSString *)topic fromPublisher:(id<ALCPublisher>)publisher;
|
||||
- (instancetype)initWithName:(NSNotificationName)name object:(nullable id)object userInfo:(nullable NSDictionary *)userInfo NS_UNAVAILABLE;
|
||||
- (instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,27 +0,0 @@
|
||||
//
|
||||
// ALCMessagingService.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 7/16/19.
|
||||
//
|
||||
|
||||
@class ALCMessage;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Service class of the Communicator SDK responsible for managing and publishing messages.
|
||||
*/
|
||||
@interface ALCMessagingService : NSObject
|
||||
|
||||
/**
|
||||
* Publish the given message to the pub/sub system.
|
||||
*/
|
||||
- (void)publishMessage:(ALCMessage *)message;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,19 +0,0 @@
|
||||
//
|
||||
// ALCPublisher.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 7/4/19.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/ALCEntity.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Protocol representing a publisher in the AppLovin pub/sub system.
|
||||
*/
|
||||
@protocol ALCPublisher <ALCEntity>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,26 +0,0 @@
|
||||
//
|
||||
// ALCSubscriber.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 7/4/19.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/ALCEntity.h>
|
||||
|
||||
@class ALCMessage;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Protocol that subscribers in the AppLovin pub-sub system should conform to in order to receive messages from subscribed topics.
|
||||
*/
|
||||
@protocol ALCSubscriber <ALCEntity>
|
||||
|
||||
/**
|
||||
* Called when a message of a topic the subscriber is interested in has been received.
|
||||
*/
|
||||
- (void)didReceiveMessage:(ALCMessage *)message;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,111 +0,0 @@
|
||||
//
|
||||
// ALErrorCodes.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
// Loading & Displaying Ads
|
||||
|
||||
/**
|
||||
* @file ALErrorCodes.h
|
||||
*/
|
||||
|
||||
/**
|
||||
* The SDK is currently disabled.
|
||||
*/
|
||||
#define kALErrorCodeSdkDisabled -22
|
||||
|
||||
/**
|
||||
* No ads are currently eligible for your device & location.
|
||||
*/
|
||||
#define kALErrorCodeNoFill 204
|
||||
|
||||
/**
|
||||
* A fetch ad request timed out (usually due to poor connectivity).
|
||||
*/
|
||||
#define kALErrorCodeAdRequestNetworkTimeout -1001
|
||||
|
||||
/**
|
||||
* The device is not connected to internet (for instance if user is in Airplane mode). This returns the same code as NSURLErrorNotConnectedToInternet.
|
||||
*/
|
||||
#define kALErrorCodeNotConnectedToInternet -1009
|
||||
|
||||
/**
|
||||
* An unspecified network issue occurred.
|
||||
*/
|
||||
#define kALErrorCodeAdRequestUnspecifiedError -1
|
||||
|
||||
/**
|
||||
* There has been a failure to render an ad on screen.
|
||||
*/
|
||||
#define kALErrorCodeUnableToRenderAd -6
|
||||
|
||||
/**
|
||||
* The zone provided is invalid; the zone needs to be added to your AppLovin account or may still be propagating to our servers.
|
||||
*/
|
||||
#define kALErrorCodeInvalidZone -7
|
||||
|
||||
/**
|
||||
* The provided ad token is invalid; ad token must be returned from AppLovin S2S integration.
|
||||
*/
|
||||
#define kALErrorCodeInvalidAdToken -8
|
||||
|
||||
/**
|
||||
* An attempt to cache a resource to the filesystem failed; the device may be out of space.
|
||||
*/
|
||||
#define kALErrorCodeUnableToPrecacheResources -200
|
||||
|
||||
/**
|
||||
* An attempt to cache an image resource to the filesystem failed; the device may be out of space.
|
||||
*/
|
||||
#define kALErrorCodeUnableToPrecacheImageResources -201
|
||||
|
||||
/**
|
||||
* An attempt to cache a video resource to the filesystem failed; the device may be out of space.
|
||||
*/
|
||||
#define kALErrorCodeUnableToPrecacheVideoResources -202
|
||||
|
||||
/**
|
||||
* An attempt to cache an HTML resource to the filesystem failed; the device may be out of space.
|
||||
*/
|
||||
#define kALErrorCodeUnableToPrecacheHTMLResources -203
|
||||
|
||||
/**
|
||||
* AppLovin servers have returned an invalid response.
|
||||
*/
|
||||
#define kALErrorCodeInvalidResponse -800
|
||||
|
||||
/**
|
||||
* A postback URL you attempted to dispatch was invalid or empty/nil.
|
||||
*/
|
||||
#define kALErrorCodeInvalidURL -900
|
||||
|
||||
/**
|
||||
* The request was invalid due to a malformed body.
|
||||
*/
|
||||
#define kALErrorCodeInvalidBody -1000
|
||||
|
||||
//
|
||||
// Rewarded Videos
|
||||
//
|
||||
|
||||
/**
|
||||
* The developer called for a rewarded video before one was available.
|
||||
*/
|
||||
#define kALErrorCodeIncentiviziedAdNotPreloaded -300
|
||||
|
||||
/**
|
||||
* An unknown server-side error occurred.
|
||||
*/
|
||||
#define kALErrorCodeIncentivizedUnknownServerError -400
|
||||
|
||||
/**
|
||||
* A reward validation requested timed out (usually due to poor connectivity).
|
||||
*/
|
||||
#define kALErrorCodeIncentivizedValidationNetworkTimeout -500
|
||||
|
||||
/**
|
||||
* The user exited out of the rewarded ad early. You may or may not wish to grant a reward depending on your preference.
|
||||
*/
|
||||
#define kALErrorCodeIncentivizedUserClosedVideo -600
|
||||
@ -1,317 +0,0 @@
|
||||
//
|
||||
// ALEventTypes.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef ALEventTypes_h
|
||||
#define ALEventTypes_h
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* @name Authentication Events
|
||||
* @file ALEventTypes.h
|
||||
*/
|
||||
|
||||
/**
|
||||
* Signifies that the user logged in to an existing account.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterUserAccountIdentifierKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserLoggedIn;
|
||||
|
||||
/**
|
||||
* Signifies that the finished a registration flow and created a new account.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterUserAccountIdentifierKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserCreatedAccount;
|
||||
|
||||
/**
|
||||
* @name Content Events
|
||||
*/
|
||||
|
||||
/**
|
||||
* Signifies that the user viewed a specific piece of content.
|
||||
*
|
||||
* For views of saleable products, pass @c kALEventTypeUserViewedProduct instead.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterContentIdentifierKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserViewedContent;
|
||||
|
||||
/**
|
||||
* Signifies that the user executed a search query.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterSearchQueryKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserExecutedSearch;
|
||||
|
||||
/**
|
||||
* @name Gaming Events
|
||||
*/
|
||||
|
||||
/**
|
||||
* Signifies that the user completed a tutorial or introduction sequence.
|
||||
*
|
||||
* Suggested parameters: None.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserCompletedTutorial;
|
||||
|
||||
/**
|
||||
* Signifies that the user completed a given level or game sequence.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterCompletedLevelKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserCompletedLevel;
|
||||
|
||||
/**
|
||||
* Signifies that the user completed (or "unlocked") a particular achievement.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterCompletedAchievementKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserCompletedAchievement;
|
||||
|
||||
/**
|
||||
* Signifies that the user spent virtual currency on an in-game purchase.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterVirtualCurrencyAmountKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserSpentVirtualCurrency;
|
||||
|
||||
/**
|
||||
* @name Commerce Events
|
||||
*/
|
||||
|
||||
/**
|
||||
* Signifies that the user viewed a specific piece of content.
|
||||
*
|
||||
* For general content (non-saleable products) use @c kALEventTypeUserViewedContent instead.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterProductIdentifierKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserViewedProduct;
|
||||
|
||||
/**
|
||||
* Signifies that the user added a product/item to their shopping cart.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterProductIdentifierKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserAddedItemToCart;
|
||||
|
||||
/**
|
||||
* Signifies that the user added a product/item to their wishlist.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterProductIdentifierKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserAddedItemToWishlist;
|
||||
|
||||
/**
|
||||
* Signifies that the user provided payment information, such as a credit card number.
|
||||
*
|
||||
* Suggested parameters: None.
|
||||
*
|
||||
* @warning Please <em>do not</em> pass AppLovin any personally identifiable information (PII) or financial/payment information.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserProvidedPaymentInformation;
|
||||
|
||||
/**
|
||||
* Signifies that the user began a check-out / purchase process.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterProductIdentifierKey, @c kALEventParameterRevenueAmountKey, and @c kALEventParameterRevenueCurrencyKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserBeganCheckOut;
|
||||
|
||||
/**
|
||||
* Signifies that the user completed a check-out / purchase.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterCheckoutTransactionIdentifierKey, @c kALEventParameterProductIdentifierKey, @c kALEventParameterRevenueAmountKey,
|
||||
* and @c kALEventParameterRevenueCurrencyKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserCompletedCheckOut;
|
||||
|
||||
/**
|
||||
* Signifies that the user completed an iTunes in-app purchase using StoreKit.
|
||||
*
|
||||
* Note that this event implies an in-app content purchase; for purchases of general products completed using Apple Pay, use
|
||||
* @c kALEventTypeUserCompletedCheckOut instead.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterProductIdentifierKey, @c kALEventParameterStoreKitTransactionIdentifierKey, @c kALEventParameterStoreKitReceiptKey,
|
||||
* @c kALEventParameterRevenueAmountKey, and @c kALEventParameterRevenueCurrencyKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserCompletedInAppPurchase;
|
||||
|
||||
/**
|
||||
* Signifies that the user has created a reservation or other date-specific event.
|
||||
*
|
||||
* Suggested parameters: @c kALEventParameterProductIdentifierKey, @c kALEventParameterReservationStartDateKey, and @c kALEventParameterReservationEndDateKey.
|
||||
*
|
||||
* AppLovin recommends that you pass these key-value pairs to @code -[ALEventService trackEvent:parameters:] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserCreatedReservation;
|
||||
|
||||
/**
|
||||
* @name Social Events
|
||||
*/
|
||||
|
||||
/**
|
||||
* Signifies that the user sent an invitation to use your app to a friend.
|
||||
*
|
||||
* Suggested parameters: None.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserSentInvitation;
|
||||
|
||||
/**
|
||||
* Signifies that the user shared a link or deep-link to some content within your app.
|
||||
*
|
||||
* Suggested parameters: None.
|
||||
*/
|
||||
extern NSString *const kALEventTypeUserSharedLink;
|
||||
|
||||
/**
|
||||
* @name Event Parameters
|
||||
*/
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that represents the username or account ID of the user. Expects a
|
||||
* corresponding value of type @c NSString.
|
||||
*/
|
||||
extern NSString *const kALEventParameterUserAccountIdentifierKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that identifies a particular piece of content viewed by the user. Expects a
|
||||
* corresponding value of type @c NSString.
|
||||
*
|
||||
* This could be something like a section title, or even a name of a view controller.
|
||||
* For views of particular products, it is preferred you pass an SKU under @c kALEventParameterProductIdentifierKey.
|
||||
*/
|
||||
extern NSString *const kALEventParameterContentIdentifierKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that represents a search query executed by the user. Expects a corresponding
|
||||
* value of type @c NSString.
|
||||
*
|
||||
* In most cases the text that the user enters into a @c UISearchBar is what you want to provide as the value.
|
||||
*/
|
||||
extern NSString *const kALEventParameterSearchQueryKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that identifies the level the user has just completed. Expects a corresponding
|
||||
* value of type @c NSString.
|
||||
*/
|
||||
extern NSString *const kALEventParameterCompletedLevelKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that identifies the achievement the user has just completed/unlocked. Expects
|
||||
* a corresponding value of type @c NSString.
|
||||
*/
|
||||
extern NSString *const kALEventParameterCompletedAchievementKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that represents the amount of virtual currency that a user spent on an in-game
|
||||
* purchase. Expects a corresponding value of type @c NSNumber.
|
||||
*/
|
||||
extern NSString *const kALEventParameterVirtualCurrencyAmountKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that represents the name of the virtual currency that a user spent on an
|
||||
* in-game purchase. Expects a corresponding value of type @c NSString.
|
||||
*/
|
||||
extern NSString *const kALEventParameterVirtualCurrencyNameKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that identifies a particular product. Expects a corresponding value of type
|
||||
* @c NSString.
|
||||
*
|
||||
* This could be something like a product name, SKU, or inventory ID. For non-product content, for example to track uses of particular view controllers, pass
|
||||
* @c kALEventParameterContentIdentifierKey instead.
|
||||
*/
|
||||
extern NSString *const kALEventParameterProductIdentifierKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that represents the amount of revenue generated by a purchase event. Expects a
|
||||
* corresponding value of type @c NSNumber.
|
||||
*/
|
||||
extern NSString *const kALEventParameterRevenueAmountKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that represents the currency of the revenue event. Expects a corresponding
|
||||
* value of type @c NSString.
|
||||
*
|
||||
* Ideally this should be an ISO 4217 three-letter currency code (for instance, @c "USD", @c "EUR", @c "GBP", and so forth).
|
||||
*
|
||||
* @see https://en.wikipedia.org/wiki/ISO_4217
|
||||
*/
|
||||
extern NSString *const kALEventParameterRevenueCurrencyKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that represents a unique identifier for the current checkout transaction.
|
||||
* Expects a corresponding value of type @c NSString.
|
||||
*/
|
||||
extern NSString *const kALEventParameterCheckoutTransactionIdentifierKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that represents the StoreKit transaction ID associated with the revenue keys.
|
||||
* Expects a corresponding value of type @c NSString.
|
||||
*
|
||||
* This identifier should match the value of @code -[SKPaymentTransaction transactionIdentifier] @endcode.
|
||||
*/
|
||||
extern NSString *const kALEventParameterStoreKitTransactionIdentifierKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that represents the StoreKit receipt associated with the revenue keys. Expects
|
||||
* a corresponding value of type @c NSData.
|
||||
*
|
||||
* The receipt can be collected in this way:
|
||||
* @code NSData* receipt = [NSData dataWithContentsOfURL: [[NSBundle mainBundle] appStoreReceiptURL]]; @endcode
|
||||
*/
|
||||
extern NSString *const kALEventParameterStoreKitReceiptKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that represents the start date of a reservation. Expects a corresponding value
|
||||
* of type @c NSDate.
|
||||
*
|
||||
* If a reservation does not span multiple days, you can submit only @c kALEventParameterReservationStartDateKey and ignore the corresponding
|
||||
* @c kALEventParameterReservationEndDateKey parameter.
|
||||
*/
|
||||
extern NSString *const kALEventParameterReservationStartDateKey;
|
||||
|
||||
/**
|
||||
* The dictionary key for @code -[ALEventService trackEvent:parameters:] @endcode that represents the end date of a reservation. Expects a corresponding value
|
||||
* of type @c NSDate.
|
||||
*
|
||||
* If a reservation does not span multiple days, you can submit only @c kALEventParameterReservationStartDateKey and ignore this parameter.
|
||||
*/
|
||||
extern NSString *const kALEventParameterReservationEndDateKey;
|
||||
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,93 +0,0 @@
|
||||
//
|
||||
// ALInterstitialAd.h
|
||||
//
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/ALAdDisplayDelegate.h>
|
||||
#import <AppLovinSDK/ALAdLoadDelegate.h>
|
||||
#import <AppLovinSDK/ALAdVideoPlaybackDelegate.h>
|
||||
|
||||
@class ALAd;
|
||||
@class ALSdk;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class displays full-screen ads to the user.
|
||||
*/
|
||||
@interface ALInterstitialAd : NSObject
|
||||
|
||||
#pragma mark - Ad Delegates
|
||||
|
||||
/**
|
||||
* An object that conforms to the @c ALAdLoadDelegate protocol. If you provide a value for @c adLoadDelegate in your instance, the SDK will notify
|
||||
* this delegate of ad load events.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) id<ALAdLoadDelegate> adLoadDelegate;
|
||||
|
||||
/**
|
||||
* An object that conforms to the @c ALAdDisplayDelegate protocol. If you provide a value for @c adDisplayDelegate in your instance, the SDK will
|
||||
* notify this delegate of ad show/hide events.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) id<ALAdDisplayDelegate> adDisplayDelegate;
|
||||
|
||||
/**
|
||||
* An object that conforms to the @c ALAdVideoPlaybackDelegate protocol. If you provide a value for @c adVideoPlaybackDelegate in your instance,
|
||||
* the SDK will notify this delegate of video start/finish events.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) id<ALAdVideoPlaybackDelegate> adVideoPlaybackDelegate;
|
||||
|
||||
#pragma mark - Loading and Showing Ads, Class Methods
|
||||
|
||||
/**
|
||||
* Shows an interstitial over the application’s key window. This loads the next interstitial and displays it.
|
||||
*/
|
||||
+ (instancetype)show;
|
||||
|
||||
/**
|
||||
* Gets a reference to the shared singleton instance.
|
||||
*
|
||||
* This method calls @code +[ALSdk shared] @endcode which requires that you have an SDK key defined in @code Info.plist @endcode.
|
||||
*
|
||||
* @warning If you use @code +[ALSdk sharedWithKey:] @endcode then you will need to use the instance methods instead.
|
||||
*/
|
||||
+ (instancetype)shared;
|
||||
|
||||
#pragma mark - Loading and Showing Ads, Instance Methods
|
||||
|
||||
/**
|
||||
* Shows an interstitial over the application’s key window. This loads the next interstitial and displays it.
|
||||
*/
|
||||
- (void)show;
|
||||
|
||||
/**
|
||||
* Shows the current interstitial over a given window and renders a specified ad loaded by @c ALAdService.
|
||||
*
|
||||
* @param ad The ad to render into this interstitial.
|
||||
*/
|
||||
- (void)showAd:(ALAd *)ad;
|
||||
|
||||
/**
|
||||
* Sets extra info to pass to the SDK.
|
||||
*
|
||||
* @param key Parameter key.
|
||||
* @param value Parameter value.
|
||||
*/
|
||||
- (void)setExtraInfoForKey:(NSString *)key value:(nullable id)value;
|
||||
|
||||
#pragma mark - Initialization
|
||||
|
||||
/**
|
||||
* Initializes an instance of this class with an SDK instance.
|
||||
*
|
||||
* @param sdk The AppLovin SDK instance to use.
|
||||
*/
|
||||
- (instancetype)initWithSdk:(ALSdk *)sdk;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,100 +0,0 @@
|
||||
//
|
||||
// ALMacros.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 1/1/22.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NS_INLINE BOOL isMainQueue (void)
|
||||
{
|
||||
return [NSThread isMainThread];
|
||||
}
|
||||
|
||||
NS_INLINE void deferToNextMainQueueRunloop (void (^block)(void))
|
||||
{
|
||||
[[NSOperationQueue mainQueue] addOperationWithBlock: block];
|
||||
}
|
||||
|
||||
NS_INLINE void dispatchOnMainQueueNow (void (^block)(void))
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), block);
|
||||
}
|
||||
|
||||
NS_INLINE void dispatchOnMainQueue (void (^block)(void))
|
||||
{
|
||||
if ( isMainQueue() )
|
||||
{
|
||||
block();
|
||||
}
|
||||
else
|
||||
{
|
||||
deferToNextMainQueueRunloop(block);
|
||||
}
|
||||
}
|
||||
|
||||
NS_INLINE void dispatchOnMainQueueImmediate (void (^block)(void))
|
||||
{
|
||||
if ( isMainQueue () )
|
||||
{
|
||||
block();
|
||||
}
|
||||
else
|
||||
{
|
||||
dispatchOnMainQueueNow(block);
|
||||
}
|
||||
}
|
||||
|
||||
NS_INLINE void dispatchOnMainQueueAfter (double delay, dispatch_block_t __nonnull block)
|
||||
{
|
||||
if ( delay > 0 )
|
||||
{
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (delay * NSEC_PER_SEC)), dispatch_get_main_queue(), block);
|
||||
}
|
||||
else
|
||||
{
|
||||
dispatchOnMainQueueImmediate(block);
|
||||
}
|
||||
}
|
||||
|
||||
NS_INLINE void dispatchOnMainQueueAfterAndDeferToNextMainQueueRunloop (double delay, dispatch_block_t __nonnull block)
|
||||
{
|
||||
if ( delay > 0 )
|
||||
{
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (delay * NSEC_PER_SEC)), dispatch_get_main_queue(), block);
|
||||
}
|
||||
else
|
||||
{
|
||||
deferToNextMainQueueRunloop(block);
|
||||
}
|
||||
}
|
||||
|
||||
NS_INLINE void dispatchSyncOnMainQueue (dispatch_block_t __nonnull block)
|
||||
{
|
||||
// Cannot call dispatch_sync on same queue results in deadlock - so just run op if main queue already
|
||||
if ( isMainQueue() )
|
||||
{
|
||||
block();
|
||||
}
|
||||
else
|
||||
{
|
||||
dispatch_sync(dispatch_get_main_queue(), block);
|
||||
}
|
||||
}
|
||||
|
||||
NS_INLINE void dispatchOnGlobalQueueAfter (dispatch_queue_priority_t priority, double delay, dispatch_block_t __nonnull block)
|
||||
{
|
||||
dispatch_queue_t globalQueue = dispatch_get_global_queue(priority, 0);
|
||||
|
||||
if ( delay > 0 )
|
||||
{
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (delay * NSEC_PER_SEC)), globalQueue, block);
|
||||
}
|
||||
else
|
||||
{
|
||||
dispatch_async(globalQueue, block);
|
||||
}
|
||||
}
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,42 +0,0 @@
|
||||
//
|
||||
// ALMediationProvider.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 1/28/18.
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* @file ALMediationProvider.h
|
||||
*
|
||||
* Names of mediation providers.
|
||||
*/
|
||||
|
||||
/** @brief AdMarvel */
|
||||
extern NSString *const ALMediationProviderAdMarvel;
|
||||
/** @brief AdMob Mediation */
|
||||
extern NSString *const ALMediationProviderAdMob;
|
||||
/** @brief AerServ | InMobi */
|
||||
extern NSString *const ALMediationProviderAerServ;
|
||||
/** @brief Appodeal */
|
||||
extern NSString *const ALMediationProviderAppodeal;
|
||||
/** @brief Fuse Powered */
|
||||
extern NSString *const ALMediationProviderFusePowered;
|
||||
/** @brief Fyber Mediation */
|
||||
extern NSString *const ALMediationProviderFyber;
|
||||
/** @brief HeyZap Mediation */
|
||||
extern NSString *const ALMediationProviderHeyzap;
|
||||
/** @brief HyprMX */
|
||||
extern NSString *const ALMediationProviderHyprMX;
|
||||
/** @brief ironSource */
|
||||
extern NSString *const ALMediationProviderIronsource;
|
||||
/** @brief MAX */
|
||||
extern NSString *const ALMediationProviderMAX;
|
||||
/** @brief MoPub Network Mediation */
|
||||
extern NSString *const ALMediationProviderMoPub;
|
||||
/** @brief Tapdaq */
|
||||
extern NSString *const ALMediationProviderTapdaq;
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,40 +0,0 @@
|
||||
//
|
||||
// ALPostbackDelegate
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
@class ALPostbackService;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol allows you to monitor the dispatching of postbacks to a developer-specified URL by the postback service.
|
||||
*/
|
||||
@protocol ALPostbackDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* Indicates that a postback dispatched to a given URL completed successfully.
|
||||
*
|
||||
* Success means having received a 2<var>xx</var> response code from the remote endpoint.
|
||||
*
|
||||
* @param postbackService The postback service that made the postback call.
|
||||
* @param postbackURL The URL that was notified.
|
||||
*/
|
||||
- (void)postbackService:(ALPostbackService *)postbackService didExecutePostback:(NSURL *)postbackURL;
|
||||
|
||||
/**
|
||||
* Indicates that a postback dispatched to a given URL has failed.
|
||||
*
|
||||
* Failure means having received a response code outside the 2<var>xx</var> range, or having been unable to establish a connection.
|
||||
*
|
||||
* @param postbackService The postback service that attempted the postback call.
|
||||
* @param postbackURL The URL to which the notification attempt was made.
|
||||
* @param errorCode The HTTP status code received, if any; otherwise one of the negative constants defined in ALErrorCodes.h.
|
||||
*/
|
||||
- (void)postbackService:(ALPostbackService *)postbackService didFailToExecutePostback:(nullable NSURL *)postbackURL errorCode:(NSInteger)errorCode;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,129 +0,0 @@
|
||||
//
|
||||
// ALSdkConfiguration.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 9/29/18.
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class contains various properties of the AppLovin SDK configuration.
|
||||
*/
|
||||
@interface ALSdkConfiguration : NSObject
|
||||
|
||||
/**
|
||||
* This enum represents the user's geography used to determine the type of consent flow shown to the user.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, ALConsentFlowUserGeography)
|
||||
{
|
||||
/**
|
||||
* User's geography is unknown.
|
||||
*/
|
||||
ALConsentFlowUserGeographyUnknown,
|
||||
|
||||
/**
|
||||
* The user is in GDPR region.
|
||||
*/
|
||||
ALConsentFlowUserGeographyGDPR,
|
||||
|
||||
/**
|
||||
* The user is in a non-GDPR region.
|
||||
*/
|
||||
ALConsentFlowUserGeographyOther
|
||||
};
|
||||
|
||||
/**
|
||||
* AppLovin SDK-defined app tracking transparency status values (extended to include "unavailable" state on iOS before iOS14).
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, ALAppTrackingTransparencyStatus)
|
||||
{
|
||||
/**
|
||||
* Device is on iOS before iOS14, AppTrackingTransparency.framework is not available.
|
||||
*/
|
||||
ALAppTrackingTransparencyStatusUnavailable = -1,
|
||||
|
||||
/**
|
||||
* The user has not yet received an authorization request to authorize access to app-related data that can be used for tracking the user or the device.
|
||||
*/
|
||||
ALAppTrackingTransparencyStatusNotDetermined,
|
||||
|
||||
/**
|
||||
* Authorization to access app-related data that can be used for tracking the user or the device is restricted.
|
||||
*/
|
||||
ALAppTrackingTransparencyStatusRestricted,
|
||||
|
||||
/**
|
||||
* The user denies authorization to access app-related data that can be used for tracking the user or the device.
|
||||
*/
|
||||
ALAppTrackingTransparencyStatusDenied,
|
||||
|
||||
/**
|
||||
* The user authorizes access to app-related data that can be used for tracking the user or the device.
|
||||
*/
|
||||
ALAppTrackingTransparencyStatusAuthorized
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the user's geography used to determine the type of consent flow shown to the user.
|
||||
* If no such determination could be made, @c ALConsentFlowUserGeographyUnknown will be returned.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) ALConsentFlowUserGeography consentFlowUserGeography;
|
||||
|
||||
/**
|
||||
* Gets the country code for this user. The value of this property will be an empty string if no country code is available for this user.
|
||||
*
|
||||
* @warning Do not confuse this with the <em>currency</em> code which is "USD" in most cases.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *countryCode;
|
||||
|
||||
/**
|
||||
* Get the list of those Ad Unit IDs that are in the waterfall that is currently active for a particular user and
|
||||
* for which Amazon Publisher Services is enabled.
|
||||
*
|
||||
* Which waterfall is currently active for a user depends on things like A/B tests, keyword targeting, or DNT.
|
||||
*
|
||||
* @return @c nil when configuration fetching fails (e.g. in the case of no connection) or
|
||||
* an empty array if no Ad Unit IDs have Amazon Publisher Services enabled.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) NSArray<NSString *> *enabledAmazonAdUnitIdentifiers;
|
||||
|
||||
/**
|
||||
* Indicates whether or not the user authorizes access to app-related data that can be used for tracking the user or the device.
|
||||
*
|
||||
* @warning Users can revoke permission at any time through the "Allow Apps To Request To Track" privacy setting on the device.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) ALAppTrackingTransparencyStatus appTrackingTransparencyStatus;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
/**
|
||||
* Whether or not test mode is enabled for this session.
|
||||
*
|
||||
* @return @c YES in one of the following cases:
|
||||
* <ul>
|
||||
* <li> 1. @code ALSdkInitializationConfiguration.testDeviceAdvertisingIdentifiers @endcode was set with current device's IDFA prior to SDK initialization.</li>
|
||||
* <li> 2. Current device was registered as a test device through MAX dashboard -> MAX Test Devices prior to SDK initialization.</li>
|
||||
* <li> 3. Test mode was manually enabled for this session through the Mediation Debugger during the last session.</li>
|
||||
* <li> 4. Current device is a simulator.</li>
|
||||
* </ul>
|
||||
*/
|
||||
@property (nonatomic, assign, readonly, getter=isTestModeEnabled) BOOL testModeEnabled;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
__attribute__((deprecated))
|
||||
typedef NS_ENUM(NSInteger, ALConsentDialogState)
|
||||
{
|
||||
ALConsentDialogStateUnknown,
|
||||
ALConsentDialogStateApplies,
|
||||
ALConsentDialogStateDoesNotApply
|
||||
};
|
||||
|
||||
@interface ALSdkConfiguration (ALDeprecated)
|
||||
@property (nonatomic, assign, readonly) ALConsentDialogState consentDialogState __deprecated_msg("This API has been deprecated and will be removed in a future release.");
|
||||
@end
|
||||
@ -1,60 +0,0 @@
|
||||
//
|
||||
// ALTermsAndPrivacyPolicyFlowSettings.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Chris Cong on 1/22/24.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/ALSdkConfiguration.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* DEPRECATED. This property is deprecated and will be removed in a future SDK version. Use the new MAX Terms and Privacy Policy Flow instead (see @c ALSdkSettings.termsAndPrivacyPolicyFlowSettings).
|
||||
*/
|
||||
@interface ALConsentFlowSettings : NSObject
|
||||
@property (nonatomic, assign, getter=isEnabled) BOOL enabled;
|
||||
@property (nonatomic, copy, nullable) NSURL *privacyPolicyURL;
|
||||
@property (nonatomic, copy, nullable) NSURL *termsOfServiceURL;
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
@end
|
||||
|
||||
/**
|
||||
* This interface contains settings that enable the MAX Terms and Privacy Policy Flow.
|
||||
*/
|
||||
@interface ALTermsAndPrivacyPolicyFlowSettings : ALConsentFlowSettings
|
||||
|
||||
/**
|
||||
* Set this to @c YES to enable the Terms Flow. You must also provide your privacy policy and terms of service URLs in this object, and you must provide a @c NSUserTrackingUsageDescription string in your @code Info.plist @endcode file.
|
||||
*
|
||||
* This defaults to the value that you entered into your @code Info.plist @endcode file via @c AppLovinConsentFlowInfo ⇒ @c AppLovinConsentFlowEnabled.
|
||||
*/
|
||||
@property (nonatomic, assign, getter=isEnabled) BOOL enabled;
|
||||
|
||||
/**
|
||||
* URL for your company’s privacy policy. This is required in order to enable the Terms Flow.
|
||||
*
|
||||
* This defaults to the value that you entered into your @code Info.plist @endcode file via @c AppLovinConsentFlowInfo ⇒ @c AppLovinConsentFlowPrivacyPolicy.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSURL *privacyPolicyURL;
|
||||
|
||||
/**
|
||||
* URL for your company’s terms of service. This is optional; you can enable the Terms Flow with or without it.
|
||||
*
|
||||
* This defaults to the value that you entered into your @code Info.plist @endcode file via @c AppLovinConsentFlowInfo ⇒ @c AppLovinConsentFlowTermsOfService.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSURL *termsOfServiceURL;
|
||||
|
||||
/**
|
||||
* Set debug user geography. You may use this to test CMP flow by setting this to @c ALConsentFlowUserGeographyGDPR.
|
||||
*
|
||||
* The flow would only be shown to new users. If you wish to test the flow after completing the CMP prompt, you would need to delete and re-install the app.
|
||||
*
|
||||
* NOTE: The debug geography is used only when the app is in debug mode.
|
||||
*/
|
||||
@property (nonatomic, assign) ALConsentFlowUserGeography debugUserGeography;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,320 +0,0 @@
|
||||
#if 0
|
||||
#elif defined(__arm64__) && __arm64__
|
||||
// Generated by Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
|
||||
#ifndef APPLOVINSDK_SWIFT_H
|
||||
#define APPLOVINSDK_SWIFT_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wgcc-compat"
|
||||
|
||||
#if !defined(__has_include)
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
#if !defined(__has_attribute)
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
#if !defined(__has_feature)
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(__has_warning)
|
||||
# define __has_warning(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_include(<swift/objc-prologue.h>)
|
||||
# include <swift/objc-prologue.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wauto-import"
|
||||
#if defined(__OBJC__)
|
||||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <cstdbool>
|
||||
#include <cstring>
|
||||
#include <stdlib.h>
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
|
||||
# include <ptrauth.h>
|
||||
#else
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
|
||||
# ifndef __ptrauth_swift_value_witness_function_pointer
|
||||
# define __ptrauth_swift_value_witness_function_pointer(x)
|
||||
# endif
|
||||
# ifndef __ptrauth_swift_class_method_pointer
|
||||
# define __ptrauth_swift_class_method_pointer(x)
|
||||
# endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_TYPEDEFS)
|
||||
# define SWIFT_TYPEDEFS 1
|
||||
# if __has_include(<uchar.h>)
|
||||
# include <uchar.h>
|
||||
# elif !defined(__cplusplus)
|
||||
typedef uint_least16_t char16_t;
|
||||
typedef uint_least32_t char32_t;
|
||||
# endif
|
||||
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
||||
#endif
|
||||
|
||||
#if !defined(SWIFT_PASTE)
|
||||
# define SWIFT_PASTE_HELPER(x, y) x##y
|
||||
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
|
||||
#endif
|
||||
#if !defined(SWIFT_METATYPE)
|
||||
# define SWIFT_METATYPE(X) Class
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_PROPERTY)
|
||||
# if __has_feature(objc_class_property)
|
||||
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
||||
# else
|
||||
# define SWIFT_CLASS_PROPERTY(...)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RUNTIME_NAME)
|
||||
# if __has_attribute(objc_runtime_name)
|
||||
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
||||
# else
|
||||
# define SWIFT_RUNTIME_NAME(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_COMPILE_NAME)
|
||||
# if __has_attribute(swift_name)
|
||||
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
||||
# else
|
||||
# define SWIFT_COMPILE_NAME(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_METHOD_FAMILY)
|
||||
# if __has_attribute(objc_method_family)
|
||||
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
||||
# else
|
||||
# define SWIFT_METHOD_FAMILY(X)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_NOESCAPE)
|
||||
# if __has_attribute(noescape)
|
||||
# define SWIFT_NOESCAPE __attribute__((noescape))
|
||||
# else
|
||||
# define SWIFT_NOESCAPE
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RELEASES_ARGUMENT)
|
||||
# if __has_attribute(ns_consumed)
|
||||
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
||||
# else
|
||||
# define SWIFT_RELEASES_ARGUMENT
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_WARN_UNUSED_RESULT)
|
||||
# if __has_attribute(warn_unused_result)
|
||||
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
# else
|
||||
# define SWIFT_WARN_UNUSED_RESULT
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_NORETURN)
|
||||
# if __has_attribute(noreturn)
|
||||
# define SWIFT_NORETURN __attribute__((noreturn))
|
||||
# else
|
||||
# define SWIFT_NORETURN
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS_EXTRA)
|
||||
# define SWIFT_CLASS_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
||||
# define SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_EXTRA)
|
||||
# define SWIFT_ENUM_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_CLASS)
|
||||
# if __has_attribute(objc_subclassing_restricted)
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# else
|
||||
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_RESILIENT_CLASS)
|
||||
# if __has_attribute(objc_class_stub)
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# else
|
||||
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
|
||||
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_PROTOCOL)
|
||||
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
||||
#endif
|
||||
#if !defined(SWIFT_EXTENSION)
|
||||
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
||||
#endif
|
||||
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
||||
# if __has_attribute(objc_designated_initializer)
|
||||
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
||||
# else
|
||||
# define OBJC_DESIGNATED_INITIALIZER
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM_ATTR)
|
||||
# if __has_attribute(enum_extensibility)
|
||||
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
||||
# else
|
||||
# define SWIFT_ENUM_ATTR(_extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_ENUM)
|
||||
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# if __has_feature(generalized_swift_name)
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
||||
# else
|
||||
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE)
|
||||
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
||||
#endif
|
||||
#if !defined(SWIFT_UNAVAILABLE_MSG)
|
||||
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
|
||||
#endif
|
||||
#if !defined(SWIFT_AVAILABILITY)
|
||||
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_WEAK_IMPORT)
|
||||
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED)
|
||||
# define SWIFT_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_MSG)
|
||||
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
||||
#endif
|
||||
#if !defined(SWIFT_DEPRECATED_OBJC)
|
||||
# if __has_feature(attribute_diagnose_if_objc)
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
||||
# else
|
||||
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
||||
# endif
|
||||
#endif
|
||||
#if defined(__OBJC__)
|
||||
#if !defined(IBSegueAction)
|
||||
# define IBSegueAction
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(SWIFT_EXTERN)
|
||||
# if defined(__cplusplus)
|
||||
# define SWIFT_EXTERN extern "C"
|
||||
# else
|
||||
# define SWIFT_EXTERN extern
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(SWIFT_CALL)
|
||||
# define SWIFT_CALL __attribute__((swiftcall))
|
||||
#endif
|
||||
#if !defined(SWIFT_INDIRECT_RESULT)
|
||||
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
|
||||
#endif
|
||||
#if !defined(SWIFT_CONTEXT)
|
||||
# define SWIFT_CONTEXT __attribute__((swift_context))
|
||||
#endif
|
||||
#if !defined(SWIFT_ERROR_RESULT)
|
||||
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
# define SWIFT_NOEXCEPT noexcept
|
||||
#else
|
||||
# define SWIFT_NOEXCEPT
|
||||
#endif
|
||||
#if !defined(SWIFT_C_INLINE_THUNK)
|
||||
# if __has_attribute(always_inline)
|
||||
# if __has_attribute(nodebug)
|
||||
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
|
||||
# else
|
||||
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
|
||||
# endif
|
||||
# else
|
||||
# define SWIFT_C_INLINE_THUNK inline
|
||||
# endif
|
||||
#endif
|
||||
#if defined(_WIN32)
|
||||
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
||||
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
||||
# define SWIFT_IMPORT_STDLIB_SYMBOL
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__OBJC__)
|
||||
#if __has_feature(objc_modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#import <AppLovinSDK/AppLovinSDK.h>
|
||||
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
||||
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
||||
#if __has_warning("-Wpragma-clang-attribute")
|
||||
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
||||
#endif
|
||||
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
|
||||
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma push_macro("any")
|
||||
# undef any
|
||||
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="AppLovinSDK",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
||||
# pragma pop_macro("any")
|
||||
#endif
|
||||
|
||||
#if defined(__OBJC__)
|
||||
|
||||
@class NSString;
|
||||
|
||||
@interface ALMediationAdapter (SWIFT_EXTENSION(AppLovinSDK))
|
||||
@property (nonatomic, readonly, copy) NSString * _Nonnull thirdPartySdkName;
|
||||
@end
|
||||
|
||||
#endif
|
||||
#if __has_attribute(external_source_symbol)
|
||||
# pragma clang attribute pop
|
||||
#endif
|
||||
#if defined(__cplusplus)
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error unsupported Swift architecture
|
||||
#endif
|
||||
@ -1,91 +0,0 @@
|
||||
//
|
||||
// MAAdDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 8/10/18.
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
@class MAAd;
|
||||
@class MAError;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines a listener to be notified about ad events.
|
||||
*/
|
||||
@protocol MAAdDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when a new ad has been loaded.
|
||||
*
|
||||
* @param ad The ad that was loaded.
|
||||
*/
|
||||
- (void)didLoadAd:(MAAd *)ad;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when an ad could not be retrieved.
|
||||
*
|
||||
* <b>Common error codes:</b><table>
|
||||
* <tr><td>204</td><td>no ad is available</td></tr>
|
||||
* <tr><td>5xx</td><td>internal server error</td></tr>
|
||||
* <tr><td>negative number</td><td>internal errors</td></tr></table>
|
||||
*
|
||||
* @param adUnitIdentifier The ad unit ID that the SDK failed to load an ad for.
|
||||
* @param error An object that encapsulates the failure info.
|
||||
*/
|
||||
- (void)didFailToLoadAdForAdUnitIdentifier:(NSString *)adUnitIdentifier withError:(MAError *)error;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when a full-screen ad is displayed.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @warning This method is deprecated for MRECs. It will only be called for full-screen ads.
|
||||
*
|
||||
* @param ad The ad that was displayed.
|
||||
*/
|
||||
- (void)didDisplayAd:(MAAd *)ad;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when a full-screen ad is hidden.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @warning This method is deprecated for MRECs. It will only be called for full-screen ads.
|
||||
*
|
||||
* @param ad The ad that was hidden.
|
||||
*/
|
||||
- (void)didHideAd:(MAAd *)ad;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when the ad is clicked.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad The ad that was clicked.
|
||||
*/
|
||||
- (void)didClickAd:(MAAd *)ad;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when the ad failed to display.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad The ad that the SDK failed to display for.
|
||||
* @param error An object that encapsulates the failure info.
|
||||
*/
|
||||
- (void)didFailToDisplayAd:(MAAd *)ad withError:(MAError *)error;
|
||||
|
||||
@optional
|
||||
|
||||
- (void)didPayRevenueForAd:(MAAd *)ad
|
||||
__deprecated_msg("This callback has been deprecated and will be removed in a future SDK version. Please use -[MAAdRevenueDelegate didPayRevenueForAd:] instead.");
|
||||
- (void)didFailToLoadAdForAdUnitIdentifier:(NSString *)adUnitIdentifier withErrorCode:(NSInteger)errorCode
|
||||
__deprecated_msg("This callback has been deprecated and will be removed in a future SDK version. Please use -[MAAdDelegate didFailToLoadAdForAdUnitIdentifier:withError:] instead.");
|
||||
- (void)didFailToDisplayAd:(MAAd *)ad withErrorCode:(NSInteger)errorCode
|
||||
__deprecated_msg("This callback has been deprecated and will be removed in a future SDK version. Please use -[MAAdDelegate didFailToDisplayAd:withError:] instead.");
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,31 +0,0 @@
|
||||
//
|
||||
// MAAdExpirationDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Ritam Sarmah on 8/7/23.
|
||||
//
|
||||
|
||||
@class MAAd;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines a delegate to be notified about ad expiration events.
|
||||
*/
|
||||
@protocol MAAdExpirationDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* The SDK invokes this callback when a new ad has reloaded after expiration.
|
||||
*
|
||||
* The SDK invokes this callback on the UI thread.
|
||||
*
|
||||
* @note @c didLoadAd: is not invoked for a successfully reloaded ad.
|
||||
*
|
||||
* @param expiredAd The previously expired ad.
|
||||
* @param newAd The newly reloaded ad.
|
||||
*/
|
||||
- (void)didReloadExpiredAd:(MAAd *)expiredAd withNewAd:(MAAd *)newAd;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,205 +0,0 @@
|
||||
//
|
||||
// MAAdPlacer.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Ritam Sarmah on 2/16/22.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <AppLovinSDK/MAAdPlacerSettings.h>
|
||||
|
||||
@class MAAd;
|
||||
@class MANativeAdViewBinder;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol MAAdPlacerDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
- (void)didLoadAdAtIndexPath:(NSIndexPath *)indexPath;
|
||||
- (void)didRemoveAdsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths;
|
||||
- (void)didClickAd:(MAAd *)ad;
|
||||
- (void)didPayRevenueForAd:(MAAd *)ad;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* This class loads native ads and calculates ad positioning info within a content stream.
|
||||
*
|
||||
* @note If you're working with a @c UITableView or @c UICollectionView, you should consider using @c MATableViewPlacer or @c MACollectionViewAdPlacer respectively. If you wish to create an implementation for a custom UI component, you should use @c MAAdPlacer or subclass @c MACustomAdPlacer.
|
||||
*
|
||||
* @discussion Initialize with an @c MAAdPlacerSettings and call @c loadAds: as soon as possible to start queuing up ads to be placed into the stream. The ad placer decides which ad index paths to actually fill based on the currently visible or "fillable" index paths, which should be set using @c updateFillableIndexPaths: to reflect the present UI state. Upon insertion or removal of ads, the delegate will be informed via @c didLoadAdAtIndexPath: and @c didRemoveAdsAtIndexPaths: , which can in turn trigger any necessary UI updates.
|
||||
*
|
||||
* Use @c renderAdAtIndexPath: to render ads once they are inserted into its corresponding view. The ad placer should also be notified of modifications to the original data in the stream (i.e., insert, delete, move operations).
|
||||
*/
|
||||
@interface MAAdPlacer : NSObject
|
||||
|
||||
@property (nonatomic, weak, nullable) id<MAAdPlacerDelegate> delegate;
|
||||
|
||||
#pragma mark - Ad Rendering Properties
|
||||
|
||||
/**
|
||||
* The desired size for the ad view.
|
||||
*
|
||||
* If you're using default templates and this value is not set, ad views automatically size to 360x120 for "Small" and 360x300 for "Medium".
|
||||
*/
|
||||
@property (nonatomic, assign) CGSize adSize;
|
||||
|
||||
/**
|
||||
* The native ad view nib to use for rendering manual template ads.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) UINib *nativeAdViewNib;
|
||||
|
||||
/**
|
||||
* The native ad view binder to use for rendering manual template ads.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) MANativeAdViewBinder *nativeAdViewBinder;
|
||||
|
||||
#pragma mark - Ads
|
||||
|
||||
/**
|
||||
* Load MAX native ads for stream. Set @code -[MAAdPlacer delegate] @endcode to assign a delegate that should be notified about ad load state.
|
||||
*/
|
||||
- (void)loadAds;
|
||||
|
||||
/**
|
||||
* Clears all ads placed in the stream, as well as any ads queued up for placement.
|
||||
*/
|
||||
- (void)clearAds;
|
||||
|
||||
/**
|
||||
* Clears ads placed in specified sections.
|
||||
*/
|
||||
- (void)clearAdsInSections:(NSIndexSet *)sections;
|
||||
|
||||
/**
|
||||
* Clears ads placed after the specified index path in its corresponding section.
|
||||
*
|
||||
* @return An array of cleared ad index paths.
|
||||
*/
|
||||
- (NSArray<NSIndexPath *> *)clearAdsInSectionAfterIndexPath:(NSIndexPath *)indexPath;
|
||||
|
||||
/**
|
||||
* Whether an index path represents an ad position.
|
||||
*/
|
||||
- (BOOL)isAdIndexPath:(NSIndexPath *)indexPath;
|
||||
|
||||
/**
|
||||
* Whether an index path contains a placed ad.
|
||||
*/
|
||||
- (BOOL)isFilledIndexPath:(NSIndexPath *)indexPath;
|
||||
|
||||
/**
|
||||
* Returns the size for an ad at a given index path. If an ad is not ready for that index path, returns @c CGSizeZero.
|
||||
*
|
||||
* If you're using default templates and @c adSize is not set, ad views automatically size to 360x120 for "Small" and 360x300 for "Medium". If the desired width is larger than the @c maximumWidth, the @c maximumWidth will be used while preserving the height for "Small" templates and the aspect ratio for "Medium". The size for manual templates will not be resized to fit.
|
||||
*/
|
||||
- (CGSize)sizeForAdAtIndexPath:(NSIndexPath *)indexPath withMaximumWidth:(CGFloat)maximumWidth;
|
||||
|
||||
/**
|
||||
* Renders an ad into the provided container view if an ad is loaded for that index path.
|
||||
*/
|
||||
- (void)renderAdAtIndexPath:(NSIndexPath *)indexPath inView:(UIView *)view;
|
||||
|
||||
#pragma mark - Info
|
||||
|
||||
/**
|
||||
* Updates the index paths to consider for placing ads. This is typically called with the list of visible index paths whenever it changes.
|
||||
*/
|
||||
- (void)updateFillableIndexPaths:(NSArray<NSIndexPath *> *)indexPaths;
|
||||
|
||||
/**
|
||||
* Returns the number of items in a section after including inserted ads.
|
||||
*
|
||||
* @param originalNumberOfItems The original number of items in the section of the content stream.
|
||||
* @param section The section in the content stream.
|
||||
*/
|
||||
- (NSInteger)adjustedNumberOfItems:(NSInteger)originalNumberOfItems inSection:(NSInteger)section;
|
||||
|
||||
/**
|
||||
* Returns the index path of an item after accounting for inserted ads.
|
||||
*
|
||||
* @param indexPath The original index path of an item in the original content stream.
|
||||
*/
|
||||
- (NSIndexPath *)adjustedIndexPathForOriginalIndexPath:(NSIndexPath *)indexPath;
|
||||
|
||||
/**
|
||||
* Returns the index path of an item in the original content stream.
|
||||
*
|
||||
* Ad index paths return nil since they do not have positions in the original stream.
|
||||
*
|
||||
* @param indexPath The adjusted index path of an item in the content stream with ads.
|
||||
*/
|
||||
- (nullable NSIndexPath *)originalIndexPathForAdjustedIndexPath:(NSIndexPath *)indexPath;
|
||||
|
||||
/**
|
||||
* Returns the index paths of items after accounting for inserted ads.
|
||||
*/
|
||||
- (NSArray<NSIndexPath *> *)adjustedIndexPathsForOriginalIndexPaths:(NSArray<NSIndexPath *> *)indexPaths;
|
||||
|
||||
/**
|
||||
* Returns the index paths of items in the original content stream.
|
||||
*/
|
||||
- (NSArray<NSIndexPath *> *)originalIndexPathsForAdjustedIndexPaths:(NSArray<NSIndexPath *> *)indexPaths;
|
||||
|
||||
#pragma mark - Item Updates
|
||||
|
||||
/**
|
||||
* Updates positioning info for the insertion of items.
|
||||
*
|
||||
* @param indexPaths An array of adjusted index paths for inserted items.
|
||||
*/
|
||||
- (void)insertItemsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths;
|
||||
|
||||
/**
|
||||
* Updates positioning info for the deletion of items.
|
||||
*
|
||||
* @param indexPaths An array of adjusted index paths for deleted items.
|
||||
*/
|
||||
- (void)deleteItemsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths;
|
||||
|
||||
/**
|
||||
* Updates positioning info for moving an item.
|
||||
*
|
||||
* @param sourceIndexPath An adjusted index path for the item to be moved.
|
||||
* @param destinationIndexPath An adjusted index path that is the destination of the move.
|
||||
*/
|
||||
- (void)moveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath;
|
||||
|
||||
#pragma mark - Section Updates
|
||||
|
||||
/**
|
||||
* Updates positioning info for inserting sections.
|
||||
*
|
||||
* @param sections An index set for positions where sections have been inserted.
|
||||
*/
|
||||
- (void)insertSections:(NSIndexSet *)sections;
|
||||
|
||||
/**
|
||||
* Updates positioning info for deleting sections.
|
||||
*
|
||||
* @param sections An index set for positions where sections have been deleting.
|
||||
*/
|
||||
- (void)deleteSections:(NSIndexSet *)sections;
|
||||
|
||||
/**
|
||||
* Updates positioning info for inserting sections.
|
||||
*
|
||||
* @param section The original index of the section.
|
||||
* @param newSection The destination index of the section.
|
||||
*/
|
||||
- (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection;
|
||||
|
||||
/**
|
||||
* Initializes an ad placer object.
|
||||
*
|
||||
* @param settings An ad placer settings object.
|
||||
*/
|
||||
- (instancetype)initWithSettings:(MAAdPlacerSettings *)settings;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,85 +0,0 @@
|
||||
//
|
||||
// MAAdPlacerSettings.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Ritam Sarmah on 2/16/22.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class contains settings to configure an Ad Placer.
|
||||
*
|
||||
* @c MAAdPlacerSettings must be initialized with a valid native ad unit identifier. Add fixed positions using @c addFixedPosition: or set the @c repeatingInterval before initializing an @c MAAdPlacer with the settings.
|
||||
*/
|
||||
@interface MAAdPlacerSettings : NSObject
|
||||
|
||||
/**
|
||||
* The ad unit identifier for loading native ads.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *adUnitIdentifier;
|
||||
|
||||
/**
|
||||
* The placement to tie the future ad events to.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *placement;
|
||||
|
||||
/**
|
||||
* The fixed index paths to place ads at in a stream in sorted order. Can be modified using @c addFixedPosition: and @c resetFixedPositions.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSOrderedSet<NSIndexPath *> *fixedPositions;
|
||||
|
||||
/**
|
||||
* An interval to repeatedly place ads at in a stream. A valid repeating interval is any value greater than or equal to 2. A value less than 2 will disable it.
|
||||
*
|
||||
* Repeating ads are added only in sections with fixed positions, after the last fixed position in each section. If no fixed positions are set, repeating ads are added to the first section starting after @c repeatingInterval items.
|
||||
*/
|
||||
@property (nonatomic, assign) NSUInteger repeatingInterval;
|
||||
|
||||
/**
|
||||
* The maximum number of ads in a stream. Defaults to 256.
|
||||
*
|
||||
* If a stream contains multiple sections, this determines the maximum number of ads per section.
|
||||
*/
|
||||
@property (nonatomic, assign) NSUInteger maximumAdCount;
|
||||
|
||||
/**
|
||||
* The maximum number of ads to start preloading for placement in a stream. Defaults to 4.
|
||||
*/
|
||||
@property (nonatomic, assign) NSUInteger maximumPreloadedAdCount;
|
||||
|
||||
/**
|
||||
* Returns true if the repeating interval has been set to a value greater than or equal to 2.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly, getter=isRepeatingEnabled) BOOL repeatingEnabled;
|
||||
|
||||
/**
|
||||
* Whether the positioning info is valid, i.e., fixed positions or a valid repeating interval have been set.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly, getter=hasValidPositioning) BOOL validPositioning;
|
||||
|
||||
/**
|
||||
* Add a fixed position for an ad in a stream.
|
||||
*
|
||||
* @param indexPath An index path to place an ad at.
|
||||
*/
|
||||
- (void)addFixedPosition:(NSIndexPath *)indexPath;
|
||||
|
||||
/**
|
||||
* Remove all fixed positions.
|
||||
*/
|
||||
- (void)resetFixedPositions;
|
||||
|
||||
/**
|
||||
* Initializes an @c MAAdPlacerSettings instance with a native ad unit identifier.
|
||||
*
|
||||
* @param adUnitIdentifier A native ad unit identifier.
|
||||
*/
|
||||
+ (instancetype)settingsWithAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,26 +0,0 @@
|
||||
//
|
||||
// MAAdRequestDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Andrew Tian on 7/8/22.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines a delegate to be notified about ad request events.
|
||||
*/
|
||||
@protocol MAAdRequestDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* The SDK invokes this callback when it sends a request for an ad, which can be for the initial ad load and upcoming ad refreshes.
|
||||
*
|
||||
* The SDK invokes this callback on the UI thread.
|
||||
*
|
||||
* @param adUnitIdentifier The ad unit identifier that the SDK requested an ad for.
|
||||
*/
|
||||
- (void)didStartAdRequestForAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,28 +0,0 @@
|
||||
//
|
||||
// MAAdRevenueDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Andrew Tian on 6/3/21.
|
||||
//
|
||||
|
||||
@class MAAd;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines a delegate to be notified about ad revenue events.
|
||||
*/
|
||||
@protocol MAAdRevenueDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* The SDK invokes this callback when it detects a revenue event for an ad.
|
||||
*
|
||||
* The SDK invokes this callback on the UI thread.
|
||||
*
|
||||
* @param ad The ad for which the revenue event was detected.
|
||||
*/
|
||||
- (void)didPayRevenueForAd:(MAAd *)ad;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,29 +0,0 @@
|
||||
//
|
||||
// MAAdReviewDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Nana Amoah on 3/29/22.
|
||||
//
|
||||
|
||||
@class MAAd;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines a delegate to be notified when the Ad Review SDK successfully generates a creative id.
|
||||
*/
|
||||
@protocol MAAdReviewDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* The SDK invokes this callback when the Ad Review SDK successfully generates a creative id.
|
||||
*
|
||||
* The SDK invokes this callback on the UI thread.
|
||||
*
|
||||
* @param creativeIdentifier The Ad Review creative id tied to the ad, if any. You can report creative issues to our Ad review team using this id.
|
||||
* @param ad The ad for which the ad review event was detected.
|
||||
*/
|
||||
- (void)didGenerateCreativeIdentifier:(NSString *)creativeIdentifier forAd:(MAAd *)ad;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,37 +0,0 @@
|
||||
//
|
||||
// MAAdViewAdapter.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 8/10/18.
|
||||
// Copyright © 2019 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdapter.h>
|
||||
#import <AppLovinSDK/MAAdapterResponseParameters.h>
|
||||
#import <AppLovinSDK/MAAdViewAdapterDelegate.h>
|
||||
|
||||
@class MAAdFormat;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines methods for ad view-based adapters (banners, mrecs, and leaders).
|
||||
*/
|
||||
@protocol MAAdViewAdapter <MAAdapter>
|
||||
|
||||
/**
|
||||
* Schedule loading of the next ad view ad.
|
||||
*
|
||||
* This is called once per adapter.
|
||||
*
|
||||
* @param parameters Parameters used to load the ads.
|
||||
* @param adFormat Format of the ad to load.
|
||||
* @param delegate Delegate to be notified about ad events.
|
||||
*/
|
||||
- (void)loadAdViewAdForParameters:(id<MAAdapterResponseParameters>)parameters
|
||||
adFormat:(MAAdFormat *)adFormat
|
||||
andNotify:(id<MAAdViewAdapterDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,120 +0,0 @@
|
||||
//
|
||||
// MAAdViewAdapterDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 8/10/18.
|
||||
// Copyright © 2019 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <AppLovinSDK/MAAdapterDelegate.h>
|
||||
|
||||
@class MAAdapterError;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Protocol for adapters to forward ad load and display events to the MAX SDK for adview ads.
|
||||
*/
|
||||
@protocol MAAdViewAdapterDelegate <MAAdapterDelegate>
|
||||
|
||||
/**
|
||||
* This method should called when an ad has been loaded.
|
||||
*
|
||||
* @param adView Ad view that contains the loaded ad.
|
||||
*/
|
||||
- (void)didLoadAdForAdView:(UIView *)adView;
|
||||
|
||||
/**
|
||||
* This method should called when an ad has been loaded.
|
||||
*
|
||||
* @param adView Ad view that contains the loaded ad.
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didLoadAdForAdView:(UIView *)adView withExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method is should be called when an ad could not be loaded.
|
||||
*
|
||||
* @param adapterError An error object that indicates the cause of ad failure.
|
||||
*/
|
||||
- (void)didFailToLoadAdViewAdWithError:(MAAdapterError *)adapterError;
|
||||
|
||||
/**
|
||||
* This method should be called when the adapter has successfully displayed an ad to the user.
|
||||
*/
|
||||
- (void)didDisplayAdViewAd;
|
||||
|
||||
/**
|
||||
* This method should be called when the adapter has successfully displayed an ad to the user.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didDisplayAdViewAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method is should be called when an ad could not be displayed.
|
||||
*
|
||||
* @param adapterError An error object that indicates the cause of the failure.
|
||||
*/
|
||||
- (void)didFailToDisplayAdViewAdWithError:(MAAdapterError *)adapterError;
|
||||
|
||||
/**
|
||||
* This method is should be called when an ad could not be displayed.
|
||||
*
|
||||
* @param adapterError An error object that indicates the cause of the failure.
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didFailToDisplayAdViewAdWithError:(MAAdapterError *)adapterError extraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when the user has clicked adapter's ad.
|
||||
*/
|
||||
- (void)didClickAdViewAd;
|
||||
|
||||
/**
|
||||
* This method should be called when the user has clicked adapter's ad.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didClickAdViewAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when adapter's ad has been dismissed.
|
||||
*/
|
||||
- (void)didHideAdViewAd;
|
||||
|
||||
/**
|
||||
* This method should be called when adapter's ad has been dismissed.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didHideAdViewAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when the ad view has expanded full screen.
|
||||
*/
|
||||
- (void)didExpandAdViewAd;
|
||||
|
||||
/**
|
||||
* This method should be called when the ad view has expanded full screen.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didExpandAdViewAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when the ad view has collapsed from its full screen state.
|
||||
*/
|
||||
- (void)didCollapseAdViewAd;
|
||||
|
||||
/**
|
||||
* This method should be called when the ad view has collapsed from its full screen state.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didCollapseAdViewAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,48 +0,0 @@
|
||||
//
|
||||
// MAAdWaterfallInfo.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 10/30/21.
|
||||
//
|
||||
|
||||
@class MAAd;
|
||||
@class MANetworkResponseInfo;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class represents an ad waterfall, encapsulating various metadata such as total latency, underlying ad responses, etc.
|
||||
*/
|
||||
@interface MAAdWaterfallInfo : NSObject
|
||||
|
||||
/**
|
||||
* The loaded ad, if any, for this waterfall.
|
||||
*/
|
||||
@property (nonatomic, weak, readonly, nullable) MAAd *loadedAd;
|
||||
|
||||
/**
|
||||
* The ad waterfall name.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *name;
|
||||
|
||||
/**
|
||||
* The ad waterfall test name.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *testName;
|
||||
|
||||
/**
|
||||
* The list of @c MAAdapterResponseInfo info objects relating to each ad in the waterfall, ordered by their position.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSArray<MANetworkResponseInfo *> *networkResponses;
|
||||
|
||||
/**
|
||||
* The total latency in seconds for this waterfall to finish processing.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSTimeInterval latency;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,143 +0,0 @@
|
||||
//
|
||||
// MAAdapter.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 8/10/18.
|
||||
// Copyright © 2019 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdapterInitializationParameters.h>
|
||||
#import <AppLovinSDK/MAAdFormat.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* An enum describing the adapter's initialization status.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MAAdapterInitializationStatus)
|
||||
{
|
||||
/**
|
||||
* The adapter is not initialized. Note: networks need to be enabled for an ad unit id to be initialized.
|
||||
*/
|
||||
MAAdapterInitializationStatusAdapterNotInitialized = -4,
|
||||
|
||||
/**
|
||||
* The 3rd-party SDK does not have an initialization callback with status.
|
||||
*/
|
||||
MAAdapterInitializationStatusDoesNotApply = -3,
|
||||
|
||||
/**
|
||||
* The 3rd-party SDK is currently initializing.
|
||||
*/
|
||||
MAAdapterInitializationStatusInitializing = -2,
|
||||
|
||||
/**
|
||||
* The 3rd-party SDK explicitly initialized, but without a status.
|
||||
*/
|
||||
MAAdapterInitializationStatusInitializedUnknown = -1,
|
||||
|
||||
/**
|
||||
* The 3rd-party SDK initialization failed.
|
||||
*/
|
||||
MAAdapterInitializationStatusInitializedFailure = 0,
|
||||
|
||||
/**
|
||||
* The 3rd-party SDK initialization was successful.
|
||||
*/
|
||||
MAAdapterInitializationStatusInitializedSuccess = 1
|
||||
};
|
||||
|
||||
/**
|
||||
* This protocol defines a mediation adapter which wraps a third-party ad SDK and will be used by AppLovin to load and display ads.
|
||||
*/
|
||||
@protocol MAAdapter <NSObject>
|
||||
|
||||
/**
|
||||
* Initialize current adapter. This method will be called at the beginning of the adapter lifecycle.
|
||||
*
|
||||
* @param parameters Parameters passed from the server.
|
||||
* @param completionHandler Completion block to be called when the 3rd-party SDK finishes initialization, whether or not it was successful.
|
||||
*/
|
||||
- (void)initializeWithParameters:(id<MAAdapterInitializationParameters>)parameters withCompletionHandler:(void(^)(void))completionHandler;
|
||||
|
||||
/**
|
||||
* The version of the third-party SDK.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *SDKVersion;
|
||||
|
||||
/**
|
||||
* The version of this adapter.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *adapterVersion;
|
||||
|
||||
/**
|
||||
* Whether or not this adapter is a beta version.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly, getter=isBeta) BOOL beta;
|
||||
|
||||
/**
|
||||
* *********************
|
||||
* AVAILABLE IN v11.9.0+
|
||||
* *********************
|
||||
* <p>
|
||||
* Whether or not to initialize the third-party SDK on main thread.
|
||||
*
|
||||
* @return @c 1 if the SDK should be initialized on main thread. @c nil if we should fallback to using the adapter spec level setting.
|
||||
*/
|
||||
- (nullable NSNumber *)shouldInitializeOnMainThread;
|
||||
|
||||
/**
|
||||
* *********************
|
||||
* AVAILABLE IN v11.9.0+
|
||||
* *********************
|
||||
* <p>
|
||||
* Whether or not to collect signals on main thread.
|
||||
*
|
||||
* @return @c 1 if the SDK should collect signals on main thread. @c nil if we should fallback to using the adapter spec level setting.
|
||||
*/
|
||||
- (nullable NSNumber *)shouldCollectSignalsOnMainThread;
|
||||
|
||||
/**
|
||||
* *********************
|
||||
* AVAILABLE IN v11.9.0+
|
||||
* *********************
|
||||
* <p>
|
||||
* Whether or not to load ads on main thread.
|
||||
*
|
||||
* @param adFormat The @c MAAdFormat for which to check if we should load on main thread.
|
||||
*
|
||||
* @return @c 1 if the given ad format should be loaded on main thread. @c nil if we should fallback to using the adapter spec level setting.
|
||||
*/
|
||||
- (nullable NSNumber *)shouldLoadAdsOnMainThreadForAdFormat:(MAAdFormat *)adFormat;
|
||||
|
||||
/**
|
||||
* *********************
|
||||
* AVAILABLE IN v11.9.0+
|
||||
* *********************
|
||||
* <p>
|
||||
* Whether or not to show ads on main thread.
|
||||
*
|
||||
* @param adFormat The @c MAAdFormat for which to check if we should show on main thread.
|
||||
*
|
||||
* @return @c 1 if the given ad format should be loaded on main thread. @c nil if we should fallback to using the adapter spec level setting.
|
||||
*/
|
||||
- (nullable NSNumber *)shouldShowAdsOnMainThreadForAdFormat:(MAAdFormat *)adFormat;
|
||||
|
||||
/**
|
||||
* This method is called when an ad associated with this adapter should be destroyed. Necessary cleanup should be performed here.
|
||||
*/
|
||||
- (void)destroy;
|
||||
|
||||
@optional
|
||||
|
||||
/**
|
||||
* Initialize current adapter. This method will be called at the beginning of the adapter lifecycle.
|
||||
*
|
||||
* @param parameters Parameters passed from the server.
|
||||
* @param completionHandler Completion block to be called when the 3rd-party SDK finishes initialization, with the initialization status passed in.
|
||||
*/
|
||||
- (void)initializeWithParameters:(id<MAAdapterInitializationParameters>)parameters completionHandler:(void(^)(MAAdapterInitializationStatus initializationStatus, NSString *_Nullable errorMessage))completionHandler;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,16 +0,0 @@
|
||||
//
|
||||
// MAAdapterDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Christopher Cong on 10/29/18.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines a common adapter protocol intended to be notified about mediated ad events.
|
||||
*/
|
||||
@protocol MAAdapterDelegate <NSObject>
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,158 +0,0 @@
|
||||
//
|
||||
// MAAdapterError.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 11/13/18.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAError.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This enum contains possible error codes that should be returned by the mediation adapter.
|
||||
*/
|
||||
@interface MAAdapterError : MAError
|
||||
|
||||
/**
|
||||
* The mediation adapter can not load an ad because of no fill.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeNoFill;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *noFill;
|
||||
|
||||
/**
|
||||
* The mediation adapter failed to load an ad for an unspecified reason.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeUnspecified;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *unspecified;
|
||||
|
||||
/**
|
||||
* The mediation adapter can not load an ad because it is currently in an invalid state.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeInvalidLoadState;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *invalidLoadState;
|
||||
|
||||
/**
|
||||
* The mediation adapter can not load an ad because it is currently not configured correctly.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeInvalidConfiguration;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *invalidConfiguration;
|
||||
|
||||
/**
|
||||
* The mediation adapter can not load an ad because of a bad request.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeBadRequest;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *badRequest;
|
||||
|
||||
/**
|
||||
* The mediation adapter can not load an ad because the SDK is not initialized yet.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeNotInitialized;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *notInitialized;
|
||||
|
||||
/**
|
||||
* The mediation adapter can not load an ad because of a timeout.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeTimeout;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *timeout;
|
||||
|
||||
/**
|
||||
* The mediation adapter can not load an ad because it can not detect an active internet connection.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeNoConnection;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *noConnection;
|
||||
|
||||
/**
|
||||
* The mediation adapter did not have an ad ready in time for showing.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeAdNotReady;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *adNotReady;
|
||||
|
||||
/**
|
||||
* The mediation adapter ran into a remote server error.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeServerError;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *serverError;
|
||||
|
||||
/**
|
||||
* The mediation adapter ran into an unspecified internal error.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeInternalError;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *internalError;
|
||||
|
||||
/**
|
||||
* The mediation adapter has timed out while collecting a signal.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeSignalCollectionTimeout;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *signalCollectionTimeout;
|
||||
|
||||
/**
|
||||
* The mediation adapter does not support signal collection.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeSignalCollectionNotSupported;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *signalCollectionNotSupported;
|
||||
|
||||
/**
|
||||
* The mediation adapter ran into a WebView-related error.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeWebViewError;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *webViewError;
|
||||
|
||||
/**
|
||||
* The mediation adapter ran into an expired ad.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeAdExpired;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *adExpiredError;
|
||||
|
||||
/**
|
||||
* The mediation ad frequency capped.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeAdFrequencyCapped;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *adFrequencyCappedError;
|
||||
|
||||
/**
|
||||
* The mediation adapter ran into an error while displaying rewarded ad.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeRewardError;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *rewardError;
|
||||
|
||||
/**
|
||||
* The mediation adapter failed to load a native ad because of missing required assets.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeMissingRequiredNativeAdAssets;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *missingRequiredNativeAdAssets;
|
||||
|
||||
/**
|
||||
* The mediation ad failed to load because an Activity context was required, but missing.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeMissingViewController;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *missingViewController;
|
||||
|
||||
/*
|
||||
* The mediation adapter failed to display the ad.
|
||||
*/
|
||||
@property (class, nonatomic, readonly) NSInteger errorCodeAdDisplayFailedError;
|
||||
@property (class, nonatomic, readonly) MAAdapterError *adDisplayFailedError;
|
||||
|
||||
+ (instancetype)errorWithCode:(NSInteger)code;
|
||||
+ (instancetype)errorWithCode:(NSInteger)code errorString:(NSString *)errorString;
|
||||
+ (instancetype)errorWithNSError:(NSError *)error;
|
||||
+ (instancetype)errorWithAdapterError:(MAAdapterError *)error
|
||||
mediatedNetworkErrorCode:(NSInteger)mediatedNetworkErrorCode
|
||||
mediatedNetworkErrorMessage:(NSString *)mediatedNetworkErrorMessage;
|
||||
+ (instancetype)errorWithCode:(NSInteger)code
|
||||
errorString:(NSString *)errorString
|
||||
mediatedNetworkErrorCode:(NSInteger)mediatedNetworkErrorCode
|
||||
mediatedNetworkErrorMessage:(NSString *)mediatedNetworkErrorMessage;
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
@interface MAAdapterError(ALDeprecated)
|
||||
+ (instancetype)errorWithAdapterError:(MAAdapterError *)error thirdPartySdkErrorCode:(NSInteger)thirdPartySdkErrorCode thirdPartySdkErrorMessage:(NSString *)thirdPartySdkErrorMessage
|
||||
__deprecated_msg("This method has been deprecated in v11.4.0 and will be removed in a future SDK version. Please use -[MAAdapterError errorWithAdapterError:mediatedNetworkErrorCode:mediatedNetworkErrorMessage:] instead.");
|
||||
+ (instancetype)errorWithCode:(NSInteger)code errorString:(NSString *)errorString thirdPartySdkErrorCode:(NSInteger)thirdPartySdkErrorCode thirdPartySdkErrorMessage:(NSString *)thirdPartySdkErrorMessage
|
||||
__deprecated_msg("This method has been deprecated in v11.4.0 and will be removed in a future SDK version. Please use -[MAAdapterError errorWithCode:errorString:mediatedNetworkErrorCode:mediatedNetworkErrorMessage:] instead.");
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,19 +0,0 @@
|
||||
//
|
||||
// MAAdapterInitializationParameters.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 8/27/18.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdapterParameters.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol contains parameters passed to a mediation adapter for initialization.
|
||||
*/
|
||||
@protocol MAAdapterInitializationParameters <MAAdapterParameters>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,41 +0,0 @@
|
||||
//
|
||||
// MAAdapterResponseParameters.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 8/27/18.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdapterParameters.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol contains parameters passed to a mediation adapter to load the next ad.
|
||||
*/
|
||||
@protocol MAAdapterResponseParameters <MAAdapterParameters>
|
||||
|
||||
/**
|
||||
* Get zone ID / placement ID / ad unit ID for the adapter to use. This is different than {@link MAAd#adUnitIdentifier}, which is used by AppLovin's SDK specifically.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *thirdPartyAdPlacementIdentifier;
|
||||
|
||||
/**
|
||||
* For header bidding only: server bid response that was sent from third-party servers to the respective SDK.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *bidResponse;
|
||||
|
||||
/**
|
||||
* @return if this is a server bid response.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly, getter=isBidding) BOOL bidding;
|
||||
|
||||
/**
|
||||
* For header bidding only: server bid expiration time.
|
||||
*
|
||||
* @return Expiration time for the bidding server response. -1 is default meaning the bid never expires.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) long long /*ALTimeIntervalMillis*/ bidExpirationMillis;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,131 +0,0 @@
|
||||
//
|
||||
// MAAppOpenAd.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Andrew Tian on 7/26/22.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdDelegate.h>
|
||||
#import <AppLovinSDK/MAAdExpirationDelegate.h>
|
||||
#import <AppLovinSDK/MAAdRequestDelegate.h>
|
||||
#import <AppLovinSDK/MAAdRevenueDelegate.h>
|
||||
#import <AppLovinSDK/MAAdReviewDelegate.h>
|
||||
|
||||
@class ALSdk;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class represents a full-screen ad that can be shown upon opening an app.
|
||||
*/
|
||||
@interface MAAppOpenAd : NSObject
|
||||
|
||||
/**
|
||||
* Creates a new mediation app open ad.
|
||||
*
|
||||
* @param adUnitIdentifier Ad unit ID to load ads for.
|
||||
*/
|
||||
- (instancetype)initWithAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
|
||||
/**
|
||||
* Creates a new mediation app open ad.
|
||||
*
|
||||
* @param adUnitIdentifier Ad unit ID to load ads for.
|
||||
* @param sdk SDK to use. You can obtain an instance of the SDK by calling @code +[ALSdk shared] @endcode.
|
||||
*/
|
||||
- (instancetype)initWithAdUnitIdentifier:(NSString *)adUnitIdentifier sdk:(ALSdk *)sdk;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
/**
|
||||
* A delegate that will be notified about ad events.
|
||||
*/
|
||||
@property (nonatomic, weak, nullable) id<MAAdDelegate> delegate;
|
||||
|
||||
/**
|
||||
* A delegate that will be notified about ad revenue events.
|
||||
*/
|
||||
@property (nonatomic, weak, nullable) id<MAAdRevenueDelegate> revenueDelegate;
|
||||
|
||||
/**
|
||||
* A delegate that will be notified about ad request events.
|
||||
*/
|
||||
@property (nonatomic, weak, nullable) id<MAAdRequestDelegate> requestDelegate;
|
||||
|
||||
/**
|
||||
* A delegate that will be notified about ad expiration events.
|
||||
*/
|
||||
@property (nonatomic, weak, nullable) id<MAAdExpirationDelegate> expirationDelegate;
|
||||
|
||||
/**
|
||||
* A delegate that will be notified about Ad Review events.
|
||||
*/
|
||||
@property (nonatomic, weak, nullable) id<MAAdReviewDelegate> adReviewDelegate;
|
||||
|
||||
/**
|
||||
* Load the ad for the current app open ad. Set @code -[MAAppOpenAd delegate] @endcode to assign a delegate that should be notified about ad load state.
|
||||
*/
|
||||
- (void)loadAd;
|
||||
|
||||
/**
|
||||
* Show the loaded app open ad.
|
||||
* <ul>
|
||||
* <li>Use @code -[MAAppOpenAd delegate] @endcode to assign a delegate that should be notified about display events.</li>
|
||||
* <li>Use @code -[MAAppOpenAd ready] @endcode to check if an ad was successfully loaded.</li>
|
||||
* </ul>
|
||||
*/
|
||||
- (void)showAd;
|
||||
|
||||
/**
|
||||
* Show the loaded app open ad for a given placement to tie ad events to.
|
||||
* <ul>
|
||||
* <li>Use @code -[MAAppOpenAd delegate] @endcode to assign a delegate that should be notified about display events.</li>
|
||||
* <li>Use @code -[MAAppOpenAd ready] @endcode to check if an ad was successfully loaded.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param placement The placement to tie the showing ad’s events to.
|
||||
*/
|
||||
- (void)showAdForPlacement:(nullable NSString *)placement;
|
||||
|
||||
/**
|
||||
* Show the loaded app open ad for a given placement and custom data to tie ad events to.
|
||||
* <ul>
|
||||
* <li>Use @code -[MAAppOpenAd delegate] @endcode to assign a delegate that should be notified about display events.</li>
|
||||
* <li>Use @code -[MAAppOpenAd ready] @endcode to check if an ad was successfully loaded.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param placement The placement to tie the showing ad’s events to.
|
||||
* @param customData The custom data to tie the showing ad’s events to. Maximum size is 8KB.
|
||||
*/
|
||||
- (void)showAdForPlacement:(nullable NSString *)placement customData:(nullable NSString *)customData;
|
||||
|
||||
/**
|
||||
* The ad unit identifier this @c MAAppOpenAd was initialized with and is loading ads for.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *adUnitIdentifier;
|
||||
|
||||
/**
|
||||
* Whether or not this ad is ready to be shown.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly, getter=isReady) BOOL ready;
|
||||
|
||||
/**
|
||||
* Sets an extra key/value parameter for the ad.
|
||||
*
|
||||
* @param key Parameter key.
|
||||
* @param value Parameter value.
|
||||
*/
|
||||
- (void)setExtraParameterForKey:(NSString *)key value:(nullable NSString *)value;
|
||||
|
||||
/**
|
||||
* Set a local extra parameter to pass to the adapter instances. Will not be available in the @code -[MAAdapter initializeWithParameters:withCompletionHandler:] @endcode method.
|
||||
*
|
||||
* @param key Parameter key. Must not be null.
|
||||
* @param value Parameter value. May be null.
|
||||
*/
|
||||
- (void)setLocalExtraParameterForKey:(NSString *)key value:(nullable id)value;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,41 +0,0 @@
|
||||
//
|
||||
// MAAppOpenAdapter.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Andrew Tian on 7/26/22.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdapter.h>
|
||||
#import <AppLovinSDK/MAAdapterResponseParameters.h>
|
||||
#import <AppLovinSDK/MAAppOpenAdapterDelegate.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines methods for app open ad adapters.
|
||||
*/
|
||||
@protocol MAAppOpenAdapter <MAAdapter>
|
||||
|
||||
/**
|
||||
* Load an app open ad.
|
||||
*
|
||||
* This is called once per adapter.
|
||||
*
|
||||
* @param parameters Parameters used to load the ad.
|
||||
* @param delegate Delegate to be notified about ad events.
|
||||
*/
|
||||
- (void)loadAppOpenAdForParameters:(id<MAAdapterResponseParameters>)parameters andNotify:(id<MAAppOpenAdapterDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Show the pre-loaded app open ad.
|
||||
*
|
||||
* This is called once per adapter.
|
||||
*
|
||||
* @param parameters Parameters used to show the ad.
|
||||
* @param delegate Delegate to be notified about ad events.
|
||||
*/
|
||||
- (void)showAppOpenAdForParameters:(id<MAAdapterResponseParameters>)parameters andNotify:(id<MAAppOpenAdapterDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,91 +0,0 @@
|
||||
//
|
||||
// MAAppOpenAdapterDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Andrew Tian on 7/26/22.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdapterDelegate.h>
|
||||
|
||||
@class MAAdapterError;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Protocol for adapters to forward ad load and display events to the MAX SDK for app open ads.
|
||||
*/
|
||||
@protocol MAAppOpenAdapterDelegate <MAAdapterDelegate>
|
||||
|
||||
/**
|
||||
* This method should called when an ad has been loaded.
|
||||
*/
|
||||
- (void)didLoadAppOpenAd;
|
||||
|
||||
/**
|
||||
* This method should called when an ad has been loaded.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didLoadAppOpenAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when an ad could not be loaded.
|
||||
*
|
||||
* @param adapterError An error object that indicates the cause of ad failure.
|
||||
*/
|
||||
- (void)didFailToLoadAppOpenAdWithError:(MAAdapterError *)adapterError;
|
||||
|
||||
/**
|
||||
* This method should be called when the adapter has successfully displayed an ad to the user.
|
||||
*/
|
||||
- (void)didDisplayAppOpenAd;
|
||||
|
||||
/**
|
||||
* This method should be called when the adapter has successfully displayed an ad to the user.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didDisplayAppOpenAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when the user has clicked adapter's ad.
|
||||
*/
|
||||
- (void)didClickAppOpenAd;
|
||||
|
||||
/**
|
||||
* This method should be called when the user has clicked adapter's ad.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didClickAppOpenAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when adapter's ad has been dismissed.
|
||||
*/
|
||||
- (void)didHideAppOpenAd;
|
||||
|
||||
/**
|
||||
* This method should be called when adapter's ad has been dismissed.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didHideAppOpenAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when an ad could not be displayed.
|
||||
*
|
||||
* @param adapterError An error object that indicates the cause of the failure.
|
||||
*/
|
||||
- (void)didFailToDisplayAppOpenAdWithError:(MAAdapterError *)adapterError;
|
||||
|
||||
/**
|
||||
* This method should be called when an ad could not be displayed.
|
||||
*
|
||||
* @param adapterError An error object that indicates the cause of the failure.
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didFailToDisplayAppOpenAdWithError:(MAAdapterError *)adapterError extraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,40 +0,0 @@
|
||||
//
|
||||
// MACollectionViewAdPlacer.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Ritam Sarmah on 3/8/22.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MACustomAdPlacer.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class loads and places native ads into a corresponding @c UICollectionView. The collection view's original data source and delegate methods are wrapped by this class in order to automatically insert ad items, while maintaining the existing collection view's behavior.
|
||||
*
|
||||
* @note If you're using storyboards, the collection view's "Estimate Size" must be set to "None".
|
||||
*/
|
||||
@interface MACollectionViewAdPlacer : MACustomAdPlacer
|
||||
|
||||
/**
|
||||
* Whether or not unfilled ad positions should be collapsed to appear hidden. Defaults to @c YES.
|
||||
*
|
||||
* The default behavior works best for collection views that have a single content item per row/column. If the collection view has multiple items per row/column, disabling this feature may prevent items from unexpected re-positioning, depending on configured content size and ad positions.
|
||||
*/
|
||||
@property (nonatomic, assign, getter=shouldCollapseEmptyAds) BOOL collapseEmptyAds;
|
||||
|
||||
/**
|
||||
* Initializes an ad placer for use with the provided collection view.
|
||||
*
|
||||
* @param collectionView A collection view to place ads in.
|
||||
* @param settings An ad placer settings object.
|
||||
*/
|
||||
+ (instancetype)placerWithCollectionView:(UICollectionView *)collectionView settings:(MAAdPlacerSettings *)settings;
|
||||
|
||||
- (instancetype)initWithSettings:(MAAdPlacerSettings *)settings NS_UNAVAILABLE;
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,21 +0,0 @@
|
||||
//
|
||||
// MACollectionViewAdPlacerCell.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Ritam Sarmah on 3/8/22.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MACollectionViewAdPlacerCell : UICollectionViewCell
|
||||
|
||||
/**
|
||||
* A container view for a native ad.
|
||||
*/
|
||||
@property (nonatomic, strong) UIView *containerView;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,36 +0,0 @@
|
||||
//
|
||||
// MACustomAdPlacer.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Ritam Sarmah on 3/17/22.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdPlacer.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This subclass of @c MAAdPlacer contains additional functionality that isn't necessarily needed for the use of @c MAAdPlacer on its own, i.e., auto-refresh and look-ahead.
|
||||
*
|
||||
* @warning @c MACustomAdPlacer should only be used via its subclasses, e.g., @c MACollectionViewAdPlacer and @c MATableViewAdPlacer, since it contains methods that must be implemented based on the specific UI component.
|
||||
*/
|
||||
@interface MACustomAdPlacer : MAAdPlacer
|
||||
|
||||
/**
|
||||
* The number of off-screen items after the last visible item to consider for ad placement in a content stream. This allows upcoming ad positions to be ready before they are visible to the user.
|
||||
*
|
||||
* This can be disabled by setting to 0. Defaults to 8.
|
||||
*/
|
||||
@property (nonatomic, assign) NSUInteger lookAhead;
|
||||
|
||||
/**
|
||||
* Allows updates to be made safely to a stream by temporarily disabling auto-reload during data modification.
|
||||
*/
|
||||
- (void)pauseForUpdates:(void (^)(void))updates;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,60 +0,0 @@
|
||||
//
|
||||
// MAError+Internal.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 5/3/21.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAErrorCode.h>
|
||||
|
||||
@class MAAdWaterfallInfo;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class encapsulates various data for MAX load and display errors.
|
||||
*/
|
||||
@interface MAError : NSObject
|
||||
|
||||
/**
|
||||
* The error code for the error. Will be one of the codes listed under the @c MAErrorCode enum.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) MAErrorCode code;
|
||||
|
||||
/**
|
||||
* The error message for the error.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *message;
|
||||
|
||||
/**
|
||||
* The mediated network's error code for the error. Available for errors returned in @c -[MAAdDelegate didFailToDisplayAd:withError:] only.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSInteger mediatedNetworkErrorCode;
|
||||
|
||||
/**
|
||||
* The mediated network's error message for the error. Defaults to an empty string. Available for errors returned in @c -[MAAdDelegate didFailToDisplayAd:withError:] only.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *mediatedNetworkErrorMessage;
|
||||
|
||||
/**
|
||||
* The underlying waterfall of ad responses.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) MAAdWaterfallInfo *waterfall;
|
||||
|
||||
/**
|
||||
* The latency of the mediation ad load request in seconds.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSTimeInterval requestLatency;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
- (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
@interface MAError (ALDeprecated)
|
||||
@property (nonatomic, assign, readonly) NSInteger errorCode __deprecated_msg("This property is deprecated and removed in a future SDK version. Please use `-[MAError code]` instead.");
|
||||
@property (nonatomic, copy, readonly) NSString *errorMessage __deprecated_msg("This property is deprecated and removed in a future SDK version. Please use `-[MAError message]` instead.");
|
||||
@property (nonatomic, copy, readonly, nullable) NSString *adLoadFailureInfo __deprecated_msg("The ad load failure info string is deprecated and removed in a future SDK version. Please use `-[MAError waterfall]` instead.");
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,77 +0,0 @@
|
||||
//
|
||||
// MAErrorCode.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 5/9/21.
|
||||
//
|
||||
|
||||
/**
|
||||
* This enum contains various error codes that the SDK can return when a MAX ad fails to load or display.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MAErrorCode)
|
||||
{
|
||||
/**
|
||||
* This error code represents an error that could not be categorized into one of the other defined errors. See the message field in the error object for more details.
|
||||
*/
|
||||
MAErrorCodeUnspecified = -1,
|
||||
|
||||
/**
|
||||
* This error code indicates that MAX returned no eligible ads from any mediated networks for this app/device.
|
||||
*/
|
||||
MAErrorCodeNoFill = 204,
|
||||
|
||||
/**
|
||||
* This error code indicates that MAX returned eligible ads from mediated networks, but all ads failed to load. See the adLoadFailureInfo field in the error object for more details.
|
||||
*/
|
||||
MAErrorCodeAdLoadFailed = -5001,
|
||||
|
||||
/**
|
||||
* This error code indicates that the SDK failed to load an ad because the publisher provided an invalid ad unit identifier.
|
||||
* Possible reasons for an invalid ad unit identifier:
|
||||
* 1. Ad unit identifier is malformed or does not exist
|
||||
* 2. Ad unit is disabled
|
||||
* 3. Ad unit is not associated with the current app's package name
|
||||
* 4. Ad unit was created within the last 30-60 minutes
|
||||
*/
|
||||
MAErrorCodeInvalidAdUnitIdentifier = -5603,
|
||||
|
||||
/**
|
||||
* This error code indicates that the ad request failed due to a generic network error. See the message field in the error object for more details.
|
||||
*/
|
||||
MAErrorCodeNetworkError = -1000,
|
||||
|
||||
/**
|
||||
* This error code indicates that the ad request timed out due to a slow internet connection.
|
||||
*/
|
||||
MAErrorCodeNetworkTimeout = -1001,
|
||||
|
||||
/**
|
||||
* This error code indicates that the ad request failed because the device is not connected to the internet.
|
||||
*/
|
||||
MAErrorCodeNoNetwork = -1009,
|
||||
|
||||
/**
|
||||
* This error code indicates that you attempted to show a fullscreen ad while another fullscreen ad is still showing.
|
||||
*/
|
||||
MAErrorCodeFullscreenAdAlreadyShowing = -23,
|
||||
|
||||
/**
|
||||
* This error code indicates you are attempting to show a fullscreen ad before the one has been loaded.
|
||||
*/
|
||||
MAErrorCodeFullscreenAdNotReady = -24,
|
||||
|
||||
/**
|
||||
* This error code indicates you attempted to present a fullscreen ad from an invalid view controller.
|
||||
*/
|
||||
MAErrorCodeFullscreenAdInvalidViewController = -25,
|
||||
|
||||
/**
|
||||
* This error code indicates you are attempting to load a fullscreen ad while another fullscreen ad is already loading.
|
||||
*/
|
||||
MAErrorCodeFullscreenAdAlreadyLoading = -26,
|
||||
|
||||
/**
|
||||
* This error code indicates you are attempting to load a fullscreen ad while another fullscreen ad is still showing.
|
||||
*/
|
||||
MAErrorCodeFullscreenAdLoadWhileShowing = -27
|
||||
};
|
||||
@ -1,36 +0,0 @@
|
||||
//
|
||||
// MAErrorCodes.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 8/27/18.
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
/**
|
||||
* @file MAErrorCodes.h
|
||||
*/
|
||||
|
||||
/**
|
||||
* No ads are currently eligible for your device.
|
||||
*/
|
||||
#define kMAErrorCodeNoFill 204
|
||||
|
||||
/**
|
||||
* The system is in unexpected state.
|
||||
*/
|
||||
#define kMAErrorCodeUnspecifiedError -1
|
||||
|
||||
/**
|
||||
* The internal state of the SDK is invalid. There are various ways this can occur.
|
||||
*/
|
||||
#define kMAErrorCodeInvalidInternalState -5201
|
||||
|
||||
/**
|
||||
* The ad failed to load due to no networks being able to fill.
|
||||
*/
|
||||
#define kMAErrorCodeMediationAdapterLoadFailed -5001
|
||||
|
||||
/**
|
||||
* An attempt to show a fullscreen ad (interstitial or rewarded) was made while another fullscreen ad is still showing.
|
||||
*/
|
||||
#define kMAErrorCodeFullscreenAdAlreadyShowing -23
|
||||
@ -1,42 +0,0 @@
|
||||
//
|
||||
// MAInterstitialAdapter.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 8/10/18.
|
||||
// Copyright © 2019 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdapter.h>
|
||||
#import <AppLovinSDK/MAAdapterResponseParameters.h>
|
||||
#import <AppLovinSDK/MAInterstitialAdapterDelegate.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines methods for interstitial adapters.
|
||||
*/
|
||||
@protocol MAInterstitialAdapter <MAAdapter>
|
||||
|
||||
/**
|
||||
* Load a interstitial ad.
|
||||
*
|
||||
* This is called once per adapter.
|
||||
*
|
||||
* @param parameters Parameters used to load the ad.
|
||||
* @param delegate Delegate to be notified about ad events.
|
||||
*/
|
||||
- (void)loadInterstitialAdForParameters:(id<MAAdapterResponseParameters>)parameters andNotify:(id<MAInterstitialAdapterDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Show the pre-loaded interstitial.
|
||||
*
|
||||
* This is called once per adapter.
|
||||
*
|
||||
* @param parameters Parameters used to show the ad.
|
||||
* @param delegate Delegate to be notified about ad events.
|
||||
*/
|
||||
- (void)showInterstitialAdForParameters:(id<MAAdapterResponseParameters>)parameters andNotify:(id<MAInterstitialAdapterDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,92 +0,0 @@
|
||||
//
|
||||
// MAInterstitialAdapterDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 8/10/18.
|
||||
// Copyright © 2019 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdapterDelegate.h>
|
||||
|
||||
@class MAAdapterError;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Protocol for adapters to forward ad load and display events to the MAX SDK for interstitial ads.
|
||||
*/
|
||||
@protocol MAInterstitialAdapterDelegate <MAAdapterDelegate>
|
||||
|
||||
/**
|
||||
* This method should called when an ad has been loaded.
|
||||
*/
|
||||
- (void)didLoadInterstitialAd;
|
||||
|
||||
/**
|
||||
* This method should called when an ad has been loaded.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didLoadInterstitialAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when an ad could not be loaded.
|
||||
*
|
||||
* @param adapterError An error object that indicates the cause of ad failure.
|
||||
*/
|
||||
- (void)didFailToLoadInterstitialAdWithError:(MAAdapterError *)adapterError;
|
||||
|
||||
/**
|
||||
* This method should be called when the adapter has successfully displayed an ad to the user.
|
||||
*/
|
||||
- (void)didDisplayInterstitialAd;
|
||||
|
||||
/**
|
||||
* This method should be called when the adapter has successfully displayed an ad to the user.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didDisplayInterstitialAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when the user has clicked adapter's ad.
|
||||
*/
|
||||
- (void)didClickInterstitialAd;
|
||||
|
||||
/**
|
||||
* This method should be called when the user has clicked adapter's ad.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didClickInterstitialAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when adapter's ad has been dismissed.
|
||||
*/
|
||||
- (void)didHideInterstitialAd;
|
||||
|
||||
/**
|
||||
* This method should be called when adapter's ad has been dismissed.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didHideInterstitialAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method is should be called when an ad could not be displayed.
|
||||
*
|
||||
* @param adapterError An error object that indicates the cause of the failure.
|
||||
*/
|
||||
- (void)didFailToDisplayInterstitialAdWithError:(MAAdapterError *)adapterError;
|
||||
|
||||
/**
|
||||
* This method is should be called when an ad could not be displayed.
|
||||
*
|
||||
* @param adapterError An error object that indicates the cause of the failure.
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didFailToDisplayInterstitialAdWithError:(MAAdapterError *)adapterError extraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,40 +0,0 @@
|
||||
//
|
||||
// MAMediatedNetworkInfo.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Ritam Sarmah on 2/8/21.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class represents information for a mediated network.
|
||||
*/
|
||||
@interface MAMediatedNetworkInfo : NSObject
|
||||
|
||||
/**
|
||||
* The name of the mediated network.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *name;
|
||||
|
||||
/**
|
||||
* The class name of the adapter for the mediated network.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *adapterClassName;
|
||||
|
||||
/**
|
||||
* The version of the adapter for the mediated network.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *adapterVersion;
|
||||
|
||||
/**
|
||||
* The version of the mediated network’s SDK.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *sdkVersion;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,186 +0,0 @@
|
||||
//
|
||||
// MANativeAd.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 5/5/20.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class MAAdFormat;
|
||||
@class MANativeAdBuilder;
|
||||
@class MANativeAdImage;
|
||||
@class MANativeAdView;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^MANativeAdBuilderBlock) (MANativeAdBuilder *builder);
|
||||
|
||||
@interface MANativeAdBuilder : NSObject
|
||||
|
||||
@property (nonatomic, copy, nullable) NSString *title;
|
||||
@property (nonatomic, copy, nullable) NSString *advertiser;
|
||||
@property (nonatomic, copy, nullable) NSString *body;
|
||||
@property (nonatomic, copy, nullable) NSString *callToAction;
|
||||
@property (nonatomic, strong, nullable) MANativeAdImage *icon;
|
||||
@property (nonatomic, strong, nullable) MANativeAdImage *mainImage;
|
||||
@property (nonatomic, strong, nullable) UIView *iconView;
|
||||
@property (nonatomic, strong, nullable) UIView *optionsView;
|
||||
@property (nonatomic, strong, nullable) UIView *mediaView;
|
||||
@property (nonatomic, assign) CGFloat mediaContentAspectRatio;
|
||||
@property (nonatomic, strong, nullable) NSNumber *starRating;
|
||||
|
||||
@end
|
||||
|
||||
@interface MANativeAdImage : NSObject
|
||||
|
||||
/**
|
||||
* The native ad image.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) UIImage *image;
|
||||
|
||||
/**
|
||||
* The native ad image URL.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nullable) NSURL *URL;
|
||||
|
||||
- (instancetype)initWithImage:(UIImage *)image;
|
||||
- (instancetype)initWithURL:(NSURL *)URL;
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* Represents a native ad to be rendered for an instance of a @c MAAd.
|
||||
*/
|
||||
@interface MANativeAd : NSObject
|
||||
|
||||
/**
|
||||
* The native ad format.
|
||||
*/
|
||||
@property (nonatomic, weak, readonly) MAAdFormat *format;
|
||||
|
||||
/**
|
||||
* The native ad title text.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nullable) NSString *title;
|
||||
|
||||
/**
|
||||
* The native ad advertiser text.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nullable) NSString *advertiser;
|
||||
|
||||
/**
|
||||
* The native ad body text.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nullable) NSString *body;
|
||||
|
||||
/**
|
||||
* The native ad CTA button text.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nullable) NSString *callToAction;
|
||||
|
||||
/**
|
||||
* The native ad icon image.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) MANativeAdImage *icon;
|
||||
|
||||
/**
|
||||
* The native ad icon image view.
|
||||
*
|
||||
* This is only used for banners using native APIs. Native ads must provide a `MANativeAdImage` instead.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) UIView *iconView;
|
||||
|
||||
/**
|
||||
* The native ad options view.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) UIView *optionsView;
|
||||
|
||||
/**
|
||||
* The native ad media view.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) UIView *mediaView;
|
||||
|
||||
/**
|
||||
* The native ad main image (cover image). May or may not be a locally cached file:// resource file.
|
||||
*
|
||||
* Please make sure you continue to render your native ad using @c MANativeAdLoader so impression tracking is not affected.
|
||||
*
|
||||
* Supported adapter versions:
|
||||
*
|
||||
* BidMachine v1.9.4.1.1
|
||||
* Google Ad Manager v9.6.0.1
|
||||
* Google AdMob v9.6.0.2
|
||||
* Mintegral v7.1.7.0.2
|
||||
* myTarget v5.15.2.1
|
||||
* Pangle v4.5.2.4.1
|
||||
* Smaato v21.7.6.1
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) MANativeAdImage *mainImage;
|
||||
|
||||
/**
|
||||
* The aspect ratio for the media view if provided by the network. Otherwise returns 0.0f.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) CGFloat mediaContentAspectRatio;
|
||||
|
||||
/**
|
||||
* The star rating of the native ad in the [0.0, 5.0] range if provided by the network. Otherwise returns @c nil.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) NSNumber *starRating;
|
||||
|
||||
/**
|
||||
* Whether or not the ad is expired.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly, getter=isExpired) BOOL expired;
|
||||
|
||||
/**
|
||||
* This method is called before the ad view is returned to the publisher.
|
||||
* The adapters should override this method to register the rendered native ad view and make sure that the view is interactable.
|
||||
*
|
||||
* @param nativeAdView a rendered native ad view.
|
||||
*/
|
||||
- (void)prepareViewForInteraction:(MANativeAdView *)nativeAdView __deprecated_msg("This method has been deprecated and will be removed in a future SDK version. Please use -[MANativeAd prepareForInteractionClickableViews:withContainer:] instead.");
|
||||
|
||||
/**
|
||||
* *********************
|
||||
* AVAILABLE IN v11.5.2+
|
||||
* *********************
|
||||
*
|
||||
* This method is called before the ad view is returned to the publisher.
|
||||
* The adapters should override this method to register the rendered native ad view and make sure that the view is interactable.
|
||||
*
|
||||
* @param clickableViews The clickable views for the native ad.
|
||||
* @param container The container for the native ad.
|
||||
*
|
||||
* @return @c YES if the call has been successfully handled by a subclass of @c MANativeAd.
|
||||
*/
|
||||
- (BOOL)prepareForInteractionClickableViews:(NSArray<UIView *> *)clickableViews withContainer:(UIView *)container;
|
||||
|
||||
/**
|
||||
* Whether or not to run the @code -[MANativeAd prepareForInteractionClickableViews:withContainer:] @endcode call on the main thread or background thread.
|
||||
*
|
||||
* @return @c YES to run the operation on the main thread, @c NO to run the operation on a background thread. Defaults to @c YES.
|
||||
*/
|
||||
- (BOOL)shouldPrepareViewForInteractionOnMainThread;
|
||||
|
||||
/**
|
||||
* *********************
|
||||
* AVAILABLE IN v11.6.0+
|
||||
* *********************
|
||||
*
|
||||
* Whether or not container clickability is supported.
|
||||
*/
|
||||
- (BOOL)isContainerClickable;
|
||||
|
||||
/**
|
||||
* For supported mediated SDKs, manually invoke a click.
|
||||
*/
|
||||
- (void)performClick;
|
||||
|
||||
- (instancetype)initWithFormat:(MAAdFormat *)format builderBlock:(NS_NOESCAPE MANativeAdBuilderBlock)builderBlock;
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,31 +0,0 @@
|
||||
//
|
||||
// MANativeAdAdapter.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 6/16/21.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdapter.h>
|
||||
#import <AppLovinSDK/MAAdapterResponseParameters.h>
|
||||
#import <AppLovinSDK/MANativeAdAdapterDelegate.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines methods for native adapters.
|
||||
*/
|
||||
@protocol MANativeAdAdapter <MAAdapter>
|
||||
|
||||
/**
|
||||
* Schedule loading of the next native ad.
|
||||
*
|
||||
* This is called once per adapter.
|
||||
*
|
||||
* @param parameters Parameters used to load the ads.
|
||||
* @param delegate Delegate to be notified about ad events.
|
||||
*/
|
||||
- (void)loadNativeAdForParameters:(id<MAAdapterResponseParameters>)parameters andNotify:(id<MANativeAdAdapterDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,57 +0,0 @@
|
||||
//
|
||||
// MANativeAdAdapterDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 6/15/21.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdapterDelegate.h>
|
||||
|
||||
@class MAAdapterError;
|
||||
@class MANativeAd;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Protocol for adapters to forward ad load and display events to the MAX SDK for native ads.
|
||||
*/
|
||||
@protocol MANativeAdAdapterDelegate <MAAdapterDelegate>
|
||||
|
||||
/**
|
||||
* This method should called when an ad has been loaded.
|
||||
*
|
||||
* @param nativeAd Native ad container containing the assets from the mediated network's native ad.
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didLoadAdForNativeAd:(MANativeAd *)nativeAd withExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when an ad could not be loaded.
|
||||
*
|
||||
* @param adapterError An error object that indicates the cause of ad failure.
|
||||
*/
|
||||
- (void)didFailToLoadNativeAdWithError:(MAAdapterError *)adapterError;
|
||||
|
||||
/**
|
||||
* This method should be called when the adapter has successfully displayed an ad to the user.
|
||||
* Note: Display callbacks are not forwarded to the publisher, however revenue events that are associated with the display event are.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didDisplayNativeAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
/**
|
||||
* This method should be called when the user has clicked adapter's ad.
|
||||
*/
|
||||
- (void)didClickNativeAd;
|
||||
|
||||
/**
|
||||
* This method should be called when the user has clicked adapter's ad.
|
||||
*
|
||||
* @param extraInfo Extra info passed from the adapter.
|
||||
*/
|
||||
- (void)didClickNativeAdWithExtraInfo:(nullable NSDictionary<NSString *, id> *)extraInfo;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,64 +0,0 @@
|
||||
//
|
||||
// MANativeAdDelegate.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Andrew Tian on 7/14/21.
|
||||
//
|
||||
|
||||
@class MAAd;
|
||||
@class MAError;
|
||||
@class MANativeAdView;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines a listener to be notified about native ad events.
|
||||
*/
|
||||
@protocol MANativeAdDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when a new native ad has been loaded.
|
||||
*
|
||||
* @param nativeAdView The native ad view that the SDK successfully loaded.
|
||||
* May be @c nil if a manual native ad is loaded without a view.
|
||||
* You can create and render the native ad view using @code -[MANativeAdLoader renderNativeAdView:withAd:] @endcode.
|
||||
* @param ad The ad that was loaded.
|
||||
*/
|
||||
- (void)didLoadNativeAd:(nullable MANativeAdView *)nativeAdView forAd:(MAAd *)ad;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when a native ad could not be retrieved.
|
||||
*
|
||||
* <b>Common error codes:</b><table>
|
||||
* <tr><td>204</td><td>no ad is available</td></tr>
|
||||
* <tr><td>5xx</td><td>internal server error</td></tr>
|
||||
* <tr><td>negative number</td><td>internal errors</td></tr></table>
|
||||
*
|
||||
* @param adUnitIdentifier The ad unit ID that the SDK failed to load an ad for.
|
||||
* @param error An object that encapsulates the failure info.
|
||||
*/
|
||||
- (void)didFailToLoadNativeAdForAdUnitIdentifier:(NSString *)adUnitIdentifier withError:(MAError *)error;
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when the native ad is clicked.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad The ad that was clicked.
|
||||
*/
|
||||
- (void)didClickNativeAd:(MAAd *)ad;
|
||||
|
||||
@optional
|
||||
|
||||
/**
|
||||
* The SDK invokes this method when the native ad expires.
|
||||
*
|
||||
* The SDK invokes this method on the main UI thread.
|
||||
*
|
||||
* @param ad The ad that expired.
|
||||
*/
|
||||
- (void)didExpireNativeAd:(MAAd *)ad;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,118 +0,0 @@
|
||||
//
|
||||
// MANativeAdLoader.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Andrew Tian on 7/14/21.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdRevenueDelegate.h>
|
||||
#import <AppLovinSDK/MAAdReviewDelegate.h>
|
||||
#import <AppLovinSDK/MANativeAdDelegate.h>
|
||||
|
||||
@class ALSdk;
|
||||
@class MAAd;
|
||||
@class MANativeAdView;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This class represents a loader for native ads.
|
||||
*/
|
||||
@interface MANativeAdLoader : NSObject
|
||||
|
||||
/**
|
||||
* Creates a new MAX native ad loader.
|
||||
*
|
||||
* @param adUnitIdentifier Ad unit ID to load ads for.
|
||||
*/
|
||||
- (instancetype)initWithAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
|
||||
/**
|
||||
* Creates a new MAX native ad loader.
|
||||
*
|
||||
* @param adUnitIdentifier Ad unit ID to load ads for.
|
||||
* @param sdk SDK to use. You can obtain an instance of the SDK by calling @code +[ALSdk shared] @endcode.
|
||||
*/
|
||||
- (instancetype)initWithAdUnitIdentifier:(NSString *)adUnitIdentifier sdk:(ALSdk *)sdk;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
/**
|
||||
* A delegate that will be notified about native ad events.
|
||||
*/
|
||||
@property (nonatomic, weak, nullable) id<MANativeAdDelegate> nativeAdDelegate;
|
||||
|
||||
/**
|
||||
* A delegate that will be notified about ad revenue events.
|
||||
*/
|
||||
@property (nonatomic, weak, nullable) id<MAAdRevenueDelegate> revenueDelegate;
|
||||
|
||||
/**
|
||||
* A delegate that will be notified about Ad Review events.
|
||||
*/
|
||||
@property (nonatomic, weak, nullable) id<MAAdReviewDelegate> adReviewDelegate;
|
||||
|
||||
/**
|
||||
* Load a new MAX native ad. Set @code -[MANativeAdLoader nativeAdDelegate] @endcode to assign a delegate that should be notified about ad load state.
|
||||
*/
|
||||
- (void)loadAd;
|
||||
|
||||
/**
|
||||
* Load a new MAX native ad into the given native ad view. Set @code -[MANativeAdLoader nativeAdDelegate] @endcode to assign a delegate that should be notified about ad load state.
|
||||
*
|
||||
* @param adView a @c MANativeAdView into which the loaded native ad will be rendered.
|
||||
*/
|
||||
- (void)loadAdIntoAdView:(nullable MANativeAdView *)adView;
|
||||
|
||||
/**
|
||||
* Renders the given ad into the given ad view.
|
||||
*
|
||||
* Note: Make sure to only render the ad separately if the native ad view returned in our @code -[MANativeAdDelegate didLoadNativeAd:forAd:] @endcode is @c nil.
|
||||
*
|
||||
* @param adView The ad view into which to render the native ad.
|
||||
* @param ad The ad to be rendered.
|
||||
*
|
||||
* @return @c YES if the ad view was rendered successfully.
|
||||
*/
|
||||
- (BOOL)renderNativeAdView:(MANativeAdView *)adView withAd:(MAAd *)ad;
|
||||
|
||||
/**
|
||||
* The placement name that you assign when you integrate each ad format, for granular reporting in ad events (e.g. "Rewarded_Store", "Rewarded_LevelEnd").
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *placement;
|
||||
|
||||
/**
|
||||
* The ad unit identifier this @c MANativeAdLoader was initialized with and is loading ads for.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *adUnitIdentifier;
|
||||
|
||||
/**
|
||||
* Destroy the native ad and fully remove it from memory.
|
||||
*/
|
||||
- (void)destroyAd:(MAAd *)nativeAd;
|
||||
|
||||
/**
|
||||
* Sets an extra key/value parameter for the ad.
|
||||
*
|
||||
* @param key Parameter key.
|
||||
* @param value Parameter value.
|
||||
*/
|
||||
- (void)setExtraParameterForKey:(NSString *)key value:(nullable NSString *)value;
|
||||
|
||||
/**
|
||||
* Set a local extra parameter to pass to the adapter instances. Will not be available in the @code -[MAAdapter initializeWithParameters:withCompletionHandler:] @endcode method.
|
||||
*
|
||||
* @param key Parameter key. Must not be null.
|
||||
* @param value Parameter value. May be null.
|
||||
*/
|
||||
- (void)setLocalExtraParameterForKey:(NSString *)key value:(nullable id)value;
|
||||
|
||||
/**
|
||||
* The custom data to tie the showing ad to, for ILRD and rewarded postbacks via the @c {CUSTOM_DATA} macro. Maximum size is 8KB.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *customData;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,78 +0,0 @@
|
||||
//
|
||||
// MANativeAdView.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 5/22/20.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class MANativeAd;
|
||||
@class MANativeAdViewBinder;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Base view class containing native ad templates for banners, leaders, and mrecs.
|
||||
*
|
||||
* NOTE: The IBOutlets binding doesn't work in interface builder once the SDK is distributed as xcframeworks. Use the -[MANativeAdView bindViewsWithAdViewBinder:] to bind the native ad views.
|
||||
* Alternatively, you can manually import this header file into your project to use interface builder outlets to bind the views.
|
||||
*/
|
||||
@interface MANativeAdView : UIView
|
||||
|
||||
/**
|
||||
* The native ad title label.
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UILabel *titleLabel;
|
||||
|
||||
/**
|
||||
* The native ad advertiser label.
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UILabel *advertiserLabel;
|
||||
|
||||
/**
|
||||
* The native ad body label.
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UILabel *bodyLabel;
|
||||
|
||||
/**
|
||||
* The native ad CTA button.
|
||||
*/
|
||||
@property (nonatomic, weak, nullable) IBOutlet UIButton *callToActionButton;
|
||||
|
||||
/**
|
||||
* The native ad icon ImageView.
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UIImageView *iconImageView;
|
||||
|
||||
/**
|
||||
* The native ad icon view.
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UIView *iconContentView __deprecated_msg("iconContentView is deprecated and will be removed in the future. Use iconImageView instead.");
|
||||
|
||||
/**
|
||||
* The native ad options view.
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UIView *optionsContentView;
|
||||
|
||||
/**
|
||||
* The native ad media view for holding an arbitrary content view provided by the 3rd-party SDK.
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UIView *mediaContentView;
|
||||
|
||||
/**
|
||||
* The native ad star rating view for holding the star rating view.
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UIView *starRatingContentView;
|
||||
|
||||
/**
|
||||
* Binds the native asset ad views to this native ad using view tags.
|
||||
*/
|
||||
- (void)bindViewsWithAdViewBinder:(MANativeAdViewBinder *)adViewBinder;
|
||||
|
||||
+ (instancetype)nativeAdViewFromAd:(MANativeAd *)ad;
|
||||
+ (instancetype)nativeAdViewFromAd:(nullable MANativeAd *)ad withTemplate:(nullable NSString *)templateType;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,77 +0,0 @@
|
||||
//
|
||||
// MANativeAdViewBinder.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Santosh Bagadi on 11/26/21.
|
||||
//
|
||||
|
||||
@class MANativeAdViewBinderBuilder;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^MANativeAdViewBinderBuilderBlock) (MANativeAdViewBinderBuilder *builder);
|
||||
|
||||
@interface MANativeAdViewBinderBuilder : NSObject
|
||||
|
||||
@property (nonatomic, assign) NSInteger titleLabelTag;
|
||||
@property (nonatomic, assign) NSInteger advertiserLabelTag;
|
||||
@property (nonatomic, assign) NSInteger bodyLabelTag;
|
||||
@property (nonatomic, assign) NSInteger iconImageViewTag;
|
||||
@property (nonatomic, assign) NSInteger optionsContentViewTag;
|
||||
@property (nonatomic, assign) NSInteger starRatingContentViewTag;
|
||||
@property (nonatomic, assign) NSInteger mediaContentViewTag;
|
||||
@property (nonatomic, assign) NSInteger callToActionButtonTag;
|
||||
|
||||
@end
|
||||
|
||||
@interface MANativeAdViewBinder : NSObject
|
||||
|
||||
/**
|
||||
* A non-zero tag for the title label view to be rendered. The maximum length will be 50 characters.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSInteger titleLabelTag;
|
||||
|
||||
/**
|
||||
* A non-zero tag for advertiser label view to be rendered. The maximum length will be 25 characters.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSInteger advertiserLabelTag;
|
||||
|
||||
/**
|
||||
* A non-zero tag for body label view to be rendered. The maximum length will be 150 characters.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSInteger bodyLabelTag;
|
||||
|
||||
/**
|
||||
* A non-zero tag for icon image view to be rendered.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSInteger iconImageViewTag;
|
||||
|
||||
/**
|
||||
* A non-zero tag for options content view to be rendered.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSInteger optionsContentViewTag;
|
||||
|
||||
/**
|
||||
* A non-zero tag for star rating content view to be rendered.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSInteger starRatingContentViewTag;
|
||||
|
||||
/**
|
||||
* A non-zero tag for media content view to be rendered.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSInteger mediaContentViewTag;
|
||||
|
||||
/**
|
||||
* A non-zero tag for call to action button view to be rendered. The maximum length will be 15 characters.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSInteger callToActionButtonTag;
|
||||
|
||||
/**
|
||||
* Instantiates a @c MANativeAdViewBinder from a builder.
|
||||
*/
|
||||
- (instancetype)initWithBuilderBlock:(MANativeAdViewBinderBuilderBlock)builder;
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,74 +0,0 @@
|
||||
//
|
||||
// MANetworkResponseInfo.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 10/30/21.
|
||||
//
|
||||
|
||||
@class MAError;
|
||||
@class MAMediatedNetworkInfo;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This enum contains possible states of an ad in the waterfall the adapter response info could represent.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MAAdLoadState)
|
||||
{
|
||||
/**
|
||||
* The AppLovin MAX SDK did not attempt to load an ad from this network in the waterfall because an ad higher in the waterfall loaded successfully.
|
||||
*/
|
||||
MAAdLoadStateAdLoadNotAttempted,
|
||||
|
||||
/**
|
||||
* An ad successfully loaded from this network.
|
||||
*/
|
||||
MAAdLoadStateAdLoaded,
|
||||
|
||||
/**
|
||||
* An ad failed to load from this network.
|
||||
*/
|
||||
MAAdLoadStateAdFailedToLoad,
|
||||
};
|
||||
|
||||
/**
|
||||
* This class represents an ad response in a waterfall.
|
||||
*/
|
||||
@interface MANetworkResponseInfo : NSObject
|
||||
|
||||
/**
|
||||
* The state of the ad that this @c MAAdapterResponseInfo object represents. For more info, see the @c MAAdLoadState enum.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) MAAdLoadState adLoadState;
|
||||
|
||||
/**
|
||||
* The mediated network that this adapter response info object represents.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) MAMediatedNetworkInfo *mediatedNetwork;
|
||||
|
||||
/**
|
||||
* The credentials used to load an ad from this adapter, as entered in the AppLovin MAX dashboard.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSDictionary<NSString *, id> *credentials;
|
||||
|
||||
/**
|
||||
* Whether or not this response is from a bidding request.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly, getter=isBidding) BOOL bidding;
|
||||
|
||||
/**
|
||||
* The amount of time the network took to load (either successfully or not) an ad, in seconds. If an attempt to load an ad has not been made (i.e. the @c loadState is @c MAAdLoadStateAdLoadNotAttempted), the value will be @c -1.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSTimeInterval latency;
|
||||
|
||||
/**
|
||||
* The ad load error this network response resulted in. Will be @c nil if an attempt to load an ad has not been made or an ad was loaded successfully (i.e. the @c loadState is NOT @c MAAdLoadStateAdFailedtoLoad).
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) MAError *error;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,54 +0,0 @@
|
||||
//
|
||||
// MAReward.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 8/10/18.
|
||||
// Copyright © 2020 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This object represents a reward given to the user.
|
||||
*/
|
||||
@interface MAReward : NSObject
|
||||
|
||||
/**
|
||||
* The label that is used when a label is not given by the third-party network.
|
||||
*/
|
||||
@property (class, nonatomic, copy, readonly) NSString *defaultLabel;
|
||||
|
||||
/**
|
||||
* The amount that is used when no amount is given by the third-party network.
|
||||
*/
|
||||
@property (class, nonatomic, assign, readonly) NSInteger defaultAmount;
|
||||
|
||||
/**
|
||||
* The reward label or @code +[MAReward defaultLabel] @endcode if none specified.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *label;
|
||||
|
||||
/**
|
||||
* The rewarded amount or @code +[MAReward defaultAmount] @endcode if none specified.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSInteger amount;
|
||||
|
||||
/**
|
||||
* Create a reward object.
|
||||
*/
|
||||
+ (instancetype)reward;
|
||||
|
||||
/**
|
||||
* Create a reward object, with a label and an amount.
|
||||
*
|
||||
* @param amount The rewarded amount.
|
||||
* @param label The reward label.
|
||||
*/
|
||||
+ (instancetype)rewardWithAmount:(NSInteger)amount label:(NSString *)label;
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,42 +0,0 @@
|
||||
//
|
||||
// MARewardedAdapter.h
|
||||
// AppLovinSDK
|
||||
//
|
||||
// Created by Thomas So on 8/10/18.
|
||||
// Copyright © 2019 AppLovin Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#import <AppLovinSDK/MAAdapter.h>
|
||||
#import <AppLovinSDK/MAAdapterResponseParameters.h>
|
||||
#import <AppLovinSDK/MARewardedAdapterDelegate.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol defines methods for rewarded (incentivized) adapters.
|
||||
*/
|
||||
@protocol MARewardedAdapter <MAAdapter>
|
||||
|
||||
/**
|
||||
* Load a rewarded ad.
|
||||
*
|
||||
* This is called once per adapter.
|
||||
*
|
||||
* @param parameters Parameters that should be used for this current ad load.
|
||||
* @param delegate Delegate to be notified about rewarded ad events.
|
||||
*/
|
||||
- (void)loadRewardedAdForParameters:(id<MAAdapterResponseParameters>)parameters andNotify:(id<MARewardedAdapterDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Show the pre-loaded rewarded ad.
|
||||
*
|
||||
* This is called once per adapter.
|
||||
*
|
||||
* @param parameters Parameters used to show the ad.
|
||||
* @param delegate Delegate to be notified about rewarded ad events.
|
||||
*/
|
||||
- (void)showRewardedAdForParameters:(id<MAAdapterResponseParameters>)parameters andNotify:(id<MARewardedAdapterDelegate>)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