Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BMSAnalytics method initialize needs to be reworked #29

Open
cshunger opened this issue Jan 10, 2017 · 1 comment
Open

BMSAnalytics method initialize needs to be reworked #29

cshunger opened this issue Jan 10, 2017 · 1 comment
Assignees

Comments

@cshunger
Copy link

The ONLY device event that is being picked up by the initialize method is LIFECYCLE.

There are 4 different types of events:
LIFECYLE
NETWORK
NONE
ALL

As of right now, the for loop does not account for the NONE and ALL events:

            for i in 0..<events.count {
                switch(i){
                case 2:
                    lifecycleFlag = true
                    deviceEvents.append(.lifecycle)
                    break
                case 3:
                    networkFlag = true
                    deviceEvents.append(.network)
                    break
                default:
                    lifecycleFlag = true
                    deviceEvents.append(.lifecycle)
                    break
                }

            }

The NONE and ALL will always go to the default in the switch statement.

The only way to collect on NETWORK is to send an array of 4 device events. For example:

var deviceEvents = [BMSAnalytics.NONE, BMSAnalytics.NONE, BMSAnalytics.NONE, BMSAnalytics.NONE];
BMSAnalytics.initialize(applicationName, clientApiKey, hasUserContext,  deviceEvents)

My device events list on the SDK will take on the array of:

  • 0 : BMSAnalyticsAPI.DeviceEvent.lifecycle
    • 1 : BMSAnalyticsAPI.DeviceEvent.lifecycle
    • 2 : BMSAnalyticsAPI.DeviceEvent.lifecycle
    • 3 : BMSAnalyticsAPI.DeviceEvent.network

Logic needs to be reworked in the for loop of the initialize method.

@Aerex
Copy link

Aerex commented Jan 11, 2017

Please verify fix in BMS-Core 1.2.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants