Helium by Chartboost SDK 集成 如果您想使用 Helium by Chartboost SDK 监测广告收入,可以借助 SDK 到 SDK 集成,将数据发送到 Adjust 服务器。 要求 在您的应用中集成 Adjust iOS SDK v4.29.7 或更新版本。 示例 Objective-C 1[NSNotificationCenter.defaultCenter addObserverForName:kHeliumDidReceiveILRDNotification2 object:nil3 queue:nil4 usingBlock:^(NSNotification * _Nonnull notification) {5 // extract the ILRD payload6 HeliumImpressionData *ilrd = (HeliumImpressionData *)notification.object;7 NSDictionary *json = ilrd.jsonData;8 // mandatory fields9 NSNumber *ad_revenue = [json objectForKey:@"ad_revenue"];10 NSString *currency_type = [json objectForKey:@"currency_type"];11 ADJAdRevenue *adjustAdRevenue = [[ADJAdRevenue alloc] initWithSource:ADJAdRevenueSourceHeliumChartboost];12 [adjustAdRevenue setRevenue:[ad_revenue doubleValue] currency:currency_type];13 // optional fields14 NSString *network_name = [json objectForKey:@"network_name"]; // Helium demand network name15 NSString *placement_name = [json objectForKey:@"placement_name"]; // Helium placement name16 NSString *line_item_name = [json objectForKey:@"line_item_name"]; // Helium line item name17 [adjustAdRevenue setAdRevenueNetwork:network_name];18 [adjustAdRevenue setAdRevenueUnit:placement_name];19 [adjustAdRevenue setAdRevenuePlacement:line_item_name];20 // Send Adjust ad revenue21 [Adjust trackAdRevenue:adjustAdRevenue];22}