我是 ionic 3 的新手。我尝试在 ionic 3 中创建项目。
并选择项目类型为:
aws ................ ionic-angular AWS Mobile Hub Starter
现在在项目创建后,当我做“离子服务”时
其显示错误为:
aws_mobile_analytics_app_id is not defined
我不知道“aws 移动分析应用程序 ID”是什么以及它可以用于什么目的。
任何人都可以指导我这个吗?提前致谢
我是 ionic 3 的新手。我尝试在 ionic 3 中创建项目。
并选择项目类型为:
aws ................ ionic-angular AWS Mobile Hub Starter
现在在项目创建后,当我做“离子服务”时
其显示错误为:
aws_mobile_analytics_app_id is not defined
我不知道“aws 移动分析应用程序 ID”是什么以及它可以用于什么目的。
任何人都可以指导我这个吗?提前致谢
Just figured it out myself. Follow the steps below. When you create the ionic project with the aws argument - ionic start myApp aws
, it creates a mobile-hub-project.zip file.
Log into your AWS account. In the Mobile Hub dashboard, click the "Import your project" button. Next, find the mobile-hub-project.zip included in this starter project, and drag and drop it to the import modal. Set the name of the project, and then click "Import project."
Once the project is imported, you'll be directed to the dashboard for this Mobile Hub project. To continue configuring the app, you'll need to find the name of the Amazon S3 bucket auto generated through the App Content Delivery system. To do this, click the "Resources" button on the left side of the Mobile Hub project dashboard, find the "Amazon S3 Buckets" card, and then copy the bucket name that contains contents delivery.
To install the AWS CLI, first ensure your pip installation is up to date:
pip install --upgrade pip Next, install the AWS CLI:
pip install awscli
Next, assuming your terminal is still open inside of the myApp folder, run:
aws s3 cp s3://BUCKET_NAME/aws-config.js src/assets Replacing BUCKET_NAME with the full name of the S3 bucket found above. This will copy the auto-generated aws-config.js file into the src/assets folder in your Ionic app, which pre-configures all your AWS settings automatically.