maxSDK升级
This commit is contained in:
parent
ed5e2f1dc7
commit
45ab702c1c
@ -171,9 +171,36 @@ public class Package {
|
||||
// <true />";
|
||||
// list.AddKey(UnityNotificationRequestAuthorizationOnAppLaunch);
|
||||
|
||||
string SKAdNetworkIdentifiers = @"
|
||||
<key>SKAdNetworkItems</key>
|
||||
<array>
|
||||
// max专用的SKAdNetworkIdentifiers,可以直接覆盖替换
|
||||
string SKAdNetworkIdentifiersForMAX = @"
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>22mmun2rn5.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>238da6jt44.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>24t9a8vw3c.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>24zw6aqk47.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>252b5q8x7y.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>275upjj5gd.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>294l99pt4k.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>2fnua5tdw4.skadnetwork</string>
|
||||
@ -182,6 +209,14 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>2u9pt9hc89.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>32z4fx6l9h.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>3l6bd9hu43.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>3qcr597p9d.skadnetwork</string>
|
||||
@ -190,6 +225,10 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>3qy4746246.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>3rd42ekr43.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>3sh42y64q3.skadnetwork</string>
|
||||
@ -202,6 +241,22 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>4468km3ulz.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>44jx6755aq.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>44n7hlldy6.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>47vhws6wlr.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>488r3q3dtq.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>4dzt52r2t5.skadnetwork</string>
|
||||
@ -212,148 +267,16 @@ public class Package {
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>578prtvx9j.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>5a6flpkh64.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>7ug5zh24hu.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>8c4e2ghe7u.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>8s468mfl3y.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>9rd848q2bz.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>9t245vhmpl.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>av6w8kgt66.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>c6k4g5qg8m.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>cstr6suwn9.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>e5fvkxwrpn.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>f38h382jlk.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>hs6bdukanm.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>kbd757ywx3.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>klf5c3l5u5.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>n6fk4nfna4.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>p78axxw29g.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>ppxm28t8ap.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>prcb7njmu6.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>s39g8k73mm.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>t38b2kh725.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>uw77j35x4d.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>v4nxqhlyqp.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>v72qych5uu.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>wzmmz9fp6w.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>yclnxrl5pm.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>ydx93a7ass.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>zq492l623r.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>22mmun2rn5.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>24t9a8vw3c.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>275upjj5gd.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>294l99pt4k.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>32z4fx6l9h.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>3l6bd9hu43.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>3rd42ekr43.skadnetwork</string>
|
||||
<string>4mn522wn87.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>4pfyvq9l8r.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>4w7y6s5ca2.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>523jb4fst2.skadnetwork</string>
|
||||
@ -366,6 +289,14 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>54nzkqm89y.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>578prtvx9j.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>5a6flpkh64.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>5l3tpt7t6e.skadnetwork</string>
|
||||
@ -378,42 +309,142 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>5tjdwbrq8w.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>6964rsfnh4.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>6g9af3uyq4.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>6p4ks3rnbw.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>6v7lgmsu45.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>6xzpu9s2p8.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>737z793b9f.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>74b6s63p6l.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>7953jerfzd.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>79pbpufp6p.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>7fmhfwg9en.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>7rz58n8ntl.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>7ug5zh24hu.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>84993kbrcf.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>89z7zv988g.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>8c4e2ghe7u.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>8m87ys6875.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>8r8llnkz5a.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>8s468mfl3y.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>97r2b46745.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>9b89h5y424.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>9g2aggbj52.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>9nlqeag3gk.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>9rd848q2bz.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>9t245vhmpl.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>9vvzujtq5s.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>9yg77x724h.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>a2p9lx4jpn.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>a7xqa6mtl2.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>a8cz6cu7e5.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>av6w8kgt66.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>b9bk5wbcq9.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>bxvub5ada5.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>c3frkrj4fj.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>c6k4g5qg8m.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>cg4yq2srnc.skadnetwork</string>
|
||||
@ -422,14 +453,58 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>cj5566h2ga.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>cp8zw746q7.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>cs644xg564.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>cstr6suwn9.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>dbu4b84rxf.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>dkc879ngq3.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>dzg6xy7pwj.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>e5fvkxwrpn.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>ecpz2srf59.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>eh6m2bh4zr.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>ejvt5qm6ak.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>f38h382jlk.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>f73kdq92p3.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>f7s53z58qe.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>feyaarzu9v.skadnetwork</string>
|
||||
@ -438,6 +513,10 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>g28c52eehv.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>g2y4y55b64.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>ggvn48r87g.skadnetwork</string>
|
||||
@ -446,22 +525,66 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>glqzh8vgby.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>gta8lk7p23.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>gta9lk7p23.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>gvmwg8q7h5.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>h65wbv5k3f.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>hb56zgv37p.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>hdw39hrw9y.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>hs6bdukanm.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>k674qkevps.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>kbd757ywx3.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>kbmxgpxpgc.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>klf5c3l5u5.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>krvm3zuq6h.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>lr83yxwka7.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>ludvb6z3bs.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>m297p6643m.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>m5mvw97r93.skadnetwork</string>
|
||||
@ -474,14 +597,30 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>mlmmfzh3r3.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>mls7yz5dvl.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>mp6xlyr22a.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>mtkv5xtk9e.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>n38lu8286q.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>n66cz3y3bx.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>n6fk4nfna4.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>n9x2a789qt.skadnetwork</string>
|
||||
@ -490,14 +629,38 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>nzq8sh4pbs.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>p78axxw29g.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>ppxm28t8ap.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>prcb7njmu6.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>pu4na253f3.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>pwa73g5rt2.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>pwdxu55a5a.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>qqp299437r.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>qu637u8glc.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>r45fhb6rf7.skadnetwork</string>
|
||||
@ -506,18 +669,78 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>rvh3l7un93.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>rx5hdcabgc.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>s39g8k73mm.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>s69wq72ugq.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>su67r6k2v3.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>t38b2kh725.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>t6d3zquu66.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>tl55sbb4fm.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>u679fj5vs4.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>uw77j35x4d.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>v4nxqhlyqp.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>v72qych5uu.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>v79kvwwj4g.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>v9wttpbfk9.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>vcra2ehyfk.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>vutu7akeur.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>w9q455wk68.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>wg4vff78zm.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>wzmmz9fp6w.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>x44k69ngh6.skadnetwork</string>
|
||||
@ -538,169 +761,21 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>xy9t38ct57.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>zmvfpc5aq8.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>44jx6755aq.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>44n7hlldy6.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>4w7y6s5ca2.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>6964rsfnh4.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>6p4ks3rnbw.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>737z793b9f.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>74b6s63p6l.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>84993kbrcf.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>97r2b46745.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>a2p9lx4jpn.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>a7xqa6mtl2.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>b9bk5wbcq9.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>bxvub5ada5.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>dzg6xy7pwj.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>f73kdq92p3.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>g2y4y55b64.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>hdw39hrw9y.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>krvm3zuq6h.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>lr83yxwka7.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>mls7yz5dvl.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>mp6xlyr22a.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>pwdxu55a5a.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>rx5hdcabgc.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>s69wq72ugq.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>su67r6k2v3.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>u679fj5vs4.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>w9q455wk68.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>y45688jllp.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>n38lu8286q.skadnetwork</string>
|
||||
<string>y5ghdn5j9k.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>v9wttpbfk9.skadnetwork</string>
|
||||
<string>yclnxrl5pm.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>252b5q8x7y.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>9g2aggbj52.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>238da6jt44.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>x2jnk7ly8j.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>488r3q3dtq.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>f7s53z58qe.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>v79kvwwj4g.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>ecpz2srf59.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>gvmwg8q7h5.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>pu4na253f3.skadnetwork</string>
|
||||
<string>ydx93a7ass.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
@ -710,8 +785,28 @@ public class Package {
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>z4gj7hsk7h.skadnetwork</string>
|
||||
</dict>
|
||||
</array>
|
||||
";
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>z959bm4gru.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>zmvfpc5aq8.skadnetwork</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>zq492l623r.skadnetwork</string>
|
||||
</dict>";
|
||||
|
||||
string SKAdNetworkIdentifiers = @"
|
||||
<key>SKAdNetworkItems</key>
|
||||
<array>"
|
||||
+ SKAdNetworkIdentifiersForMAX
|
||||
+ @"<dict>
|
||||
<key>SKAdNetworkIdentifier</key>
|
||||
<string>x2jnk7ly8j.skadnetwork</string>
|
||||
</dict>" // 不知道哪儿来的,但是不删除
|
||||
+ "</array>";
|
||||
list.AddKey(SKAdNetworkIdentifiers);
|
||||
|
||||
///*/facebook 深度连接
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dependencies>
|
||||
<androidPackages>
|
||||
<androidPackage spec="com.applovin:applovin-sdk:11.4.4" />
|
||||
<androidPackage spec="com.applovin:applovin-sdk:11.10.1" />
|
||||
</androidPackages>
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinSDK" version="11.4.3" />
|
||||
<iosPod name="AppLovinSDK" version="11.10.1" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -16,6 +16,7 @@ typedef void (*ALUnityBackgroundCallback)(const char* args);
|
||||
|
||||
- (void)createBannerWithAdUnitIdentifier:(NSString *)adUnitIdentifier atPosition:(NSString *)bannerPosition;
|
||||
- (void)createBannerWithAdUnitIdentifier:(NSString *)adUnitIdentifier x:(CGFloat)xOffset y:(CGFloat)yOffset;
|
||||
- (void)loadBannerWithAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
- (void)setBannerBackgroundColorForAdUnitIdentifier:(NSString *)adUnitIdentifier hexColorCode:(NSString *)hexColorCode;
|
||||
- (void)setBannerPlacement:(nullable NSString *)placement forAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
- (void)startBannerAutoRefreshForAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
@ -34,6 +35,7 @@ typedef void (*ALUnityBackgroundCallback)(const char* args);
|
||||
|
||||
- (void)createMRecWithAdUnitIdentifier:(NSString *)adUnitIdentifier atPosition:(NSString *)mrecPosition;
|
||||
- (void)createMRecWithAdUnitIdentifier:(NSString *)adUnitIdentifier x:(CGFloat)xOffset y:(CGFloat)yOffset;
|
||||
- (void)loadMRecWithAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
- (void)setMRecPlacement:(nullable NSString *)placement forAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
- (void)startMRecAutoRefreshForAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
- (void)stopMRecAutoRefreshForAdUnitIdentifier:(NSString *)adUnitIdentifer;
|
||||
@ -61,6 +63,12 @@ typedef void (*ALUnityBackgroundCallback)(const char* args);
|
||||
- (void)setInterstitialExtraParameterForAdUnitIdentifier:(NSString *)adUnitIdentifier key:(NSString *)key value:(nullable NSString *)value;
|
||||
- (void)setInterstitialLocalExtraParameterForAdUnitIdentifier:(NSString *)adUnitIdentifier key:(NSString *)key value:(nullable id)value;
|
||||
|
||||
- (void)loadAppOpenAdWithAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
- (BOOL)isAppOpenAdReadyWithAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
- (void)showAppOpenAdWithAdUnitIdentifier:(NSString *)adUnitIdentifier placement:(nullable NSString *)placement customData:(nullable NSString *)customData;
|
||||
- (void)setAppOpenAdExtraParameterForAdUnitIdentifier:(NSString *)adUnitIdentifier key:(NSString *)key value:(nullable NSString *)value;
|
||||
- (void)setAppOpenAdLocalExtraParameterForAdUnitIdentifier:(NSString *)adUnitIdentifier key:(NSString *)key value:(nullable id)value;
|
||||
|
||||
- (void)loadRewardedAdWithAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
- (BOOL)isRewardedAdReadyWithAdUnitIdentifier:(NSString *)adUnitIdentifier;
|
||||
- (void)showRewardedAdWithAdUnitIdentifier:(NSString *)adUnitIdentifier placement:(nullable NSString *)placement customData:(nullable NSString *)customData;
|
||||
@ -85,8 +93,11 @@ typedef void (*ALUnityBackgroundCallback)(const char* args);
|
||||
// User Service
|
||||
- (void)didDismissUserConsentDialog;
|
||||
|
||||
// Consent Flow
|
||||
- (void)startConsentFlow;
|
||||
|
||||
// Utils
|
||||
+ (NSString *)serializeParameters:(NSDictionary<NSString *, NSString *> *)dict;
|
||||
+ (NSString *)serializeParameters:(NSDictionary<NSString *, id> *)dict;
|
||||
|
||||
/**
|
||||
* Creates an instance of @c MAUnityAdManager if needed and returns the singleton instance.
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 4209563f82b8a4f7dabf03705ab761c6
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/AppLovin/Plugins/iOS/MAUnityAdManager.h
|
||||
- al_max_export_path-MaxSdk\AppLovin\Plugins\iOS\MAUnityAdManager.h
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@ -16,7 +15,7 @@ PluginImporter:
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
'': Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
#import "MAUnityAdManager.h"
|
||||
|
||||
#define VERSION @"5.4.5"
|
||||
#define VERSION @"5.10.1"
|
||||
|
||||
#define KEY_WINDOW [UIApplication sharedApplication].keyWindow
|
||||
#define DEVICE_SPECIFIC_ADVIEW_AD_FORMAT ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) ? MAAdFormat.leader : MAAdFormat.banner
|
||||
@ -42,13 +42,14 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
@interface MAUnityAdManager()<MAAdDelegate, MAAdViewAdDelegate, MARewardedAdDelegate, MAAdRevenueDelegate, ALVariableServiceDelegate>
|
||||
@interface MAUnityAdManager()<MAAdDelegate, MAAdViewAdDelegate, MARewardedAdDelegate, MAAdRevenueDelegate, MAAdReviewDelegate, ALVariableServiceDelegate>
|
||||
|
||||
// Parent Fields
|
||||
@property (nonatomic, weak) ALSdk *sdk;
|
||||
|
||||
// Fullscreen Ad Fields
|
||||
@property (nonatomic, strong) NSMutableDictionary<NSString *, MAInterstitialAd *> *interstitials;
|
||||
@property (nonatomic, strong) NSMutableDictionary<NSString *, MAAppOpenAd *> *appOpenAds;
|
||||
@property (nonatomic, strong) NSMutableDictionary<NSString *, MARewardedAd *> *rewardedAds;
|
||||
@property (nonatomic, strong) NSMutableDictionary<NSString *, MARewardedInterstitialAd *> *rewardedInterstitialAds;
|
||||
|
||||
@ -67,6 +68,7 @@ extern "C" {
|
||||
@property (nonatomic, strong) NSMutableDictionary<NSString *, NSString *> *adViewCustomDataToSetAfterCreate;
|
||||
@property (nonatomic, strong) NSMutableArray<NSString *> *adUnitIdentifiersToShowAfterCreate;
|
||||
@property (nonatomic, strong) NSMutableSet<NSString *> *disabledAdaptiveBannerAdUnitIdentifiers;
|
||||
@property (nonatomic, strong) NSMutableSet<NSString *> *disabledAutoRefreshAdViewAdUnitIdentifiers;
|
||||
@property (nonatomic, strong) UIView *safeAreaBackground;
|
||||
@property (nonatomic, strong, nullable) UIColor *publisherBannerBackgroundColor;
|
||||
|
||||
@ -107,6 +109,7 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
if ( self )
|
||||
{
|
||||
self.interstitials = [NSMutableDictionary dictionaryWithCapacity: 2];
|
||||
self.appOpenAds = [NSMutableDictionary dictionaryWithCapacity: 2];
|
||||
self.rewardedAds = [NSMutableDictionary dictionaryWithCapacity: 2];
|
||||
self.rewardedInterstitialAds = [NSMutableDictionary dictionaryWithCapacity: 2];
|
||||
self.adViews = [NSMutableDictionary dictionaryWithCapacity: 2];
|
||||
@ -123,6 +126,7 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
self.adViewCustomDataToSetAfterCreate = [NSMutableDictionary dictionaryWithCapacity: 1];
|
||||
self.adUnitIdentifiersToShowAfterCreate = [NSMutableArray arrayWithCapacity: 2];
|
||||
self.disabledAdaptiveBannerAdUnitIdentifiers = [NSMutableSet setWithCapacity: 2];
|
||||
self.disabledAutoRefreshAdViewAdUnitIdentifiers = [NSMutableSet setWithCapacity: 2];
|
||||
self.adInfoDict = [NSMutableDictionary dictionary];
|
||||
self.adInfoDictLock = [[NSObject alloc] init];
|
||||
|
||||
@ -172,7 +176,15 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
backgroundCallback = unityBackgroundCallback;
|
||||
NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
|
||||
NSString *sdkKey = infoDict[@"AppLovinSdkKey"];
|
||||
if ( [sdkKey al_isValidString] )
|
||||
{
|
||||
self.sdk = [ALSdk sharedWithKey: sdkKey settings: [self generateSDKSettingsForAdUnitIdentifiers: serializedAdUnitIdentifiers metaData: serializedMetaData]];
|
||||
}
|
||||
else
|
||||
{
|
||||
self.sdk = [ALSdk sharedWithSettings:[self generateSDKSettingsForAdUnitIdentifiers:serializedAdUnitIdentifiers metaData:serializedMetaData]];
|
||||
}
|
||||
|
||||
self.sdk.variableService.delegate = self;
|
||||
[self.sdk setPluginVersion: [@"Max-Unity-" stringByAppendingString: VERSION]];
|
||||
self.sdk.mediationProvider = @"max";
|
||||
@ -187,7 +199,8 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
@"consentDialogState" : consentDialogStateStr,
|
||||
@"countryCode" : configuration.countryCode,
|
||||
@"appTrackingStatus" : appTrackingStatus,
|
||||
@"isSuccessfullyInitialized" : ([self.sdk isInitialized] ? @"true" : @"false")}];
|
||||
@"isSuccessfullyInitialized" : @([self.sdk isInitialized]),
|
||||
@"isTestModeEnabled" : @([configuration isTestModeEnabled])}];
|
||||
}];
|
||||
|
||||
return self.sdk;
|
||||
@ -205,6 +218,11 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
[self createAdViewWithAdUnitIdentifier: adUnitIdentifier adFormat: [self adViewAdFormatForAdUnitIdentifier: adUnitIdentifier] atPosition: DEFAULT_AD_VIEW_POSITION withOffset: CGPointMake(xOffset, yOffset)];
|
||||
}
|
||||
|
||||
- (void)loadBannerWithAdUnitIdentifier:(NSString *)adUnitIdentifier
|
||||
{
|
||||
[self loadAdViewWithAdUnitIdentifier: adUnitIdentifier adFormat: [self adViewAdFormatForAdUnitIdentifier: adUnitIdentifier]];
|
||||
}
|
||||
|
||||
- (void)setBannerBackgroundColorForAdUnitIdentifier:(NSString *)adUnitIdentifier hexColorCode:(NSString *)hexColorCode
|
||||
{
|
||||
[self setAdViewBackgroundColorForAdUnitIdentifier: adUnitIdentifier adFormat: [self adViewAdFormatForAdUnitIdentifier: adUnitIdentifier] hexColorCode: hexColorCode];
|
||||
@ -292,6 +310,11 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
[self createAdViewWithAdUnitIdentifier: adUnitIdentifier adFormat: MAAdFormat.mrec atPosition: DEFAULT_AD_VIEW_POSITION withOffset: CGPointMake(xOffset, yOffset)];
|
||||
}
|
||||
|
||||
- (void)loadMRecWithAdUnitIdentifier:(NSString *)adUnitIdentifier
|
||||
{
|
||||
[self loadAdViewWithAdUnitIdentifier: adUnitIdentifier adFormat: MAAdFormat.mrec];
|
||||
}
|
||||
|
||||
- (void)setMRecPlacement:(nullable NSString *)placement forAdUnitIdentifier:(NSString *)adUnitIdentifier
|
||||
{
|
||||
[self setAdViewPlacement: placement forAdUnitIdentifier: adUnitIdentifier adFormat: MAAdFormat.mrec];
|
||||
@ -302,9 +325,9 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
[self startAdViewAutoRefreshForAdUnitIdentifier: adUnitIdentifier adFormat: MAAdFormat.mrec];
|
||||
}
|
||||
|
||||
- (void)stopMRecAutoRefreshForAdUnitIdentifier:(NSString *)adUnitIdentifer
|
||||
- (void)stopMRecAutoRefreshForAdUnitIdentifier:(NSString *)adUnitIdentifier
|
||||
{
|
||||
[self stopAdViewAutoRefreshForAdUnitIdentifier: adUnitIdentifer adFormat: MAAdFormat.mrec];
|
||||
[self stopAdViewAutoRefreshForAdUnitIdentifier: adUnitIdentifier adFormat: MAAdFormat.mrec];
|
||||
}
|
||||
|
||||
- (void)updateMRecPosition:(NSString *)mrecPosition forAdUnitIdentifier:(NSString *)adUnitIdentifier
|
||||
@ -427,6 +450,38 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
[interstitial setLocalExtraParameterForKey: key value: value];
|
||||
}
|
||||
|
||||
#pragma mark - App Open Ads
|
||||
|
||||
- (void)loadAppOpenAdWithAdUnitIdentifier:(NSString *)adUnitIdentifier
|
||||
{
|
||||
MAAppOpenAd *appOpenAd = [self retrieveAppOpenAdForAdUnitIdentifier: adUnitIdentifier];
|
||||
[appOpenAd loadAd];
|
||||
}
|
||||
|
||||
- (BOOL)isAppOpenAdReadyWithAdUnitIdentifier:(NSString *)adUnitIdentifier
|
||||
{
|
||||
MAAppOpenAd *appOpenAd = [self retrieveAppOpenAdForAdUnitIdentifier: adUnitIdentifier];
|
||||
return [appOpenAd isReady];
|
||||
}
|
||||
|
||||
- (void)showAppOpenAdWithAdUnitIdentifier:(NSString *)adUnitIdentifier placement:(nullable NSString *)placement customData:(nullable NSString *)customData
|
||||
{
|
||||
MAAppOpenAd *appOpenAd = [self retrieveAppOpenAdForAdUnitIdentifier: adUnitIdentifier];
|
||||
[appOpenAd showAdForPlacement: placement customData: customData];
|
||||
}
|
||||
|
||||
- (void)setAppOpenAdExtraParameterForAdUnitIdentifier:(NSString *)adUnitIdentifier key:(NSString *)key value:(nullable NSString *)value
|
||||
{
|
||||
MAAppOpenAd *appOpenAd = [self retrieveAppOpenAdForAdUnitIdentifier: adUnitIdentifier];
|
||||
[appOpenAd setExtraParameterForKey: key value: value];
|
||||
}
|
||||
|
||||
- (void)setAppOpenAdLocalExtraParameterForAdUnitIdentifier:(NSString *)adUnitIdentifier key:(NSString *)key value:(nullable id)value
|
||||
{
|
||||
MAAppOpenAd *appOpenAd = [self retrieveAppOpenAdForAdUnitIdentifier: adUnitIdentifier];
|
||||
[appOpenAd setLocalExtraParameterForKey: key value: value];
|
||||
}
|
||||
|
||||
#pragma mark - Rewarded
|
||||
|
||||
- (void)loadRewardedAdWithAdUnitIdentifier:(NSString *)adUnitIdentifier
|
||||
@ -568,6 +623,7 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
}
|
||||
|
||||
networkResponseDict[@"credentials"] = response.credentials;
|
||||
networkResponseDict[@"isBidding"] = @([response isBidding]);
|
||||
|
||||
MAError *error = response.error;
|
||||
if ( error )
|
||||
@ -636,6 +692,10 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
{
|
||||
name = @"OnInterstitialLoadedEvent";
|
||||
}
|
||||
else if ( MAAdFormat.appOpen == adFormat )
|
||||
{
|
||||
name = @"OnAppOpenAdLoadedEvent";
|
||||
}
|
||||
else if ( MAAdFormat.rewarded == adFormat )
|
||||
{
|
||||
name = @"OnRewardedAdLoadedEvent";
|
||||
@ -688,6 +748,10 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
{
|
||||
name = @"OnInterstitialLoadFailedEvent";
|
||||
}
|
||||
else if ( self.appOpenAds[adUnitIdentifier] )
|
||||
{
|
||||
name = @"OnAppOpenAdLoadFailedEvent";
|
||||
}
|
||||
else if ( self.rewardedAds[adUnitIdentifier] )
|
||||
{
|
||||
name = @"OnRewardedAdLoadFailedEvent";
|
||||
@ -735,6 +799,10 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
{
|
||||
name = @"OnInterstitialClickedEvent";
|
||||
}
|
||||
else if ( MAAdFormat.appOpen == adFormat )
|
||||
{
|
||||
name = @"OnAppOpenAdClickedEvent";
|
||||
}
|
||||
else if ( MAAdFormat.rewarded == adFormat )
|
||||
{
|
||||
name = @"OnRewardedAdClickedEvent";
|
||||
@ -768,6 +836,10 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
{
|
||||
name = @"OnInterstitialDisplayedEvent";
|
||||
}
|
||||
else if ( MAAdFormat.appOpen == adFormat )
|
||||
{
|
||||
name = @"OnAppOpenAdDisplayedEvent";
|
||||
}
|
||||
else if ( MAAdFormat.rewarded == adFormat )
|
||||
{
|
||||
name = @"OnRewardedAdDisplayedEvent";
|
||||
@ -792,6 +864,10 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
{
|
||||
name = @"OnInterstitialAdFailedToDisplayEvent";
|
||||
}
|
||||
else if ( MAAdFormat.appOpen == adFormat )
|
||||
{
|
||||
name = @"OnAppOpenAdFailedToDisplayEvent";
|
||||
}
|
||||
else if ( MAAdFormat.rewarded == adFormat )
|
||||
{
|
||||
name = @"OnRewardedAdFailedToDisplayEvent";
|
||||
@ -825,6 +901,10 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
{
|
||||
name = @"OnInterstitialHiddenEvent";
|
||||
}
|
||||
else if ( MAAdFormat.appOpen == adFormat )
|
||||
{
|
||||
name = @"OnAppOpenAdHiddenEvent";
|
||||
}
|
||||
else if ( MAAdFormat.rewarded == adFormat )
|
||||
{
|
||||
name = @"OnRewardedAdHiddenEvent";
|
||||
@ -952,6 +1032,10 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
{
|
||||
name = @"OnInterstitialAdRevenuePaidEvent";
|
||||
}
|
||||
else if ( MAAdFormat.appOpen == adFormat )
|
||||
{
|
||||
name = @"OnAppOpenAdRevenuePaidEvent";
|
||||
}
|
||||
else if ( MAAdFormat.rewarded == adFormat )
|
||||
{
|
||||
name = @"OnRewardedAdRevenuePaidEvent";
|
||||
@ -970,6 +1054,41 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
[MAUnityAdManager forwardUnityEventWithArgs: args forwardInBackground: [adFormat isFullscreenAd]];
|
||||
}
|
||||
|
||||
- (void)didGenerateCreativeIdentifier:(NSString *)creativeIdentifier forAd:(MAAd *)ad
|
||||
{
|
||||
NSString *name;
|
||||
MAAdFormat *adFormat = ad.format;
|
||||
if ( MAAdFormat.banner == adFormat || MAAdFormat.leader == adFormat )
|
||||
{
|
||||
name = @"OnBannerAdReviewCreativeIdGeneratedEvent";
|
||||
}
|
||||
else if ( MAAdFormat.mrec == adFormat )
|
||||
{
|
||||
name = @"OnMRecAdReviewCreativeIdGeneratedEvent";
|
||||
}
|
||||
else if ( MAAdFormat.interstitial == adFormat )
|
||||
{
|
||||
name = @"OnInterstitialAdReviewCreativeIdGeneratedEvent";
|
||||
}
|
||||
else if ( MAAdFormat.rewarded == adFormat )
|
||||
{
|
||||
name = @"OnRewardedAdReviewCreativeIdGeneratedEvent";
|
||||
}
|
||||
else if ( MAAdFormat.rewardedInterstitial == adFormat )
|
||||
{
|
||||
name = @"OnRewardedInterstitialAdReviewCreativeIdGeneratedEvent";
|
||||
}
|
||||
else
|
||||
{
|
||||
[self logInvalidAdFormat: adFormat];
|
||||
return;
|
||||
}
|
||||
|
||||
NSMutableDictionary<NSString *, id> *args = [self defaultAdEventParametersForName: name withAd: ad];
|
||||
args[@"adReviewCreativeId"] = creativeIdentifier;
|
||||
[MAUnityAdManager forwardUnityEventWithArgs: args];
|
||||
}
|
||||
|
||||
- (NSMutableDictionary<NSString *, id> *)defaultAdEventParametersForName:(NSString *)name withAd:(MAAd *)ad
|
||||
{
|
||||
NSMutableDictionary<NSString *, id> *args = [[self adInfoForAd: ad] mutableCopy];
|
||||
@ -985,6 +1104,11 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
max_unity_dispatch_on_main_thread(^{
|
||||
[self log: @"Creating %@ with ad unit identifier \"%@\" and position: \"%@\"", adFormat, adUnitIdentifier, adViewPosition];
|
||||
|
||||
if ( self.adViews[adUnitIdentifier] )
|
||||
{
|
||||
[self log: @"Trying to create a %@ that was already created. This will cause the current ad to be hidden.", adFormat.label];
|
||||
}
|
||||
|
||||
// Retrieve ad view from the map
|
||||
MAAdView *adView = [self retrieveAdViewForAdUnitIdentifier: adUnitIdentifier adFormat: adFormat atPosition: adViewPosition withOffset: offset];
|
||||
adView.hidden = YES;
|
||||
@ -1040,6 +1164,12 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
|
||||
[adView loadAd];
|
||||
|
||||
// Disable auto-refresh if publisher sets it before creating the ad view.
|
||||
if ( [self.disabledAutoRefreshAdViewAdUnitIdentifiers containsObject: adUnitIdentifier] )
|
||||
{
|
||||
[adView stopAutoRefresh];
|
||||
}
|
||||
|
||||
// The publisher may have requested to show the banner before it was created. Now that the banner is created, show it.
|
||||
if ( [self.adUnitIdentifiersToShowAfterCreate containsObject: adUnitIdentifier] )
|
||||
{
|
||||
@ -1049,6 +1179,32 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
});
|
||||
}
|
||||
|
||||
- (void)loadAdViewWithAdUnitIdentifier:(NSString *)adUnitIdentifier adFormat:(MAAdFormat *)adFormat
|
||||
{
|
||||
max_unity_dispatch_on_main_thread(^{
|
||||
MAAdView *adView = [self retrieveAdViewForAdUnitIdentifier: adUnitIdentifier adFormat: adFormat];
|
||||
if ( !adView )
|
||||
{
|
||||
[self log: @"%@ does not exist for ad unit identifier %@.", adFormat.label, adUnitIdentifier];
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ![self.disabledAutoRefreshAdViewAdUnitIdentifiers containsObject: adUnitIdentifier] )
|
||||
{
|
||||
if ( [adView isHidden] )
|
||||
{
|
||||
[self log: @"Auto-refresh will resume when the %@ ad is shown. You should only call LoadBanner() or LoadMRec() if you explicitly pause auto-refresh and want to manually load an ad.", adFormat.label];
|
||||
return;
|
||||
}
|
||||
|
||||
[self log: @"You must stop auto-refresh if you want to manually load %@ ads.", adFormat.label];
|
||||
return;
|
||||
}
|
||||
|
||||
[adView loadAd];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)setAdViewBackgroundColorForAdUnitIdentifier:(NSString *)adUnitIdentifier adFormat:(MAAdFormat *)adFormat hexColorCode:(NSString *)hexColorCode
|
||||
{
|
||||
max_unity_dispatch_on_main_thread(^{
|
||||
@ -1082,6 +1238,8 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
max_unity_dispatch_on_main_thread(^{
|
||||
[self log: @"Starting %@ auto refresh for ad unit identifier \"%@\"", adFormat.label, adUnitIdentifier];
|
||||
|
||||
[self.disabledAutoRefreshAdViewAdUnitIdentifiers removeObject: adUnitIdentifier];
|
||||
|
||||
MAAdView *adView = [self retrieveAdViewForAdUnitIdentifier: adUnitIdentifier adFormat: adFormat];
|
||||
if ( !adView )
|
||||
{
|
||||
@ -1098,6 +1256,8 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
max_unity_dispatch_on_main_thread(^{
|
||||
[self log: @"Stopping %@ auto refresh for ad unit identifier \"%@\"", adFormat.label, adUnitIdentifier];
|
||||
|
||||
[self.disabledAutoRefreshAdViewAdUnitIdentifiers addObject: adUnitIdentifier];
|
||||
|
||||
MAAdView *adView = [self retrieveAdViewForAdUnitIdentifier: adUnitIdentifier adFormat: adFormat];
|
||||
if ( !adView )
|
||||
{
|
||||
@ -1272,7 +1432,10 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
self.safeAreaBackground.hidden = NO;
|
||||
view.hidden = NO;
|
||||
|
||||
if ( ![self.disabledAutoRefreshAdViewAdUnitIdentifiers containsObject: adUnitIdentifier] )
|
||||
{
|
||||
[view startAutoRefresh];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -1317,6 +1480,7 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
MAAdView *view = [self retrieveAdViewForAdUnitIdentifier: adUnitIdentifier adFormat: adFormat];
|
||||
view.delegate = nil;
|
||||
view.revenueDelegate = nil;
|
||||
view.adReviewDelegate = nil;
|
||||
|
||||
[view removeFromSuperview];
|
||||
|
||||
@ -1355,6 +1519,7 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
result = [[MAInterstitialAd alloc] initWithAdUnitIdentifier: adUnitIdentifier sdk: self.sdk];
|
||||
result.delegate = self;
|
||||
result.revenueDelegate = self;
|
||||
result.adReviewDelegate = self;
|
||||
|
||||
self.interstitials[adUnitIdentifier] = result;
|
||||
}
|
||||
@ -1362,6 +1527,21 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
return result;
|
||||
}
|
||||
|
||||
- (MAAppOpenAd *)retrieveAppOpenAdForAdUnitIdentifier:(NSString *)adUnitIdentifier
|
||||
{
|
||||
MAAppOpenAd *result = self.appOpenAds[adUnitIdentifier];
|
||||
if ( !result )
|
||||
{
|
||||
result = [[MAAppOpenAd alloc] initWithAdUnitIdentifier: adUnitIdentifier sdk: self.sdk];
|
||||
result.delegate = self;
|
||||
result.revenueDelegate = self;
|
||||
|
||||
self.appOpenAds[adUnitIdentifier] = result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (MARewardedAd *)retrieveRewardedAdForAdUnitIdentifier:(NSString *)adUnitIdentifier
|
||||
{
|
||||
MARewardedAd *result = self.rewardedAds[adUnitIdentifier];
|
||||
@ -1370,6 +1550,7 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
result = [MARewardedAd sharedWithAdUnitIdentifier: adUnitIdentifier sdk: self.sdk];
|
||||
result.delegate = self;
|
||||
result.revenueDelegate = self;
|
||||
result.adReviewDelegate = self;
|
||||
|
||||
self.rewardedAds[adUnitIdentifier] = result;
|
||||
}
|
||||
@ -1385,6 +1566,7 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
result = [[MARewardedInterstitialAd alloc] initWithAdUnitIdentifier: adUnitIdentifier sdk: self.sdk];
|
||||
result.delegate = self;
|
||||
result.revenueDelegate = self;
|
||||
result.adReviewDelegate = self;
|
||||
|
||||
self.rewardedInterstitialAds[adUnitIdentifier] = result;
|
||||
}
|
||||
@ -1408,6 +1590,7 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
result.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
result.delegate = self;
|
||||
result.revenueDelegate = self;
|
||||
result.adReviewDelegate = self;
|
||||
|
||||
self.adViews[adUnitIdentifier] = result;
|
||||
self.adViewPositions[adUnitIdentifier] = adViewPosition;
|
||||
@ -1415,6 +1598,9 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
|
||||
UIViewController *rootViewController = [self unityViewController];
|
||||
[rootViewController.view addSubview: result];
|
||||
|
||||
// Allow pubs to pause auto-refresh immediately, by default.
|
||||
[result setExtraParameterForKey: @"allow_pause_auto_refresh_immediately" value: @"true"];
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -1829,6 +2015,25 @@ static ALUnityBackgroundCallback backgroundCallback;
|
||||
[MAUnityAdManager forwardUnityEventWithArgs: @{@"name" : @"OnSdkConsentDialogDismissedEvent"}];
|
||||
}
|
||||
|
||||
#pragma mark - Consent Flow
|
||||
|
||||
- (void)startConsentFlow
|
||||
{
|
||||
[self.sdk.cfService scfWithCompletionHander:^(ALCFError * _Nullable error) {
|
||||
|
||||
NSMutableDictionary<NSString *, id> *args = [NSMutableDictionary dictionaryWithCapacity: 3];
|
||||
args[@"name"] = @"OnSdkConsentFlowCompletedEvent";
|
||||
|
||||
if ( error )
|
||||
{
|
||||
args[@"code"] = @(error.code);
|
||||
args[@"message"] = error.message;
|
||||
}
|
||||
|
||||
[MAUnityAdManager forwardUnityEventWithArgs: args];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Variable Service (Deprecated)
|
||||
|
||||
- (void)loadVariables
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 2973e70bd2fa74984b35aea07ae9db52
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/AppLovin/Plugins/iOS/MAUnityAdManager.m
|
||||
- al_max_export_path-MaxSdk\AppLovin\Plugins\iOS\MAUnityAdManager.m
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@ -16,7 +15,7 @@ PluginImporter:
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
'': Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
|
||||
@ -37,11 +37,20 @@ extern "C"
|
||||
static NSNumber *_creativeDebuggerEnabledToSet;
|
||||
static NSNumber *_exceptionHandlerEnabledToSet;
|
||||
static NSNumber *_locationCollectionEnabledToSet;
|
||||
static NSNumber *_targetingYearOfBirth;
|
||||
static NSString *_targetingGender;
|
||||
static NSNumber *_targetingMaximumAdContentRating;
|
||||
static NSString *_targetingEmail;
|
||||
static NSString *_targetingPhoneNumber;
|
||||
static NSArray<NSString *> *_targetingKeywords;
|
||||
static NSArray<NSString *> *_targetingInterests;
|
||||
static NSMutableDictionary<NSString *, NSString *> *_extraParametersToSet = [NSMutableDictionary dictionary];
|
||||
static NSObject *_extraParametersToSetLock = [[NSObject alloc] init];
|
||||
|
||||
// Helper method to create C string copy
|
||||
static const char * cStringCopy(NSString *string);
|
||||
// Helper method to log errors
|
||||
void logUninitializedAccessError(char *callingMethod);
|
||||
|
||||
bool isPluginInitialized()
|
||||
{
|
||||
@ -67,6 +76,42 @@ extern "C"
|
||||
return array;
|
||||
}
|
||||
|
||||
ALGender getAppLovinGender(NSString *genderString)
|
||||
{
|
||||
if ( [@"F" al_isEqualToStringIgnoringCase: genderString] )
|
||||
{
|
||||
return ALGenderFemale;
|
||||
}
|
||||
else if ( [@"M" al_isEqualToStringIgnoringCase: genderString] )
|
||||
{
|
||||
return ALGenderMale;
|
||||
}
|
||||
else if ( [@"O" al_isEqualToStringIgnoringCase: genderString] )
|
||||
{
|
||||
return ALGenderOther;
|
||||
}
|
||||
|
||||
return ALGenderUnknown;
|
||||
}
|
||||
|
||||
ALAdContentRating getAppLovinAdContentRating(int maximumAdContentRating)
|
||||
{
|
||||
if ( maximumAdContentRating == 1 )
|
||||
{
|
||||
return ALAdContentRatingAllAudiences;
|
||||
}
|
||||
else if ( maximumAdContentRating == 2 )
|
||||
{
|
||||
return ALAdContentRatingEveryoneOverTwelve;
|
||||
}
|
||||
else if ( maximumAdContentRating == 3 )
|
||||
{
|
||||
return ALAdContentRatingMatureAudiences;
|
||||
}
|
||||
|
||||
return ALAdContentRatingNone;
|
||||
}
|
||||
|
||||
void setPendingExtraParametersIfNeeded(ALSdkSettings *settings)
|
||||
{
|
||||
NSDictionary *extraParameters;
|
||||
@ -129,7 +174,7 @@ extern "C"
|
||||
|
||||
if ( _verboseLoggingToSet )
|
||||
{
|
||||
_sdk.settings.isVerboseLogging = _verboseLoggingToSet.boolValue;
|
||||
_sdk.settings.verboseLoggingEnabled = _verboseLoggingToSet.boolValue;
|
||||
_verboseLoggingToSet = nil;
|
||||
}
|
||||
|
||||
@ -151,6 +196,48 @@ extern "C"
|
||||
_locationCollectionEnabledToSet = nil;
|
||||
}
|
||||
|
||||
if ( _targetingYearOfBirth )
|
||||
{
|
||||
_sdk.targetingData.yearOfBirth = _targetingYearOfBirth.intValue <= 0 ? nil : _targetingYearOfBirth;
|
||||
_targetingYearOfBirth = nil;
|
||||
}
|
||||
|
||||
if ( _targetingGender )
|
||||
{
|
||||
_sdk.targetingData.gender = getAppLovinGender(_targetingGender);
|
||||
_targetingGender = nil;
|
||||
}
|
||||
|
||||
if ( _targetingMaximumAdContentRating )
|
||||
{
|
||||
_sdk.targetingData.maximumAdContentRating = getAppLovinAdContentRating(_targetingMaximumAdContentRating.intValue);
|
||||
_targetingMaximumAdContentRating = nil;
|
||||
}
|
||||
|
||||
if ( _targetingEmail )
|
||||
{
|
||||
_sdk.targetingData.email = _targetingEmail;
|
||||
_targetingEmail = nil;
|
||||
}
|
||||
|
||||
if ( _targetingPhoneNumber )
|
||||
{
|
||||
_sdk.targetingData.phoneNumber = _targetingPhoneNumber;
|
||||
_targetingPhoneNumber = nil;
|
||||
}
|
||||
|
||||
if ( _targetingKeywords )
|
||||
{
|
||||
_sdk.targetingData.keywords = _targetingKeywords;
|
||||
_targetingKeywords = nil;
|
||||
}
|
||||
|
||||
if ( _targetingInterests )
|
||||
{
|
||||
_sdk.targetingData.interests = _targetingInterests;
|
||||
_targetingInterests = nil;
|
||||
}
|
||||
|
||||
setPendingExtraParametersIfNeeded( _sdk.settings );
|
||||
}
|
||||
|
||||
@ -195,6 +282,17 @@ extern "C"
|
||||
[_sdk showMediationDebugger];
|
||||
}
|
||||
|
||||
void _MaxShowCreativeDebugger()
|
||||
{
|
||||
if ( !_sdk )
|
||||
{
|
||||
NSLog(@"[%@] Failed to show creative debugger - please ensure the AppLovin MAX Unity Plugin has been initialized by calling 'MaxSdk.InitializeSdk();'!", TAG);
|
||||
return;
|
||||
}
|
||||
|
||||
[_sdk showCreativeDebugger];
|
||||
}
|
||||
|
||||
void _MaxShowConsentDialog()
|
||||
{
|
||||
NSLog(@"[%@] Failed to show consent dialog - Unavailable on iOS, please use the consent flow: https://dash.applovin.com/documentation/mediation/unity/getting-started/consent-flow", TAG);
|
||||
@ -236,82 +334,98 @@ extern "C"
|
||||
|
||||
void _MaxSetTargetingDataYearOfBirth(const int yearOfBirth)
|
||||
{
|
||||
if ( !isPluginInitialized() ) return;
|
||||
if ( !_sdk )
|
||||
{
|
||||
_targetingYearOfBirth = @(yearOfBirth);
|
||||
return;
|
||||
}
|
||||
|
||||
_sdk.targetingData.yearOfBirth = yearOfBirth <= 0 ? nil : @(yearOfBirth);
|
||||
}
|
||||
|
||||
void _MaxSetTargetingDataGender(const char *gender)
|
||||
void _MaxSetTargetingDataGender(char *gender)
|
||||
{
|
||||
if ( !isPluginInitialized() ) return;
|
||||
if ( !_sdk )
|
||||
{
|
||||
_targetingGender = NSSTRING(gender);
|
||||
return;
|
||||
}
|
||||
|
||||
NSString *genderString = NSSTRING(gender);
|
||||
ALGender alGender = ALGenderUnknown;
|
||||
|
||||
if ( [genderString isEqualToString: @"F"] )
|
||||
{
|
||||
alGender = ALGenderFemale;
|
||||
}
|
||||
else if ( [genderString isEqualToString: @"M"] )
|
||||
{
|
||||
alGender = ALGenderMale;
|
||||
}
|
||||
else if ( [genderString isEqualToString: @"O"] )
|
||||
{
|
||||
alGender = ALGenderOther;
|
||||
}
|
||||
|
||||
_sdk.targetingData.gender = alGender;
|
||||
_sdk.targetingData.gender = getAppLovinGender(genderString);
|
||||
}
|
||||
|
||||
void _MaxSetTargetingDataMaximumAdContentRating(const int maximumAdContentRating)
|
||||
{
|
||||
if ( !isPluginInitialized() ) return;
|
||||
|
||||
ALAdContentRating rating = ALAdContentRatingNone;
|
||||
|
||||
if ( maximumAdContentRating == 1 )
|
||||
if ( !_sdk )
|
||||
{
|
||||
rating = ALAdContentRatingAllAudiences;
|
||||
}
|
||||
else if ( maximumAdContentRating == 2 )
|
||||
{
|
||||
rating = ALAdContentRatingEveryoneOverTwelve;
|
||||
}
|
||||
else if ( maximumAdContentRating == 3 )
|
||||
{
|
||||
rating = ALAdContentRatingMatureAudiences;
|
||||
_targetingMaximumAdContentRating = @(maximumAdContentRating);
|
||||
return;
|
||||
}
|
||||
|
||||
_sdk.targetingData.maximumAdContentRating = rating;
|
||||
_sdk.targetingData.maximumAdContentRating = getAppLovinAdContentRating(maximumAdContentRating);
|
||||
}
|
||||
|
||||
void _MaxSetTargetingDataEmail(const char *email)
|
||||
void _MaxSetTargetingDataEmail(char *email)
|
||||
{
|
||||
if ( !isPluginInitialized() ) return;
|
||||
if ( !_sdk )
|
||||
{
|
||||
_targetingEmail = NSSTRING(email);
|
||||
return;
|
||||
}
|
||||
|
||||
_sdk.targetingData.email = NSSTRING(email);
|
||||
}
|
||||
|
||||
void _MaxSetTargetingDataPhoneNumber(const char *phoneNumber)
|
||||
void _MaxSetTargetingDataPhoneNumber(char *phoneNumber)
|
||||
{
|
||||
if ( !isPluginInitialized() ) return;
|
||||
if ( !_sdk )
|
||||
{
|
||||
_targetingPhoneNumber = NSSTRING(phoneNumber);
|
||||
return;
|
||||
}
|
||||
|
||||
_sdk.targetingData.phoneNumber = NSSTRING(phoneNumber);
|
||||
}
|
||||
|
||||
void _MaxSetTargetingDataKeywords(char **keywords, int size)
|
||||
{
|
||||
if ( !isPluginInitialized() ) return;
|
||||
_sdk.targetingData.keywords = toStringArray(keywords, size);
|
||||
NSArray<NSString *> *keywordsArray = keywords ? toStringArray(keywords, size) : nil;
|
||||
if ( !_sdk )
|
||||
{
|
||||
_targetingKeywords = keywordsArray;
|
||||
return;
|
||||
}
|
||||
|
||||
_sdk.targetingData.keywords = keywordsArray;
|
||||
}
|
||||
|
||||
void _MaxSetTargetingDataInterests(char **interests, int size)
|
||||
{
|
||||
if ( !isPluginInitialized() ) return;
|
||||
_sdk.targetingData.interests = toStringArray(interests, size);
|
||||
NSArray<NSString *> *interestsArray = interests ? toStringArray(interests, size) : nil;
|
||||
if ( !_sdk )
|
||||
{
|
||||
_targetingInterests = interestsArray;
|
||||
return;
|
||||
}
|
||||
|
||||
_sdk.targetingData.interests = interestsArray;
|
||||
}
|
||||
|
||||
void _MaxClearAllTargetingData()
|
||||
{
|
||||
if ( !isPluginInitialized() ) return;
|
||||
if ( !_sdk )
|
||||
{
|
||||
_targetingYearOfBirth = nil;
|
||||
_targetingGender = nil;
|
||||
_targetingMaximumAdContentRating = nil;
|
||||
_targetingEmail = nil;
|
||||
_targetingPhoneNumber = nil;
|
||||
_targetingKeywords = nil;
|
||||
_targetingInterests = nil;
|
||||
return;
|
||||
}
|
||||
|
||||
[_sdk.targetingData clearAll];
|
||||
}
|
||||
|
||||
@ -319,7 +433,7 @@ extern "C"
|
||||
{
|
||||
if ( !_sdk )
|
||||
{
|
||||
NSLog(@"[%@] Failed to get SDK configuration - please ensure the AppLovin MAX Unity Plugin has been initialized by calling 'MaxSdk.InitializeSdk();'!", TAG);
|
||||
logUninitializedAccessError("_MaxGetSdkConfiguration");
|
||||
return cStringCopy(@"");
|
||||
}
|
||||
|
||||
@ -329,7 +443,8 @@ extern "C"
|
||||
return cStringCopy([MAUnityAdManager serializeParameters: @{@"consentDialogState" : consentDialogStateStr,
|
||||
@"countryCode" : _sdk.configuration.countryCode,
|
||||
@"appTrackingStatus" : appTrackingStatus,
|
||||
@"isSuccessfullyInitialized" : ([_sdk isInitialized] ? @"true" : @"false")}]);
|
||||
@"isSuccessfullyInitialized" : @([_sdk isInitialized]),
|
||||
@"isTestModeEnabled" : @([_sdk.configuration isTestModeEnabled])}]);
|
||||
}
|
||||
|
||||
void _MaxSetHasUserConsent(bool hasUserConsent)
|
||||
@ -391,6 +506,13 @@ extern "C"
|
||||
[_adManager createBannerWithAdUnitIdentifier: NSSTRING(adUnitIdentifier) x: x y: y];
|
||||
}
|
||||
|
||||
void _MaxLoadBanner(const char *adUnitIdentifier)
|
||||
{
|
||||
if (!isPluginInitialized()) return;
|
||||
|
||||
[_adManager loadBannerWithAdUnitIdentifier: NSSTRING(adUnitIdentifier)];
|
||||
}
|
||||
|
||||
void _MaxSetBannerBackgroundColor(const char *adUnitIdentifier, const char *hexColorCode)
|
||||
{
|
||||
if (!isPluginInitialized()) return;
|
||||
@ -493,6 +615,13 @@ extern "C"
|
||||
[_adManager createMRecWithAdUnitIdentifier: NSSTRING(adUnitIdentifier) x: x y: y];
|
||||
}
|
||||
|
||||
void _MaxLoadMRec(const char *adUnitIdentifier)
|
||||
{
|
||||
if (!isPluginInitialized()) return;
|
||||
|
||||
[_adManager loadMRecWithAdUnitIdentifier: NSSTRING(adUnitIdentifier)];
|
||||
}
|
||||
|
||||
void _MaxSetMRecPlacement(const char *adUnitIdentifier, const char *placement)
|
||||
{
|
||||
[_adManager setMRecPlacement: NSSTRING(placement) forAdUnitIdentifier: NSSTRING(adUnitIdentifier)];
|
||||
@ -649,6 +778,41 @@ extern "C"
|
||||
[_adManager showInterstitialWithAdUnitIdentifier: NSSTRING(adUnitIdentifier) placement: NSSTRING(placement) customData: NSSTRING(customData)];
|
||||
}
|
||||
|
||||
void _MaxLoadAppOpenAd(const char *adUnitIdentifier)
|
||||
{
|
||||
if (!isPluginInitialized()) return;
|
||||
|
||||
[_adManager loadAppOpenAdWithAdUnitIdentifier: NSSTRING(adUnitIdentifier)];
|
||||
}
|
||||
|
||||
void _MaxSetAppOpenAdExtraParameter(const char *adUnitIdentifier, const char *key, const char *value)
|
||||
{
|
||||
[_adManager setAppOpenAdExtraParameterForAdUnitIdentifier: NSSTRING(adUnitIdentifier)
|
||||
key: NSSTRING(key)
|
||||
value: NSSTRING(value)];
|
||||
}
|
||||
|
||||
void _MaxSetAppOpenAdLocalExtraParameter(const char *adUnitIdentifier, const char *key, MAUnityRef value)
|
||||
{
|
||||
[_adManager setAppOpenAdLocalExtraParameterForAdUnitIdentifier: NSSTRING(adUnitIdentifier)
|
||||
key: NSSTRING(key)
|
||||
value: (__bridge id)value];
|
||||
}
|
||||
|
||||
bool _MaxIsAppOpenAdReady(const char *adUnitIdentifier)
|
||||
{
|
||||
if (!isPluginInitialized()) return false;
|
||||
|
||||
return [_adManager isAppOpenAdReadyWithAdUnitIdentifier: NSSTRING(adUnitIdentifier)];
|
||||
}
|
||||
|
||||
void _MaxShowAppOpenAd(const char *adUnitIdentifier, const char *placement, const char *customData)
|
||||
{
|
||||
if (!isPluginInitialized()) return;
|
||||
|
||||
[_adManager showAppOpenAdWithAdUnitIdentifier: NSSTRING(adUnitIdentifier) placement: NSSTRING(placement) customData: NSSTRING(customData)];
|
||||
}
|
||||
|
||||
void _MaxLoadRewardedAd(const char *adUnitIdentifier)
|
||||
{
|
||||
if (!isPluginInitialized()) return;
|
||||
@ -789,7 +953,7 @@ extern "C"
|
||||
{
|
||||
if ( _sdk )
|
||||
{
|
||||
_sdk.settings.isVerboseLogging = enabled;
|
||||
_sdk.settings.verboseLoggingEnabled = enabled;
|
||||
_verboseLoggingToSet = nil;
|
||||
}
|
||||
else
|
||||
@ -802,7 +966,7 @@ extern "C"
|
||||
{
|
||||
if ( _sdk )
|
||||
{
|
||||
return _sdk.settings.isVerboseLogging;
|
||||
return [_sdk.settings isVerboseLoggingEnabled];
|
||||
}
|
||||
else if ( _verboseLoggingToSet )
|
||||
{
|
||||
@ -890,11 +1054,38 @@ extern "C"
|
||||
}
|
||||
}
|
||||
|
||||
const char * _MaxGetCFType()
|
||||
{
|
||||
if ( !_sdk )
|
||||
{
|
||||
NSLog(@"[%@] Failed to get available mediated networks - please ensure the AppLovin MAX Unity Plugin has been initialized by calling 'MaxSdk.InitializeSdk();'!", TAG);
|
||||
return cStringCopy(@(ALCFTypeUnknown).stringValue);
|
||||
}
|
||||
|
||||
return cStringCopy(@(_sdk.cfService.cfType).stringValue);
|
||||
}
|
||||
|
||||
void _MaxStartConsentFlow()
|
||||
{
|
||||
if (!isPluginInitialized())
|
||||
{
|
||||
logUninitializedAccessError("_MaxStartConsentFlow");
|
||||
return;
|
||||
}
|
||||
|
||||
[_adManager startConsentFlow];
|
||||
}
|
||||
|
||||
float _MaxGetAdaptiveBannerHeight(const float width)
|
||||
{
|
||||
return [MAUnityAdManager adaptiveBannerHeightForWidth: width];
|
||||
}
|
||||
|
||||
void logUninitializedAccessError(char *callingMethod)
|
||||
{
|
||||
NSLog(@"[%@] Failed to execute: %s - please ensure the AppLovin MAX Unity Plugin has been initialized by calling 'MaxSdk.InitializeSdk();'!", TAG, callingMethod);
|
||||
}
|
||||
|
||||
[[deprecated("This API has been deprecated. Please use our SDK's initialization callback to retrieve variables instead.")]]
|
||||
void _MaxLoadVariables()
|
||||
{
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 7e373ed7168b243e6b706e991ab5a643
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/AppLovin/Plugins/iOS/MAUnityPlugin.mm
|
||||
- al_max_export_path-MaxSdk\AppLovin\Plugins\iOS\MAUnityPlugin.mm
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@ -16,7 +15,7 @@ PluginImporter:
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
'': Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
|
||||
1
Assets/ThirdParty/MaxSdk/Mediation.meta
vendored
1
Assets/ThirdParty/MaxSdk/Mediation.meta
vendored
@ -3,7 +3,6 @@ guid: dcf2020c4018447c9b91170c0f62d799
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation
|
||||
- al_max_export_path-MaxSdk\Mediation
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dependencies>
|
||||
<!-- <androidPackages>
|
||||
<androidPackage spec="com.applovin.mediation:adcolony-adapter:4.8.0.2"/>
|
||||
<androidPackage spec="com.applovin.mediation:adcolony-adapter:4.8.0.4"/>
|
||||
</androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationAdColonyAdapter" version="4.9.0.0.2"/>
|
||||
<iosPod name="AppLovinMediationAdColonyAdapter" version="4.9.0.0.4"/>
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: a351b114cfc11494ba8c131833b1bf74
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/AdColony/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\AdColony\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: ef8467ffb0e4447b79a8804884a7520a
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/ByteDance/Editor
|
||||
- al_max_export_path-MaxSdk\Mediation\ByteDance\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dependencies>
|
||||
<!-- <androidPackages>
|
||||
<androidPackage spec="com.applovin.mediation:bytedance-adapter:4.5.0.6.0">
|
||||
<androidPackage spec="com.applovin.mediation:bytedance-adapter:5.4.1.0.0">
|
||||
<repositories>
|
||||
<repository>https://artifact.bytedance.com/repository/pangle</repository>
|
||||
</repositories>
|
||||
</androidPackage>
|
||||
</androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationByteDanceAdapter" version="4.6.1.3.0" />
|
||||
<iosPod name="AppLovinMediationByteDanceAdapter" version="5.4.1.0.0" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 0828555cb1ce94702a4af6f3dce3d735
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/ByteDance/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\ByteDance\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: a90f13141c35746f5a2996c8ad068fe9
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Chartboost/Editor
|
||||
- al_max_export_path-MaxSdk\Mediation\Chartboost\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dependencies>
|
||||
<!-- <androidPackages>
|
||||
<androidPackage spec="com.applovin.mediation:chartboost-adapter:8.4.3.1" />
|
||||
<androidPackage spec="com.applovin.mediation:chartboost-adapter:9.4.1.0">
|
||||
<repositories>
|
||||
<repository>https://cboost.jfrog.io/artifactory/chartboost-ads/</repository>
|
||||
</repositories>
|
||||
</androidPackage>
|
||||
<androidPackage spec="com.google.android.gms:play-services-base:16.1.0" />
|
||||
</androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationChartboostAdapter" version="9.0.0.0" />
|
||||
<iosPod name="AppLovinMediationChartboostAdapter" version="9.4.0.0" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 93b0a4618bd884871af0981a7867bb2f
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Chartboost/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\Chartboost\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 28880992a399a48b7abe95b66649d711
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Facebook/Editor
|
||||
- al_max_export_path-MaxSdk\Mediation\Facebook\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
Since FAN SDK depends on older versions of a few support and play service versions
|
||||
`com.applovin.mediation:facebook-adapter:x.y.z.a` resolves to `com.applovin.mediation:facebook-adapter:+` which pulls down the beta versions of FAN SDK.
|
||||
Note that forcing the adapter is enough to stop Jar Resolver from pulling the latest FAN SDK. -->
|
||||
<!-- <androidPackage spec="com.applovin.mediation:facebook-adapter:[6.11.0.5]" /> -->
|
||||
<!-- <androidPackage spec="com.applovin.mediation:facebook-adapter:[6.15.0.0]" /> -->
|
||||
<!-- </androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationFacebookAdapter" version="6.11.2.1" />
|
||||
<iosPod name="AppLovinMediationFacebookAdapter" version="6.14.0.0" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: aea9bdf974328420db5ae118ef0d2b87
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Facebook/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\Facebook\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: e076e4ef7e2874ba69b108cc7a346c2a
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Fyber/Editor
|
||||
- al_max_export_path-MaxSdk\Mediation\Fyber\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dependencies>
|
||||
<!-- <androidPackages>
|
||||
<androidPackage spec="com.applovin.mediation:fyber-adapter:8.2.0.0"/>
|
||||
<androidPackage spec="com.applovin.mediation:fyber-adapter:8.2.3.3"/>
|
||||
</androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationFyberAdapter" version="8.1.6.0"/>
|
||||
<iosPod name="AppLovinMediationFyberAdapter" version="8.2.4.0"/>
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 5e123cdc08e804dffb2c40c4fbc83caf
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Fyber/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\Fyber\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: e8015bd045cea462c8f39c8a05867d08
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Google/Editor
|
||||
- al_max_export_path-MaxSdk\Mediation\Google\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
<dependencies>
|
||||
<!-- <androidPackages> -->
|
||||
<!-- Ensure that Resolver doesn't inadvertently pull the latest Play Services Ads' SDK that we haven't certified against. -->
|
||||
<!-- <androidPackage spec="com.applovin.mediation:google-adapter:[21.1.0.0]" />
|
||||
<!-- <androidPackage spec="com.applovin.mediation:google-adapter:[22.3.0.0]" />
|
||||
</androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationGoogleAdapter" version="9.8.0.0" />
|
||||
<iosPod name="AppLovinMediationGoogleAdapter" version="10.10.0.0" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 053b810d3594744e38b6fd0fa378fb57
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Google/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\Google\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
//
|
||||
// MaxGoogleInitialize.cs
|
||||
// AppLovin MAX Unity Plugin
|
||||
//
|
||||
// Created by Santosh Bagadi on 10/5/20.
|
||||
// Copyright © 2020 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AppLovinMax.Mediation.Google.Editor
|
||||
{
|
||||
[InitializeOnLoad]
|
||||
public class MaxGoogleInitialize
|
||||
{
|
||||
private static readonly string LegacyMaxMediationGoogleDir = Path.Combine("Assets", "Plugins/Android/MaxMediationGoogle");
|
||||
|
||||
static MaxGoogleInitialize()
|
||||
{
|
||||
// 安卓不处理
|
||||
if (true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Check if the MaxMediationGoogle directory exists and append .androidlib to it.
|
||||
if (Directory.Exists(LegacyMaxMediationGoogleDir))
|
||||
{
|
||||
Debug.Log("[AppLovin MAX] Updating Google Android library directory name to make it compatible with Unity 2020+ versions.");
|
||||
|
||||
FileUtil.MoveFileOrDirectory(LegacyMaxMediationGoogleDir, LegacyMaxMediationGoogleDir + ".androidlib");
|
||||
FileUtil.MoveFileOrDirectory(LegacyMaxMediationGoogleDir + ".meta", LegacyMaxMediationGoogleDir + ".androidlib" + ".meta");
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2376824a26af1414bbc62440698ccc89
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Google/Editor/MaxGoogleInitialize.cs
|
||||
- al_max_export_path-MaxSdk\Mediation\Google\Editor\MaxGoogleInitialize.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,59 +0,0 @@
|
||||
//
|
||||
// MaxMediationGoogleUtils.cs
|
||||
// AppLovin MAX Unity Plugin
|
||||
//
|
||||
// Created by Santosh Bagadi on 11/7/19.
|
||||
// Copyright © 2019 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AppLovinMax.Mediation.Google.Editor
|
||||
{
|
||||
/// <summary>
|
||||
/// An Utils class containing shared convenience methods.
|
||||
/// </summary>
|
||||
public static class MaxMediationGoogleUtils
|
||||
{
|
||||
private const string AppLovinSettingsExportPath = "MaxSdk/Resources/AppLovinSettings.asset";
|
||||
|
||||
/// <summary>
|
||||
/// Loads the AppLovin Settings asset if it is available and returns the value for the given property name.
|
||||
/// </summary>
|
||||
/// <param name="property">The name of the property for which to get the value of from <c>AppLovinSettings.asset</c> file.</param>
|
||||
/// <returns>The string value of the property if found.</returns>
|
||||
public static string GetAppIdFromAppLovinSettings(string property)
|
||||
{
|
||||
var settingsFileName = GetAppLovinSettingsAssetPath();
|
||||
if (!File.Exists(settingsFileName))
|
||||
{
|
||||
Debug.LogError("[AppLovin MAX] The current plugin version is incompatible with the AdMob adapter. Please update the AppLovin MAX plugin to version 2.4.0 or higher.");
|
||||
return null;
|
||||
}
|
||||
|
||||
var instance = AssetDatabase.LoadAssetAtPath(settingsFileName, Type.GetType("AppLovinSettings, MaxSdk.Scripts.IntegrationManager.Editor"));
|
||||
if (instance == null)
|
||||
{
|
||||
Debug.LogError("[AppLovin MAX] The current plugin version is incompatible with the AdMob adapter. Please update the AppLovin MAX plugin to version 2.4.15 or higher");
|
||||
return null;
|
||||
}
|
||||
|
||||
var adMobAppIdProperty = instance.GetType().GetProperty(property);
|
||||
return adMobAppIdProperty == null ? null : adMobAppIdProperty.GetValue(instance, null).ToString();
|
||||
}
|
||||
|
||||
private static string GetAppLovinSettingsAssetPath()
|
||||
{
|
||||
// Since the settings asset is generated during compile time, the asset label will contain platform specific path separator. So, use platform specific export path.
|
||||
var assetLabel = "l:al_max_export_path-" + AppLovinSettingsExportPath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
|
||||
var guids = AssetDatabase.FindAssets(assetLabel);
|
||||
|
||||
var defaultPath = Path.Combine("Assets", AppLovinSettingsExportPath);
|
||||
|
||||
return guids.Length > 0 ? AssetDatabase.GUIDToAssetPath(guids[0]) : defaultPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6de4e4d420b14431a7d169724e23361e
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Google/Editor/MaxMediationGoogleUtils.cs
|
||||
- al_max_export_path-MaxSdk\Mediation\Google\Editor\MaxMediationGoogleUtils.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,48 +0,0 @@
|
||||
//
|
||||
// PostProcessor.cs
|
||||
// AppLovin MAX Unity Plugin
|
||||
//
|
||||
// Created by Santosh Bagadi on 6/4/19.
|
||||
// Copyright © 2019 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
#if UNITY_IPHONE || UNITY_IOS
|
||||
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Callbacks;
|
||||
using UnityEditor.iOS.Xcode;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AppLovinMax.Mediation.Google.Editor
|
||||
{
|
||||
/// <summary>
|
||||
/// A post processor that will add the AdMob App ID to the <c>info.plist</c> file.
|
||||
/// </summary>
|
||||
public class PostProcessor
|
||||
{
|
||||
[PostProcessBuild]
|
||||
public static void OnPostProcessBuild(BuildTarget buildTarget, string buildPath)
|
||||
{
|
||||
var appId = MaxMediationGoogleUtils.GetAppIdFromAppLovinSettings("AdMobIosAppId");
|
||||
|
||||
// Log error if the App ID is not set.
|
||||
if (string.IsNullOrEmpty(appId) || !appId.StartsWith("ca-app-pub-"))
|
||||
{
|
||||
Debug.LogError("[AppLovin MAX] AdMob App ID is not set. Please enter a valid app ID within the AppLovin Integration Manager window.");
|
||||
return;
|
||||
}
|
||||
|
||||
var plistPath = Path.Combine(buildPath, "Info.plist");
|
||||
var plist = new PlistDocument();
|
||||
plist.ReadFromFile(plistPath);
|
||||
|
||||
// Actually set (then write) AdMob app id to Info.plist if valid
|
||||
plist.root.SetString("GADApplicationIdentifier", appId);
|
||||
|
||||
File.WriteAllText(plistPath, plist.WriteToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -1,115 +0,0 @@
|
||||
//
|
||||
// PreProcessor.cs
|
||||
// AppLovin MAX Unity Plugin
|
||||
//
|
||||
// Created by Santosh Bagadi on 11/7/19.
|
||||
// Copyright © 2019 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
#if UNITY_ANDROID
|
||||
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
using UnityEditor.Build.Reporting;
|
||||
#endif
|
||||
using UnityEngine;
|
||||
|
||||
namespace AppLovinMax.Mediation.Google.Editor
|
||||
{
|
||||
/// <summary>
|
||||
/// A pre processor that will add the AdMob App ID to the <c>AndroidManifest.xml</c> file.
|
||||
/// </summary>
|
||||
public class PreProcessor :
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
IPreprocessBuildWithReport
|
||||
#else
|
||||
IPreprocessBuild
|
||||
#endif
|
||||
{
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
public void OnPreprocessBuild(BuildReport report)
|
||||
#else
|
||||
public void OnPreprocessBuild(BuildTarget target, string path)
|
||||
#endif
|
||||
{
|
||||
// 安卓先不处理
|
||||
if (true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var appId = MaxMediationGoogleUtils.GetAppIdFromAppLovinSettings("AdMobAndroidAppId");
|
||||
if (string.IsNullOrEmpty(appId))
|
||||
{
|
||||
Debug.LogError("[AppLovin MAX] AdMob App ID is not set. Please enter a valid app ID within the ");
|
||||
return;
|
||||
}
|
||||
|
||||
var manifestPath = Path.Combine(Application.dataPath, "Plugins/Android/MaxMediationGoogle.androidlib/AndroidManifest.xml");
|
||||
|
||||
XDocument manifest;
|
||||
try
|
||||
{
|
||||
manifest = XDocument.Load(manifestPath);
|
||||
}
|
||||
#pragma warning disable 0168
|
||||
catch (IOException exception)
|
||||
#pragma warning restore 0168
|
||||
{
|
||||
Debug.LogError("[AppLovin MAX] Google mediation AndroidManifest.xml is missing. Ensure that MAX Google mediation plugin is imported correctly.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the `manifest` element.
|
||||
var elementManifest = manifest.Element("manifest");
|
||||
if (elementManifest == null)
|
||||
{
|
||||
Debug.LogError("[AppLovin MAX] Google mediation AndroidManifest.xml is invalid. Ensure that MAX Google mediation plugin is imported correctly.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the `application` element under `manifest`.
|
||||
var elementApplication = elementManifest.Element("application");
|
||||
if (elementApplication == null)
|
||||
{
|
||||
Debug.LogError("[AppLovin MAX] Google mediation AndroidManifest.xml is invalid. Ensure that MAX Google mediation plugin is imported correctly.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get all the `meta-data` elements under `application`.
|
||||
var adMobMetaData = elementApplication.Descendants().First(element => element.Name.LocalName.Equals("meta-data"));
|
||||
XNamespace androidNamespace = "http://schemas.android.com/apk/res/android";
|
||||
|
||||
if (!adMobMetaData.FirstAttribute.Name.Namespace.Equals(androidNamespace) ||
|
||||
!adMobMetaData.FirstAttribute.Name.LocalName.Equals("name") ||
|
||||
!adMobMetaData.FirstAttribute.Value.Equals("com.google.android.gms.ads.APPLICATION_ID"))
|
||||
{
|
||||
Debug.LogError("[AppLovin MAX] Google mediation AndroidManifest.xml is invalid. Ensure that MAX Google mediation plugin is imported correctly.");
|
||||
return;
|
||||
}
|
||||
|
||||
var lastAttribute = adMobMetaData.LastAttribute;
|
||||
// Log error if the AdMob App ID is not set.
|
||||
if (!lastAttribute.Name.LocalName.Equals("value"))
|
||||
{
|
||||
Debug.LogError("[AppLovin MAX] Google mediation AndroidManifest.xml is invalid. Ensure that MAX Google mediation plugin is imported correctly.");
|
||||
}
|
||||
|
||||
// Set the App ID value.
|
||||
lastAttribute.Value = appId;
|
||||
|
||||
// Save the updated manifest file.
|
||||
manifest.Save(manifestPath);
|
||||
}
|
||||
|
||||
public int callbackOrder
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -3,7 +3,6 @@ guid: a141703acd55a48c2a3e6e6599f90c64
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/InMobi/Editor
|
||||
- al_max_export_path-MaxSdk\Mediation\InMobi\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dependencies>
|
||||
<!-- <androidPackages>
|
||||
<androidPackage spec="com.applovin.mediation:inmobi-adapter:10.0.8.1" />
|
||||
<androidPackage spec="com.applovin.mediation:inmobi-adapter:10.1.4.3" />
|
||||
<androidPackage spec="com.squareup.picasso:picasso:2.71828" />
|
||||
<androidPackage spec="com.android.support:recyclerview-v7:28.+" />
|
||||
<androidPackage spec="com.android.support:customtabs:28.+" />
|
||||
</androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationInMobiAdapter" version="10.0.8.1" />
|
||||
<iosPod name="AppLovinMediationInMobiAdapter" version="10.5.6.0" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: bc66a0ef4503843ee9b1bf1b1e867367
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/InMobi/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\InMobi\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 531d860cac61f47d19e32f526470ae43
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/IronSource/Editor
|
||||
- al_max_export_path-MaxSdk\Mediation\IronSource\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dependencies>
|
||||
<!-- <androidPackages>
|
||||
<androidPackage spec="com.applovin.mediation:ironsource-adapter:7.2.3.1.0">
|
||||
<androidPackage spec="com.applovin.mediation:ironsource-adapter:7.5.0.0.1">
|
||||
<repositories>
|
||||
<repository>https://android-sdk.is.com/</repository>
|
||||
</repositories>
|
||||
</androidPackage>
|
||||
</androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationIronSourceAdapter" version="7.2.3.1.0" />
|
||||
<iosPod name="AppLovinMediationIronSourceAdapter" version="7.5.0.0.0" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 19262406303f04f05b14b31b3c734d35
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/IronSource/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\IronSource\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: db1de4066dc4e4290b3879b34fa87de2
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Mintegral/Editor
|
||||
- al_max_export_path-MaxSdk\Mediation\Mintegral\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dependencies>
|
||||
<!-- <androidPackages>
|
||||
<androidPackage spec="com.applovin.mediation:mintegral-adapter:16.2.11.0">
|
||||
<androidPackage spec="com.applovin.mediation:mintegral-adapter:16.5.11.0">
|
||||
<repositories>
|
||||
<repository>https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea</repository>
|
||||
</repositories>
|
||||
@ -9,6 +9,6 @@
|
||||
<androidPackage spec="androidx.recyclerview:recyclerview:1.2.1" />
|
||||
</androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationMintegralAdapter" version="7.1.9.0.0" />
|
||||
<iosPod name="AppLovinMediationMintegralAdapter" version="7.4.3.0.0" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 221b2a20a58a04f2cb4afb0779587206
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\Mintegral\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 6b21a711d751f4e1d9c77b5fb984e112
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Tapjoy/Editor
|
||||
- al_max_export_path-MaxSdk\Mediation\Tapjoy\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dependencies>
|
||||
<!-- <androidPackages>
|
||||
<androidPackage spec="com.applovin.mediation:tapjoy-adapter:12.10.0.2">
|
||||
<androidPackage spec="com.applovin.mediation:tapjoy-adapter:13.1.2.0">
|
||||
<repositories>
|
||||
<repository>https://sdk.tapjoy.com/</repository>
|
||||
</repositories>
|
||||
</androidPackage>
|
||||
</androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationTapjoyAdapter" version="12.10.0.1" />
|
||||
<iosPod name="AppLovinMediationTapjoyAdapter" version="13.1.2.0" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: c5268a136291a461aad1c0175bccb266
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Tapjoy/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\Tapjoy\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 30751f2dc322a40e588edfb7c978c9c0
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/UnityAds/Editor
|
||||
- al_max_export_path-MaxSdk\Mediation\UnityAds\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dependencies>
|
||||
<!-- <androidPackages>
|
||||
<androidPackage spec="com.applovin.mediation:unityads-adapter:4.3.0.0" />
|
||||
<androidPackage spec="com.applovin.mediation:unityads-adapter:4.8.0.0" />
|
||||
</androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationUnityAdsAdapter" version="4.3.0.0" />
|
||||
<iosPod name="AppLovinMediationUnityAdsAdapter" version="4.8.0.1" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 9950f1cb0da1e43efbeca604db142076
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\UnityAds\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 77b6ea05736a9458f8ef8762ee9b64bb
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Vungle/Editor
|
||||
- al_max_export_path-MaxSdk\Mediation\Vungle\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dependencies>
|
||||
<!-- <androidPackages>
|
||||
<androidPackage spec="com.applovin.mediation:vungle-adapter:6.12.0.0" />
|
||||
<androidPackage spec="com.applovin.mediation:vungle-adapter:6.12.1.1" />
|
||||
</androidPackages> -->
|
||||
<iosPods>
|
||||
<iosPod name="AppLovinMediationVungleAdapter" version="6.11.0.3" />
|
||||
<iosPod name="AppLovinMediationVungleAdapter" version="7.0.1.0" />
|
||||
</iosPods>
|
||||
</dependencies>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 0d8ad3a6ddc4f44fab2efe607fe14f26
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Vungle/Editor/Dependencies.xml
|
||||
- al_max_export_path-MaxSdk\Mediation\Vungle\Editor\Dependencies.xml
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 54c062c0526b148efa2ea2e9489b3aa0
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Prefabs/BannerBottom.prefab
|
||||
- al_max_export_path-MaxSdk\Prefabs\BannerBottom.prefab
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 6521750c87fd14f709d09a1e38ffde47
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Prefabs/BannerTop.prefab
|
||||
- al_max_export_path-MaxSdk\Prefabs\BannerTop.prefab
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -199,6 +199,7 @@ GameObject:
|
||||
- component: {fileID: 1672649117655046507}
|
||||
- component: {fileID: 2484422763836779945}
|
||||
- component: {fileID: 1332063313327512547}
|
||||
- component: {fileID: 9160434328933334999}
|
||||
m_Layer: 5
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
@ -227,7 +228,7 @@ MonoBehaviour:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6155160063690407013}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
@ -254,6 +255,18 @@ MonoBehaviour:
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &9160434328933334999
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6155160063690407013}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e0acf281ba86b4929a6942ecd998395b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &6462551400748024402
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 3fc0c2627ce8a4490b8e319326f8a535
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Prefabs/Interstitial.prefab
|
||||
- al_max_export_path-MaxSdk\Prefabs\Interstitial.prefab
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
15
Assets/ThirdParty/MaxSdk/Prefabs/Rewarded.prefab
vendored
15
Assets/ThirdParty/MaxSdk/Prefabs/Rewarded.prefab
vendored
@ -355,6 +355,7 @@ GameObject:
|
||||
- component: {fileID: 3074011789293951898}
|
||||
- component: {fileID: 301935380126337495}
|
||||
- component: {fileID: 535359239537776472}
|
||||
- component: {fileID: 1463999766055390634}
|
||||
m_Layer: 5
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
@ -383,7 +384,7 @@ MonoBehaviour:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4010021198786516228}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
@ -410,6 +411,18 @@ MonoBehaviour:
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &1463999766055390634
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4010021198786516228}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e0acf281ba86b4929a6942ecd998395b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &5668641863723001099
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -3,7 +3,6 @@ guid: a28c1544d6f094d5eafc8da2343c9119
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Prefabs/Rewarded.prefab
|
||||
- al_max_export_path-MaxSdk\Prefabs\Rewarded.prefab
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -16,6 +16,7 @@ MonoBehaviour:
|
||||
sdkKey: 9uHgeBwag3NXva9MC23ToO3q11Ve59bF1uwg4qGltdGmCQ7OSByFZ_3b1ZF7krMlkHQo5gXzIokVDsvg1rwbr-
|
||||
setAttributionReportEndpoint: 0
|
||||
consentFlowEnabled: 0
|
||||
consentFlowPlatform: 0
|
||||
consentFlowPrivacyPolicyUrl:
|
||||
consentFlowTermsOfServiceUrl:
|
||||
userTrackingUsageDescriptionEn:
|
||||
@ -29,4 +30,4 @@ MonoBehaviour:
|
||||
userTrackingUsageDescriptionZhHant:
|
||||
adMobAndroidAppId:
|
||||
adMobIosAppId: ca-app-pub-8252390069143459~7358844489
|
||||
snapAppStoreAppId: 0
|
||||
showInternalSettingsInIntegrationManager: 0
|
||||
|
||||
@ -3,11 +3,10 @@ guid: 572fee4574afa4f6dbf2846e0c152fe8
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Resources/Images/alert_icon.png
|
||||
- al_max_export_path-MaxSdk\Resources\Images\alert_icon.png
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
serializedVersion: 10
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
@ -27,7 +26,6 @@ TextureImporter:
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
@ -36,12 +34,12 @@ TextureImporter:
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: -1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
@ -59,13 +57,9 @@ TextureImporter:
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
|
||||
@ -3,11 +3,10 @@ guid: d24994f48fdd0430692e3d49279cd782
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Resources/Images/uninstall_icon.png
|
||||
- al_max_export_path-MaxSdk\Resources\Images\uninstall_icon.png
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
serializedVersion: 10
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
@ -27,7 +26,6 @@ TextureImporter:
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
@ -36,12 +34,12 @@ TextureImporter:
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: -1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
@ -59,13 +57,9 @@ TextureImporter:
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
|
||||
@ -3,11 +3,10 @@ guid: b504c956e7ed744b6b0e7f014e1cac5a
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Resources/Images/warning_icon.png
|
||||
- al_max_export_path-MaxSdk\Resources\Images\warning_icon.png
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
@ -27,7 +26,6 @@ TextureImporter:
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
@ -36,12 +34,12 @@ TextureImporter:
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: -1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
@ -59,15 +57,11 @@ TextureImporter:
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
@ -78,7 +72,6 @@ TextureImporter:
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
@ -86,12 +79,10 @@ TextureImporter:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
|
||||
1
Assets/ThirdParty/MaxSdk/Scripts/Editor.meta
vendored
1
Assets/ThirdParty/MaxSdk/Scripts/Editor.meta
vendored
@ -3,7 +3,6 @@ guid: b6903b66cb8984df289e6d66f9c52ddc
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/Editor
|
||||
- al_max_export_path-MaxSdk\Scripts\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -17,39 +17,45 @@ namespace AppLovinMax.Scripts.Editor
|
||||
[InitializeOnLoad]
|
||||
public class MaxInitialize
|
||||
{
|
||||
private const string AndroidChangelog = "ANDROID_CHANGELOG.md";
|
||||
private const string IosChangelog = "IOS_CHANGELOG.md";
|
||||
|
||||
private static readonly List<string> Networks = new List<string>
|
||||
{
|
||||
"AdColony",
|
||||
"Amazon",
|
||||
"ByteDance",
|
||||
"Chartboost",
|
||||
"Facebook",
|
||||
"Fyber",
|
||||
"Google",
|
||||
"InMobi",
|
||||
"IronSource",
|
||||
"Maio",
|
||||
"Mintegral",
|
||||
"MyTarget",
|
||||
"Nend",
|
||||
"Ogury",
|
||||
"Smaato",
|
||||
"Tapjoy",
|
||||
"TencentGDT",
|
||||
"UnityAds",
|
||||
"VerizonAds",
|
||||
"Vungle",
|
||||
"Yandex"
|
||||
};
|
||||
|
||||
private static readonly List<string> ObsoleteNetworks = new List<string>
|
||||
{
|
||||
"Snap",
|
||||
"VoodooAds"
|
||||
};
|
||||
|
||||
#if UNITY_2018_2_OR_NEWER
|
||||
private static readonly List<string> ObsoleteFileExportPathsToDelete = new List<string>
|
||||
{
|
||||
// The `EventSystemChecker` has been renamed to `MaxEventSystemChecker`.
|
||||
"MaxSdk/Scripts/EventSystemChecker.cs",
|
||||
"MaxSdk/Scripts/EventSystemChecker.cs.meta",
|
||||
|
||||
// Google AdMob adapter pre/post process scripts. The logic has been migrated to the main plugin.
|
||||
"MaxSdk/Mediation/Google/Editor/MaxGoogleInitialize.cs",
|
||||
"MaxSdk/Mediation/Google/Editor/MaxGoogleInitialize.cs.meta",
|
||||
"MaxSdk/Mediation/Google/Editor/MaxMediationGoogleUtils.cs",
|
||||
"MaxSdk/Mediation/Google/Editor/MaxMediationGoogleUtils.cs.meta",
|
||||
"MaxSdk/Mediation/Google/Editor/PostProcessor.cs",
|
||||
"MaxSdk/Mediation/Google/Editor/PostProcessor.cs.meta",
|
||||
"MaxSdk/Mediation/Google/Editor/PreProcessor.cs",
|
||||
"MaxSdk/Mediation/Google/Editor/PreProcessor.cs.meta",
|
||||
"MaxSdk/Mediation/Google/Editor/MaxSdk.Mediation.Google.Editor.asmdef",
|
||||
"MaxSdk/Mediation/Google/MaxSdk.Mediation.Google.Editor.asmdef.meta",
|
||||
"Plugins/Android/MaxMediationGoogle.androidlib",
|
||||
"Plugins/Android/MaxMediationGoogle.androidlib.meta",
|
||||
|
||||
// Google Ad Manager adapter pre/post process scripts. The logic has been migrated to the main plugin
|
||||
"MaxSdk/Mediation/GoogleAdManager/Editor/MaxGoogleAdManagerInitialize.cs",
|
||||
"MaxSdk/Mediation/GoogleAdManager/Editor/MaxGoogleAdManagerInitialize.cs.meta",
|
||||
"MaxSdk/Mediation/GoogleAdManager/Editor/PostProcessor.cs",
|
||||
"MaxSdk/Mediation/GoogleAdManager/Editor/PostProcessor.cs.meta",
|
||||
"MaxSdk/Mediation/GoogleAdManager/Editor/MaxSdk.Mediation.GoogleAdManager.Editor.asmdef",
|
||||
"MaxSdk/Mediation/GoogleAdManager/Editor/MaxSdk.Mediation.GoogleAdManager.Editor.asmdef.meta",
|
||||
"Plugins/Android/MaxMediationGoogleAdManager.androidlib",
|
||||
"Plugins/Android/MaxMediationGoogleAdManager.androidlib.meta"
|
||||
};
|
||||
#endif
|
||||
|
||||
static MaxInitialize()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
@ -77,29 +83,18 @@ namespace AppLovinMax.Scripts.Editor
|
||||
|
||||
AppLovinIntegrationManager.AddLabelsToAssetsIfNeeded(pluginParentDir, isPluginOutsideAssetsDir);
|
||||
|
||||
// Check if we have legacy adapter CHANGELOGs.
|
||||
foreach (var network in Networks)
|
||||
#if UNITY_2018_2_OR_NEWER
|
||||
foreach (var obsoleteFileExportPathToDelete in ObsoleteFileExportPathsToDelete)
|
||||
{
|
||||
var mediationAdapterDir = Path.Combine(pluginParentDir, "MaxSdk/Mediation/" + network);
|
||||
|
||||
// If new directory exists
|
||||
if (CheckExistence(mediationAdapterDir))
|
||||
var pathToDelete = MaxSdkUtils.GetAssetPathForExportPath(obsoleteFileExportPathToDelete);
|
||||
if (CheckExistence(pathToDelete))
|
||||
{
|
||||
var androidChangelogFile = Path.Combine(mediationAdapterDir, AndroidChangelog);
|
||||
if (CheckExistence(androidChangelogFile))
|
||||
{
|
||||
FileUtil.DeleteFileOrDirectory(androidChangelogFile);
|
||||
changesMade = true;
|
||||
}
|
||||
|
||||
var iosChangelogFile = Path.Combine(mediationAdapterDir, IosChangelog);
|
||||
if (CheckExistence(iosChangelogFile))
|
||||
{
|
||||
FileUtil.DeleteFileOrDirectory(iosChangelogFile);
|
||||
MaxSdkLogger.UserDebug("Deleting obsolete file '" + pathToDelete + "' that are no longer needed.");
|
||||
FileUtil.DeleteFileOrDirectory(pathToDelete);
|
||||
changesMade = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check if any obsolete networks are installed
|
||||
foreach (var obsoleteNetwork in ObsoleteNetworks)
|
||||
|
||||
@ -3,7 +3,6 @@ guid: bc0c5693335e0408a95293c0d7b61137
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/Editor/MaxInitialization.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\Editor\MaxInitialization.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -7,14 +7,16 @@
|
||||
//
|
||||
|
||||
#if UNITY_ANDROID && UNITY_2018_2_OR_NEWER
|
||||
|
||||
using AppLovinMax.Scripts.IntegrationManager.Editor;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using AppLovinMax.ThirdParty.MiniJson;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Android;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AppLovinMax.Scripts.Editor
|
||||
{
|
||||
@ -30,7 +32,22 @@ namespace AppLovinMax.Scripts.Editor
|
||||
#endif
|
||||
private const string PropertyDexingArtifactTransform = "android.enableDexingArtifactTransform";
|
||||
private const string DisableProperty = "=false";
|
||||
private const string AppLovinVerboseLoggingOnKey = "applovin.sdk.verbose_logging";
|
||||
|
||||
private const string KeyMetaDataAppLovinSdkKey = "applovin.sdk.key";
|
||||
private const string KeyMetaDataAppLovinVerboseLoggingOn = "applovin.sdk.verbose_logging";
|
||||
private const string KeyMetaDataGoogleApplicationId = "com.google.android.gms.ads.APPLICATION_ID";
|
||||
private const string KeyMetaDataGoogleAdManagerApp = "com.google.android.gms.ads.AD_MANAGER_APP";
|
||||
|
||||
private static readonly XNamespace AndroidNamespace = "http://schemas.android.com/apk/res/android";
|
||||
|
||||
private static string PluginMediationDirectory
|
||||
{
|
||||
get
|
||||
{
|
||||
var pluginParentDir = AppLovinIntegrationManager.MediationSpecificPluginParentDirectory;
|
||||
return Path.Combine(pluginParentDir, "MaxSdk/Mediation/");
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPostGenerateGradleAndroidProject(string path)
|
||||
{
|
||||
@ -73,7 +90,18 @@ namespace AppLovinMax.Scripts.Editor
|
||||
Console.WriteLine(exception);
|
||||
}
|
||||
|
||||
EnableVerboseLoggingIfNeeded(path);
|
||||
ProcessAndroidManifest(path);
|
||||
|
||||
var rawResourceDirectory = Path.Combine(path, "src/main/res/raw");
|
||||
if (AppLovinSettings.Instance.ShowInternalSettingsInIntegrationManager)
|
||||
{
|
||||
// For Unity 2018.1 or older, the consent flow is enabled in AppLovinPreProcessAndroid.
|
||||
AppLovinPreProcessAndroid.EnableConsentFlowIfNeeded(rawResourceDirectory);
|
||||
}
|
||||
else
|
||||
{
|
||||
AppLovinPreProcessAndroid.EnableTermsFlowIfNeeded(rawResourceDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
public int callbackOrder
|
||||
@ -81,11 +109,8 @@ namespace AppLovinMax.Scripts.Editor
|
||||
get { return int.MaxValue; }
|
||||
}
|
||||
|
||||
private static void EnableVerboseLoggingIfNeeded(string path)
|
||||
private static void ProcessAndroidManifest(string path)
|
||||
{
|
||||
if (!EditorPrefs.HasKey(MaxSdkLogger.KeyVerboseLoggingEnabled)) return;
|
||||
|
||||
var enabled = EditorPrefs.GetBool(MaxSdkLogger.KeyVerboseLoggingEnabled);
|
||||
var manifestPath = Path.Combine(path, "src/main/AndroidManifest.xml");
|
||||
XDocument manifest;
|
||||
try
|
||||
@ -115,10 +140,49 @@ namespace AppLovinMax.Scripts.Editor
|
||||
return;
|
||||
}
|
||||
|
||||
var metaDataElements = elementApplication.Descendants().Where(element => element.Name.LocalName.Equals("meta-data"));
|
||||
|
||||
AddSdkKeyIfNeeded(elementApplication);
|
||||
EnableVerboseLoggingIfNeeded(elementApplication);
|
||||
AddGoogleApplicationIdIfNeeded(elementApplication, metaDataElements);
|
||||
|
||||
// Save the updated manifest file.
|
||||
manifest.Save(manifestPath);
|
||||
}
|
||||
|
||||
private static void AddSdkKeyIfNeeded(XElement elementApplication)
|
||||
{
|
||||
var sdkKey = AppLovinSettings.Instance.SdkKey;
|
||||
if (string.IsNullOrEmpty(sdkKey)) return;
|
||||
|
||||
var descendants = elementApplication.Descendants();
|
||||
var sdkKeyMetaData = descendants.FirstOrDefault(descendant => descendant.FirstAttribute != null &&
|
||||
descendant.FirstAttribute.Name.LocalName.Equals("name") &&
|
||||
descendant.FirstAttribute.Value.Equals(KeyMetaDataAppLovinSdkKey) &&
|
||||
descendant.LastAttribute != null &&
|
||||
descendant.LastAttribute.Name.LocalName.Equals("value"));
|
||||
|
||||
// check if applovin.sdk.key meta data exists.
|
||||
if (sdkKeyMetaData != null)
|
||||
{
|
||||
sdkKeyMetaData.LastAttribute.Value = sdkKey;
|
||||
}
|
||||
else
|
||||
{
|
||||
// add applovin.sdk.key meta data if it does not exist.
|
||||
var metaData = CreateMetaDataElement(KeyMetaDataAppLovinSdkKey, sdkKey);
|
||||
elementApplication.Add(metaData);
|
||||
}
|
||||
}
|
||||
|
||||
private static void EnableVerboseLoggingIfNeeded(XElement elementApplication)
|
||||
{
|
||||
var enabled = EditorPrefs.GetBool(MaxSdkLogger.KeyVerboseLoggingEnabled, false);
|
||||
|
||||
var descendants = elementApplication.Descendants();
|
||||
var verboseLoggingMetaData = descendants.FirstOrDefault(descendant => descendant.FirstAttribute != null &&
|
||||
descendant.FirstAttribute.Name.LocalName.Equals("name") &&
|
||||
descendant.FirstAttribute.Value.Equals(AppLovinVerboseLoggingOnKey) &&
|
||||
descendant.FirstAttribute.Value.Equals(KeyMetaDataAppLovinVerboseLoggingOn) &&
|
||||
descendant.LastAttribute != null &&
|
||||
descendant.LastAttribute.Name.LocalName.Equals("value"));
|
||||
|
||||
@ -141,16 +205,66 @@ namespace AppLovinMax.Scripts.Editor
|
||||
if (enabled)
|
||||
{
|
||||
// add applovin.sdk.verbose_logging meta data if it does not exist.
|
||||
var metaData = new XElement("meta-data");
|
||||
XNamespace androidNamespace = "http://schemas.android.com/apk/res/android";
|
||||
metaData.Add(new XAttribute(androidNamespace + "name", AppLovinVerboseLoggingOnKey));
|
||||
metaData.Add(new XAttribute(androidNamespace + "value", enabled.ToString()));
|
||||
var metaData = CreateMetaDataElement(KeyMetaDataAppLovinVerboseLoggingOn, enabled.ToString());
|
||||
elementApplication.Add(metaData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Save the updated manifest file.
|
||||
manifest.Save(manifestPath);
|
||||
private static void AddGoogleApplicationIdIfNeeded(XElement elementApplication, IEnumerable<XElement> metaDataElements)
|
||||
{
|
||||
if (!AppLovinIntegrationManager.IsAdapterInstalled("Google") && !AppLovinIntegrationManager.IsAdapterInstalled("GoogleAdManager")) return;
|
||||
|
||||
var googleApplicationIdMetaData = GetMetaDataElement(metaDataElements, KeyMetaDataGoogleApplicationId);
|
||||
var appId = AppLovinSettings.Instance.AdMobAndroidAppId;
|
||||
// Log error if the App ID is not set.
|
||||
if (string.IsNullOrEmpty(appId) || !appId.StartsWith("ca-app-pub-"))
|
||||
{
|
||||
MaxSdkLogger.UserError("Google App ID is not set. Please enter a valid app ID within the AppLovin Integration Manager window.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if the Google App ID meta data already exists. Update if it already exists.
|
||||
if (googleApplicationIdMetaData != null)
|
||||
{
|
||||
googleApplicationIdMetaData.SetAttributeValue(AndroidNamespace + "value", appId);
|
||||
}
|
||||
// Meta data doesn't exist, add it.
|
||||
else
|
||||
{
|
||||
elementApplication.Add(CreateMetaDataElement(KeyMetaDataGoogleApplicationId, appId));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates and returns a <c>meta-data</c> element with the given name and value.
|
||||
/// </summary>
|
||||
private static XElement CreateMetaDataElement(string name, object value)
|
||||
{
|
||||
var metaData = new XElement("meta-data");
|
||||
metaData.Add(new XAttribute(AndroidNamespace + "name", name));
|
||||
metaData.Add(new XAttribute(AndroidNamespace + "value", value));
|
||||
|
||||
return metaData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks through all the given meta-data elements to check if the required one exists. Returns <c>null</c> if it doesn't exist.
|
||||
/// </summary>
|
||||
private static XElement GetMetaDataElement(IEnumerable<XElement> metaDataElements, string metaDataName)
|
||||
{
|
||||
foreach (var metaDataElement in metaDataElements)
|
||||
{
|
||||
var attributes = metaDataElement.Attributes();
|
||||
if (attributes.Any(attribute => attribute.Name.Namespace.Equals(AndroidNamespace)
|
||||
&& attribute.Name.LocalName.Equals("name")
|
||||
&& attribute.Value.Equals(metaDataName)))
|
||||
{
|
||||
return metaDataElement;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 75fed160a41749d4990cee871ee618a4
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/Editor/MaxPostProcessBuildAndroid.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\Editor\MaxPostProcessBuildAndroid.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -40,63 +40,44 @@ namespace AppLovinMax.Scripts.Editor
|
||||
private const string AppLovinMaxResourcesDirectoryName = "AppLovinMAXResources";
|
||||
private const string AppLovinAdvertisingAttributionEndpoint = "https://postbacks-app.com";
|
||||
|
||||
private static readonly List<string> AtsRequiringNetworks = new List<string>
|
||||
private const string AppLovinSettingsPlistFileName = "AppLovin-Settings.plist";
|
||||
private const string KeyConsentFlowInfo = "ConsentFlowInfo";
|
||||
private const string KeyConsentFlowEnabled = "ConsentFlowEnabled";
|
||||
private const string KeyConsentFlowTermsOfService = "ConsentFlowTermsOfService";
|
||||
private const string KeyConsentFlowPrivacyPolicy = "ConsentFlowPrivacyPolicy";
|
||||
private const string KeyConsentFlowAdvertisingPartners = "ConsentFlowAdvertisingPartners";
|
||||
private const string KeyConsentFlowIncludeDefaultAdvertisingPartners = "ConsentFlowIncludeDefaultAdvertisingPartners";
|
||||
private const string KeyConsentFlowAnalyticsPartners = "ConsentFlowAnalyticsPartners";
|
||||
private const string KeyConsentFlowIncludeDefaultAnalyticsPartners = "ConsentFlowIncludeDefaultAnalyticsPartners";
|
||||
|
||||
private static readonly List<string> DynamicLibrariesToEmbed = new List<string>
|
||||
{
|
||||
"AdColony",
|
||||
"ByteDance",
|
||||
"Fyber",
|
||||
"Google",
|
||||
"GoogleAdManager",
|
||||
"HyprMX",
|
||||
"InMobi",
|
||||
"IronSource",
|
||||
"Smaato"
|
||||
"DTBiOSSDK.xcframework",
|
||||
"FBSDKCoreKit_Basics.xcframework",
|
||||
"HyprMX.xcframework",
|
||||
"IASDKCore.xcframework",
|
||||
"MobileFuseSDK.xcframework",
|
||||
"OMSDK_Appodeal.xcframework",
|
||||
"OMSDK_Ogury.xcframework",
|
||||
"OMSDK_Pubnativenet.xcframework",
|
||||
"OMSDK_Smaato.xcframework"
|
||||
};
|
||||
|
||||
private static List<string> DynamicLibraryPathsToEmbed
|
||||
{
|
||||
get
|
||||
{
|
||||
var dynamicLibraryPathsToEmbed = new List<string>(2);
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "HyprMX/HyprMX.xcframework"));
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "smaato-ios-sdk/vendor/OMSDK_Smaato.xcframework"));
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "FBSDKCoreKit_Basics/XCFrameworks/FBSDKCoreKit_Basics.xcframework"));
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "OguryAds/OguryAds/OMSDK_Ogury.xcframework"));
|
||||
|
||||
if (ShouldEmbedSnapSdk())
|
||||
{
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "SAKSDK/SAKSDK.framework"));
|
||||
dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "SAKSDK/SAKSDK.xcframework"));
|
||||
}
|
||||
|
||||
return dynamicLibraryPathsToEmbed;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Some library paths might contain versions and can't be hardcoded. So, we'll instead search for these libraries in the Pods/ directory.
|
||||
/// </summary>
|
||||
private static List<string> DynamicLibrariesToSearchToEmbed
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<string>()
|
||||
{
|
||||
"OMSDK_Pubnativenet.xcframework"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private static List<string> SwiftLanguageNetworks
|
||||
{
|
||||
get
|
||||
{
|
||||
var swiftLanguageNetworks = new List<string>(1);
|
||||
if (ShouldAddSwiftSupportForFacebook())
|
||||
var swiftLanguageNetworks = new List<string>();
|
||||
if (AppLovinIntegrationManager.IsAdapterInstalled("Facebook", "6.9.0.0"))
|
||||
{
|
||||
swiftLanguageNetworks.Add("Facebook");
|
||||
}
|
||||
|
||||
if (AppLovinIntegrationManager.IsAdapterInstalled("UnityAds", "4.4.0.0"))
|
||||
{
|
||||
swiftLanguageNetworks.Add("UnityAds");
|
||||
}
|
||||
|
||||
return swiftLanguageNetworks;
|
||||
}
|
||||
}
|
||||
@ -104,6 +85,7 @@ namespace AppLovinMax.Scripts.Editor
|
||||
private static readonly List<string> EmbedSwiftStandardLibrariesNetworks = new List<string>
|
||||
{
|
||||
"Facebook",
|
||||
"UnityAds"
|
||||
};
|
||||
|
||||
private static string PluginMediationDirectory
|
||||
@ -131,39 +113,49 @@ namespace AppLovinMax.Scripts.Editor
|
||||
#endif
|
||||
EmbedDynamicLibrariesIfNeeded(buildPath, project, unityMainTargetGuid);
|
||||
|
||||
LocalizeUserTrackingDescriptionIfNeeded(AppLovinSettings.Instance.UserTrackingUsageDescriptionDe, "de", buildPath, project, unityMainTargetGuid);
|
||||
LocalizeUserTrackingDescriptionIfNeeded(AppLovinSettings.Instance.UserTrackingUsageDescriptionEn, "en", buildPath, project, unityMainTargetGuid);
|
||||
LocalizeUserTrackingDescriptionIfNeeded(AppLovinSettings.Instance.UserTrackingUsageDescriptionEs, "es", buildPath, project, unityMainTargetGuid);
|
||||
LocalizeUserTrackingDescriptionIfNeeded(AppLovinSettings.Instance.UserTrackingUsageDescriptionFr, "fr", buildPath, project, unityMainTargetGuid);
|
||||
LocalizeUserTrackingDescriptionIfNeeded(AppLovinSettings.Instance.UserTrackingUsageDescriptionJa, "ja", buildPath, project, unityMainTargetGuid);
|
||||
LocalizeUserTrackingDescriptionIfNeeded(AppLovinSettings.Instance.UserTrackingUsageDescriptionKo, "ko", buildPath, project, unityMainTargetGuid);
|
||||
LocalizeUserTrackingDescriptionIfNeeded(AppLovinSettings.Instance.UserTrackingUsageDescriptionZhHans, "zh-Hans", buildPath, project, unityMainTargetGuid);
|
||||
LocalizeUserTrackingDescriptionIfNeeded(AppLovinSettings.Instance.UserTrackingUsageDescriptionZhHant, "zh-Hant", buildPath, project, unityMainTargetGuid);
|
||||
var internalSettingsEnabled = AppLovinSettings.Instance.ShowInternalSettingsInIntegrationManager;
|
||||
var userTrackingUsageDescriptionDe = internalSettingsEnabled ? AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionDe : AppLovinSettings.Instance.UserTrackingUsageDescriptionDe;
|
||||
LocalizeUserTrackingDescriptionIfNeeded(userTrackingUsageDescriptionDe, "de", buildPath, project, unityMainTargetGuid);
|
||||
var userTrackingUsageDescriptionEn = internalSettingsEnabled ? AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionEn : AppLovinSettings.Instance.UserTrackingUsageDescriptionEn;
|
||||
LocalizeUserTrackingDescriptionIfNeeded(userTrackingUsageDescriptionEn, "en", buildPath, project, unityMainTargetGuid);
|
||||
var userTrackingUsageDescriptionEs = internalSettingsEnabled ? AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionEs : AppLovinSettings.Instance.UserTrackingUsageDescriptionEs;
|
||||
LocalizeUserTrackingDescriptionIfNeeded(userTrackingUsageDescriptionEs, "es", buildPath, project, unityMainTargetGuid);
|
||||
var userTrackingUsageDescriptionFr = internalSettingsEnabled ? AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionFr : AppLovinSettings.Instance.UserTrackingUsageDescriptionFr;
|
||||
LocalizeUserTrackingDescriptionIfNeeded(userTrackingUsageDescriptionFr, "fr", buildPath, project, unityMainTargetGuid);
|
||||
var userTrackingUsageDescriptionJa = internalSettingsEnabled ? AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionJa : AppLovinSettings.Instance.UserTrackingUsageDescriptionJa;
|
||||
LocalizeUserTrackingDescriptionIfNeeded(userTrackingUsageDescriptionJa, "ja", buildPath, project, unityMainTargetGuid);
|
||||
var userTrackingUsageDescriptionKo = internalSettingsEnabled ? AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionKo : AppLovinSettings.Instance.UserTrackingUsageDescriptionKo;
|
||||
LocalizeUserTrackingDescriptionIfNeeded(userTrackingUsageDescriptionKo, "ko", buildPath, project, unityMainTargetGuid);
|
||||
var userTrackingUsageDescriptionZhHans = internalSettingsEnabled ? AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionZhHans : AppLovinSettings.Instance.UserTrackingUsageDescriptionZhHans;
|
||||
LocalizeUserTrackingDescriptionIfNeeded(userTrackingUsageDescriptionZhHans, "zh-Hans", buildPath, project, unityMainTargetGuid);
|
||||
var userTrackingUsageDescriptionZhHant = internalSettingsEnabled ? AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionZhHant : AppLovinSettings.Instance.UserTrackingUsageDescriptionZhHant;
|
||||
LocalizeUserTrackingDescriptionIfNeeded(userTrackingUsageDescriptionZhHant, "zh-Hant", buildPath, project, unityMainTargetGuid);
|
||||
|
||||
AddSwiftSupportIfNeeded(buildPath, project, unityFrameworkTargetGuid);
|
||||
EmbedSwiftStandardLibrariesIfNeeded(buildPath, project, unityMainTargetGuid);
|
||||
AddYandexSettingsIfNeeded(project, unityMainTargetGuid);
|
||||
|
||||
project.WriteToFile(projectPath);
|
||||
}
|
||||
|
||||
private static void EmbedDynamicLibrariesIfNeeded(string buildPath, PBXProject project, string targetGuid)
|
||||
{
|
||||
var dynamicLibraryPathsPresentInProject = DynamicLibraryPathsToEmbed.Where(dynamicLibraryPath => Directory.Exists(Path.Combine(buildPath, dynamicLibraryPath))).ToList();
|
||||
var podsDirectory = Path.Combine(buildPath, "Pods");
|
||||
// Check that the Pods directory exists (it might not if a publisher is building with Generate Podfile setting disabled in EDM).
|
||||
if (Directory.Exists(podsDirectory))
|
||||
{
|
||||
foreach (var dynamicLibraryToSearch in DynamicLibrariesToSearchToEmbed)
|
||||
var podsDirectory = Path.Combine(buildPath, "Pods");
|
||||
if (!Directory.Exists(podsDirectory)) return;
|
||||
|
||||
var dynamicLibraryPathsPresentInProject = new List<string>();
|
||||
foreach (var dynamicLibraryToSearch in DynamicLibrariesToEmbed)
|
||||
{
|
||||
// both .framework and .xcframework are directories, not files
|
||||
var directories = Directory.GetDirectories(podsDirectory, dynamicLibraryToSearch, SearchOption.AllDirectories);
|
||||
if (directories.Length <= 0) continue;
|
||||
|
||||
var index = directories[0].LastIndexOf("Pods");
|
||||
var relativePath = directories[0].Substring(index);
|
||||
var dynamicLibraryAbsolutePath = directories[0];
|
||||
var index = dynamicLibraryAbsolutePath.LastIndexOf("Pods");
|
||||
var relativePath = dynamicLibraryAbsolutePath.Substring(index);
|
||||
dynamicLibraryPathsPresentInProject.Add(relativePath);
|
||||
}
|
||||
}
|
||||
|
||||
if (dynamicLibraryPathsPresentInProject.Count <= 0) return;
|
||||
|
||||
@ -192,12 +184,6 @@ namespace AppLovinMax.Scripts.Editor
|
||||
runpathSearchPaths += "@executable_path/Frameworks";
|
||||
project.SetBuildProperty(targetGuid, "LD_RUNPATH_SEARCH_PATHS", runpathSearchPaths);
|
||||
#endif
|
||||
|
||||
if (ShouldEmbedSnapSdk())
|
||||
{
|
||||
// Needed to build successfully on Xcode 12+, as Snap was build with latest Xcode but not as an xcframework
|
||||
project.AddBuildProperty(targetGuid, "VALIDATE_WORKSPACE", "YES");
|
||||
}
|
||||
}
|
||||
|
||||
private static void LocalizeUserTrackingDescriptionIfNeeded(string localizedUserTrackingDescription, string localeCode, string buildPath, PBXProject project, string targetGuid)
|
||||
@ -210,8 +196,7 @@ namespace AppLovinMax.Scripts.Editor
|
||||
var infoPlistStringsFilePath = Path.Combine(localeSpecificDirectoryPath, "InfoPlist.strings");
|
||||
|
||||
// Check if localization has been disabled between builds, and remove them as needed.
|
||||
var settings = AppLovinSettings.Instance;
|
||||
if (!settings.ConsentFlowEnabled || !settings.UserTrackingUsageLocalizationEnabled || string.IsNullOrEmpty(localizedUserTrackingDescription))
|
||||
if (ShouldRemoveLocalization(localizedUserTrackingDescription))
|
||||
{
|
||||
if (!File.Exists(infoPlistStringsFilePath)) return;
|
||||
|
||||
@ -268,6 +253,21 @@ namespace AppLovinMax.Scripts.Editor
|
||||
project.AddFileToBuild(targetGuid, guid);
|
||||
}
|
||||
|
||||
private static bool ShouldRemoveLocalization(string localizedUserTrackingDescription)
|
||||
{
|
||||
if (string.IsNullOrEmpty(localizedUserTrackingDescription)) return true;
|
||||
|
||||
var settings = AppLovinSettings.Instance;
|
||||
var internalSettingsEnabled = settings.ShowInternalSettingsInIntegrationManager;
|
||||
if (internalSettingsEnabled)
|
||||
{
|
||||
var internalSettings = AppLovinInternalSettings.Instance;
|
||||
return !internalSettings.ConsentFlowEnabled || !internalSettings.UserTrackingUsageLocalizationEnabled;
|
||||
}
|
||||
|
||||
return !settings.ConsentFlowEnabled || !settings.UserTrackingUsageLocalizationEnabled;
|
||||
}
|
||||
|
||||
private static void AddSwiftSupportIfNeeded(string buildPath, PBXProject project, string targetGuid)
|
||||
{
|
||||
var swiftFileRelativePath = "Classes/MAXSwiftSupport.swift";
|
||||
@ -353,19 +353,30 @@ namespace AppLovinMax.Scripts.Editor
|
||||
var plist = new PlistDocument();
|
||||
plist.ReadFromFile(plistPath);
|
||||
|
||||
SetSdkKeyIfNeeded(plist);
|
||||
SetAttributionReportEndpointIfNeeded(plist);
|
||||
|
||||
#if UNITY_2018_2_OR_NEWER
|
||||
EnableVerboseLoggingIfNeeded(plist);
|
||||
AddGoogleApplicationIdIfNeeded(plist);
|
||||
#endif
|
||||
EnableConsentFlowIfNeeded(plist);
|
||||
|
||||
AddSdkSettingsIfNeeded(plist, path);
|
||||
EnableTermsFlowIfNeeded(plist);
|
||||
AddSkAdNetworksInfoIfNeeded(plist);
|
||||
UpdateAppTransportSecuritySettingsIfNeeded(plist);
|
||||
AddSnapAppStoreAppIdIfNeeded(plist);
|
||||
|
||||
plist.WriteToFile(plistPath);
|
||||
}
|
||||
|
||||
private static void SetSdkKeyIfNeeded(PlistDocument plist)
|
||||
{
|
||||
var sdkKey = AppLovinSettings.Instance.SdkKey;
|
||||
if (string.IsNullOrEmpty(sdkKey)) return;
|
||||
|
||||
const string AppLovinVerboseLoggingOnKey = "AppLovinSdkKey";
|
||||
plist.root.SetString(AppLovinVerboseLoggingOnKey, sdkKey);
|
||||
}
|
||||
|
||||
private static void SetAttributionReportEndpointIfNeeded(PlistDocument plist)
|
||||
{
|
||||
if (AppLovinSettings.Instance.SetAttributionReportEndpoint)
|
||||
@ -401,14 +412,135 @@ namespace AppLovinMax.Scripts.Editor
|
||||
plist.root.values.Remove(AppLovinVerboseLoggingOnKey);
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddGoogleApplicationIdIfNeeded(PlistDocument plist)
|
||||
{
|
||||
if (!AppLovinIntegrationManager.IsAdapterInstalled("Google") && !AppLovinIntegrationManager.IsAdapterInstalled("GoogleAdManager")) return;
|
||||
|
||||
const string googleApplicationIdentifier = "GADApplicationIdentifier";
|
||||
var appId = AppLovinSettings.Instance.AdMobIosAppId;
|
||||
// Log error if the App ID is not set.
|
||||
if (string.IsNullOrEmpty(appId) || !appId.StartsWith("ca-app-pub-"))
|
||||
{
|
||||
Debug.LogError("[AppLovin MAX] Google App ID is not set. Please enter a valid app ID within the AppLovin Integration Manager window.");
|
||||
return;
|
||||
}
|
||||
|
||||
plist.root.SetString(googleApplicationIdentifier, appId);
|
||||
}
|
||||
#endif
|
||||
|
||||
private static void EnableConsentFlowIfNeeded(PlistDocument plist)
|
||||
private static void AddYandexSettingsIfNeeded(PBXProject project, string unityMainTargetGuid)
|
||||
{
|
||||
// Check if consent flow is enabled. No need to update info.plist if consent flow is disabled.
|
||||
if (!AppLovinIntegrationManager.IsAdapterInstalled("Yandex")) return;
|
||||
|
||||
if (MaxSdkUtils.CompareVersions(PlayerSettings.iOS.targetOSVersionString, "12.0") == MaxSdkUtils.VersionComparisonResult.Lesser)
|
||||
{
|
||||
Debug.LogWarning("Your iOS target version is under the minimum required version by Yandex. Please update it to 12.0 or newer in your ProjectSettings and rebuild your project.");
|
||||
return;
|
||||
}
|
||||
|
||||
project.SetBuildProperty(unityMainTargetGuid, "GENERATE_INFOPLIST_FILE", "NO");
|
||||
}
|
||||
|
||||
private static void AddSdkSettingsIfNeeded(PlistDocument infoPlist, string buildPath)
|
||||
{
|
||||
if (!AppLovinSettings.Instance.ShowInternalSettingsInIntegrationManager) return;
|
||||
|
||||
// Right now internal settings is only needed for Consent Flow. Remove this setting once we add more settings.
|
||||
if (!AppLovinInternalSettings.Instance.ConsentFlowEnabled) return;
|
||||
|
||||
var sdkSettingsPlistPath = Path.Combine(buildPath, AppLovinSettingsPlistFileName);
|
||||
var sdkSettingsPlist = new PlistDocument();
|
||||
if (File.Exists(sdkSettingsPlistPath))
|
||||
{
|
||||
sdkSettingsPlist.ReadFromFile(sdkSettingsPlistPath);
|
||||
}
|
||||
|
||||
EnableConsentFlowIfNeeded(sdkSettingsPlist, infoPlist);
|
||||
|
||||
sdkSettingsPlist.WriteToFile(sdkSettingsPlistPath);
|
||||
|
||||
var projectPath = PBXProject.GetPBXProjectPath(buildPath);
|
||||
var project = new PBXProject();
|
||||
project.ReadFromFile(projectPath);
|
||||
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
var unityMainTargetGuid = project.GetUnityMainTargetGuid();
|
||||
#else
|
||||
var unityMainTargetGuid = project.TargetGuidByName(UnityMainTargetName);
|
||||
#endif
|
||||
|
||||
var guid = project.AddFile(AppLovinSettingsPlistFileName, AppLovinSettingsPlistFileName, PBXSourceTree.Source);
|
||||
project.AddFileToBuild(unityMainTargetGuid, guid);
|
||||
project.WriteToFile(projectPath);
|
||||
}
|
||||
|
||||
private static void EnableConsentFlowIfNeeded(PlistDocument applovinSettingsPlist, PlistDocument infoPlist)
|
||||
{
|
||||
var consentFlowEnabled = AppLovinInternalSettings.Instance.ConsentFlowEnabled;
|
||||
var userTrackingUsageDescription = AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionEn;
|
||||
var privacyPolicyUrl = AppLovinInternalSettings.Instance.ConsentFlowPrivacyPolicyUrl;
|
||||
if (string.IsNullOrEmpty(userTrackingUsageDescription) || string.IsNullOrEmpty(privacyPolicyUrl))
|
||||
{
|
||||
AppLovinIntegrationManager.ShowBuildFailureDialog("You cannot use the AppLovin SDK's consent flow without defining a Privacy Policy URL and the `User Tracking Usage Description` in the AppLovin Integration Manager. \n\n" +
|
||||
"Both values must be included to enable the SDK's consent flow.");
|
||||
|
||||
// No need to update the info.plist here. Default consent flow state will be determined on the SDK side.
|
||||
return;
|
||||
}
|
||||
|
||||
var consentFlowInfoRoot = applovinSettingsPlist.root.CreateDict(KeyConsentFlowInfo);
|
||||
consentFlowInfoRoot.SetBoolean(KeyConsentFlowEnabled, consentFlowEnabled);
|
||||
consentFlowInfoRoot.SetString(KeyConsentFlowPrivacyPolicy, privacyPolicyUrl);
|
||||
|
||||
var termsOfServiceUrl = AppLovinInternalSettings.Instance.ConsentFlowTermsOfServiceUrl;
|
||||
if (!string.IsNullOrEmpty(termsOfServiceUrl))
|
||||
{
|
||||
consentFlowInfoRoot.SetString(KeyConsentFlowTermsOfService, termsOfServiceUrl);
|
||||
}
|
||||
|
||||
var advertisingPartnerUrls = AppLovinInternalSettings.Instance.ConsentFlowAdvertisingPartnerUrls;
|
||||
if (MaxSdkUtils.IsValidString(advertisingPartnerUrls))
|
||||
{
|
||||
var advertisingPartnerUrlsList = advertisingPartnerUrls.Split(',');
|
||||
var advertisingPartnersArray = consentFlowInfoRoot.CreateArray(KeyConsentFlowAdvertisingPartners);
|
||||
foreach (var advertisingPartner in advertisingPartnerUrlsList)
|
||||
{
|
||||
advertisingPartnersArray.AddString(advertisingPartner);
|
||||
}
|
||||
}
|
||||
|
||||
consentFlowInfoRoot.SetBoolean(KeyConsentFlowIncludeDefaultAdvertisingPartners, AppLovinInternalSettings.Instance.ConsentFlowIncludeDefaultAdvertisingPartnerUrls);
|
||||
|
||||
var analyticsPartnerUrls = AppLovinInternalSettings.Instance.ConsentFlowAnalyticsPartnerUrls;
|
||||
if (MaxSdkUtils.IsValidString(analyticsPartnerUrls))
|
||||
{
|
||||
var analyticsPartnerUrlsList = analyticsPartnerUrls.Split(',');
|
||||
var analyticsPartnersArray = consentFlowInfoRoot.CreateArray(KeyConsentFlowAnalyticsPartners);
|
||||
foreach (var analyticsPartnerUrl in analyticsPartnerUrlsList)
|
||||
{
|
||||
analyticsPartnersArray.AddString(analyticsPartnerUrl);
|
||||
}
|
||||
}
|
||||
|
||||
consentFlowInfoRoot.SetBoolean(KeyConsentFlowIncludeDefaultAnalyticsPartners, AppLovinInternalSettings.Instance.ConsentFlowIncludeDefaultAnalyticsPartnerUrls);
|
||||
|
||||
infoPlist.root.SetString("NSUserTrackingUsageDescription", userTrackingUsageDescription);
|
||||
}
|
||||
|
||||
private static void EnableTermsFlowIfNeeded(PlistDocument plist)
|
||||
{
|
||||
if (AppLovinSettings.Instance.ShowInternalSettingsInIntegrationManager) return;
|
||||
|
||||
// Check if terms flow is enabled. No need to update info.plist if consent flow is disabled.
|
||||
var consentFlowEnabled = AppLovinSettings.Instance.ConsentFlowEnabled;
|
||||
if (!consentFlowEnabled) return;
|
||||
|
||||
// Check if terms flow is enabled for this format.
|
||||
var consentFlowPlatform = AppLovinSettings.Instance.ConsentFlowPlatform;
|
||||
if (consentFlowPlatform != Platform.All && consentFlowPlatform != Platform.iOS) return;
|
||||
|
||||
var userTrackingUsageDescription = AppLovinSettings.Instance.UserTrackingUsageDescriptionEn;
|
||||
var privacyPolicyUrl = AppLovinSettings.Instance.ConsentFlowPrivacyPolicyUrl;
|
||||
if (string.IsNullOrEmpty(userTrackingUsageDescription) || string.IsNullOrEmpty(privacyPolicyUrl))
|
||||
@ -508,8 +640,8 @@ namespace AppLovinMax.Scripts.Editor
|
||||
}
|
||||
}
|
||||
|
||||
var unityWebRequest = UnityWebRequest.Get(uriBuilder.ToString());
|
||||
|
||||
using (var unityWebRequest = UnityWebRequest.Get(uriBuilder.ToString()))
|
||||
{
|
||||
#if UNITY_2017_2_OR_NEWER
|
||||
var operation = unityWebRequest.SendWebRequest();
|
||||
#else
|
||||
@ -518,7 +650,6 @@ namespace AppLovinMax.Scripts.Editor
|
||||
// Wait for the download to complete or the request to timeout.
|
||||
while (!operation.isDone) { }
|
||||
|
||||
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
if (unityWebRequest.result != UnityWebRequest.Result.Success)
|
||||
#elif UNITY_2017_2_OR_NEWER
|
||||
@ -541,76 +672,6 @@ namespace AppLovinMax.Scripts.Editor
|
||||
return new SkAdNetworkData();
|
||||
}
|
||||
}
|
||||
|
||||
private static void UpdateAppTransportSecuritySettingsIfNeeded(PlistDocument plist)
|
||||
{
|
||||
var mediationDir = PluginMediationDirectory;
|
||||
var projectHasAtsRequiringNetworks = AtsRequiringNetworks.Any(atsRequiringNetwork => Directory.Exists(Path.Combine(mediationDir, atsRequiringNetwork)));
|
||||
if (!projectHasAtsRequiringNetworks) return;
|
||||
|
||||
var root = plist.root.values;
|
||||
PlistElement atsRoot;
|
||||
root.TryGetValue("NSAppTransportSecurity", out atsRoot);
|
||||
|
||||
if (atsRoot == null || atsRoot.GetType() != typeof(PlistElementDict))
|
||||
{
|
||||
// Add the missing App Transport Security settings for publishers if needed.
|
||||
MaxSdkLogger.UserDebug("Adding App Transport Security settings...");
|
||||
atsRoot = plist.root.CreateDict("NSAppTransportSecurity");
|
||||
atsRoot.AsDict().SetBoolean("NSAllowsArbitraryLoads", true);
|
||||
}
|
||||
|
||||
var atsRootDict = atsRoot.AsDict().values;
|
||||
// Check if both NSAllowsArbitraryLoads and NSAllowsArbitraryLoadsInWebContent are present and remove NSAllowsArbitraryLoadsInWebContent if both are present.
|
||||
if (atsRootDict.ContainsKey("NSAllowsArbitraryLoads") && atsRootDict.ContainsKey("NSAllowsArbitraryLoadsInWebContent"))
|
||||
{
|
||||
MaxSdkLogger.UserDebug("Removing NSAllowsArbitraryLoadsInWebContent");
|
||||
atsRootDict.Remove("NSAllowsArbitraryLoadsInWebContent");
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddSnapAppStoreAppIdIfNeeded(PlistDocument plist)
|
||||
{
|
||||
var snapDependencyPath = Path.Combine(PluginMediationDirectory, "Snap/Editor/Dependencies.xml");
|
||||
if (!File.Exists(snapDependencyPath)) return;
|
||||
|
||||
// App Store App ID is only needed for iOS versions 2.0.0.0 or newer.
|
||||
var currentVersion = AppLovinIntegrationManager.GetCurrentVersions(snapDependencyPath);
|
||||
var iosVersionComparison = MaxSdkUtils.CompareVersions(currentVersion.Ios, AppLovinSettings.SnapAppStoreAppIdMinVersion);
|
||||
if (iosVersionComparison == MaxSdkUtils.VersionComparisonResult.Lesser) return;
|
||||
|
||||
if (AppLovinSettings.Instance.SnapAppStoreAppId <= 0)
|
||||
{
|
||||
MaxSdkLogger.UserError("Snap App Store App ID is not set. Please enter a valid App ID within the AppLovin Integration Manager window.");
|
||||
return;
|
||||
}
|
||||
|
||||
plist.root.SetInteger("SCAppStoreAppID", AppLovinSettings.Instance.SnapAppStoreAppId);
|
||||
}
|
||||
|
||||
private static bool ShouldAddSwiftSupportForFacebook()
|
||||
{
|
||||
var facebookDependencyPath = Path.Combine(PluginMediationDirectory, "Facebook/Editor/Dependencies.xml");
|
||||
if (!File.Exists(facebookDependencyPath)) return false;
|
||||
|
||||
var currentVersion = AppLovinIntegrationManager.GetCurrentVersions(facebookDependencyPath);
|
||||
var iosVersionComparison = MaxSdkUtils.CompareVersions(currentVersion.Ios, "6.9.0.0");
|
||||
return iosVersionComparison != MaxSdkUtils.VersionComparisonResult.Lesser;
|
||||
}
|
||||
|
||||
private static bool ShouldEmbedSnapSdk()
|
||||
{
|
||||
var snapDependencyPath = Path.Combine(PluginMediationDirectory, "Snap/Editor/Dependencies.xml");
|
||||
if (!File.Exists(snapDependencyPath)) return false;
|
||||
|
||||
// Return true for UNITY_2019_3_OR_NEWER because app will crash on launch unless embedded.
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
return true;
|
||||
#else
|
||||
var currentVersion = AppLovinIntegrationManager.GetCurrentVersions(snapDependencyPath);
|
||||
var iosVersionComparison = MaxSdkUtils.CompareVersions(currentVersion.Ios, "1.0.7.2");
|
||||
return iosVersionComparison != MaxSdkUtils.VersionComparisonResult.Lesser;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 29959b3cd36c484a9d57d6b7ca7f7bfa
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/Editor/MaxPostProcessBuildiOS.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\Editor\MaxPostProcessBuildiOS.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -3,9 +3,4 @@ guid: 691e0eb4b7a542dba2219d48c3254f1c
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/Editor/MaxSdk.Scripts.Editor.asmdef
|
||||
- al_max_export_path-MaxSdk\Scripts\Editor\MaxSdk.Scripts.Editor.asmdef
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
timeCreated: 1591749791
|
||||
|
||||
@ -3,7 +3,6 @@ guid: e01816bc45c944d03afb95d035caf0e1
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 0da229e279400497786c39933fe02e52
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -19,6 +19,9 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
public class AppLovinAutoUpdater
|
||||
{
|
||||
public const string KeyAutoUpdateEnabled = "com.applovin.auto_update_enabled";
|
||||
#if !UNITY_2018_2_OR_NEWER
|
||||
private const string KeyOldUnityVersionWarningShown = "com.applovin.old_unity_version_warning_shown";
|
||||
#endif
|
||||
private const string KeyLastUpdateCheckTime = "com.applovin.last_update_check_time_v2"; // Updated to v2 to force adapter version checks in plugin version 3.1.10.
|
||||
private static readonly DateTime EpochTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
private static readonly int SecondsInADay = (int) TimeSpan.FromDays(1).TotalSeconds;
|
||||
@ -61,6 +64,10 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
// Update last checked time.
|
||||
EditorPrefs.SetInt(KeyLastUpdateCheckTime, now);
|
||||
|
||||
#if !UNITY_2018_2_OR_NEWER
|
||||
ShowNotSupportingOldUnityVersionsIfNeeded();
|
||||
#endif
|
||||
|
||||
// Load the plugin data
|
||||
AppLovinEditorCoroutine.StartCoroutine(AppLovinIntegrationManager.Instance.LoadPluginData(data =>
|
||||
{
|
||||
@ -149,6 +156,27 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
AppLovinIntegrationManager.ShowBuildFailureDialog(message);
|
||||
}
|
||||
|
||||
#if !UNITY_2018_2_OR_NEWER
|
||||
private static void ShowNotSupportingOldUnityVersionsIfNeeded()
|
||||
{
|
||||
// Check if publisher has seen the warning before
|
||||
if (EditorPrefs.GetBool(KeyOldUnityVersionWarningShown, false)) return;
|
||||
|
||||
// Show a dialog if they haven't seen the warning yet.
|
||||
var option = EditorUtility.DisplayDialog(
|
||||
"WARNING: Old Unity Version Detected",
|
||||
"AppLovin MAX Unity plugin will soon require Unity 2018.2 or newer to function. Please upgrade to a newer Unity version.",
|
||||
"Ok",
|
||||
"Don't Ask Again"
|
||||
);
|
||||
|
||||
if (!option) // 'false' means `Don't Ask Again` was clicked.
|
||||
{
|
||||
EditorPrefs.SetBool(KeyOldUnityVersionWarningShown, true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private static bool GoogleNetworkAdaptersCompatible(string googleVersion, string googleAdManagerVersion, string breakingVersion)
|
||||
{
|
||||
var googleResult = MaxSdkUtils.CompareVersions(googleVersion, breakingVersion);
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 8bcdd5226273242c5bd9ec79568202e6
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinAutoUpdater.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinAutoUpdater.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 2d0aa55f9a7d2440f871dfb256372a33
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinCommandLine.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinCommandLine.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -3,7 +3,6 @@ guid: c85c3812a13e04838951767c1285e4da
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinDownloadHandler.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinDownloadHandler.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
|
||||
namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
@ -16,7 +17,15 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
/// </summary>
|
||||
public class AppLovinEditorCoroutine
|
||||
{
|
||||
private readonly IEnumerator enumerator;
|
||||
/// <summary>
|
||||
/// Keeps track of the coroutine currently running.
|
||||
/// </summary>
|
||||
private IEnumerator enumerator;
|
||||
|
||||
/// <summary>
|
||||
/// Keeps track of coroutines that have yielded to the current enumerator.
|
||||
/// </summary>
|
||||
private readonly List<IEnumerator> history = new List<IEnumerator>();
|
||||
|
||||
private AppLovinEditorCoroutine(IEnumerator enumerator)
|
||||
{
|
||||
@ -52,11 +61,31 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
|
||||
private void OnEditorUpdate()
|
||||
{
|
||||
// Coroutine has ended, stop updating.
|
||||
if (!enumerator.MoveNext())
|
||||
if (enumerator.MoveNext())
|
||||
{
|
||||
// If there is a coroutine to yield for inside the coroutine, add the initial one to history and continue the second one
|
||||
if (enumerator.Current is IEnumerator)
|
||||
{
|
||||
history.Add(enumerator);
|
||||
enumerator = (IEnumerator) enumerator.Current;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Current coroutine has ended, check if we have more coroutines in history to be run.
|
||||
if (history.Count == 0)
|
||||
{
|
||||
// No more coroutines to run, stop updating.
|
||||
Stop();
|
||||
}
|
||||
// Step out and finish the code in the coroutine that yielded to it
|
||||
else
|
||||
{
|
||||
var index = history.Count - 1;
|
||||
enumerator = history[index];
|
||||
history.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 95747c688378548eeb92aeb528ac96ff
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinEditorCoroutine.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinEditorCoroutine.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -121,8 +121,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
|
||||
public static readonly string GradleTemplatePath = Path.Combine("Assets/Plugins/Android", "mainTemplate.gradle");
|
||||
public static readonly string DefaultPluginExportPath = Path.Combine("Assets", "MaxSdk");
|
||||
private const string DefaultMaxSdkAssetExportPath = "MaxSdk/Scripts/MaxSdk.cs";
|
||||
private static readonly string MaxSdkAssetExportPath = Path.Combine("MaxSdk", "Scripts/MaxSdk.cs");
|
||||
private const string MaxSdkAssetExportPath = "MaxSdk/Scripts/MaxSdk.cs";
|
||||
|
||||
/// <summary>
|
||||
/// Some publishers might re-export our plugin via Unity Package Manager and the plugin will not be under the Assets folder. This means that the mediation adapters, settings files should not be moved to the packages folder,
|
||||
@ -164,16 +163,10 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
{
|
||||
// Search for the asset with the default exported path first, In most cases, we should be able to find the asset.
|
||||
// In some cases where we don't, use the platform specific export path to search for the asset (in case of migrating a project from Windows to Mac or vice versa).
|
||||
var maxSdkScriptAssetPath = MaxSdkUtils.GetAssetPathForExportPath(DefaultMaxSdkAssetExportPath);
|
||||
if (File.Exists(maxSdkScriptAssetPath))
|
||||
{
|
||||
// maxSdkScriptAssetPath will always have AltDirectorySeparatorChar (/) as the path separator. Convert to platform specific path.
|
||||
return maxSdkScriptAssetPath.Replace(DefaultMaxSdkAssetExportPath, "")
|
||||
.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
|
||||
}
|
||||
var maxSdkScriptAssetPath = MaxSdkUtils.GetAssetPathForExportPath(MaxSdkAssetExportPath);
|
||||
|
||||
// We should never reach this line but leaving this in out of paranoia.
|
||||
return MaxSdkUtils.GetAssetPathForExportPath(MaxSdkAssetExportPath).Replace(MaxSdkAssetExportPath, "")
|
||||
// maxSdkScriptAssetPath will always have AltDirectorySeparatorChar (/) as the path separator. Convert to platform specific path.
|
||||
return maxSdkScriptAssetPath.Replace(MaxSdkAssetExportPath, "")
|
||||
.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
|
||||
}
|
||||
}
|
||||
@ -287,8 +280,8 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
public IEnumerator LoadPluginData(Action<PluginData> callback)
|
||||
{
|
||||
var url = string.Format("https://dash.applovin.com/docs/v1/unity_integration_manager?plugin_version={0}", GetPluginVersionForUrl());
|
||||
var www = UnityWebRequest.Get(url);
|
||||
|
||||
using (var www = UnityWebRequest.Get(url))
|
||||
{
|
||||
#if UNITY_2017_2_OR_NEWER
|
||||
var operation = www.SendWebRequest();
|
||||
#else
|
||||
@ -337,6 +330,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
callback(pluginData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the CurrentVersion fields for a given network data object.
|
||||
@ -407,8 +401,9 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
/// Downloads the plugin file for a given network.
|
||||
/// </summary>
|
||||
/// <param name="network">Network for which to download the current version.</param>
|
||||
/// <param name="showImport">Whether or not to show the import window when downloading. Defaults to <c>true</c>.</param>
|
||||
/// <returns></returns>
|
||||
public IEnumerator DownloadPlugin(Network network)
|
||||
public IEnumerator DownloadPlugin(Network network, bool showImport = true)
|
||||
{
|
||||
var path = Path.Combine(Application.temporaryCachePath, GetPluginFileName(network)); // TODO: Maybe delete plugin file after finishing import.
|
||||
#if UNITY_2017_2_OR_NEWER
|
||||
@ -427,14 +422,12 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
#else
|
||||
var operation = webRequest.Send();
|
||||
#endif
|
||||
|
||||
while (!operation.isDone)
|
||||
{
|
||||
yield return new WaitForSeconds(0.1f); // Just wait till webRequest is completed. Our coroutine is pretty rudimentary.
|
||||
CallDownloadPluginProgressCallback(network.DisplayName, operation.progress, operation.isDone);
|
||||
}
|
||||
|
||||
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
if (webRequest.result != UnityWebRequest.Result.Success)
|
||||
#elif UNITY_2017_2_OR_NEWER
|
||||
@ -448,9 +441,10 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
else
|
||||
{
|
||||
importingNetwork = network;
|
||||
AssetDatabase.ImportPackage(path, true);
|
||||
AssetDatabase.ImportPackage(path, showImport);
|
||||
}
|
||||
|
||||
webRequest.Dispose();
|
||||
webRequest = null;
|
||||
}
|
||||
|
||||
@ -479,6 +473,25 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
MaxSdkLogger.UserError(message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether or not an adapter with the given version or newer exists.
|
||||
/// </summary>
|
||||
/// <param name="adapterName">The name of the network (the root adapter folder name in "MaxSdk/Mediation/" folder.</param>
|
||||
/// <param name="version">The min adapter version to check for. Can be <c>null</c> if we want to check for any version.</param>
|
||||
/// <returns><c>true</c> if an adapter with the min version is installed.</returns>
|
||||
public static bool IsAdapterInstalled(string adapterName, string version = null)
|
||||
{
|
||||
var dependencyFilePath = MaxSdkUtils.GetAssetPathForExportPath("MaxSdk/Mediation/" + adapterName + "/Editor/Dependencies.xml");
|
||||
if (!File.Exists(dependencyFilePath)) return false;
|
||||
|
||||
// If version is null, we just need the adapter installed. We don't have to check for a specific version.
|
||||
if (version == null) return true;
|
||||
|
||||
var currentVersion = AppLovinIntegrationManager.GetCurrentVersions(dependencyFilePath);
|
||||
var iosVersionComparison = MaxSdkUtils.CompareVersions(currentVersion.Ios, version);
|
||||
return iosVersionComparison != MaxSdkUtils.VersionComparisonResult.Lesser;
|
||||
}
|
||||
|
||||
#region Utility Methods
|
||||
|
||||
/// <summary>
|
||||
@ -640,7 +653,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
didAddLabels = true;
|
||||
}
|
||||
|
||||
var exportPathLabel = "al_max_export_path-" + assetPath.Replace(pluginParentDir, "");
|
||||
var exportPathLabel = "al_max_export_path-" + assetPath.Replace(pluginParentDir, "").Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
|
||||
if (!labels.Contains(exportPathLabel))
|
||||
{
|
||||
labelsToAdd.Add(exportPathLabel);
|
||||
|
||||
@ -3,7 +3,6 @@ guid: c5b874c1e65274159bcc0dc15d9458cc
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinIntegrationManager.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinIntegrationManager.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
@ -33,22 +34,24 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
private const string qualityServiceRequiresGradleBuildErrorMsg = "AppLovin Quality Service integration via AppLovin Integration Manager requires Custom Gradle Template enabled or Unity 2018.2 or higher.\n" +
|
||||
"If you would like to continue using your existing setup, please add Quality Service Plugin to your build.gradle manually.";
|
||||
|
||||
private readonly string[] termsFlowPlatforms = new string[3] {"Both", "Android", "iOS"};
|
||||
|
||||
private Vector2 scrollPosition;
|
||||
private static readonly Vector2 windowMinSize = new Vector2(750, 750);
|
||||
private const float actionFieldWidth = 60f;
|
||||
private const float upgradeAllButtonWidth = 80f;
|
||||
private const float networkFieldMinWidth = 100f;
|
||||
private const float versionFieldMinWidth = 190f;
|
||||
private const float privacySettingLabelWidth = 200f;
|
||||
private const float privacySettingLabelWidth = 250f;
|
||||
private const float networkFieldWidthPercentage = 0.22f;
|
||||
private const float versionFieldWidthPercentage = 0.36f; // There are two version fields. Each take 40% of the width, network field takes the remaining 20%.
|
||||
private static float previousWindowWidth = windowMinSize.x;
|
||||
private static GUILayoutOption networkWidthOption = GUILayout.Width(networkFieldMinWidth);
|
||||
private static GUILayoutOption versionWidthOption = GUILayout.Width(versionFieldMinWidth);
|
||||
|
||||
private static GUILayoutOption sdkKeyTextFieldWidthOption = GUILayout.Width(520);
|
||||
|
||||
private static GUILayoutOption privacySettingFieldWidthOption = GUILayout.Width(400);
|
||||
private static readonly GUILayoutOption fieldWidth = GUILayout.Width(actionFieldWidth);
|
||||
private static readonly GUILayoutOption upgradeAllButtonFieldWidth = GUILayout.Width(upgradeAllButtonWidth);
|
||||
|
||||
private static readonly Color darkModeTextColor = new Color(0.29f, 0.6f, 0.8f);
|
||||
|
||||
@ -62,8 +65,8 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
private PluginData pluginData;
|
||||
private bool pluginDataLoadFailed;
|
||||
private bool isPluginMoved;
|
||||
private bool shouldMarkNewLocalizations;
|
||||
private bool shouldShowGoogleWarning;
|
||||
private bool networkButtonsEnabled = true;
|
||||
|
||||
private AppLovinEditorCoroutine loadDataCoroutine;
|
||||
private Texture2D uninstallIcon;
|
||||
@ -138,24 +141,22 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
shouldMarkNewLocalizations = !EditorPrefs.GetBool(keyNewLocalizationsMarked, false);
|
||||
|
||||
AppLovinIntegrationManager.downloadPluginProgressCallback = OnDownloadPluginProgress;
|
||||
|
||||
// Plugin downloaded and imported. Update current versions for the imported package.
|
||||
AppLovinIntegrationManager.importPackageCompletedCallback = OnImportPackageCompleted;
|
||||
|
||||
// Disable old consent flow if internal settings are enabled.
|
||||
if (AppLovinSettings.Instance.ShowInternalSettingsInIntegrationManager)
|
||||
{
|
||||
AppLovinSettings.Instance.ConsentFlowEnabled = false;
|
||||
}
|
||||
|
||||
Load();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
// New localizations have been shown to the publisher, now remove them.
|
||||
if (shouldMarkNewLocalizations)
|
||||
{
|
||||
EditorPrefs.SetBool(keyNewLocalizationsMarked, true);
|
||||
}
|
||||
|
||||
if (loadDataCoroutine != null)
|
||||
{
|
||||
loadDataCoroutine.Stop();
|
||||
@ -190,11 +191,16 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
DrawPluginDetails();
|
||||
|
||||
// Draw mediated networks
|
||||
using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandHeight(false)))
|
||||
{
|
||||
EditorGUILayout.LabelField("Mediated Networks", titleLabelStyle);
|
||||
DrawUpgradeAllButton();
|
||||
}
|
||||
|
||||
DrawMediatedNetworks();
|
||||
|
||||
// Draw AppLovin Quality Service settings
|
||||
EditorGUILayout.LabelField("AppLovin Quality Service", titleLabelStyle);
|
||||
EditorGUILayout.LabelField("SDK Settings", titleLabelStyle);
|
||||
DrawQualityServiceSettings();
|
||||
|
||||
EditorGUILayout.LabelField("Privacy Settings", titleLabelStyle);
|
||||
@ -218,6 +224,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
if (GUI.changed)
|
||||
{
|
||||
AppLovinSettings.Instance.SaveAsync();
|
||||
AppLovinInternalSettings.Instance.Save();
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,6 +313,10 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
|
||||
GUILayout.Space(5);
|
||||
}
|
||||
|
||||
#if !UNITY_2018_2_OR_NEWER
|
||||
EditorGUILayout.HelpBox("AppLovin MAX Unity plugin will soon require Unity 2018.2 or newer to function. Please upgrade to a newer Unity version.", MessageType.Warning);
|
||||
#endif
|
||||
}
|
||||
|
||||
GUILayout.Space(5);
|
||||
@ -378,7 +389,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
DrawNetworkDetailRow(network);
|
||||
}
|
||||
|
||||
GUILayout.Space(5);
|
||||
GUILayout.Space(10);
|
||||
}
|
||||
}
|
||||
|
||||
@ -448,7 +459,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
GUILayout.Label(new GUIContent {image = warningIcon, tooltip = "You may see unexpected errors if you use different versions of the AdMob and Google Ad Manager adapter SDKs."}, iconStyle);
|
||||
}
|
||||
|
||||
GUI.enabled = isActionEnabled;
|
||||
GUI.enabled = networkButtonsEnabled && isActionEnabled;
|
||||
if (GUILayout.Button(new GUIContent(action), fieldWidth))
|
||||
{
|
||||
// Download the plugin.
|
||||
@ -458,7 +469,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
GUI.enabled = true;
|
||||
GUILayout.Space(2);
|
||||
|
||||
GUI.enabled = isInstalled;
|
||||
GUI.enabled = networkButtonsEnabled && isInstalled;
|
||||
if (GUILayout.Button(new GUIContent {image = uninstallIcon, tooltip = "Uninstall"}, iconStyle))
|
||||
{
|
||||
EditorUtility.DisplayProgressBar("Integration Manager", "Deleting " + network.Name + "...", 0.5f);
|
||||
@ -480,67 +491,59 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
}
|
||||
|
||||
if (isInstalled)
|
||||
{
|
||||
DrawGoogleAppIdTextBoxIfNeeded(network);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawGoogleAppIdTextBoxIfNeeded(Network network)
|
||||
{
|
||||
// Custom integration for AdMob where the user can enter the Android and iOS App IDs.
|
||||
if (network.Name.Equals("ADMOB_NETWORK"))
|
||||
{
|
||||
// Custom integration requires Google AdMob adapter version newer than android_19.0.1.0_ios_7.57.0.0.
|
||||
if (MaxSdkUtils.CompareUnityMediationVersions(network.CurrentVersions.Unity, "android_19.0.1.0_ios_7.57.0.0") == VersionComparisonResult.Greater)
|
||||
// Show only one set of text boxes if both ADMOB and GAM are installed
|
||||
if (AppLovinIntegrationManager.IsAdapterInstalled("GoogleAdManager")) return;
|
||||
|
||||
DrawGoogleAppIdTextBox();
|
||||
}
|
||||
|
||||
// Custom integration for GAM where the user can enter the Android and iOS App IDs.
|
||||
else if (network.Name.Equals("GOOGLE_AD_MANAGER_NETWORK"))
|
||||
{
|
||||
DrawGoogleAppIdTextBox();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the text box for GAM or ADMOB to input the App ID
|
||||
/// </summary>
|
||||
private void DrawGoogleAppIdTextBox()
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(20);
|
||||
using (new EditorGUILayout.VerticalScope("box"))
|
||||
{
|
||||
string requiredVersion;
|
||||
string warningMessage;
|
||||
if (isPluginMoved)
|
||||
{
|
||||
requiredVersion = "android_19.6.0.1_ios_7.69.0.0";
|
||||
warningMessage = "Looks like the MAX plugin has been moved to a different directory. This requires Google adapter version newer than " + requiredVersion + " for auto-export of AdMob App ID to work correctly.";
|
||||
}
|
||||
else
|
||||
{
|
||||
requiredVersion = "android_19.2.0.0_ios_7.61.0.0";
|
||||
warningMessage = "The current version of AppLovin MAX plugin requires Google adapter version newer than " + requiredVersion + " to enable auto-export of AdMob App ID.";
|
||||
}
|
||||
|
||||
GUILayout.Space(2);
|
||||
if (MaxSdkUtils.CompareUnityMediationVersions(network.CurrentVersions.Unity, requiredVersion) == VersionComparisonResult.Greater)
|
||||
{
|
||||
AppLovinSettings.Instance.AdMobAndroidAppId = DrawTextField("App ID (Android)", AppLovinSettings.Instance.AdMobAndroidAppId, networkWidthOption);
|
||||
AppLovinSettings.Instance.AdMobIosAppId = DrawTextField("App ID (iOS)", AppLovinSettings.Instance.AdMobIosAppId, networkWidthOption);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.HelpBox(warningMessage, MessageType.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
// Snap requires SCAppStoreAppID to be set starting adapter version 2.0.0.0 or newer. Show a text field for the publisher to input the App ID.
|
||||
else if (network.Name.Equals("SNAP_NETWORK") &&
|
||||
MaxSdkUtils.CompareVersions(network.CurrentVersions.Ios, AppLovinSettings.SnapAppStoreAppIdMinVersion) != VersionComparisonResult.Lesser)
|
||||
|
||||
/// <summary>
|
||||
/// Draws the upgrade all button
|
||||
/// </summary>
|
||||
private void DrawUpgradeAllButton()
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(20);
|
||||
using (new EditorGUILayout.VerticalScope("box"))
|
||||
GUI.enabled = NetworksRequireUpgrade();
|
||||
if (GUILayout.Button(new GUIContent("Upgrade All"), upgradeAllButtonFieldWidth))
|
||||
{
|
||||
GUILayout.Space(2);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
EditorGUILayout.LabelField(new GUIContent("App Store App ID (iOS)"), networkWidthOption);
|
||||
GUILayout.Space(4);
|
||||
AppLovinSettings.Instance.SnapAppStoreAppId = EditorGUILayout.IntField(AppLovinSettings.Instance.SnapAppStoreAppId);
|
||||
GUILayout.Space(4);
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.Space(2);
|
||||
AppLovinEditorCoroutine.StartCoroutine(UpgradeAllNetworks());
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
GUI.enabled = true;
|
||||
GUILayout.Space(10);
|
||||
}
|
||||
|
||||
private void DrawQualityServiceSettings()
|
||||
@ -550,15 +553,9 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
using (new EditorGUILayout.VerticalScope("box"))
|
||||
{
|
||||
GUILayout.Space(4);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
AppLovinSettings.Instance.QualityServiceEnabled = GUILayout.Toggle(AppLovinSettings.Instance.QualityServiceEnabled, " Enable MAX Ad Review");
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.Space(4);
|
||||
|
||||
if (!AppLovinIntegrationManager.CanProcessAndroidQualityServiceSettings)
|
||||
{
|
||||
GUILayout.Space(2);
|
||||
GUILayout.Space(4);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
EditorGUILayout.HelpBox(qualityServiceRequiresGradleBuildErrorMsg, MessageType.Warning);
|
||||
@ -568,8 +565,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
GUILayout.Space(4);
|
||||
}
|
||||
|
||||
GUI.enabled = AppLovinSettings.Instance.QualityServiceEnabled;
|
||||
AppLovinSettings.Instance.SdkKey = DrawTextField("AppLovin SDK Key", AppLovinSettings.Instance.SdkKey, networkWidthOption, sdkKeyTextFieldWidthOption);
|
||||
AppLovinSettings.Instance.SdkKey = DrawTextField("AppLovin SDK Key", AppLovinSettings.Instance.SdkKey, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
GUILayout.Button("You can find your SDK key here: ", wrapTextLabelStyle, GUILayout.Width(185)); // Setting a fixed width since Unity adds arbitrary padding at the end leaving a space between link and text.
|
||||
@ -580,7 +576,13 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
GUI.enabled = true;
|
||||
|
||||
GUILayout.Space(4);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
AppLovinSettings.Instance.QualityServiceEnabled = GUILayout.Toggle(AppLovinSettings.Instance.QualityServiceEnabled, " Enable MAX Ad Review");
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.Space(4);
|
||||
|
||||
GUILayout.Space(4);
|
||||
}
|
||||
@ -589,13 +591,28 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
private string DrawTextField(string fieldTitle, string text, GUILayoutOption labelWidth, GUILayoutOption textFieldWidthOption = null)
|
||||
private string DrawTextField(string fieldTitle, string text, GUILayoutOption labelWidth, GUILayoutOption textFieldWidthOption = null, bool isTextFieldEditable = true)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
EditorGUILayout.LabelField(new GUIContent(fieldTitle), labelWidth);
|
||||
GUILayout.Space(4);
|
||||
if (isTextFieldEditable)
|
||||
{
|
||||
text = (textFieldWidthOption == null) ? GUILayout.TextField(text) : GUILayout.TextField(text, textFieldWidthOption);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (textFieldWidthOption == null)
|
||||
{
|
||||
GUILayout.Label(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
GUILayout.Label(text, textFieldWidthOption);
|
||||
}
|
||||
}
|
||||
|
||||
GUILayout.Space(4);
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.Space(4);
|
||||
@ -609,29 +626,46 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
GUILayout.Space(10);
|
||||
using (new EditorGUILayout.VerticalScope("box"))
|
||||
{
|
||||
GUILayout.Space(4);
|
||||
var shouldDrawInternalSettings = AppLovinSettings.Instance.ShowInternalSettingsInIntegrationManager;
|
||||
if (shouldDrawInternalSettings)
|
||||
{
|
||||
DrawConsentFlowSettings();
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawTermsFlowSettings();
|
||||
}
|
||||
}
|
||||
|
||||
GUILayout.Space(5);
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
private void DrawTermsFlowSettings()
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
AppLovinSettings.Instance.ConsentFlowEnabled = GUILayout.Toggle(AppLovinSettings.Instance.ConsentFlowEnabled, " Enable Consent Flow (iOS Only)");
|
||||
AppLovinSettings.Instance.ConsentFlowEnabled = GUILayout.Toggle(AppLovinSettings.Instance.ConsentFlowEnabled, " Enable Terms Flow");
|
||||
GUILayout.FlexibleSpace();
|
||||
GUI.enabled = AppLovinSettings.Instance.ConsentFlowEnabled;
|
||||
AppLovinSettings.Instance.ConsentFlowPlatform = (Platform) EditorGUILayout.Popup((int) AppLovinSettings.Instance.ConsentFlowPlatform, termsFlowPlatforms);
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.Space(4);
|
||||
|
||||
GUI.enabled = AppLovinSettings.Instance.ConsentFlowEnabled;
|
||||
|
||||
AppLovinSettings.Instance.ConsentFlowPrivacyPolicyUrl = DrawTextField("Privacy Policy URL", AppLovinSettings.Instance.ConsentFlowPrivacyPolicyUrl, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
AppLovinSettings.Instance.ConsentFlowTermsOfServiceUrl = DrawTextField("Terms of Service URL (optional)", AppLovinSettings.Instance.ConsentFlowTermsOfServiceUrl, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
AppLovinSettings.Instance.UserTrackingUsageDescriptionEn = DrawTextField("User Tracking Usage Description", AppLovinSettings.Instance.UserTrackingUsageDescriptionEn, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
AppLovinSettings.Instance.UserTrackingUsageDescriptionEn = DrawTextField("User Tracking Usage Description (iOS only)", AppLovinSettings.Instance.UserTrackingUsageDescriptionEn, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
AppLovinSettings.Instance.UserTrackingUsageLocalizationEnabled = GUILayout.Toggle(AppLovinSettings.Instance.UserTrackingUsageLocalizationEnabled, " Localize User Tracking Usage Description");
|
||||
AppLovinSettings.Instance.UserTrackingUsageLocalizationEnabled = GUILayout.Toggle(AppLovinSettings.Instance.UserTrackingUsageLocalizationEnabled, " Localize User Tracking Usage Description (iOS only)");
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.Space(4);
|
||||
|
||||
if (AppLovinSettings.Instance.UserTrackingUsageLocalizationEnabled)
|
||||
{
|
||||
AppLovinSettings.Instance.UserTrackingUsageDescriptionZhHans = DrawTextField("Chinese, Simplified (zh-Hans)", AppLovinSettings.Instance.UserTrackingUsageDescriptionZhHans, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
AppLovinSettings.Instance.UserTrackingUsageDescriptionZhHant = DrawTextField("Chinese, Traditional (zh-Hant)" + (shouldMarkNewLocalizations ? " *" : ""), AppLovinSettings.Instance.UserTrackingUsageDescriptionZhHant, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption); // TODO: Remove new mark for next release.
|
||||
AppLovinSettings.Instance.UserTrackingUsageDescriptionZhHant = DrawTextField("Chinese, Traditional (zh-Hant)", AppLovinSettings.Instance.UserTrackingUsageDescriptionZhHant, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption); // TODO: Remove new mark for next release.
|
||||
AppLovinSettings.Instance.UserTrackingUsageDescriptionFr = DrawTextField("French (fr)", AppLovinSettings.Instance.UserTrackingUsageDescriptionFr, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
AppLovinSettings.Instance.UserTrackingUsageDescriptionDe = DrawTextField("German (de)", AppLovinSettings.Instance.UserTrackingUsageDescriptionDe, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
AppLovinSettings.Instance.UserTrackingUsageDescriptionJa = DrawTextField("Japanese (ja)", AppLovinSettings.Instance.UserTrackingUsageDescriptionJa, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
@ -641,7 +675,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
GUILayout.Space(4);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
EditorGUILayout.HelpBox((shouldMarkNewLocalizations ? "* " : "") + "MAX may add more localized strings to this list in the future, which will set the default value of the User Tracking Usage Description string for more locales. If you are overriding these with your own custom translations, you may want to review this list whenever you upgrade the plugin to see if there are new entries you may want to customize.", MessageType.Info);
|
||||
EditorGUILayout.HelpBox("MAX may add more localized strings to this list in the future, which will set the default value of the User Tracking Usage Description string for more locales. If you are overriding these with your own custom translations, you may want to review this list whenever you upgrade the plugin to see if there are new entries you may want to customize.", MessageType.Info);
|
||||
GUILayout.Space(4);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
@ -673,8 +707,100 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
GUILayout.Space(4);
|
||||
}
|
||||
|
||||
GUILayout.Space(5);
|
||||
private void DrawConsentFlowSettings()
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
AppLovinInternalSettings.Instance.ConsentFlowEnabled = GUILayout.Toggle(AppLovinInternalSettings.Instance.ConsentFlowEnabled, " Enable Consent Flow");
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.Space(4);
|
||||
GUI.enabled = true;
|
||||
|
||||
if (!AppLovinInternalSettings.Instance.ConsentFlowEnabled) return;
|
||||
|
||||
AppLovinInternalSettings.Instance.ConsentFlowPrivacyPolicyUrl = DrawTextField("Privacy Policy URL", AppLovinInternalSettings.Instance.ConsentFlowPrivacyPolicyUrl, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
AppLovinInternalSettings.Instance.ConsentFlowTermsOfServiceUrl = DrawTextField("Terms of Service URL (optional)", AppLovinInternalSettings.Instance.ConsentFlowTermsOfServiceUrl, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
|
||||
GUILayout.Space(4);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
AppLovinInternalSettings.Instance.ConsentFlowIncludeDefaultAdvertisingPartnerUrls = GUILayout.Toggle(AppLovinInternalSettings.Instance.ConsentFlowIncludeDefaultAdvertisingPartnerUrls, " Include Default Advertising Partner URLs");
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.Space(4);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
AppLovinInternalSettings.Instance.ConsentFlowAdvertisingPartnerUrls = DrawTextField("Advertising Partner URLs (CSV)", AppLovinInternalSettings.Instance.ConsentFlowAdvertisingPartnerUrls, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.Space(4);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
AppLovinInternalSettings.Instance.ConsentFlowIncludeDefaultAnalyticsPartnerUrls = GUILayout.Toggle(AppLovinInternalSettings.Instance.ConsentFlowIncludeDefaultAnalyticsPartnerUrls, " Include Default Analytics Partner URLs");
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.Space(4);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
AppLovinInternalSettings.Instance.ConsentFlowAnalyticsPartnerUrls = DrawTextField("Analytics Partner URLs (CSV)", AppLovinInternalSettings.Instance.ConsentFlowAnalyticsPartnerUrls, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption);
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.Space(4);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
EditorGUILayout.LabelField("iOS specific settings:", headerLabelStyle);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
var isEditableTextField = AppLovinInternalSettings.Instance.OverrideDefaultUserTrackingUsageDescriptions;
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
AppLovinInternalSettings.Instance.OverrideDefaultUserTrackingUsageDescriptions = GUILayout.Toggle(AppLovinInternalSettings.Instance.OverrideDefaultUserTrackingUsageDescriptions, " Override Default User Tracking Usage Description");
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.Space(4);
|
||||
|
||||
GUILayout.Space(4);
|
||||
AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionEn = DrawTextField("User Tracking Usage Description", AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionEn, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption, isEditableTextField);
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
AppLovinInternalSettings.Instance.UserTrackingUsageLocalizationEnabled = GUILayout.Toggle(AppLovinInternalSettings.Instance.UserTrackingUsageLocalizationEnabled, " Localize User Tracking Usage Description");
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.Space(4);
|
||||
|
||||
if (AppLovinInternalSettings.Instance.UserTrackingUsageLocalizationEnabled)
|
||||
{
|
||||
AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionZhHans = DrawTextField("Chinese, Simplified (zh-Hans)", AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionZhHans, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption, isEditableTextField);
|
||||
AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionZhHant = DrawTextField("Chinese, Traditional (zh-Hant)", AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionZhHant, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption, isEditableTextField);
|
||||
AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionFr = DrawTextField("French (fr)", AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionFr, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption, isEditableTextField);
|
||||
AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionDe = DrawTextField("German (de)", AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionDe, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption, isEditableTextField);
|
||||
AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionJa = DrawTextField("Japanese (ja)", AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionJa, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption, isEditableTextField);
|
||||
AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionKo = DrawTextField("Korean (ko)", AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionKo, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption, isEditableTextField);
|
||||
AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionEs = DrawTextField("Spanish (es)", AppLovinInternalSettings.Instance.UserTrackingUsageDescriptionEs, GUILayout.Width(privacySettingLabelWidth), privacySettingFieldWidthOption, isEditableTextField);
|
||||
|
||||
GUILayout.Space(4);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
EditorGUILayout.HelpBox("If you have your own implementation of InfoPlist.strings localization implementation, please use that instead. Using both at the same time may cause conflicts.", MessageType.Info);
|
||||
GUILayout.Space(4);
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
GUILayout.Space(4);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
GUILayout.Button("Click the link below for more information about User Tracking Usage Description: ", wrapTextLabelStyle);
|
||||
GUILayout.Space(4);
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(4);
|
||||
if (GUILayout.Button(new GUIContent(userTrackingUsageDescriptionDocsLink), linkLabelStyle))
|
||||
{
|
||||
Application.OpenURL(userTrackingUsageDescriptionDocsLink);
|
||||
}
|
||||
|
||||
GUILayout.Space(4);
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.Space(4);
|
||||
}
|
||||
|
||||
private void DrawOtherSettings()
|
||||
@ -761,9 +887,6 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
versionWidthOption = GUILayout.Width(versionLabelWidth);
|
||||
|
||||
const int textFieldOtherUiElementsWidth = 45; // NOTE: Magic number alert. This is the sum of all the spacing the fields and other UI elements.
|
||||
var availableTextFieldWidth = currentWidth - networkLabelWidth - textFieldOtherUiElementsWidth;
|
||||
sdkKeyTextFieldWidthOption = GUILayout.Width(availableTextFieldWidth);
|
||||
|
||||
var availableUserDescriptionTextFieldWidth = currentWidth - privacySettingLabelWidth - textFieldOtherUiElementsWidth;
|
||||
privacySettingFieldWidthOption = GUILayout.Width(availableUserDescriptionTextFieldWidth);
|
||||
}
|
||||
@ -849,6 +972,42 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Upgrades all outdated networks
|
||||
/// </summary>
|
||||
private IEnumerator UpgradeAllNetworks()
|
||||
{
|
||||
networkButtonsEnabled = false;
|
||||
EditorApplication.LockReloadAssemblies();
|
||||
var networks = pluginData.MediatedNetworks;
|
||||
foreach (var network in networks)
|
||||
{
|
||||
var comparison = network.CurrentToLatestVersionComparisonResult;
|
||||
// A newer version is available
|
||||
if (!string.IsNullOrEmpty(network.CurrentVersions.Unity) && comparison == VersionComparisonResult.Lesser)
|
||||
{
|
||||
yield return AppLovinIntegrationManager.Instance.DownloadPlugin(network, false);
|
||||
}
|
||||
}
|
||||
|
||||
EditorApplication.UnlockReloadAssemblies();
|
||||
networkButtonsEnabled = true;
|
||||
|
||||
// The pluginData becomes stale after the networks have been updated, and we should re-load it.
|
||||
Load();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether any network adapter needs to be upgraded
|
||||
/// </summary>
|
||||
private bool NetworksRequireUpgrade()
|
||||
{
|
||||
if (pluginData == null || pluginData.AppLovinMax.CurrentVersions == null) return false;
|
||||
|
||||
var networks = pluginData.MediatedNetworks;
|
||||
return networks.Any(network => !string.IsNullOrEmpty(network.CurrentVersions.Unity) && network.CurrentToLatestVersionComparisonResult == VersionComparisonResult.Lesser);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 84c61b4c05e114cec91df447d1b585f8
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinIntegrationManagerWindow.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinIntegrationManagerWindow.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
329
Assets/ThirdParty/MaxSdk/Scripts/IntegrationManager/Editor/AppLovinInternalSettings.cs
vendored
Normal file
329
Assets/ThirdParty/MaxSdk/Scripts/IntegrationManager/Editor/AppLovinInternalSettings.cs
vendored
Normal file
@ -0,0 +1,329 @@
|
||||
//
|
||||
// AppLovinInternalSettigns.cs
|
||||
// AppLovin User Engagement Unity Plugin
|
||||
//
|
||||
// Created by Santosh Bagadi on 9/15/22.
|
||||
// Copyright © 2022 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="ScriptableObject"/> representing the AppLovin internal settings that can be set in the Integration Manager Window.
|
||||
///
|
||||
/// The scriptable object asset is saved under ProjectSettings as <c>AppLovinInternalSettings.json</c>.
|
||||
/// </summary>
|
||||
public class AppLovinInternalSettings : ScriptableObject
|
||||
{
|
||||
private static AppLovinInternalSettings instance;
|
||||
|
||||
public const string DefaultUserTrackingDescriptionEn = "This uses device info for more personalized ads and content";
|
||||
public const string DefaultUserTrackingDescriptionDe = "Dies benutzt Gerätinformationen für relevantere Werbeinhalte";
|
||||
public const string DefaultUserTrackingDescriptionEs = "Esto utiliza la información del dispositivo para anuncios y contenido más personalizados";
|
||||
public const string DefaultUserTrackingDescriptionFr = "Cela permet d'utiliser les informations du téléphone pour afficher des contenus publicitaires plus pertinents.";
|
||||
public const string DefaultUserTrackingDescriptionJa = "これはユーザーデータをもとに、より関連性の高い広告コンテンツをお客様に提供します";
|
||||
public const string DefaultUserTrackingDescriptionKo = "보다 개인화된 광고 및 콘텐츠를 위해 기기 정보를 사용합니다.";
|
||||
public const string DefaultUserTrackingDescriptionZhHans = "我们使用设备信息来提供个性化的广告和内容。";
|
||||
public const string DefaultUserTrackingDescriptionZhHant = "我們使用設備信息來提供個性化的廣告和內容。";
|
||||
|
||||
[SerializeField] private bool consentFlowEnabled;
|
||||
[SerializeField] private string consentFlowPrivacyPolicyUrl = string.Empty;
|
||||
[SerializeField] private string consentFlowTermsOfServiceUrl = string.Empty;
|
||||
[SerializeField] private string consentFlowAdvertisingPartnerUrls = string.Empty;
|
||||
[SerializeField] private bool includeDefaultAdvertisingPartnerUrls = true;
|
||||
[SerializeField] private string consentFlowAnalyticsPartnerUrls = string.Empty;
|
||||
[SerializeField] private bool consentFlowIncludeDefaultAnalyticsPartnerUrls = true;
|
||||
[SerializeField] private bool overrideDefaultUserTrackingUsageDescriptions;
|
||||
[SerializeField] private string userTrackingUsageDescriptionEn = string.Empty;
|
||||
[SerializeField] private bool userTrackingUsageLocalizationEnabled;
|
||||
[SerializeField] private string userTrackingUsageDescriptionDe = string.Empty;
|
||||
[SerializeField] private string userTrackingUsageDescriptionEs = string.Empty;
|
||||
[SerializeField] private string userTrackingUsageDescriptionFr = string.Empty;
|
||||
[SerializeField] private string userTrackingUsageDescriptionJa = string.Empty;
|
||||
[SerializeField] private string userTrackingUsageDescriptionKo = string.Empty;
|
||||
[SerializeField] private string userTrackingUsageDescriptionZhHans = string.Empty;
|
||||
[SerializeField] private string userTrackingUsageDescriptionZhHant = string.Empty;
|
||||
|
||||
private const string SettingsFilePath = "ProjectSettings/AppLovinInternalSettings.json";
|
||||
|
||||
public static AppLovinInternalSettings Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (instance != null) return instance;
|
||||
|
||||
instance = CreateInstance<AppLovinInternalSettings>();
|
||||
|
||||
var projectRootPath = Path.GetDirectoryName(Application.dataPath);
|
||||
var settingsFilePath = Path.Combine(projectRootPath, SettingsFilePath);
|
||||
if (!File.Exists(settingsFilePath))
|
||||
{
|
||||
instance.Save();
|
||||
return instance;
|
||||
}
|
||||
|
||||
var settingsJson = File.ReadAllText(settingsFilePath);
|
||||
if (string.IsNullOrEmpty(settingsJson))
|
||||
{
|
||||
instance.Save();
|
||||
return instance;
|
||||
}
|
||||
|
||||
JsonUtility.FromJsonOverwrite(settingsJson, instance);
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
var settingsJson = JsonUtility.ToJson(instance);
|
||||
try
|
||||
{
|
||||
var projectRootPath = Path.GetDirectoryName(Application.dataPath);
|
||||
var settingsFilePath = Path.Combine(projectRootPath, SettingsFilePath);
|
||||
File.WriteAllText(settingsFilePath, settingsJson);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
MaxSdkLogger.UserError("Failed to save internal settings.");
|
||||
Console.WriteLine(exception);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not AppLovin Consent Flow is enabled.
|
||||
/// </summary>
|
||||
public bool ConsentFlowEnabled
|
||||
{
|
||||
get { return consentFlowEnabled; }
|
||||
set
|
||||
{
|
||||
var previousValue = consentFlowEnabled;
|
||||
consentFlowEnabled = value;
|
||||
|
||||
if (value)
|
||||
{
|
||||
// If the value didn't change, we don't need to update anything.
|
||||
if (previousValue) return;
|
||||
|
||||
UserTrackingUsageDescriptionEn = DefaultUserTrackingDescriptionEn;
|
||||
UserTrackingUsageLocalizationEnabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ConsentFlowPrivacyPolicyUrl = string.Empty;
|
||||
ConsentFlowTermsOfServiceUrl = string.Empty;
|
||||
UserTrackingUsageDescriptionEn = string.Empty;
|
||||
UserTrackingUsageLocalizationEnabled = false;
|
||||
OverrideDefaultUserTrackingUsageDescriptions = false;
|
||||
ConsentFlowIncludeDefaultAdvertisingPartnerUrls = true;
|
||||
ConsentFlowIncludeDefaultAnalyticsPartnerUrls = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A URL pointing to the Privacy Policy for the app to be shown when prompting the user for consent.
|
||||
/// </summary>
|
||||
public string ConsentFlowPrivacyPolicyUrl
|
||||
{
|
||||
get { return consentFlowPrivacyPolicyUrl; }
|
||||
set { consentFlowPrivacyPolicyUrl = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An optional URL pointing to the Terms of Service for the app to be shown when prompting the user for consent.
|
||||
/// </summary>
|
||||
public string ConsentFlowTermsOfServiceUrl
|
||||
{
|
||||
get { return consentFlowTermsOfServiceUrl; }
|
||||
set { consentFlowTermsOfServiceUrl = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An array of advertising partner URLs. These URLs list are shown during the GDPR flow.
|
||||
/// </summary>
|
||||
public string ConsentFlowAdvertisingPartnerUrls
|
||||
{
|
||||
get { return consentFlowAdvertisingPartnerUrls; }
|
||||
set { consentFlowAdvertisingPartnerUrls = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not to include a default set of advertising partners. Defaults to <c>true</c>.
|
||||
/// </summary>
|
||||
public bool ConsentFlowIncludeDefaultAdvertisingPartnerUrls
|
||||
{
|
||||
get { return includeDefaultAdvertisingPartnerUrls; }
|
||||
set { includeDefaultAdvertisingPartnerUrls = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An array of analytics partner URLs. These URLs list are shown during the GDPR flow.
|
||||
/// </summary>
|
||||
public string ConsentFlowAnalyticsPartnerUrls
|
||||
{
|
||||
get { return consentFlowAnalyticsPartnerUrls; }
|
||||
set { consentFlowAnalyticsPartnerUrls = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not to include a default set of analytics partners. Defaults to <c>true</c>.
|
||||
/// </summary>
|
||||
public bool ConsentFlowIncludeDefaultAnalyticsPartnerUrls
|
||||
{
|
||||
get { return consentFlowIncludeDefaultAnalyticsPartnerUrls; }
|
||||
set { consentFlowIncludeDefaultAnalyticsPartnerUrls = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A User Tracking Usage Description in English to be shown to users when requesting permission to use data for tracking.
|
||||
/// For more information see <see cref="https://developer.apple.com/documentation/bundleresources/information_property_list/nsusertrackingusagedescription">Apple's documentation</see>.
|
||||
/// </summary>
|
||||
public string UserTrackingUsageDescriptionEn
|
||||
{
|
||||
get { return userTrackingUsageDescriptionEn; }
|
||||
set { userTrackingUsageDescriptionEn = value; }
|
||||
}
|
||||
|
||||
public bool OverrideDefaultUserTrackingUsageDescriptions
|
||||
{
|
||||
get { return overrideDefaultUserTrackingUsageDescriptions; }
|
||||
set
|
||||
{
|
||||
var previousValue = overrideDefaultUserTrackingUsageDescriptions;
|
||||
overrideDefaultUserTrackingUsageDescriptions = value;
|
||||
|
||||
if (!value)
|
||||
{
|
||||
if (!previousValue) return;
|
||||
|
||||
UserTrackingUsageDescriptionEn = DefaultUserTrackingDescriptionEn;
|
||||
UserTrackingUsageDescriptionDe = DefaultUserTrackingDescriptionDe;
|
||||
UserTrackingUsageDescriptionEs = DefaultUserTrackingDescriptionEs;
|
||||
UserTrackingUsageDescriptionFr = DefaultUserTrackingDescriptionFr;
|
||||
UserTrackingUsageDescriptionJa = DefaultUserTrackingDescriptionJa;
|
||||
UserTrackingUsageDescriptionKo = DefaultUserTrackingDescriptionKo;
|
||||
UserTrackingUsageDescriptionZhHans = DefaultUserTrackingDescriptionZhHans;
|
||||
UserTrackingUsageDescriptionZhHant = DefaultUserTrackingDescriptionZhHant;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not to localize User Tracking Usage Description.
|
||||
/// For more information see <see cref="https://developer.apple.com/documentation/bundleresources/information_property_list/nsusertrackingusagedescription">Apple's documentation</see>.
|
||||
/// </summary>
|
||||
public bool UserTrackingUsageLocalizationEnabled
|
||||
{
|
||||
get { return userTrackingUsageLocalizationEnabled; }
|
||||
set
|
||||
{
|
||||
var previousValue = userTrackingUsageLocalizationEnabled;
|
||||
userTrackingUsageLocalizationEnabled = value;
|
||||
|
||||
if (value)
|
||||
{
|
||||
// If the value didn't change, don't do anything
|
||||
if (previousValue) return;
|
||||
|
||||
// Don't set the default values if they are being overriden.
|
||||
if (OverrideDefaultUserTrackingUsageDescriptions) return;
|
||||
|
||||
UserTrackingUsageDescriptionDe = DefaultUserTrackingDescriptionDe;
|
||||
UserTrackingUsageDescriptionEs = DefaultUserTrackingDescriptionEs;
|
||||
UserTrackingUsageDescriptionFr = DefaultUserTrackingDescriptionFr;
|
||||
UserTrackingUsageDescriptionJa = DefaultUserTrackingDescriptionJa;
|
||||
UserTrackingUsageDescriptionKo = DefaultUserTrackingDescriptionKo;
|
||||
UserTrackingUsageDescriptionZhHans = DefaultUserTrackingDescriptionZhHans;
|
||||
UserTrackingUsageDescriptionZhHant = DefaultUserTrackingDescriptionZhHant;
|
||||
}
|
||||
else
|
||||
{
|
||||
UserTrackingUsageDescriptionDe = string.Empty;
|
||||
UserTrackingUsageDescriptionEs = string.Empty;
|
||||
UserTrackingUsageDescriptionFr = string.Empty;
|
||||
UserTrackingUsageDescriptionJa = string.Empty;
|
||||
UserTrackingUsageDescriptionKo = string.Empty;
|
||||
UserTrackingUsageDescriptionZhHans = string.Empty;
|
||||
UserTrackingUsageDescriptionZhHant = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A User Tracking Usage Description in German to be shown to users when requesting permission to use data for tracking.
|
||||
/// For more information see <see cref="https://developer.apple.com/documentation/bundleresources/information_property_list/nsusertrackingusagedescription">Apple's documentation</see>.
|
||||
/// </summary>
|
||||
public string UserTrackingUsageDescriptionDe
|
||||
{
|
||||
get { return userTrackingUsageDescriptionDe; }
|
||||
set { userTrackingUsageDescriptionDe = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A User Tracking Usage Description in Spanish to be shown to users when requesting permission to use data for tracking.
|
||||
/// For more information see <see cref="https://developer.apple.com/documentation/bundleresources/information_property_list/nsusertrackingusagedescription">Apple's documentation</see>.
|
||||
/// </summary>
|
||||
public string UserTrackingUsageDescriptionEs
|
||||
{
|
||||
get { return userTrackingUsageDescriptionEs; }
|
||||
set { userTrackingUsageDescriptionEs = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A User Tracking Usage Description in French to be shown to users when requesting permission to use data for tracking.
|
||||
/// For more information see <see cref="https://developer.apple.com/documentation/bundleresources/information_property_list/nsusertrackingusagedescription">Apple's documentation</see>.
|
||||
/// </summary>
|
||||
public string UserTrackingUsageDescriptionFr
|
||||
{
|
||||
get { return userTrackingUsageDescriptionFr; }
|
||||
set { userTrackingUsageDescriptionFr = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A User Tracking Usage Description in Japanese to be shown to users when requesting permission to use data for tracking.
|
||||
/// For more information see <see cref="https://developer.apple.com/documentation/bundleresources/information_property_list/nsusertrackingusagedescription">Apple's documentation</see>.
|
||||
/// </summary>
|
||||
public string UserTrackingUsageDescriptionJa
|
||||
{
|
||||
get { return userTrackingUsageDescriptionJa; }
|
||||
set { userTrackingUsageDescriptionJa = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A User Tracking Usage Description in Korean to be shown to users when requesting permission to use data for tracking.
|
||||
/// For more information see <see cref="https://developer.apple.com/documentation/bundleresources/information_property_list/nsusertrackingusagedescription">Apple's documentation</see>.
|
||||
/// </summary>
|
||||
public string UserTrackingUsageDescriptionKo
|
||||
{
|
||||
get { return userTrackingUsageDescriptionKo; }
|
||||
set { userTrackingUsageDescriptionKo = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A User Tracking Usage Description in Chinese (Simplified) to be shown to users when requesting permission to use data for tracking.
|
||||
/// For more information see <see cref="https://developer.apple.com/documentation/bundleresources/information_property_list/nsusertrackingusagedescription">Apple's documentation</see>.
|
||||
/// </summary>
|
||||
public string UserTrackingUsageDescriptionZhHans
|
||||
{
|
||||
get { return userTrackingUsageDescriptionZhHans; }
|
||||
set { userTrackingUsageDescriptionZhHans = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A User Tracking Usage Description in Chinese (Traditional) to be shown to users when requesting permission to use data for tracking.
|
||||
/// For more information see <see cref="https://developer.apple.com/documentation/bundleresources/information_property_list/nsusertrackingusagedescription">Apple's documentation</see>.
|
||||
/// </summary>
|
||||
public string UserTrackingUsageDescriptionZhHant
|
||||
{
|
||||
get { return userTrackingUsageDescriptionZhHant; }
|
||||
set { userTrackingUsageDescriptionZhHant = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfbc947903224d09a77085f74b86a409
|
||||
guid: 65c51e21887ae42c2839962fb9585e9f
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Google/Editor/PreProcessor.cs
|
||||
- al_max_export_path-MaxSdk\Mediation\Google\Editor\PreProcessor.cs
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinInternalSettings.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@ -3,7 +3,6 @@ guid: 02c2d277874f649d18a59d382420bf65
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinMenuItems.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinMenuItems.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -21,12 +21,21 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
{
|
||||
public void OnPostGenerateGradleAndroidProject(string path)
|
||||
{
|
||||
if (!AppLovinSettings.Instance.QualityServiceEnabled) return;
|
||||
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
// On Unity 2019.3+, the path returned is the path to the unityLibrary's module.
|
||||
// The AppLovin Quality Service buildscript closure related lines need to be added to the root build.gradle file.
|
||||
var rootGradleBuildFilePath = Path.Combine(path, "../build.gradle");
|
||||
#if UNITY_2022_2_OR_NEWER
|
||||
if (!AddPluginToRootGradleBuildFile(rootGradleBuildFilePath)) return;
|
||||
|
||||
var rootSettingsGradleFilePath = Path.Combine(path, "../settings.gradle");
|
||||
if (!AddAppLovinRepository(rootSettingsGradleFilePath)) return;
|
||||
#else
|
||||
var buildScriptChangesAdded = AddQualityServiceBuildScriptLines(rootGradleBuildFilePath);
|
||||
if (!buildScriptChangesAdded) return;
|
||||
#endif
|
||||
|
||||
// The plugin needs to be added to the application module (named launcher)
|
||||
var applicationGradleBuildFilePath = Path.Combine(path, "../launcher/build.gradle");
|
||||
|
||||
@ -3,7 +3,6 @@ guid: f75e54e2eb78f427ca8643c97684387b
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinPostProcessAndroidGradle.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinPostProcessAndroidGradle.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -59,13 +59,11 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
var uploadHandler = new UploadHandlerRaw(bodyRaw);
|
||||
uploadHandler.contentType = "application/json";
|
||||
|
||||
var unityWebRequest = new UnityWebRequest("https://api2.safedk.com/v1/build/ios_setup2")
|
||||
using (var unityWebRequest = new UnityWebRequest("https://api2.safedk.com/v1/build/ios_setup2"))
|
||||
{
|
||||
method = UnityWebRequest.kHttpVerbPOST,
|
||||
downloadHandler = downloadHandler,
|
||||
uploadHandler = uploadHandler
|
||||
};
|
||||
|
||||
unityWebRequest.method = UnityWebRequest.kHttpVerbPOST;
|
||||
unityWebRequest.downloadHandler = downloadHandler;
|
||||
unityWebRequest.uploadHandler = uploadHandler;
|
||||
#if UNITY_2017_2_OR_NEWER
|
||||
var operation = unityWebRequest.SendWebRequest();
|
||||
#else
|
||||
@ -105,5 +103,6 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -3,7 +3,6 @@ guid: d5d209f90444f4a90830b48b5f3f3ff4
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinPostProcessiOS.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinPostProcessiOS.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -8,10 +8,17 @@
|
||||
|
||||
#if UNITY_ANDROID
|
||||
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using AppLovinMax.ThirdParty.MiniJson;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
using UnityEditor.Build.Reporting;
|
||||
using UnityEngine;
|
||||
|
||||
#endif
|
||||
|
||||
namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
@ -26,6 +33,22 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
IPreprocessBuild
|
||||
#endif
|
||||
{
|
||||
private const string AppLovinSettingsFileName = "applovin_settings.json";
|
||||
|
||||
private const string KeyTermsFlowSettings = "terms_flow_settings";
|
||||
private const string KeyTermsFlowEnabled = "terms_flow_enabled";
|
||||
private const string KeyTermsFlowTermsOfService = "terms_flow_terms_of_service";
|
||||
private const string KeyTermsFlowPrivacyPolicy = "terms_flow_privacy_policy";
|
||||
|
||||
private const string KeyConsentFlowSettings = "consent_flow_settings";
|
||||
private const string KeyConsentFlowEnabled = "consent_flow_enabled";
|
||||
private const string KeyConsentFlowTermsOfService = "consent_flow_terms_of_service";
|
||||
private const string KeyConsentFlowPrivacyPolicy = "consent_flow_privacy_policy";
|
||||
private const string KeyConsentFlowAdvertisingPartners = "consent_flow_advertising_partners";
|
||||
private const string KeyConsentFlowIncludeDefaultAdvertisingPartners = "consent_flow_should_include_default_advertising_partners";
|
||||
private const string KeyConsentFlowAnalyticsPartners = "consent_flow_analytics_partners";
|
||||
private const string KeyConsentFlowIncludeDefaultAnalyticsPartners = "consent_flow_should_include_default_analytics_partners";
|
||||
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
public void OnPreprocessBuild(BuildReport report)
|
||||
#else
|
||||
@ -42,6 +65,120 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
#else
|
||||
AddAppLovinQualityServicePlugin(AppLovinIntegrationManager.GradleTemplatePath);
|
||||
#endif
|
||||
|
||||
// For Unity 2018.2 or newer, the consent flow is enabled in MaxPostProcessBuildAndroid.
|
||||
#if !UNITY_2018_2_OR_NEWER
|
||||
if (AppLovinSettings.Instance.ShowInternalSettingsInIntegrationManager)
|
||||
{
|
||||
var consentFlowSettingsFilePath = Path.Combine("Assets", "Plugin/Android/res/raw/");
|
||||
EnableConsentFlowIfNeeded(consentFlowSettingsFilePath);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void EnableConsentFlowIfNeeded(string rawResourceDirectory)
|
||||
{
|
||||
// Check if consent flow is enabled. No need to create the applovin_consent_flow_settings.json if consent flow is disabled.
|
||||
var consentFlowEnabled = AppLovinInternalSettings.Instance.ConsentFlowEnabled;
|
||||
if (!consentFlowEnabled) return;
|
||||
|
||||
var privacyPolicyUrl = AppLovinInternalSettings.Instance.ConsentFlowPrivacyPolicyUrl;
|
||||
if (string.IsNullOrEmpty(privacyPolicyUrl))
|
||||
{
|
||||
AppLovinIntegrationManager.ShowBuildFailureDialog("You cannot use the AppLovin SDK's consent flow without defining a Privacy Policy URL in the AppLovin Integration Manager.");
|
||||
|
||||
// No need to update the applovin_consent_flow_settings.json here. Default consent flow state will be determined on the SDK side.
|
||||
return;
|
||||
}
|
||||
|
||||
var consentFlowSettings = new Dictionary<string, object>();
|
||||
consentFlowSettings[KeyConsentFlowEnabled] = consentFlowEnabled;
|
||||
consentFlowSettings[KeyConsentFlowPrivacyPolicy] = privacyPolicyUrl;
|
||||
|
||||
var termsOfServiceUrl = AppLovinInternalSettings.Instance.ConsentFlowTermsOfServiceUrl;
|
||||
if (MaxSdkUtils.IsValidString(termsOfServiceUrl))
|
||||
{
|
||||
consentFlowSettings[KeyConsentFlowTermsOfService] = termsOfServiceUrl;
|
||||
}
|
||||
|
||||
consentFlowSettings[KeyConsentFlowIncludeDefaultAdvertisingPartners] = AppLovinInternalSettings.Instance.ConsentFlowIncludeDefaultAdvertisingPartnerUrls;
|
||||
var advertisingPartnerUrls = AppLovinInternalSettings.Instance.ConsentFlowAdvertisingPartnerUrls;
|
||||
if (MaxSdkUtils.IsValidString(advertisingPartnerUrls))
|
||||
{
|
||||
var advertisingPartnerUrlsList = advertisingPartnerUrls.Split(',').ToList();
|
||||
consentFlowSettings[KeyConsentFlowAdvertisingPartners] = advertisingPartnerUrlsList;
|
||||
}
|
||||
|
||||
consentFlowSettings[KeyConsentFlowIncludeDefaultAnalyticsPartners] = AppLovinInternalSettings.Instance.ConsentFlowIncludeDefaultAnalyticsPartnerUrls;
|
||||
var analyticsPartnerUrls = AppLovinInternalSettings.Instance.ConsentFlowAnalyticsPartnerUrls;
|
||||
if (MaxSdkUtils.IsValidString(analyticsPartnerUrls))
|
||||
{
|
||||
var analyticsPartnerUrlsList = analyticsPartnerUrls.Split(',').ToList();
|
||||
consentFlowSettings[KeyConsentFlowAnalyticsPartners] = analyticsPartnerUrlsList;
|
||||
}
|
||||
|
||||
var applovinSdkSettings = new Dictionary<string, object>();
|
||||
applovinSdkSettings[KeyConsentFlowSettings] = consentFlowSettings;
|
||||
|
||||
var applovinSdkSettingsJson = Json.Serialize(applovinSdkSettings);
|
||||
WriteAppLovinSettingsRawResourceFile(applovinSdkSettingsJson, rawResourceDirectory);
|
||||
}
|
||||
|
||||
public static void EnableTermsFlowIfNeeded(string rawResourceDirectory)
|
||||
{
|
||||
if (AppLovinSettings.Instance.ShowInternalSettingsInIntegrationManager) return;
|
||||
|
||||
// Check if terms flow is enabled. No need to create the applovin_consent_flow_settings.json if consent flow is disabled.
|
||||
var consentFlowEnabled = AppLovinSettings.Instance.ConsentFlowEnabled;
|
||||
if (!consentFlowEnabled) return;
|
||||
|
||||
// Check if terms flow is enabled for this format.
|
||||
var consentFlowPlatform = AppLovinSettings.Instance.ConsentFlowPlatform;
|
||||
if (consentFlowPlatform != Platform.All && consentFlowPlatform != Platform.Android) return;
|
||||
|
||||
var privacyPolicyUrl = AppLovinSettings.Instance.ConsentFlowPrivacyPolicyUrl;
|
||||
if (string.IsNullOrEmpty(privacyPolicyUrl))
|
||||
{
|
||||
AppLovinIntegrationManager.ShowBuildFailureDialog("You cannot use the AppLovin SDK's consent flow without defining a Privacy Policy URL in the AppLovin Integration Manager.");
|
||||
|
||||
// No need to update the applovin_consent_flow_settings.json here. Default consent flow state will be determined on the SDK side.
|
||||
return;
|
||||
}
|
||||
|
||||
var consentFlowSettings = new Dictionary<string, object>();
|
||||
consentFlowSettings[KeyTermsFlowEnabled] = consentFlowEnabled;
|
||||
consentFlowSettings[KeyTermsFlowPrivacyPolicy] = privacyPolicyUrl;
|
||||
|
||||
var termsOfServiceUrl = AppLovinSettings.Instance.ConsentFlowTermsOfServiceUrl;
|
||||
if (MaxSdkUtils.IsValidString(termsOfServiceUrl))
|
||||
{
|
||||
consentFlowSettings[KeyTermsFlowTermsOfService] = termsOfServiceUrl;
|
||||
}
|
||||
|
||||
var applovinSdkSettings = new Dictionary<string, object>();
|
||||
applovinSdkSettings[KeyTermsFlowSettings] = consentFlowSettings;
|
||||
|
||||
var applovinSdkSettingsJson = Json.Serialize(applovinSdkSettings);
|
||||
WriteAppLovinSettingsRawResourceFile(applovinSdkSettingsJson, rawResourceDirectory);
|
||||
}
|
||||
|
||||
private static void WriteAppLovinSettingsRawResourceFile(string applovinSdkSettingsJson, string rawResourceDirectory)
|
||||
{
|
||||
if (!Directory.Exists(rawResourceDirectory))
|
||||
{
|
||||
Directory.CreateDirectory(rawResourceDirectory);
|
||||
}
|
||||
|
||||
var consentFlowSettingsFilePath = Path.Combine(rawResourceDirectory, AppLovinSettingsFileName);
|
||||
try
|
||||
{
|
||||
File.WriteAllText(consentFlowSettingsFilePath, applovinSdkSettingsJson + "\n");
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
MaxSdkLogger.UserError("applovin_settings.json file write failed due to: " + exception.Message);
|
||||
Console.WriteLine(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public int callbackOrder
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 8ccaf444d0d4f4cadb5debe7c41b20c4
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinPreProcessAndroid.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinPreProcessAndroid.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -12,6 +12,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using Debug = UnityEngine.Debug;
|
||||
@ -36,13 +37,20 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
private static readonly Regex TokenApiKey = new Regex(".*apiKey.*");
|
||||
private static readonly Regex TokenAppLovinPlugin = new Regex(".*apply plugin:.+?(?=applovin-quality-service).*");
|
||||
|
||||
#if UNITY_2022_2_OR_NEWER
|
||||
private const string PluginsMatcher = "plugins";
|
||||
private const string PluginManagementMatcher = "pluginManagement";
|
||||
private const string QualityServicePluginRoot = " id 'com.applovin.quality' version '+' apply false // NOTE: Requires version 4.8.3+ for Gradle version 7.2+";
|
||||
#endif
|
||||
|
||||
private const string BuildScriptMatcher = "buildscript";
|
||||
private const string QualityServiceMavenRepo = "maven { url 'https://artifacts.applovin.com/android' }";
|
||||
private const string QualityServiceMavenRepo = "maven { url 'https://artifacts.applovin.com/android'; content { includeGroupByRegex 'com.applovin.*' } }";
|
||||
private const string QualityServiceDependencyClassPath = "classpath 'com.applovin.quality:AppLovinQualityServiceGradlePlugin:+'";
|
||||
private const string QualityServiceApplyPlugin = "apply plugin: 'applovin-quality-service'";
|
||||
private const string QualityServicePlugin = "applovin {";
|
||||
private const string QualityServiceApiKey = " apiKey '{0}'";
|
||||
private const string QualityServiceBintrayMavenRepo = "https://applovin.bintray.com/Quality-Service";
|
||||
private const string QualityServiceNoRegexMavenRepo = "maven { url 'https://artifacts.applovin.com/android' }";
|
||||
|
||||
// Legacy plugin detection variables
|
||||
private const string QualityServiceDependencyClassPathV3 = "classpath 'com.applovin.quality:AppLovinQualityServiceGradlePlugin:3.+'";
|
||||
@ -100,6 +108,126 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
Console.WriteLine(exception);
|
||||
}
|
||||
}
|
||||
#if UNITY_2022_2_OR_NEWER
|
||||
/// <summary>
|
||||
/// Adds AppLovin Quality Service plugin DSL element to the project's root build.gradle file.
|
||||
/// </summary>
|
||||
/// <param name="rootGradleBuildFile">The path to project's root build.gradle file.</param>
|
||||
/// <returns><c>true</c> when the plugin was added successfully.</returns>
|
||||
protected bool AddPluginToRootGradleBuildFile(string rootGradleBuildFile)
|
||||
{
|
||||
var lines = File.ReadAllLines(rootGradleBuildFile).ToList();
|
||||
var outputLines = new List<string>();
|
||||
var pluginAdded = false;
|
||||
var insidePluginsClosure = false;
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (line.Contains(PluginsMatcher))
|
||||
{
|
||||
insidePluginsClosure = true;
|
||||
}
|
||||
|
||||
if (!pluginAdded && insidePluginsClosure && line.Contains("}"))
|
||||
{
|
||||
outputLines.Add(QualityServicePluginRoot);
|
||||
pluginAdded = true;
|
||||
insidePluginsClosure = false;
|
||||
}
|
||||
|
||||
outputLines.Add(line);
|
||||
}
|
||||
|
||||
if (!pluginAdded)
|
||||
{
|
||||
MaxSdkLogger.UserError("Failed to add AppLovin Quality Service plugin to root gradle file.");
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
File.WriteAllText(rootGradleBuildFile, string.Join("\n", outputLines.ToArray()) + "\n");
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
MaxSdkLogger.UserError("Failed to install AppLovin Quality Service plugin. Root Gradle file write failed.");
|
||||
Console.WriteLine(exception);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the AppLovin maven repository to the project's settings.gradle file.
|
||||
/// </summary>
|
||||
/// <param name="settingsGradleFile">The path to the project's settings.gradle file.</param>
|
||||
/// <returns><c>true</c> if the repository was added successfully.</returns>
|
||||
protected bool AddAppLovinRepository(string settingsGradleFile)
|
||||
{
|
||||
var lines = File.ReadLines(settingsGradleFile).ToList();
|
||||
var outputLines = new List<string>();
|
||||
var mavenRepoAdded = false;
|
||||
var pluginManagementClosureDepth = 0;
|
||||
var insidePluginManagementClosure = false;
|
||||
var pluginManagementMatched = false;
|
||||
foreach (var line in lines)
|
||||
{
|
||||
outputLines.Add(line);
|
||||
|
||||
if (!pluginManagementMatched && line.Contains(PluginManagementMatcher))
|
||||
{
|
||||
pluginManagementMatched = true;
|
||||
insidePluginManagementClosure = true;
|
||||
}
|
||||
|
||||
if (insidePluginManagementClosure)
|
||||
{
|
||||
if (line.Contains("{"))
|
||||
{
|
||||
pluginManagementClosureDepth++;
|
||||
}
|
||||
|
||||
if (line.Contains("}"))
|
||||
{
|
||||
pluginManagementClosureDepth--;
|
||||
}
|
||||
|
||||
if (pluginManagementClosureDepth == 0)
|
||||
{
|
||||
insidePluginManagementClosure = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (insidePluginManagementClosure)
|
||||
{
|
||||
if (!mavenRepoAdded && TokenBuildScriptRepositories.IsMatch(line))
|
||||
{
|
||||
outputLines.Add(GetFormattedBuildScriptLine(QualityServiceMavenRepo));
|
||||
mavenRepoAdded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!mavenRepoAdded)
|
||||
{
|
||||
MaxSdkLogger.UserError("Failed to add AppLovin Quality Service plugin maven repo to settings gradle file.");
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
File.WriteAllText(settingsGradleFile, string.Join("\n", outputLines.ToArray()) + "\n");
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
MaxSdkLogger.UserError("Failed to install AppLovin Quality Service plugin. Setting Gradle file write failed.");
|
||||
Console.WriteLine(exception);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
/// <summary>
|
||||
@ -155,15 +283,15 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
{
|
||||
var postJson = string.Format("{{\"sdk_key\" : \"{0}\"}}", sdkKey);
|
||||
var bodyRaw = Encoding.UTF8.GetBytes(postJson);
|
||||
// Upload handler is automatically disposed when UnityWebRequest is disposed
|
||||
var uploadHandler = new UploadHandlerRaw(bodyRaw);
|
||||
uploadHandler.contentType = "application/json";
|
||||
|
||||
var unityWebRequest = new UnityWebRequest("https://api2.safedk.com/v1/build/cred")
|
||||
using (var unityWebRequest = new UnityWebRequest("https://api2.safedk.com/v1/build/cred"))
|
||||
{
|
||||
method = UnityWebRequest.kHttpVerbPOST,
|
||||
uploadHandler = uploadHandler,
|
||||
downloadHandler = new DownloadHandlerBuffer()
|
||||
};
|
||||
unityWebRequest.method = UnityWebRequest.kHttpVerbPOST;
|
||||
unityWebRequest.uploadHandler = uploadHandler;
|
||||
unityWebRequest.downloadHandler = new DownloadHandlerBuffer();
|
||||
|
||||
#if UNITY_2017_2_OR_NEWER
|
||||
var operation = unityWebRequest.SendWebRequest();
|
||||
@ -196,6 +324,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
return new AppLovinQualityServiceData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static List<string> RemoveLegacySafeDkPlugin(List<string> lines)
|
||||
{
|
||||
@ -292,8 +421,8 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
var dependencyClassPathUpdated = false;
|
||||
foreach (var line in lines)
|
||||
{
|
||||
// Bintray maven repo is no longer being used. Update to s3 maven repo.
|
||||
if (!mavenRepoUpdated && line.Contains(QualityServiceBintrayMavenRepo))
|
||||
// Bintray maven repo is no longer being used. Update to s3 maven repo with regex check
|
||||
if (!mavenRepoUpdated && (line.Contains(QualityServiceBintrayMavenRepo) || line.Contains(QualityServiceNoRegexMavenRepo)))
|
||||
{
|
||||
outputLines.Add(GetFormattedBuildScriptLine(QualityServiceMavenRepo));
|
||||
mavenRepoUpdated = true;
|
||||
@ -419,7 +548,9 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
|
||||
private static string GetFormattedBuildScriptLine(string buildScriptLine)
|
||||
{
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
#if UNITY_2022_2_OR_NEWER
|
||||
return " "
|
||||
#elif UNITY_2019_3_OR_NEWER
|
||||
return " "
|
||||
#else
|
||||
return " "
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 732b7510bc9c94aafb3fd3b8c0dc5d2d
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinProcessGradleBuildFile.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinProcessGradleBuildFile.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -12,6 +12,17 @@ using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
|
||||
namespace AppLovinMax.Scripts.IntegrationManager.Editor
|
||||
{
|
||||
public enum Platform
|
||||
{
|
||||
All,
|
||||
Android,
|
||||
iOS
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A <see cref="ScriptableObject"/> representing the AppLovin Settings that can be set in the Integration Manager Window.
|
||||
///
|
||||
@ -26,6 +37,7 @@ public class AppLovinSettings : ScriptableObject
|
||||
public const string DefaultUserTrackingDescriptionEnV0 = "Pressing \\\"Allow\\\" uses device info for more relevant ad content";
|
||||
public const string DefaultUserTrackingDescriptionEnV1 = "This only uses device info for less annoying, more relevant ads";
|
||||
public const string DefaultUserTrackingDescriptionEnV2 = "This only uses device info for more interesting and relevant ads";
|
||||
public const string DefaultUserTrackingDescriptionEnV3 = "This uses device info for more personalized ads and content";
|
||||
|
||||
public const string DefaultUserTrackingDescriptionDe = "\\\"Erlauben\\\" drücken benutzt Gerätinformationen für relevantere Werbeinhalte";
|
||||
public const string DefaultUserTrackingDescriptionEs = "Presionando \\\"Permitir\\\", se usa la información del dispositivo para obtener contenido publicitario más relevante";
|
||||
@ -35,8 +47,6 @@ public class AppLovinSettings : ScriptableObject
|
||||
public const string DefaultUserTrackingDescriptionZhHans = "点击\\\"允许\\\"以使用设备信息获得更加相关的广告内容";
|
||||
public const string DefaultUserTrackingDescriptionZhHant = "點擊\\\"允許\\\"以使用設備信息獲得更加相關的廣告內容";
|
||||
|
||||
public const string SnapAppStoreAppIdMinVersion = "2.0.0.0";
|
||||
|
||||
/// <summary>
|
||||
/// A placeholder constant to be replaced with the actual default localization or an empty string based on whether or not localization is enabled when when the getter is called.
|
||||
/// </summary>
|
||||
@ -50,6 +60,7 @@ public class AppLovinSettings : ScriptableObject
|
||||
[SerializeField] private bool setAttributionReportEndpoint;
|
||||
|
||||
[SerializeField] private bool consentFlowEnabled;
|
||||
[SerializeField] private Platform consentFlowPlatform;
|
||||
[SerializeField] private string consentFlowPrivacyPolicyUrl = string.Empty;
|
||||
[SerializeField] private string consentFlowTermsOfServiceUrl = string.Empty;
|
||||
[FormerlySerializedAs("userTrackingUsageDescription")] [SerializeField] private string userTrackingUsageDescriptionEn = string.Empty;
|
||||
@ -65,7 +76,7 @@ public class AppLovinSettings : ScriptableObject
|
||||
[SerializeField] private string adMobAndroidAppId = string.Empty;
|
||||
[SerializeField] private string adMobIosAppId = string.Empty;
|
||||
|
||||
[SerializeField] private int snapAppStoreAppId;
|
||||
[SerializeField] private bool showInternalSettingsInIntegrationManager;
|
||||
|
||||
/// <summary>
|
||||
/// An instance of AppLovin Setting.
|
||||
@ -76,6 +87,21 @@ public class AppLovinSettings : ScriptableObject
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
// Check for an existing AppLovinSettings somewhere in the project
|
||||
var guids = AssetDatabase.FindAssets("AppLovinSettings t:ScriptableObject");
|
||||
if (guids.Length > 1)
|
||||
{
|
||||
MaxSdkLogger.UserWarning("Multiple AppLovinSettings found. This may cause unexpected results.");
|
||||
}
|
||||
|
||||
if (guids.Length != 0)
|
||||
{
|
||||
var path = AssetDatabase.GUIDToAssetPath(guids[0]);
|
||||
instance = AssetDatabase.LoadAssetAtPath<AppLovinSettings>(path);
|
||||
return instance;
|
||||
}
|
||||
|
||||
// If there is no existing AppLovinSettings asset, create one in the default location
|
||||
string settingsFilePath;
|
||||
// The settings file should be under the Assets/ folder so that it can be version controlled and cannot be overriden when updating.
|
||||
// If the plugin is outside the Assets folder, create the settings asset at the default location.
|
||||
@ -101,11 +127,9 @@ public class AppLovinSettings : ScriptableObject
|
||||
Directory.CreateDirectory(settingsDir);
|
||||
}
|
||||
|
||||
instance = AssetDatabase.LoadAssetAtPath<AppLovinSettings>(settingsFilePath);
|
||||
if (instance != null) return instance;
|
||||
|
||||
instance = CreateInstance<AppLovinSettings>();
|
||||
AssetDatabase.CreateAsset(instance, settingsFilePath);
|
||||
MaxSdkLogger.D("Creating new AppLovinSettings asset at path: " + settingsFilePath);
|
||||
}
|
||||
|
||||
return instance;
|
||||
@ -148,9 +172,10 @@ public class AppLovinSettings : ScriptableObject
|
||||
{
|
||||
// Update the default EN description if an old version of the description is still being used.
|
||||
if (DefaultUserTrackingDescriptionEnV0.Equals(Instance.UserTrackingUsageDescriptionEn)
|
||||
|| DefaultUserTrackingDescriptionEnV1.Equals(Instance.UserTrackingUsageDescriptionEn))
|
||||
|| DefaultUserTrackingDescriptionEnV1.Equals(Instance.UserTrackingUsageDescriptionEn)
|
||||
|| DefaultUserTrackingDescriptionEnV2.Equals(Instance.UserTrackingUsageDescriptionEn))
|
||||
{
|
||||
Instance.UserTrackingUsageDescriptionEn = DefaultUserTrackingDescriptionEnV2;
|
||||
Instance.UserTrackingUsageDescriptionEn = DefaultUserTrackingDescriptionEnV3;
|
||||
}
|
||||
|
||||
return Instance.consentFlowEnabled;
|
||||
@ -165,11 +190,12 @@ public class AppLovinSettings : ScriptableObject
|
||||
// If the value didn't change, we don't need to update anything.
|
||||
if (previousValue) return;
|
||||
|
||||
Instance.UserTrackingUsageDescriptionEn = DefaultUserTrackingDescriptionEnV2;
|
||||
Instance.UserTrackingUsageDescriptionEn = DefaultUserTrackingDescriptionEnV3;
|
||||
Instance.UserTrackingUsageLocalizationEnabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Instance.ConsentFlowPlatform = Platform.All;
|
||||
Instance.ConsentFlowPrivacyPolicyUrl = string.Empty;
|
||||
Instance.ConsentFlowTermsOfServiceUrl = string.Empty;
|
||||
Instance.UserTrackingUsageDescriptionEn = string.Empty;
|
||||
@ -178,6 +204,12 @@ public class AppLovinSettings : ScriptableObject
|
||||
}
|
||||
}
|
||||
|
||||
public Platform ConsentFlowPlatform
|
||||
{
|
||||
get { return Instance.consentFlowEnabled ? Instance.consentFlowPlatform : Platform.All; }
|
||||
set { Instance.consentFlowPlatform = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A URL pointing to the Privacy Policy for the app to be shown when prompting the user for consent.
|
||||
/// </summary>
|
||||
@ -221,7 +253,7 @@ public class AppLovinSettings : ScriptableObject
|
||||
if (value)
|
||||
{
|
||||
// If the value didn't change or the english localization text is not the default one, we don't need to update anything.
|
||||
if (previousValue || !DefaultUserTrackingDescriptionEnV2.Equals(Instance.UserTrackingUsageDescriptionEn)) return;
|
||||
if (previousValue || !DefaultUserTrackingDescriptionEnV3.Equals(Instance.UserTrackingUsageDescriptionEn)) return;
|
||||
|
||||
Instance.UserTrackingUsageDescriptionDe = DefaultUserTrackingDescriptionDe;
|
||||
Instance.UserTrackingUsageDescriptionEs = DefaultUserTrackingDescriptionEs;
|
||||
@ -342,13 +374,10 @@ public class AppLovinSettings : ScriptableObject
|
||||
set { Instance.adMobIosAppId = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Snap App Store App ID.
|
||||
/// </summary>
|
||||
public int SnapAppStoreAppId
|
||||
public bool ShowInternalSettingsInIntegrationManager
|
||||
{
|
||||
get { return Instance.snapAppStoreAppId; }
|
||||
set { Instance.snapAppStoreAppId = value; }
|
||||
get { return Instance.showInternalSettingsInIntegrationManager; }
|
||||
set { Instance.showInternalSettingsInIntegrationManager = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -3,7 +3,6 @@ guid: ebc0ba1b5ef6b4a6b9dd53d7eadfea16
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/AppLovinSettings.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\AppLovinSettings.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -3,9 +3,4 @@ guid: a10a05a8449c42519fd80f2b8b580de3
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/IntegrationManager/Editor/MaxSdk.IntegrationManager.Editor.asmdef
|
||||
- al_max_export_path-MaxSdk\Scripts\IntegrationManager\Editor\MaxSdk.IntegrationManager.Editor.asmdef
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
timeCreated: 1591749873
|
||||
|
||||
37
Assets/ThirdParty/MaxSdk/Scripts/MaxEventSystemChecker.cs
vendored
Normal file
37
Assets/ThirdParty/MaxSdk/Scripts/MaxEventSystemChecker.cs
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
//
|
||||
// EventSystemChecker.cs
|
||||
// AppLovin MAX Unity Plugin
|
||||
//
|
||||
// Created by Jonathan Liu on 10/23/2022.
|
||||
// Copyright © 2022 AppLovin. All rights reserved.
|
||||
//
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace AppLovinMax.Scripts
|
||||
{
|
||||
/// <summary>
|
||||
/// A script to check and enable event system as needed for the AppLovin MAX ad prefabs.
|
||||
/// </summary>
|
||||
[RequireComponent(typeof(EventSystem))]
|
||||
public class MaxEventSystemChecker : MonoBehaviour
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
// Enable the EventSystem if there is no other EventSystem in the scene
|
||||
var eventSystem = GetComponent<EventSystem>();
|
||||
var currentSystem = UnityEngine.EventSystems.EventSystem.current;
|
||||
if (currentSystem == null || currentSystem == eventSystem)
|
||||
{
|
||||
eventSystem.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
eventSystem.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1,9 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42aa959278164e1683addd3bd5ff03d2
|
||||
guid: e0acf281ba86b4929a6942ecd998395b
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Mediation/Google/Editor/PostProcessor.cs
|
||||
- al_max_export_path-MaxSdk\Mediation\Google\Editor\PostProcessor.cs
|
||||
- al_max_export_path-MaxSdk/Scripts/MaxEventSystemChecker.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@ -3,7 +3,6 @@ guid: 67ec2f620c6b0405ba16ea2c032dc9a2
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/MaxEvents.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\MaxEvents.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@ -3,7 +3,6 @@ guid: a4cfc1a18fa3a469b96d885db522f42e
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/MaxSdk.Scripts.asmdef
|
||||
- al_max_export_path-MaxSdk\Scripts\MaxSdk.Scripts.asmdef
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
2
Assets/ThirdParty/MaxSdk/Scripts/MaxSdk.cs
vendored
2
Assets/ThirdParty/MaxSdk/Scripts/MaxSdk.cs
vendored
@ -18,7 +18,7 @@ public class MaxSdk :
|
||||
MaxSdkUnityEditor
|
||||
#endif
|
||||
{
|
||||
private const string _version = "5.4.5";
|
||||
private const string _version = "5.10.1";
|
||||
|
||||
/// <summary>
|
||||
/// Returns the current plugin version.
|
||||
|
||||
@ -3,7 +3,6 @@ guid: 2fc7aa576843c44e68c7ab14b475bb82
|
||||
labels:
|
||||
- al_max
|
||||
- al_max_export_path-MaxSdk/Scripts/MaxSdk.cs
|
||||
- al_max_export_path-MaxSdk\Scripts\MaxSdk.cs
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user