使用Amazon Mobile Analytics而不配置Amazon Cognito [英] Using Amazon Mobile Analytics without configuring Amazon Cognito

查看:116
本文介绍了使用Amazon Mobile Analytics而不配置Amazon Cognito的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与竞争分析服务相比,Amazon Mobile Analytics似乎需要更多的配置和集成步骤。

Compared to competing analytics services, Amazon Mobile Analytics appear to require many more configuration and integration steps.

例如,在Flurry Analytics中,设置非常简单:

For example, in Flurry Analytics, the setup is pretty simple:

[Flurry startSession:@"<app-id>"];
[Flurry logEvent:@"<event-name>"];
// Optionally, set the userID
[Flurry setUserID:@"userid"];

我希望对于未经身份验证的用户,Amazon Mobile Analytics中的等效内容会像这样:

I was hoping the equivalent in Amazon Mobile Analytics would be something like this for unauthenticated users:

[AWSLogger defaultLogger].logLevel = AWSLogLevelVerbose;
AWSMobileAnalytics* analytics = [AWSMobileAnalytics mobileAnalyticsForAppId:@"<app-id>"];
id<AWSMobileAnalyticsEventClient> eventClient = analytics.eventClient;
id<AWSMobileAnalyticsEvent> event = [eventClient createEventWithEventType:@"ScreenView"];
[eventClient recordEvent:event];

但是,在运行该代码并将应用置于后台以上传和发送事件后,没有错误或其他日志消息。

However, after running that code and putting the app in the background to upload and send off the event, no errors or other log messages are given.

两者都是Amazon的快速入门指南和本教程( http://www.nickyap.info/mobile-analytics/ )引导您完成配置Amazon Cognito的其他步骤,甚至用于跟踪未经身份验证的用户。反过来,这需要额外的AWS权限来创建用户角色等,而我的AWS账户不具备此权限。

Both Amazon's quick start guide and this tutorial (http://www.nickyap.info/mobile-analytics/) step you through extra steps configuring Amazon Cognito, even for tracking unauthenticated users. This in turn, requires extra AWS permissions for creating user roles, etc. which my AWS account doesn't have.

有人尝试使用Amazon Mobile Analytics而不先配置Cognito ?还是绝对要求?

Has anyone tried using Amazon Mobile Analytics without configuring Cognito first? Or is that an absolute requirement?

推荐答案

Amazon Mobile Analytics客户端要求Cognito在提交数据时促进身份验证和授权。这用于提高从移动客户端提交数据的安全性,以确保有效的凭据正在发送特定应用程序的数据。如果不使用Cognito,则由于无效的权限,数据提交调用将失败。

The Amazon Mobile Analytics client requires Cognito to facilitate authentication and authorization when submitting data. This is used to increase the security of submitting data from mobile clients to ensure valid credentials are sending the data for a particular app. If Cognito is not used, the data submission call will fail due to invalid permissions.

这篇关于使用Amazon Mobile Analytics而不配置Amazon Cognito的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆