[英]How to update demographics like Gender and Age everytime using Flurry in IOS
I am using Flurry(4.2.3). 我正在使用Flurry(4.2.3)。 I have called flurry as below
我称呼如下
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[Flurry setCrashReportingEnabled:YES];
[Flurry startSession:@"API_key"];
}
But I want to call below method everytime when user updated his Gender and Age to send self.ageString and self.genderString to Flurry analytics. 但是我想每次用户更新其性别和年龄以将self.ageString和self.genderString发送到Flurry分析时都调用以下方法。
Note: I am calling below method at my view controller everytime the user updated his Gender and Age. 注意:每当用户更新其性别和年龄时,我都会在视图控制器上调用以下方法。
-(void)flurryCall
{
[Flurry setCrashReportingEnabled:YES];
[Flurry startSession:@"API_key"];
//your code
[Flurry setAge:self.ageString];//say 18
[Flurry setGender:self.genderString];//say m
}
Whenever I am calling above method. 每当我调用上述方法时。 Below error is displaying from Flurry
Flurry显示以下错误
Flurry: startSession has been called already. Flurry:startSession已经被调用。 It should only be called once.
它只能被调用一次。 Returning.
返回。
How can I send Demographics like Gender & Age everytime to Flurry. 如何将“性别和年龄”等人口统计信息每次发送到Flurry。
I know that we need to call Flurry startSession at didFinishLaunchingWithOptions but my requirement is to update the demographics(age,gender) everytime. 我知道我们需要在didFinishLaunchingWithOptions上调用Flurry startSession,但我的要求是每次都更新人口统计信息(年龄,性别)。 As I want to store the users demographics in Flurry who are using my app.
因为我想在使用我的应用程序的Flurry中存储用户人口统计信息。
Please Suggest any ideas where I am going wrong. 请提出我要去哪里的任何想法。
Thanks in Advance.. 提前致谢..
Looks like there is no options to set demographics when session has been already started. 会话已经开始时,似乎没有设置人口统计的选项。 Try to set demographics before call
startSession
. 尝试在调用
startSession
之前设置受众特征。
NSUserDefaults
when you take them. NSUserDefaults
时,请将其设置为NSUserDefaults
。 NSUserDefaults
and set them to Flurry in case they exist. NSUserDefaults
中是否具有正确的参数,并将它们设置为Flurry(如果存在)。 Yes, you will track demographics only for sessions after session when you take this parameters. 是的,使用此参数后,您将仅跟踪会话后会话的人口统计信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.