Skip to content

HMS analytics kit demo provides an example of integrating HUAWEI Analytics Kit with an app. It illustrates how to collect predefined events and custom events on two pages, namely, question page or user attribute setting page.

License

Notifications You must be signed in to change notification settings

HMS-Core/hms-analytics-demo-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HMS AnalyticsKit Demo for ios

hms

English | 中文

Table of Contents

Introduction

Hmsanalyticskitdemo provides an example of integrating HUAWEI Analytics Kit with an app. It illustrates how to collect predefined events and custom events on two pages, namely, question page or user attribute setting page. If you click TRUE or FALSE on the question page, automatically collected events including page exit and page entry will be logged when the page is switched. Read more about Hianalytics.

Getting Started

For more development guidance, please refer to the links below:

Development Guide

API References

In this example, we demonstrate how to use the analytics SDK for iOS by using the CocoaPods Tool, a dependency manager for Swift and Objective-C Cocoa projects.

First download the demo by cloning this repository or downloading an archived snapshot.

Open the CLI and navigate to the location of the Xcode project. Edit the Podfile file, add pod 'HiAnalytics', that is, the dependency for pod.

Install the pod and open the .xcworkspace file to view the project.

You should create an iOS app in AppGallery Connect, and obtain the agconnect-services.plist file and add it to the project. You should also generate a signing certificate fingerprint and add the certificate file to the project. More to Development Process

Installation

Use Xcode to open the decompressed project.

Configuration

  1. Create an iOS app in AppGallery Connect and obtain the project configuration file agconnect-services.plist. In Xcode, switch to the Project view and move the agconnect-services.plist file to the root directory of the app.

Supported Environments

Hardware requirements:

  1. A MAC computer (desktop or laptop)
  2. A iPhone phone, which is used to debug the developed app

Software requirements:

  1. HUAWEI Analytics Kit 5.2.0.300
  2. Xcode

Result

After running the app you should see a screen.

And click the button TRUE or FALSE to answer the question; Click the Setting to set user profiles.

Click button SETTINGS: When you click the Setting button, you will be asked for your favorite sports. These information will be logged as users attributes by HUAWEI Analytics Kit.

Question or issues

If you want to evaluate more about HMS Core, r/HMSCore on Reddit is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.

If you have questions about how to use HMS samples, try the following options:

  • Stack Overflow is the best place for any programming questions. Be sure to tag your question with huawei-mobile-services.
  • Huawei Developer Forum HMS Core Module is great for general questions, or seeking recommendations and opinions.

If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.

License

HmsAnalyticsKitDemo is licensed under the Apache License, version 2.0.

About

HMS analytics kit demo provides an example of integrating HUAWEI Analytics Kit with an app. It illustrates how to collect predefined events and custom events on two pages, namely, question page or user attribute setting page.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •