publishing - fancyfsz/FancyWiki GitHub Wiki
这里主要记录一些对游戏发行来说很重要的数据以及技术实现。
这篇来自Facebook的文档简要介绍了识别用户的几种技术
- Apple 广告 ID (Identifier for Advertising,简称IDFA)
Apple 提供的广告编号,属于 iOS 广告框架的一部分。
Starting with iOS 14.5, apps on the App Store need to receive the user’s permission through the AppTrackingTransparency framework
before collecting data used to track them. This requirement protects the privacy of App Store users.
Apple's App Tracking Transparency framework, which is used for requesting user permission to track their data for advertising purposes.
如果你的代码里面已经用到了ATT框架的API,在Xcode的TARGET
的Build Phases
页签的Link Binary With Libraries
下却没有AppTrackingTransparency.framework
的话,则会报链接错误 Undefined symbol: _OBJC_CLASS_$_ATTrackingManager
。
#import <AdSupport/ASIdentifierManager.h>
NSString *userId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
- Android 广告 ID
应该对应了AppsFlyer里面添加Android测试设备的AID;也可以简称GAID(Google advertising ID)
Google 提供的广告编号,属于 Google Play 服务的一部分。
import com.google.android.gms.ads.identifier.AdvertisingIdClient;
import com.google.android.gms.ads.identifier.AdvertisingIdClient.Info;
Info adInfo = null;
try {
adInfo = AdvertisingIdClient.getAdvertisingIdInfo(mContext);
} catch (IOException e) {
// ...
} catch (GooglePlayServicesAvailabilityException e) {
// ...
} catch (GooglePlayServicesNotAvailableException e) {
// ...
}
String userId = adInfo.getId();
- Facebook 应用范围编号,据我的理解它应该就是App Scope Id也代表了fb_login_id
NSString *userId = [FBSDKProfile currentProfile].userID;
String userId = Profile.getCurrentProfile().getId();
经我的测试发现currentProfile里面的id其实和调用graph me api得到的id字段的内容是一致的。