Helium by Chartboost SDK 集成 如果您想使用 Helium by Chartboost SDK 监测广告收入,可以借助 SDK 到 SDK 集成,将数据发送到 Adjust 服务器。 示例 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 *adRevenue = [[ADJAdRevenue alloc]12 initWithSource:@"helium_chartboost_sdk"];13 [adjustAdRevenue setRevenue:[ad_revenue doubleValue] currency:currency_type];14 // optional fields15 NSString *network_name = [json objectForKey:@"network_name"]; // Helium demand network name16 NSString *placement_name = [json objectForKey:@"placement_name"]; // Helium placement name17 NSString *line_item_name = [json objectForKey:@"line_item_name"]; // Helium line item name18 [adjustAdRevenue setAdRevenueNetwork:network_name];19 [adjustAdRevenue setAdRevenueUnit:placement_name];20 [adjustAdRevenue setAdRevenuePlacement:line_item_name];21 // Send Adjust ad revenue22 [Adjust trackAdRevenue:adjustAdRevenue];23}