HwSDK 接入文档(适用于V8.0.2~8.1.5) - artwl/hwsdk_ios Wiki

0、写在前面:

🥇 注意:1.3.3中系统库有变化,请着重核对(否则需重新发版)

iOS版本需求:最低 iOS 10.0
Xcode版本需求:Xcode 12.0

本文档适用于V8.0.2~8.1.5版本SDK,关于内购二次验证和自定义打点以及SDK接口介绍和使用请在这里查看,若遇到报错请先移步这里查看相关解决方案,若没有相对应的解决方案,请联系对接人员。

特别提示:本文档中有3个值与项目相关,需要【找对接人员要】(具体使用看下文):

1.Admob的app id

2.初始化接口,服务端的参数;这个值为数字

3.Applovin 的AppLovinConsentFlowInfo里面对应的隐私政策AppLovinConsentFlowPrivacyPolicy和服务条款AppLovinConsentFlowTermsOfService

1、iOS SDK 接入

接入前准备 :对于unity,首先需要将unity相关的5个类文件(AdMgr.cs HwAdsCallBack.cs HwAdsInterface.cs HwAdsInterface.h HwAdsInterface.m)放到游戏中,与游戏进行关联,再导出xcode工程,在xcode工程中做相应的修改。 HwAdsInterface.h和HwAdsInterface.m是示例代码,也是unity调用iOS这边的“桥梁”。COCOS开发的游戏,也可以参考这两个类;

unity开发的游戏,若不是自己封装反射文件,必须先将这两个类放入到Assets->Plugins->iOS文件夹下再打包Xcode工程,否则打完工程会出现头文件找不到报错,具体unity中和导出的Xcode工程文件路径如下截图:

unity工程路径

Xcode工程路径

1.1 iOS SDK导入framework

1.1.1导入framework (注意:unity2019版本_打的Xcode工程会有两个target,cocos打的工程中是一个target)

在 .xcodeproj同级目录新建一个HwAds文件夹,将DependenceSDKx.xx.x.zip 和HwAdsFramework.framework.zip解压,放入到HwAds文件夹中(注意在mac下解压,framework在windows下解压,文件容易失效);请确保勾选了Copy items if needed和Create groups,以及Add to targets中勾选了:Unity-iPhone

1.1.2 特别注意:_unity2019版本_打的Xcode工程会有两个target,sdk要导入并关联到UnityFramework对应的target中,如下图

1.1.3(cocos平台打的开发包不需要此步骤)然后在把BUAdSDK.bundle文件从UnityFramework Target的Build Phaese->Copy Bundle Resources 下移除(注意是点 - 而不是在项目中删除)然后添加至Unity-iPhone Target的Build Phaese->Copy Bundle Resources 下(点 + 添加),否则播放穿山甲广告的时候会引起崩溃

1.1.4(cocos平台打的开发包不需要此步骤)在Unity-iPhone Target中 -> Build Phases -> Link Binary with Libraries(点 + )添加 UnityFramework.framework

添加UnityFramework

1.2 Xcode中info.plist相关设置

1.2.1添加HTTP权限

在工程info.plist中,在NSAppTransportSecurity配置为true

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

1.2.2添加Applovin的key的配置

在工程info.plist中,在information Property List下面,添加key值为:AppLovinSdkKey;类型为String,Value为9hZx6KZPde6GIbp6OX3zn0M3HzROhgMsNxoTGLtv_-AHZzNzURwFRGJkEl6xQTnoPZFfv7Tv5iAegTb9-WPQni

1.2.3添加admob的key值配置

在工程info.plist中,在information Property List下面,添加key值为:GADApplicationIdentifier;类型为String,Value为 ca-app-pub-XXXXXXXXX~XXXXX[这个值【找对接人员要】,不同的项目这个值不同

1.2.4 添加如下ATT权限请求描述,下面只是用英文做了示例,需要根据项目内容做国际化

    <key>NSUserTrackingUsageDescription</key>
	<string>This only uses device info for less annoying, more relevant ads.</string>

下列是国际化语言示例:

English (base):This only uses device info for less annoying, more relevant ads

简体中文(ZhHans):点击"允许"以使用设备信息获得更加相关的广告内容

繁体中文(ZhHant):點擊"允許"以使用設備信息獲得更加相關的廣告內容

法语(fr):"Autoriser" permet d'utiliser les infos du téléphone pour afficher des contenus publicitaires plus pertinents

德文(de):"Erlauben" drücken benutzt Gerätinformationen für relevantere Werbeinhalte

日本(Ja):"許可"をクリックすることで、デバイス情報を元により最適な広告を表示することができます

韩文(Ko):"허용"을 누르면 더 관련성 높은 광고 콘텐츠를 제공하기 위해 기기 정보가 사용됩니다

西班牙语(es):Presionando "Permitir", se usa la información del dispositivo para obtener contenido publicitario más relevante

1.2.5 添加Max同意流控制开关: AppLovinConsentFlowEnabled是控制同意流的开关,1为开,0为关;下面对应的两个连接是隐私政策和服务条款,每个项目的隐私政策和服务条款都不一样,请找对接人员核对后填入。 标题1.2.6中也为示例,复制后请对应修改。

        <key>AppLovinConsentFlowInfo</key>
	<dict>
		<key>AppLovinConsentFlowEnabled</key>
		<true/>
		<key>AppLovinConsentFlowPrivacyPolicy</key>
		<string>https://gameteamhw.github.io/common/blockmasters/privacy.html</string>
		<key>AppLovinConsentFlowTermsOfService</key>
		<string>https://gameteamhw.github.io/common/blockmasters/terms.html</string>
	</dict>

1.2.6汇总

可以右键info.plist Open As——Source Code 将下面这段代码复制进去;然后做相对应的修改

注意:下面的》》》SKAdNetworkItems下的SKAdNetworkIdentifier的值每次都需要更新一下,因为每次官方更新我们这里也会更新数据以保持最新

     <key>AppLovinConsentFlowInfo</key>
     <dict>
           <key>AppLovinConsentFlowEnabled</key>
	   <true/>
	   <key>AppLovinConsentFlowPrivacyPolicy</key>
	   <string>https://gameteamhw.github.io/common/blockmasters/privacy.html</string>
	   <key>AppLovinConsentFlowTermsOfService</key>
	   <string>https://gameteamhw.github.io/common/blockmasters/terms.html</string>
    </dict>
    <key>AppLovinSdkKey</key>
    <string>9hZx6KZPde6GIbp6OX3zn0M3HzROhgMsNxoTGLtv_-AHZzNzURwFRGJkEl6xQTnoPZFfv7Tv5iAegTb9-WPQni</string>
    <key>GADIsAdManagerApp</key>
    <true/>
    <key>GADApplicationIdentifier</key>
    <string>ca-app-pub-5470400114155059~3256815974</string>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
    <key>NSUserTrackingUsageDescription</key>
	<string>This only uses device info for less annoying, more relevant ads.</string>
    <key>SKAdNetworkItems</key>
    <array>
        <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>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>2u9pt9hc89.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>3rd42ekr43.skadnetwork</string>
</dict>
<dict>
    <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>4fzdc2evr5.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>4pfyvq9l8r.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>523jb4fst2.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>5l3tpt7t6e.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>5lm9lj6jb7.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>74b6s63p6l.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>8s468mfl3y.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>a7xqa6mtl2.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>c6k4g5qg8m.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>cg4yq2srnc.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>cj5566h2ga.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>e5fvkxwrpn.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>ejvt5qm6ak.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>g28c52eehv.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>g2y4y55b64.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>gta9lk7p23.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>kbmxgpxpgc.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>klf5c3l5u5.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>m8dbw4sv7c.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>mlmmfzh3r3.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>mtkv5xtk9e.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>n6fk4nfna4.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>n9x2a789qt.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>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>r45fhb6rf7.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>rx5hdcabgc.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>t38b2kh725.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>v72qych5uu.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>yclnxrl5pm.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>ydx93a7ass.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>3qcr597p9d.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>3qy4746246.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>3sh42y64q3.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>424m5254lk.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>4dzt52r2t5.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>8c4e2ghe7u.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>av6w8kgt66.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>cstr6suwn9.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>f38h382jlk.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>p78axxw29g.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>s39g8k73mm.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>v4nxqhlyqp.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>zq492l623r.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>24t9a8vw3c.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>32z4fx6l9h.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>54nzkqm89y.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>6xzpu9s2p8.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>79pbpufp6p.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>9b89h5y424.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>c3frkrj4fj.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>feyaarzu9v.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>ggvn48r87g.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>glqzh8vgby.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>k674qkevps.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>ludvb6z3bs.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>rvh3l7un93.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>x8jxxk4ff5.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>xy9t38ct57.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>zmvfpc5aq8.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>22mmun2rn5.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>4w7y6s5ca2.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>5tjdwbrq8w.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>97r2b46745.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>hdw39hrw9y.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>s69wq72ugq.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>su67r6k2v3.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>w9q455wk68.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>x44k69ngh6.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>x8uqf25wch.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>y45688jllp.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>n38lu8286q.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>v9wttpbfk9.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>krvm3zuq6h.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>238da6jt44.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>488r3q3dtq.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>52fl2v3hgk.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>9yg77x724h.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>n66cz3y3bx.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>nzq8sh4pbs.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>pu4na253f3.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>v79kvwwj4g.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>yrqqpx2mcb.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>z4gj7hsk7h.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>f7s53z58qe.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>7953jerfzd.skadnetwork</string>
</dict>
    </array>


1.3 Xcode编译选项设置

1.3.1 运行环境配置

SDK编译环境 10.0+; 支持架构:armv7,arm64

1.3.2 添加ObjC链接器标记

在Xcode中选择项目的Targets->Build Settings,配置Other Link Flags,增加-ObjC 注意:O大写,C大写

1.3.3 添加依赖库

工程在TARGETS选中项目,选择Build Phases中找到Link Binary With Libraries,点击“+”,依次添加下列依赖库 若,前面导入framework正确勾选了,下面很多库会自动带进来;系统库需要手动添加,系统库都可配置成

:o: AdServices.framework(添加这个库需要在Build Phases-> Link Binary with libraries 里面把这个系统库配置成optional,否则在iOS14以下会崩溃)
:o: AdSupport.framework (请参照上面配置成optional)
:o: StoreKit.framework(请参照上面配置成optional)
:o: iAd.framework(请参照上面配置成optional)(前四个库需要着重核对一下,没有的话会影响归因)
CoreTelephony.framework (请参照上面配置成optional)
WebKit.framework(请参照上面配置成optional)
AppTrackingTransparency.framework(添加这个库需要在Build Phases-> Link Binary with libraries 里面把这个系统库配置成optional,否则在iOS14以下会崩溃)

CoreGraphics.framework
Foundation.framework
UIKit.framework
libbz2.tbd
libresolv.9.tbd
libc++abi.tbd
libsqlite3.tbd
libz.tbd
QuartzCore.framework
MobileCoreServices.framework
AVFoundation.framework

1.4 由于升级FaceBookSDK会包含FBCoreKit SDK,SDK中包含swift框架,如果项目中有swift桥接文件则跳过此步骤;如果项目中没有用过swift相关代码或者框架,则需要添加一个swift文件并让Xcode自动生成一个swift桥接文件,具体如下。

1.4.1 在Xcode中打开ios / YourAppName.xcodeproj

1.4.2 在左侧的项目浏览器中,右键单击您的应用程序名称,然后单击新建文件…。

1.4.3 为项目创建一个空的Swift文件,命名可随意,我用的默认的命名(添加时请确保选择了“您的应用名称”Target)

1.4.4 当Xcode询问时,按Create Bridging Header让系统帮我们自动生成Swift桥接文件,然后不删除Swift文件。

1.5 把AppLovinQualityServiceSetup-ios.rb添加到工程根目录,然后打开终端cd到工程根目录,复制 ruby AppLovinQualityServiceSetup-ios.rb 点回车。

1.6 Adjust打点需要跟踪App的生命周期内程序进入前台和后台两种状态,所以在App进入前台和后台时候要打两个点,打点位置和打点方法如下:

#import <AdjustSdk/Adjust.h>
特别注意:如果没有接变现SDK之前已经[按照这里](https://github.com/artwl/hwsdk_ios/wiki/Adjust-%E6%8E%A5%E5%85%A5%E6%8C%87%E5%AF%BC)接入过adjust统计的话,请在接入HwSDK时候移除AdjustSdk.framework,因为HwSDK也有Adjust SDK,会引起冲突。且删除(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions方法里面的adjust初始化相关代码。如下注释的三行代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    //NSString *environment = ADJEnvironmentProduction;
    //ADJConfig *adjustConfig = [ADJConfig configWithAppToken:@"XXXXXX"
                                                environment:environment];
    //[Adjust appDidLaunch:adjustConfig];

    
    // Override point for customization after application launch.
    return YES;
}

如果以前接入Adjust统计,有下面两个方法则不用变化,(如果以前没有接入Adjust统计,请加上下列两个调用方法)
- (void)applicationDidBecomeActive:(UIApplication *)application{
    NSLog(@"hlyLog:app即将进入前台");
    //adjust打点
    [Adjust trackSubsessionStart];
}
- (void)applicationWillResignActive:(UIApplication *)application{
    NSLog(@"hlyLog:app即将进入后台");
    //adjust打点
    [Adjust trackSubsessionEnd];
}

1.7 从SDK7.7.1以后版本加入Google开屏广告,若使用开屏广告需配置下列代码

导入头文件
#import <HwAdsFramework/HLYGoogleAppOpenAd.h>

在didFinishLaunchingWithOptions方法中初始化Google开屏广告
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    //测试的Id:ca-app-pub-3940256099942544/5662855259,该ID是开屏广告的广告ID,需找对接人员核对,测试可以使用本ID
    [[HLYGoogleAppOpenAd instance] initSDK:@"ca-app-pub-3940256099942544/5662855259"];

}

在applicationDidBecomeActive方法中调用Google开屏广告
- (void)applicationDidBecomeActive:(UIApplication *)application{
    NSLog(@"hlyLog:app即将进入前台");
    //adjust打点
    [Adjust trackSubsessionStart];
    
    //****下列代码是Google开屏广告的调用代码,没使用开屏广告的应用请不要调用****
    [[HLYGoogleAppOpenAd instance] tryToPresentAd];
}