Giter Site home page Giter Site logo

adjust / cordova_sdk Goto Github PK

View Code? Open in Web Editor NEW
36.0 55.0 43.0 111.14 MB

This is the Cordova SDK of

Home Page: http://www.adjust.com

License: Other

Objective-C 26.19% JavaScript 26.50% Java 23.45% CSS 2.39% HTML 2.87% TypeScript 14.10% SCSS 2.84% Swift 0.99% Ruby 0.32% C 0.36%

cordova_sdk's Introduction

Summary

This is the Cordova SDK of Adjust™. You can read more about Adjust™ at adjust.com.

N.B. At the moment, Cordova SDK supports Android platform version 4.0.0 and higher and iOS platform version 3.0.0 and higher.

Table of contents

Example app

There is Cordova example app inside the example-cordova directory and Ionic example app inside the example-ionic-capacitor directory. In there you can check how to integrate the Adjust SDK into your app.

Basic integration

These are the minimal steps required to integrate the Adjust SDK into your Cordova project.

Get the SDK

You can get the latest version of the Adjust SDK from the npm repository or download the it from our releases page.

Add the SDK to your project

You can download our SDK directly as the plugin from npm repository. In order to do that, just execute this command in your project folder:

> cordova plugin add com.adjust.sdk
Fetching plugin "com.adjust.sdk" via npm
Installing "com.adjust.sdk" for android
Installing "com.adjust.sdk" for ios

In case you are using Ionic to build your app, you can add our SDK from awesome-cordova-plugins repo:

> npm install @awesome-cordova-plugins/adjust --save
> ionic cordova plugin add com.adjust.sdk

Integrate the SDK into your app

The Adjust SDK automatically registers with the Cordova events deviceready, resume and pause.

In your index.js file after you have received the deviceready event, add the following code to initialize the Adjust SDK:

var adjustConfig = new AdjustConfig("{YourAppToken}", AdjustConfig.EnvironmentSandbox);
Adjust.create(adjustConfig);

Replace {YourAppToken} with your app token. You can find this in your dashboard.

Depending on whether you build your app for testing or for production, you must set environment with one of these values:

AdjustConfig.EnvironmentSandbox
AdjustConfig.EnvironmentProduction

Important: This value should be set to AdjustConfig.EnvironmentSandbox if and only if you or someone else is testing your app. Make sure to set the environment to AdjustConfig.EnvironmentProduction just before you publish the app. Set it back to AdjustConfig.EnvironmentSandbox when you start developing and testing it again.

We use this environment to distinguish between real traffic and test traffic from test devices. It is very important that you keep this value meaningful at all times! This is especially important if you are tracking revenue.

Adjust logging

You can increase or decrease the amount of logs you see in tests by calling setLogLevel on your AdjustConfig instance with one of the following parameters:

adjustConfig.setLogLevel(AdjustConfig.LogLevelVerbose);   // enable all logging
adjustConfig.setLogLevel(AdjustConfig.LogLevelDebug);     // enable more logging
adjustConfig.setLogLevel(AdjustConfig.LogLevelInfo);      // the default
adjustConfig.setLogLevel(AdjustConfig.LogLevelWarn);      // disable info logging
adjustConfig.setLogLevel(AdjustConfig.LogLevelError);     // disable warnings as well
adjustConfig.setLogLevel(AdjustConfig.LogLevelAssert);    // disable errors as well
adjustConfig.setLogLevel(AdjustConfig.LogLevelSuppress);  // disable all logging

Adjust project settings

Once the Adjust SDK has been added to your app, certain tweeks are being performed so that the Adjust SDK can work properly. Everything that is being done in this process is written in the plugin.xml file of the Adjust SDK plugin. Below you can find a description of every additional thing that the Adjust SDK performs after you've added it to your app.

Android permissions

The Adjust SDK adds three permissions to your Android manifest file: INTERNET and ACCESS_NETWORK_STATE. You can find this setting in the plugin.xml file of the Adjust SDK plugin:

<config-file target="AndroidManifest.xml" parent="/manifest">
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</config-file>
  • INTERNET permission is the permission that our SDK might need at any point in time.
  • ACCESS_NETWORK_STATE is needed for reading MMC and MNC parameters.

Add permission to gather Google advertising ID

If you are targeting Android 12 and above (API level 31), you need to add the com.google.android.gms.AD_ID permission to read the device's advertising ID. Add the following line to your plugin.xml to enable the permission:

<config-file target="AndroidManifest.xml" parent="/manifest">
  <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
</config>

Important: The Adjust SDK includes the com.google.android.gms.AD_ID permission by default in version 4.32.0 and above.

You can remove the com.google.android.gms.AD_ID permission by adding a remove directive. Do this if need to make your app COPPA-compliant or if you do not target the Google Play Store.

<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>

For more information, see Google's AdvertisingIdClient.Info documentation.

Google Play Services

Since the August 1, 2014, apps in the Google Play Store must use the Google Advertising ID to uniquely identify each device. To allow the Adjust SDK to use the Google Advertising ID, you must add the Google Play Services dependency which allows reading of this parameter.

The Adjust SDK adds this dependency by default to your app. This is done with this line in the plugin.xml file:

<framework src="com.google.android.gms:play-services-ads-identifier:18.0.1" />

To check whether the analytics part of the Google Play Services library has been successfully added to your app so that the Adjust SDK can read it properly, you should start your app by configuring the SDK to run in sandbox mode and set the log level to verbose. After that, track a session or some events in your app and observe the list of parameters in the verbose logs which are being read once the session or event has been tracked. If you see a parameter called gps_adid in there, you have successfully added the analytics part of the Google Play Services library to your app and our SDK is reading the necessary information from it.

Proguard settings

If you are using Proguard, add these lines to your Proguard file:

-keep class com.adjust.sdk.** { *; }
-keep class com.google.android.gms.common.ConnectionResult {
    int SUCCESS;
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
    com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
    java.lang.String getId();
    boolean isLimitAdTrackingEnabled();
}
-keep public class com.android.installreferrer.** { *; }

If you are not publishing your app in the Google Play Store, use the following com.adjust.sdk package rules:

-keep public class com.adjust.sdk.** { *; }

Install referrer

In order to correctly attribute an install of your Android app to its source, Adjust needs information about the install referrer. This can be obtained by using the Google Play Referrer API or by catching the Google Play Store intent with a broadcast receiver.

Important: The Google Play Referrer API is newly introduced by Google with the express purpose of providing a more reliable and secure way of obtaining install referrer information and to aid attribution providers in the fight against click injection. It is strongly advised that you support this in your application. The Google Play Store intent is a less secure way of obtaining install referrer information. It will continue to exist in parallel with the new Google Play Referrer API temporarily, but it is set to be deprecated in future.

Google Play Referrer API

In order to support this in your app, the Adjust SDK adds support for it by default to your app. This is done with this line in the plugin.xml file:

<framework src="com.android.installreferrer:installreferrer:2.2" />

installreferrer library is part of Google Maven repository, so in order to be able to build your app, you need to add Google Maven repository to your app's build.gradle file if you haven't added it already:

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

Also, make sure that you have paid attention to the Proguard settings chapter and that you have added all the rules mentioned in it, especially the one needed for this feature:

-keep public class com.android.installreferrer.** { *; }

This feature is supported if you are using the Adjust SDK v4.12.0 or above.

Google Play Store intent

The Google Play Store INSTALL_REFERRER intent should be captured with a broadcast receiver. The Adjust install referrer broadcast receiver is added to your app by default. For more information, you can check our native Android SDK README. You can find this setting in the plugin.xml file of the the Adjust SDK plugin:

<config-file target="AndroidManifest.xml" parent="/manifest/application">
    <receiver
        android:name="com.adjust.sdk.AdjustReferrerReceiver"
        android:exported="true">
        <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER" />
        </intent-filter>
    </receiver>
</config-file>

Please bear in mind that, if you are using your own broadcast receiver which handles the INSTALL_REFERRER intent, you don't need the Adjust broadcast receiver to be added to your manifest file. You can remove it, but inside your own receiver add the call to the Adjust broadcast receiver as described in our Android guide.

Huawei Referrer API

As of v4.21.1, the Adjust SDK supports install tracking on Huawei devices with Huawei App Gallery version 10.4 and higher. No additional integration steps are needed to start using the Huawei Referrer API.

iOS frameworks

Adjust SDK plugin adds these iOS frameworks to your generated Xcode project:

  • AdSupport.framework - This framework is needed so that SDK can access to IDFA value and (prior to iOS 14) LAT information.
  • AdServices.framework - For devices running iOS 14.3 or higher, this framework allows the SDK to automatically handle attribution for ASA campaigns. It is required when leveraging the Apple Ads Attribution API.
  • StoreKit.framework - This framework is needed for access to SKAdNetwork framework and for Adjust SDK to handle communication with it automatically in iOS 14 or later.
  • AppTrackingTransparency.framework - This framework is needed in iOS 14 and later for SDK to be able to wrap user's tracking consent dialog and access to value of the user's consent to be tracked or not.

Settings for this can also be found in plugin.xml file of the Adjust SDK plugin:

<framework src="AdSupport.framework" weak="true" />
<framework src="StoreKit.framework" weak="true" />
<framework src="AdServices.framework" weak="true" />
<framework src="AppTrackingTransparency.framework" weak="true" />

Additional features

You can take advantage of the following features once the Adjust SDK is integrated into your project.

AppTrackingTransparency framework

Note: This feature exists only in iOS platform.

For each package sent, the Adjust backend receives one of the following four (4) states of consent for access to app-related data that can be used for tracking the user or the device:

  • Authorized
  • Denied
  • Not Determined
  • Restricted

After a device receives an authorization request to approve access to app-related data, which is used for user device tracking, the returned status will either be Authorized or Denied.

Before a device receives an authorization request for access to app-related data, which is used for tracking the user or device, the returned status will be Not Determined.

If authorization to use app tracking data is restricted, the returned status will be Restricted.

The SDK has a built-in mechanism to receive an updated status after a user responds to the pop-up dialog, in case you don't want to customize your displayed dialog pop-up. To conveniently and efficiently communicate the new state of consent to the backend, Adjust SDK offers a wrapper around the app tracking authorization method described in the following chapter, App-tracking authorization wrapper.

App-tracking authorisation wrapper

Note: This feature exists only in iOS platform.

Adjust SDK offers the possibility to use it for requesting user authorization in accessing their app-related data. Adjust SDK has a wrapper built on top of the requestTrackingAuthorizationWithCompletionHandler: method, where you can as well define the callback method to get information about a user's choice. Also, with the use of this wrapper, as soon as a user responds to the pop-up dialog, it's then communicated back using your callback method. The SDK will also inform the backend of the user's choice. Integer value will be delivered via your callback method with the following meaning:

  • 0: ATTrackingManagerAuthorizationStatusNotDetermined
  • 1: ATTrackingManagerAuthorizationStatusRestricted
  • 2: ATTrackingManagerAuthorizationStatusDenied
  • 3: ATTrackingManagerAuthorizationStatusAuthorized

To use this wrapper, you can call it as such:

Adjust.requestTrackingAuthorizationWithCompletionHandler(function(status) {
    switch (status) {
        case 0:
            // ATTrackingManagerAuthorizationStatusNotDetermined case
            break;
        case 1:
            // ATTrackingManagerAuthorizationStatusRestricted case
            break;
        case 2:
            // ATTrackingManagerAuthorizationStatusDenied case
            break;
        case 3:
            // ATTrackingManagerAuthorizationStatusAuthorized case
            break;
    }
});

Get current authorisation status

Note: This feature exists only in iOS platform.

To get the current app tracking authorization status you can call getAppTrackingAuthorizationStatus method of Adjust class that will return one of the following possibilities:

  • 0: The user hasn't been asked yet
  • 1: The user device is restricted
  • 2: The user denied access to IDFA
  • 3: The user authorized access to IDFA
  • -1: The status is not available

Check for ATT status change

In cases where you are not using Adjust app-tracking authorization wrapper, Adjust SDK will not be able to know immediately upon answering the dialog what is the new value of app-tracking status. In situations like this, if you would want Adjust SDK to read the new app-tracking status value and communicate it to our backend, make sure to make a call to this method:

Adjust.checkForNewAttStatus();

SKAdNetwork framework

Note: This feature exists only in iOS platform.

If you have implemented the Adjust iOS SDK v4.23.0 or above and your app is running on iOS 14 and above, the communication with SKAdNetwork will be set on by default, although you can choose to turn it off. When set on, Adjust automatically registers for SKAdNetwork attribution when the SDK is initialized. If events are set up in the Adjust dashboard to receive conversion values, the Adjust backend sends the conversion value data to the SDK. The SDK then sets the conversion value. After Adjust receives the SKAdNetwork callback data, it is then displayed in the dashboard.

In case you don't want the Adjust SDK to automatically communicate with SKAdNetwork, you can disable that by calling the following method on configuration object:

adjustConfig.deactivateSKAdNetworkHandling();

Update SKAdNetwork conversion value

Note: This feature exists only in iOS platform.

You can use Adjust SDK wrapper method updateConversionValue to update SKAdNetwork conversion value for your user:

Adjust.updateConversionValue(6);

Conversion value updated callback

Note: This feature exists only in iOS platform.

You can register callback to get notified each time when Adjust SDK updates conversion value for the user.

var adjustConfig = new AdjustConfig(appToken, environment);

adjustConfig.setConversionValueUpdatedCallbackListener(function(conversionValue) {
    console.log("Conversion value updated callback recveived");
    console.log("Conversion value: " + conversionValue);
  });

Adjust.create(adjustConfig);

Event tracking

You can use Adjust to track all kinds of events. Let's say you want to track every tap on a button. Simply create a new event token in your dashboard. Let's say that event token is abc123. You can add the following line in your button’s click handler method to track the click:

var adjustEvent = new AdjustEvent("abc123");
Adjust.trackEvent(adjustEvent);

Revenue tracking

If your users can generate revenue by tapping on advertisements or making In-App Purchases, then you can track those revenues with events. Let's say a tap is worth €0.01. You could track the revenue event like this:

var adjustEvent = new AdjustEvent("abc123");
adjustEvent.setRevenue(0.01, "EUR");
Adjust.trackEvent(adjustEvent);

When you set a currency token, Adjust will automatically convert the incoming revenues into a reporting revenue of your choice. Read more about currency conversion here.

Revenue deduplication

You can also add an optional transaction ID to avoid tracking duplicate revenues. The last ten transaction IDs are remembered, and revenue events with duplicate transaction IDs are skipped. This is especially useful for In-App Purchase tracking. You can see an example below.

If you want to track in-app purchases, please make sure to call the trackEvent only if the transaction is finished and an item is purchased. That way you can avoid tracking revenue that is not actually being generated.

var adjustEvent = new AdjustEvent("abc123");
adjustEvent.setRevenue(0.01, "EUR");
adjustEvent.setTransactionId("{YourTransactionId}");
Adjust.trackEvent(adjustEvent);

Note: Transaction ID is the iOS term, unique identifier for successfully finished Android In-App-Purchases is named Order ID.

Callback parameters

You can also register a callback URL for that event in your dashboard and we will send a GET request to that URL whenever the event gets tracked. In that case you can also put some key-value pairs in an object and pass it to the trackEvent method. We will then append these named parameters to your callback URL.

For example, suppose you have registered the URL http://www.adjust.com/callback for your event with event token abc123 and execute the following lines:

var adjustEvent = new AdjustEvent("abc123");
adjustEvent.addCallbackParameter("key", "value");
adjustEvent.addCallbackParameter("foo", "bar");
Adjust.trackEvent(adjustEvent);

In that case we would track the event and send a request to:

http://www.adjust.com/callback?key=value&foo=bar

It should be mentioned that we support a variety of placeholders like {idfa} for iOS or {gps_adid} for Android that can be used as parameter values. In the resulting callback the {idfa} placeholder would be replaced with the ID for Advertisers of the current device for iOS and the {gps_adid} would be replaced with the Google Advertising ID of the current device for Android. Also note that we don't store any of your custom parameters, but only append them to your callbacks. If you haven't registered a callback for an event, these parameters won't even be read.

You can read more about using URL callbacks, including a full list of available values, in our callbacks guide.

Partner parameters

Similarly to the callback parameters mentioned above, you can also add parameters that Adjust will transmit to the network partners of your choice. You can activate these networks in your Adjust dashboard.

This works similarly to the callback parameters mentioned above, but can be added by calling the addPartnerParameter method on your AdjustEvent instance.

var adjustEvent = new AdjustEvent("abc123");
adjustEvent.addPartnerParameter("key", "value");
adjustEvent.addPartnerParameter("foo", "bar");
Adjust.trackEvent(adjustEvent);

You can read more about special partners and networks in our guide to special partners.

Callback identifier

You can also add custom string identifier to each event you want to track. This identifier will later be reported in event success and/or event failure callbacks to enable you to keep track on which event was successfully tracked or not. You can set this identifier by calling the setCallbackId method on your AdjustEvent instance:

var adjustEvent = new AdjustEvent("abc123");
adjustEvent.setCallbackId("Your-Custom-Id");
Adjust.trackEvent(adjustEvent);

Subscription tracking

Note: This feature is only available in the SDK v4.22.0 and above.

You can track App Store and Play Store subscriptions and verify their validity with the Adjust SDK. After a subscription has been successfully purchased, make the following call to the Adjust SDK:

For App Store subscription:

var subscription = new AdjustAppStoreSubscription(price, currency, transactionId, receipt);
subscription.setTransactionDate(transactionDate);
subscription.setSalesRegion(salesRegion);

Adjust.trackAppStoreSubscription(subscription);

For Play Store subscription:

var subscription = new AdjustPlayStoreSubscription(price, currency, sku, orderId, signature, purchaseToken);
subscription.setPurchaseTime(purchaseTime);

Adjust.trackPlayStoreSubscription(subscription);

Subscription tracking parameters for App Store subscription:

Subscription tracking parameters for Play Store subscription:

Note: Subscription tracking API offered by Adjust SDK expects all parameters to be passed as string values. Parameters described above are the ones which API exects you to pass to subscription object prior to tracking subscription. There are various libraries which are handling in app purchases in Cordova and each one of them should return information described above in some form upon successfully completed subscription purchase. You should locate where these parameters are placed in response you are getting from library you are using for in app purchases, extract those values and pass them to Adjust API as string values.

Just like with event tracking, you can attach callback and partner parameters to the subscription object as well:

For App Store subscription:

var subscription = new AdjustAppStoreSubscription(price, currency, transactionId, receipt);
subscription.setTransactionDate(transactionDate);
subscription.setSalesRegion(salesRegion);

// add callback parameters
subscription.addCallbackParameter("key", "value");
subscription.addCallbackParameter("foo", "bar");

// add partner parameters
subscription.addPartnerParameter("key", "value");
subscription.addPartnerParameter("foo", "bar");

Adjust.trackAppStoreSubscription(subscription);

For Play Store subscription:

var subscription = new AdjustPlayStoreSubscription(price, currency, sku, orderId, signature, purchaseToken);
subscription.setPurchaseTime(purchaseTime);

// add callback parameters
subscription.addCallbackParameter("key", "value");
subscription.addCallbackParameter("foo", "bar");

// add partner parameters
subscription.addPartnerParameter("key", "value");
subscription.addPartnerParameter("foo", "bar");

Adjust.trackPlayStoreSubscription(subscription);

Session parameters

Some parameters are saved to be sent in every event and session of the Adjust SDK. Once you have added any of these parameters, you don't need to add them every time, since they will be saved locally. If you add the same parameter twice, there will be no effect.

These session parameters can be called before the Adjust SDK is launched to make sure they are sent even on install. If you need to send them with an install, but can only obtain the needed values after launch, it's possible to delay the first launch of the Adjust SDK to allow this behaviour.

Session callback parameters

The same callback parameters that are registered for events can be also saved to be sent in every event or session of the Adjust SDK.

The session callback parameters have a similar interface of the event callback parameters. Instead of adding the key and its value to an event, it's added through a call to method addSessionCallbackParameter of the Adjust instance:

Adjust.addSessionCallbackParameter("foo", "bar");

The session callback parameters will be merged with the callback parameters added to an event. The callback parameters added to an event have precedence over the session callback parameters. Meaning that, when adding a callback parameter to an event with the same key to one added from the session, the value that prevails is the callback parameter added to the event.

It's possible to remove a specific session callback parameter by passing the desiring key to the method removeSessionCallbackParameter of the Adjust instance:

Adjust.removeSessionCallbackParameter("foo");

If you wish to remove all key and values from the session callback parameters, you can reset it with the method resetSessionCallbackParameters of the Adjust instance:

Adjust.resetSessionCallbackParameters();

Session partner parameters

In the same way that there are session callback parameters that are sent for every event or session of the Adjust SDK, there are also session partner parameters.

These will be transmitted to network partners, for the integrations that have been activated in your Adjust dashboard.

The session partner parameters have a similar interface to the event partner parameters. Instead of adding the key and its value to an event, it's added through a call to method addSessionPartnerParameter of the Adjust instance:

Adjust.addSessionPartnerParameter("foo", "bar");

The session partner parameters will be merged with the partner parameters added to an event. The partner parameters added to an event have precedence over the session partner parameters. Meaning that, when adding a partner parameter to an event with the same key to one added from the session, the value that prevails is the partner parameter added to the event.

It's possible to remove a specific session partner parameter by passing the desiring key to the method removeSessionPartnerParameter of the Adjust instance:

Adjust.removeSessionPartnerParameter("foo");

If you wish to remove all keys and values from the session partner parameters, you can reset it with the method resetSessionPartnerParameters of the Adjust instance:

Adjust.resetSessionPartnerParameters();

Delay start

Delaying the start of the Adjust SDK allows your app some time to obtain session parameters, such as unique identifiers, to be sent on install.

Set the initial delay time in seconds with the setDelayStart field of the AdjustConfig instance:

adjustConfig.setDelayStart(5.5);

In this case this will make the Adjust SDK not send the initial install session and any event created for 5.5 seconds. After this time is expired or if you call sendFirstPackages() of the Adjust instance in the meanwhile, every session parameter will be added to the delayed install session and events and the Adjust SDK will resume as usual.

The maximum delay start time of the Adjust SDK is 10 seconds.

Attribution callback

You can register a listener to be notified of tracker attribution changes. Due to the different sources considered for attribution, this information cannot by provided synchronously. The simplest way is to create a single anonymous listener which is going to be called each time your user's attribution value changes:

With the AdjustConfig instance, before starting the SDK, add the anonymous listener:

var adjustConfig = new AdjustConfig(appToken, environment);

adjustConfig.setAttributionCallbackListener(function(attribution) {
    // Printing all attribution properties.
    console.log("Attribution changed!");
    console.log(attribution.trackerToken);
    console.log(attribution.trackerName);
    console.log(attribution.network);
    console.log(attribution.campaign);
    console.log(attribution.adgroup);
    console.log(attribution.creative);
    console.log(attribution.clickLabel);
    console.log(attribution.adid);
    console.log(attribution.costType);
    console.log(attribution.costAmount);
    console.log(attribution.costCurrency);
});

Adjust.create(adjustConfig);

Within the listener function you have access to the attribution parameters. Here is a quick summary of its properties:

  • trackerToken the tracker token of the current attribution.
  • trackerName the tracker name of the current attribution.
  • network the network grouping level of the current attribution.
  • campaign the campaign grouping level of the current attribution.
  • adgroup the ad group grouping level of the current attribution.
  • creative the creative grouping level of the current attribution.
  • clickLabel the click label of the current attribution.
  • adid the Adjust device identifier.
  • costType the cost type.
  • costAmount the cost amount.
  • costCurrency the cost currency.

Please make sure to consider our applicable attribution data policies.

Note: The cost data - costType, costAmount & costCurrency are only available when configured in AdjustConfig by calling setNeedsCost method. If not configured or configured, but not being part of the attribution, these fields will have value null. This feature is available in SDK v4.26.0 and above.

You can register a callback to be notified of successful and failed tracked events and/or sessions.

Follow the same steps as for attribution callback to implement the following callback function for successfully tracked events:

var adjustConfig = new AdjustConfig(appToken, environment);

adjustConfig.setEventTrackingSucceededCallbackListener(function(eventSuccess) {
    // Printing all event success properties.
    console.log("Event tracking succeeded!");
    console.log(eventSuccess.message);
    console.log(eventSuccess.timestamp);
    console.log(eventSuccess.eventToken);
    console.log(eventSuccess.callbackId);
    console.log(eventSuccess.adid);
    console.log(eventSuccess.jsonResponse);
});

Adjust.create(adjustConfig);

The following callback function for failed tracked events:

var adjustConfig = new AdjustConfig(appToken, environment);

adjustConfig.setEventTrackingFailedCallbackListener(function(eventFailure) {
    // Printing all event failure properties.
    console.log("Event tracking failed!");
    console.log(eventFailure.message);
    console.log(eventFailure.timestamp);
    console.log(eventFailure.eventToken);
    console.log(eventFailure.callbackId);
    console.log(eventFailure.adid);
    console.log(eventFailure.willRetry);
    console.log(eventFailure.jsonResponse);
});

Adjust.create(adjustConfig);

For successfully tracked sessions:

var adjustConfig = new AdjustConfig(appToken, environment);

adjustConfig.setSessionTrackingSucceededCallbackListener(function(sessionSuccess) {
    // Printing all session success properties.
    console.log("Session tracking succeeded!");
    console.log(sessionSuccess.message);
    console.log(sessionSuccess.timestamp);
    console.log(sessionSuccess.adid);
    console.log(sessionSuccess.jsonResponse);
});

Adjust.create(adjustConfig);

And for failed tracked sessions:

var adjustConfig = new AdjustConfig(appToken, environment);

adjustConfig.setSessionTrackingFailedCallbackListener(function(sessionFailure) {
    // Printing all session failure properties.
    console.log("Session tracking failed!");
    console.log(sessionFailure.message);
    console.log(sessionFailure.timestamp);
    console.log(sessionFailure.adid);
    console.log(sessionFailure.willRetry);
    console.log(sessionFailure.jsonResponse);
});

Adjust.create(adjustConfig);

The callback functions will be called after the SDK tries to send a package to the server. Within the callback you have access to a response data object specifically for the callback. Here is a quick summary of the session response data properties:

  • var message the message from the server or the error logged by the SDK.
  • var timestamp timestamp from the server.
  • var adid a unique device identifier provided by Adjust.
  • var jsonResponse the JSON object with the response from the server.

Both event response data objects contain:

  • var eventToken the event token, if the package tracked was an event.
  • var callbackId the custom defined callback ID set on event object.

And both event and session failed objects also contain:

  • var willRetry indicates there will be an attempt to resend the package at a later time.

Disable tracking

You can disable the Adjust SDK from tracking by invoking the method setEnabled of the Adjust instance with the enabled parameter as false. This setting is remembered between sessions, but it can only be activated after the first session.

Adjust.setEnabled(false);

You can verify if the Adjust SDK is currently active with the method isEnabled of the Adjust instance. It is always possible to activate the Adjust SDK by invoking setEnabled with the parameter set to true.

Offline mode

You can put the Adjust SDK in offline mode to suspend transmission to our servers while retaining tracked data to be sent later. When in offline mode, all information is saved in a file, so be careful not to trigger too many events while in offline mode.

You can activate offline mode by calling the method setOfflineMode of the Adjust instance with the parameter true.

Adjust.setOfflineMode(true);

Conversely, you can deactivate offline mode by calling setOfflineMode with false. When the Adjust SDK is put back in online mode, all saved information is send to our servers with the correct time information.

Unlike disabling tracking, this setting is not remembered between sessions. This means that the SDK is in online mode whenever it is started, even if the app was terminated in offline mode.

Event buffering

If your app makes heavy use of event tracking, you might want to delay some HTTP requests in order to send them in one batch every minute. You can enable event buffering with your AdjustConfig instance by calling setEventBufferingEnabled method:

var adjustConfig = new AdjustConfig(appToken, environment);
adjustConfig.setEventBufferingEnabled(true);
Adjust.create(adjustConfig);

GDPR right to be forgotten

In accordance with article 17 of the EU's General Data Protection Regulation (GDPR), you can notify Adjust when a user has exercised their right to be forgotten. Calling the following method will instruct the Adjust SDK to communicate the user's choice to be forgotten to the Adjust backend:

Adjust.gdprForgetMe();

Upon receiving this information, Adjust will erase the user's data and the Adjust SDK will stop tracking the user. No requests from this device will be sent to Adjust in the future.

Third-party sharing for specific users

You can notify Adjust when a user disables, enables, and re-enables data sharing with third-party partners.

Disable third-party sharing for specific users

Call the following method to instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend:

var adjustThirdPartySharing = new AdjustThirdPartySharing(false);
Adjust.trackThirdPartySharing(adjustThirdPartySharing);

Upon receiving this information, Adjust will block the sharing of that specific user's data to partners and the Adjust SDK will continue to work as usual.

Call the following method to instruct the Adjust SDK to communicate the user's choice to share data or change data sharing, to the Adjust backend:

var adjustThirdPartySharing = new AdjustThirdPartySharing(true);
Adjust.trackThirdPartySharing(adjustThirdPartySharing);

Upon receiving this information, Adjust changes sharing the specific user's data to partners. The Adjust SDK will continue to work as expected.

Call the following method to instruct the Adjust SDK to send the granular options to the Adjust backend:

var adjustThirdPartySharing = new AdjustThirdPartySharing(null);
adjustThirdPartySharing.addGranularOption("PartnerA", "foo", "bar");
Adjust.trackThirdPartySharing(adjustThirdPartySharing);

Consent measurement for specific users

You can notify Adjust when a user exercises their right to change data sharing with partners for marketing purposes, but they allow data sharing for statistical purposes.

Call the following method to instruct the Adjust SDK to communicate the user's choice to change data sharing, to the Adjust backend:

Adjust.trackMeasurementConsent(true);

Upon receiving this information, Adjust changes sharing the specific user's data to partners. The Adjust SDK will continue to work as expected.

SDK signature

When you set up the SDK Signature, each SDK communication package is "signed". This lets Adjust’s servers easily detect and reject any install activity that is not legitimate.

There are just a few steps involved in setting up the SDK Signature. Please contact your Technical Account Manager or [email protected] to get started.

Background tracking

The default behaviour of the Adjust SDK is to pause sending HTTP requests while the app is in the background. You can change this in your AdjustConfig instance by calling setSendInBackground method:

var adjustConfig = new AdjustConfig(appToken, environment);
adjustConfig.setSendInBackground(true);
Adjust.create(adjustConfig);

If nothing is set, sending in background is disabled by default.

Device IDs

Certain services (such as Google Analytics) require you to coordinate Device and Client IDs in order to prevent duplicate reporting.

To obtain the IDFA, call the getIdfa method of the Adjust instance. You need to pass a callback to that method in order to obtain the value:

Adjust.getIdfa(function(idfa) {
    // Use idfa value.
});

Google Play Services advertising identifier

The Google Play Services Advertising Identifier (Google advertising ID) is a unique identifier for a device. Users can opt out of sharing their Google advertising ID by toggling the "Opt out of Ads Personalization" setting on their device. When a user has enabled this setting, the Adjust SDK returns a string of zeros when trying to read the Google advertising ID.

Important: If you are targeting Android 12 and above (API level 31), you need to add the com.google.android.gms.AD_ID permission to your app. If you do not add this permission, you will not be able to read the Google advertising ID even if the user has not opted out of sharing their ID.

If you need to obtain the Google Advertising ID, you can call the getGoogleAdId method of the Adjust instance. You need to pass a callback to that method in order to obtain the value:

Adjust.getGoogleAdId(function(googleAdId) {
    // Use googleAdId value.
});

Inside the callback method you will have access to the Google Advertising ID as the variable googleAdId.

Amazon advertising identifier

If you need to obtain the Amazon advertising ID, you can call the getAmazonAdId method on Adjust instance:

Adjust.getAmazonAdId(function(amazonAdId) {
    // Use amazonAdId value.
});

Inside the callback method you will have access to the Amazon Advertising ID as the variable amazonAdId.

Adjust device identifier

For every device with your app installed on it, the Adjust backend generates a unique Adjust device identifier (adid). In order to obtain this identifier, call the getAdid method of the Adjust instance. You need to pass a callback to that method in order to obtain the value:

Adjust.getAdid(function(adid) {
    // Use adid value.
});

Note: Information about the adid is only available after an app installation has been tracked by the Adjust backend. From that moment on, the Adjust SDK has information about the device adid and you can access it with this method. So, it is not possible to access the adid value before the SDK has been initialised and installation of your app has been successfully tracked.

Set external device ID

Note If you want to use external device IDs, please contact your Adjust representative. They will talk you through the best approach for your use case.

An external device identifier is a custom value that you can assign to a device or user. They can help you to recognize users across sessions and platforms. They can also help you to deduplicate installs by user so that a user isn't counted as multiple new installs.

You can also use an external device ID as a custom identifier for a device. This can be useful if you use these identifiers elsewhere and want to keep continuity.

Check out our external device identifiers article for more information.

Note This setting requires Adjust SDK v4.21.0 or later.

To set an external device ID, assign the identifier to the externalDeviceId property of your config instance. Do this before you initialize the Adjust SDK.

adjustConfig.setExternalDeviceId("{Your-External-Device-Id}");

Important: You need to make sure this ID is unique to the user or device depending on your use-case. Using the same ID across different users or devices could lead to duplicated data. Talk to your Adjust representative for more information.

If you want to use the external device ID in your business analytics, you can pass it as a session callback parameter. See the section on session callback parameters for more information.

You can import existing external device IDs into Adjust. This ensures that the backend matches future data to your existing device records. If you want to do this, please contact your Adjust representative.

User attribution

As described in the attribution callback section, this callback is triggered, providing you with information about a new attribution whenever it changes. If you want to access information about a user's current attribution whenever you need it, you can make a call to the getAttribution method of the Adjust instance:

Adjust.getAttribution(function(attribution) {
    // Use attribution object in same way like in attribution callback.
});

Note: Information about current attribution is only available after an app installation has been tracked by the Adjust backend and the attribution callback has been triggered. From that moment on, the Adjust SDK has information about a user's attribution and you can access it with this method. So, it is not possible to access a user's attribution value before the SDK has been initialised and an attribution callback has been triggered.

Push token

To send us the push notification token, add the following call to Adjust whenever you get your token in the app or when it gets updated:

Adjust.setPushToken("YourPushNotificationsToken");

Push tokens are used for Audience Builder and client callbacks, and they are required for the uninstall tracking feature.

Pre-installed trackers

If you want to use the Adjust SDK to recognize users that found your app pre-installed on their device, follow these steps.

  1. Create a new tracker in your dashboard.

  2. Open your app delegate and add set the default tracker of your AdjustConfig instance:

    var adjustConfig = new AdjustConfig(appToken, environment);
    adjustConfig.setDefaultTracker("{TrackerToken}");
    Adjust.create(adjustConfig);

Replace {TrackerToken} with the tracker token you created in step 2. Please note that the dashboard displays a tracker URL (including http://app.adjust.com/). In your source code, you should specify only the six-character token and not the entire URL.

  1. Build and run your app. You should see a line like the following in the app's log output:

    Default tracker: 'abc123'
    

Deep linking

If you are using the Adjust tracker URL with an option to deep link into your app from the URL, there is the possibility to get info about the deep link URL and its content. Hitting the URL can happen when the user has your app already installed (standard deep linking scenario) or if they don't have the app on their device (deferred deep linking scenario).

Standard deep linking scenario

Standard deep linking scenario is a platform specific feature and in order to support it, you need to add some additional settings to your app. If your user already has the app installed and hits the tracker URL with deep link information in it, your application will be opened and the content of the deep link will be sent to your app so that you can parse it and decide what to do next.

Note for iOS: With the introduction of iOS 9, Apple has changed the way deep linking is handled in the app. Depending on which scenario you want to use for your app (or if you want to use them both to support a wide range of devices), you need to set up your app to handle one or both of the following scenarios.

Deep linking on Android & iOS 8 and earlier

To support deep linking handling in your app for Android and iOS 8 and earlier versions, you can use the Custom URL Scheme plugin which can be found here.

After you successfully integrate this plugin, in the callback method used with the plugin described in this section you will have an access to the content of the URL which opened your app on user's device:

function handleOpenURL(url) {
    setTimeout(function () {
        // Check content of the url object and get information about the URL.
    }, 300);
};

By completing integration of this plugin, you should be able to handle deep linking in Android and iOS 8 and lower.

Deep linking on iOS 9 and later

Starting from iOS 9, Apple has introduced suppressed support for old style deep linking with custom URL schemes like described above in favour of universal links. If you want to support deep linking in your app for iOS 9 and higher, you need to add support for universal links handling.

First thing you need to do is to enable universal links for your app in the Adjust dashboard. Instructions on how to do that can be found in our native iOS SDK README.

After you have enabled universal links handling for your app in your dashboard, you need to add support for it in your app as well. You can achieve this by adding this plugin to your cordova app. Please, read the README of this plugin, because it precisely describes what should be done in order to properly integrate it.

Note: You can disregard any information in the README that states that you need to have a domain and website or you need to upload a file to the root of your domain. Adjust is taking care of this instead of you and you can skip these parts of the README. Also, you don't need to follow the instructions of this plugin for the Android platform, because deep linking in Android is still being handled with Custom URL scheme plugin.

To complete the integration of Cordova Universal Links Plugin after successfully enabling universal links for your app in the Adjust dashboard you must:

Edit your config.xml file

You need to add following entry to your config.xml file:

<widget>
    <universal-links>
        <host name="[hash].adj.st" scheme="https" event="adjustDeepLinking" />
    </universal-links>
</widget>

You should replace the [hash] value with the value you generated on the Adjust dashboard. You can name the event also how ever you like.

Check ul_web_hooks/ios/ content of the plugin

Go to the Cordova Universal Links Plugin install directory in your app and check the ul_web_hooks/ios/ folder content. In there, you should see a generated file with the name [hash].ulink.adjust.com#apple-app-site-association. The content of that file should look like this:

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "<YOUR_TEAM_ID_FROM_MEMBER_CENTER>.com.adjust.examples",
        "paths": [
          "/ulink/*"
        ]
      }
    ]
  }
}

Integrate plugin to your index.js file

After the deviceready event gets fired, you should subscribe to the event you have defined in your config.xml file, and define the callback method which gets fired once the event is triggered. Because you don't need this plugin to handle deep linking in Android, you can only need to subscribe to it if your app is running on an iOS device.

// ...

var app = {
    initialize: function() {
        this.bindEvents();
    },

    bindEvents: function() {
        document.addEventListener('deviceready', this.onDeviceReady, false);
    },

    onDeviceReady: function() {
        if (device.platform == "iOS") {
            universalLinks.subscribe('adjustDeepLinking', app.didLaunchAppFromLink);
        }
    },

    didLaunchAppFromLink: function(eventData) {
        // Check content of the eventData.url object and get information about the URL.
    }
}
// ...

By completing these steps, you have successfully added support for deep linking for iOS 9 and above as well.

Deferred deep linking scenario

While deferred deep linking is not supported out of the box on Android and iOS, our Adjust SDK makes it possible.

In order to get info about the URL content in a deferred deep linking scenario, you should set a callback method on the AdjustConfig object which will receive one parameter where the content of the URL will be delivered. You should set this method on the config object by calling the method setDeferredDeeplinkCallbackListener:

var adjustConfig = new AdjustConfig(appToken, environment);

adjustConfig.setDeferredDeeplinkCallbackListener(function(deeplink) {
    console.log("Deferred deep link URL content: " + deeplink);
});

Adjust.create(adjustConfig);

In deferred deep linking scenario, there is one additional setting which can be set on the AdjustConfig object. Once the Adjust SDK gets the deferred deep link info, we are offering you the possibility to choose whether our SDK should open this URL or not. You can choose to set this option by calling the setShouldLaunchDeeplink method on the config object:

var adjustConfig = new AdjustConfig(appToken, environment);

adjustConfig.setShouldLaunchDeeplink(true);
// or adjustConfig.setShouldLaunchDeeplink(false);

adjustConfig.setDeferredDeeplinkCallbackListener(function(deeplink) {
    console.log("Deferred deep link URL content: " + deeplink);
});

Adjust.create(adjustConfig);

If nothing is set, the Adjust SDK will always try to launch the URL by default.

Reattribution via deep links

Adjust enables you to run re-engagement campaigns by using deep links. For more information on this, please check our official docs.

If you are using this feature, in order for your user to be properly reattributed, you need to make one additional call to the Adjust SDK in your app.

Once you have received deep link content information in your app, add a call to appWillOpenUrl method of the Adjust instance. By making this call, the Adjust SDK will try to find if there is any new attribution info inside of the deep link and if any, it will be sent to the Adjust backend. If your user should be reattributed due to a click on the Adjust tracker URL with deep link content in it, you will see the attribution callback in your app being triggered with new attribution info for this user.

In the code examples described above, a call to the appWillOpenUrl method should be done like this:

function handleOpenURL(url) {
    setTimeout(function () {
        // Check content of the url object and get information about the URL.
        Adjust.appWillOpenUrl(url);
    }, 300);
};
// ...

var app = {
    initialize: function() {
        this.bindEvents();
    },

    bindEvents: function() {
        document.addEventListener('deviceready', this.onDeviceReady, false);
    },

    onDeviceReady: function() {
        if (device.platform == "iOS") {
            universalLinks.subscribe('adjustDeepLinking', app.didLaunchAppFromLink);
        }
    },

    didLaunchAppFromLink: function(eventData) {
        // Check content of the eventData.url object and get information about the URL.
        Adjust.appWillOpenUrl(eventData.url);
    }
}
// ...

Data residency

In order to enable data residency feature, make sure to call setUrlStrategy method of the AdjustConfig instance with one of the following constants:

adjustConfig.setUrlStrategy(AdjustConfig.DataResidencyEU); // for EU data residency region
adjustConfig.setUrlStrategy(AdjustConfig.DataResidencyTR); // for Turkey data residency region
adjustConfig.setUrlStrategy(AdjustConfig.DataResidencyUS); // for US data residency region

OAID plugin

You can enable native Adjust OAID plugin directly from Adjust Cordova SDK. In order to do that, first make sure to read native OAID plugin docs. Since Adjust Cordova SDK is already adding the native Adjust SDK under the hood, only dependency you need to add to your app from OAID plugin docs is the OAID plugin dependency. After that has been done, you have an option to enable usage of native Adjust OAID plugin by calling setOaidReadingEnabled method of AdjustConfig:

adjustConfig.setOaidReadingEnabled(true);

COPPA compliance

By default Adjust SDK doesn't mark app as COPPA compliant. In order to mark your app as COPPA compliant, make sure to call setCoppaCompliantEnabled method of AdjustConfig instance with boolean parameter true:

adjustConfig.setCoppaCompliantEnabled(true);

Note: By enabling this feature, third-party sharing will be automatically disabled for the users. If later during the app lifetime you decide not to mark app as COPPA compliant anymore, third-party sharing will not be automatically re-enabled. Instead, next to not marking your app as COPPA compliant anymore, you will need to explicitly re-enable third-party sharing in case you want to do that.

Play Store Kids Apps

By default Adjust SDK doesn't mark Android app as Play Store Kids App. In order to mark your app as the app which is targetting kids in Play Store, make sure to call setPlayStoreKidsAppEnabled method of AdjustConfig instance with boolean parameter true:

adjustConfig.setPlayStoreKidsAppEnabled(true);

License

The Adjust SDK is licensed under the MIT License.

Copyright (c) 2012-Present Adjust GmbH, http://www.adjust.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cordova_sdk's People

Contributors

aditi3 avatar danielsatriano avatar dependabot[bot] avatar elmacnifico avatar esamcgv avatar ivosam3 avatar lejohnduff avatar mpm avatar nonelse avatar sighmoan avatar simon-wicki avatar sporiff avatar uerceg avatar wellle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova_sdk's Issues

Can we read install referrer value

Hello,

Hope you are doing good! We are aware that Adjust sdk already implements install referrer and we can see the value in sandbox debug logs. Now, we have a requirement to use the value of referrer in our application. So, is there any way to read the referrer value from the cordova sdk in android and ios? Please let us know the approach.

Deprecation clarification

Hello,

I am using adjust 4.14. Could you let me know if there are any functionalities in 4.14 which would be deprecated in the near future with the new releases that could impact my integration?

Ionic 2 or 3 Supported?

Please share/comment isn't this plugin support ionic 2 or 3 as well? If yes, how to initialize this plugin in the project?
For the moment I try to implement it on ionic 3 but when I try to generate my apk I get this error.

:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

:compileDebugSources
:transformClassesWithDexBuilderForDebug

:transformDexArchiveWithExternalLibsDexMergerForDebug
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 17s
40 actionable tasks: 40 executed
Error: app/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

No adjust id for Huawei app without GMS

Hi, I'm using this plugin successfully in a regular Play Store app.
But when calling Adjust.getAdid on a Huawei AppGallery only device, I get a null result.
Also, the log sais, Adjust not initialized correctly.

Are there any additional steps for this to work with a Huawei device that doesn't have GMS?
Thanks.

appDidLaunch issue ionic cordova ios app only

2020-02-28 23:23:28.142061+0530 App_Name[55521:2623924] [CDVTimer][adjust] 0.329018ms
2020-02-28 23:23:48.679820+0530 App_Name [55521:2623924] [Adjust]e: Please initialize Adjust by calling 'appDidLaunch' before
2020-02-28 23:23:48.679940+0530 App_Name [55521:2623924] THREAD WARNING: ['Adjust'] took '10.363037' ms. Plugin should use a background thread.

I am using this in ionic4 and after platform ready, 10days back it worked and now giving above issue, could you please help here

Plugin cannot be installed

Hi, when I execute
cordova plugin add com.adjust.sdk

I get the following error:

Installing "com.adjust.sdk" for android
Error during processing of action! Attempting to revert...
Failed to install 'com.adjust.sdk':CordovaError: Uh oh!
"/Users/kkoller/Documents/treefin/git/app/dist_cordova/plugins/com.adjust.sdk/src/Android/adjust-android.jar" not found!
    at copyFile (/Users/kkoller/Documents/treefin/git/app/dist_cordova/platforms/android/cordova/lib/pluginHandlers.js:202:36)
    at copyNewFile (/Users/kkoller/Documents/treefin/git/app/dist_cordova/platforms/android/cordova/lib/pluginHandlers.js:234:5)
    at handlers.source-file.install (/Users/kkoller/Documents/treefin/git/app/dist_cordova/platforms/android/cordova/lib/pluginHandlers.js:37:17)
    at Object.ActionStack.process (/Users/kkoller/Documents/treefin/git/app/dist_cordova/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/Users/kkoller/Documents/treefin/git/app/dist_cordova/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:117:20)
    at PluginManager.addPlugin (/Users/kkoller/Documents/treefin/git/app/dist_cordova/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:147:17)
    at Api.addPlugin (/Users/kkoller/Documents/treefin/git/app/dist_cordova/platforms/android/cordova/Api.js:198:10)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:611:6)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:407:28
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
Error: Uh oh!
"/Users/kkoller/Documents/treefin/git/app/dist_cordova/plugins/com.adjust.sdk/src/Android/adjust-android.jar" not found!

Thanks for solving!

Set parameters for the `activity_kind=session` callbacks?

Hi. I know about adjustEvent.addCallbackParameter("key", "value"); to set values that will be added to my activity_kind=event callbacks. Will this also for to add information to the activity_kind=session callbacks? Is there another way to get additionall data to the session-callbacks?

activity_kind=session seems to be a bit newer, so I am not sure how this is handled.

Thanks.

Cordova plugin dependency issue

Hello, I'm trying to create cordova plugin for android and want to use Adjust in my plugin. I cannot be sure that cordova developer has Adjust plugin in his config.xml. So I set this in my plugin.xml:

		<preference name="ADJUST_VERSION" default="+"/>
		<framework src="com.adjust.sdk:adjust-android:$ADJUST_VERSION" />
		<framework src="com.adjust.sdk:adjust-android-webbridge:$ADJUST_VERSION" />

In config.xml cordova developer set Adjust sdk and my plugin:

<plugin name="com.adjust.sdk" spec="4.21.0" />
<plugin name="cordova-plugin-mycustomplugin" spec="myCustomPlugin">
    <variable name="ADJUST_VERSION" value="4.21.0" />
</plugin>

When we try to build app, we have an error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 
  Program type already present: com.adjust.sdk.ActivityHandler$11
  Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.

I suppose it happens because of you use jar file in your android cordova plugin instead of maven dependency on your library. So gradle cannot resolve this dependency.

Could you please help me and specify how can I configure and use Adjust correctly with my cordova plugin?

Unable to add plugin in iOS apache cordova app using Cordova 8.0.0

I have setup FCM in iOS apache cordova app with the following
-> cocoapods
->GoogleService-info.plist

Using:
Xcode 10.1
iOS 12.1
OSX 10.13.6
Installed platforms:
ios 4.5.5

npm 5.6.0
Cordova 8.0.0

cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-media 5.0.2 "Media"
cordova-plugin-media-capture 3.0.2 "Capture"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-whitelist 1.3.3 "Whitelist

Now, try to add fcm plugin 2.1.2 , but get following error

$ cordova plugin add cordova-plugin-fcm
(node:5127) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: npm: Command failed with exit code 1 Error output:
npm ERR! registry error parsing json
npm ERR! Unexpected token < in JSON at position 0
npm ERR! Access Denied
npm ERR! Your credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your credentials can be verified.

npm ERR! This is typically caused by an incorrect username and/or password, but could also be caused by network problems.

npm ERR! For assistance, contact your network support team.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/avineon/.npm/_logs/2019-03-18T11_42_15_072Z-debug.log
(node:5127) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Edit: anything try to add @Terminal, shows e.g,

npm ERR! 407 Proxy Authentication Required: npm@latest

Any suggestions will be appreciated

update native sdk dependencies to latest

ios/android sdks were not updated since Feb 2016.

please update to latest available:
android 4.7.0
ios 4.9.0

ios is especially important because of fixes related to iOS 10!

Multiple dex files define Lcom/google/android/gms/internal/zzcay

Ionic cordova project don't run in android with Sdk, because has an error.

BUILD FAILED
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzcay;

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Error: /home/user/project/folder/platforms/android/gradlew: Command failed with exit code 1 Error output:
    FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzcay;

Gradle 4.3.1
java version "1.8.0_151"
NodeJS v 6.11.5

Improve installation

It's awesome that you have a Cordova plugin, we choose you over a few of your competitors for that reason alone. Some thoughts on improvement though.

Installation improvements

  • Keeping the adjust.json config file inside the plugin dir isn't that good, because that folder is a build artifact and not checked into version control. Either you should keep those values in the config.xml file, or in a file in the root cordova directory.
  • Ideally a single-line install, via the cordova registry should be used. As a second option, being able to install from your git-repo would be nice. You could use a secondary repo for releases only, if you'd like to build output out of the repo (generally a good idea). Others do this[1]. More on plugin installs and how you could handle a 'deep' directory under Advanced Plugin Options[2].

Configuration improvements

  • It seems like adjust must use one app per store, i.e. one for Android and one for iOS. Cordova built apps are typically deployed to both. Currently, your config has no method to facilitate this, one needs to hack the hook code to insert different appToken values depending on the platform.
  • I think you can handle hooks without requiring people to copy files around, i.e. from within your plugin.

Documentation improvements

  • It would be neat to know if with enableEventBuffering enabled, will it still 'flush' upon exit? Or are some events (e.g. open/install always sent immediately, despite it being enabled).

[1] https://github.com/components/ember-data
[2] http://cordova.apache.org/docs/en/4.0.0/guide_cli_index.md.html#The%20Command-Line%20Interface

iOS building problems

Hello, we had iOS building problems using this plugin. I had to manually remove i386 and x86_64 platforms from AdjustSdk executable in order to get to compile.

Leaving here if someone needs:

lipo -o AdjustSdk.framework/AdjustSdk -remove i386 AdjustSdk.framework/AdjustSdk
lipo -o AdjustSdk.framework/AdjustSdk -remove x84_64 AdjustSdk.framework/AdjustSdk

Build is failing

We are facing a build issue, which was earlier working fine. We are using the version 4.14.0.
The error is as below :
No resource identifier found for attribute 'appComponentFactory' in package 'android'

TypeError: Object(...) is not a function with Ajust SDK and Ionic 4

Hey guys !

I have some troubles with Adjust SDK.
I added it following Ionic doc :

https://ionicframework.com/docs/native/adjust

Then, I created a service :

import { Injectable } from '@angular/core';
import { Adjust, AdjustConfig, AdjustEnvironment, AdjustLogLevel } from '@ionic-native/adjust';

@Injectable({
  providedIn: 'root'
})
export class AdjustService {

  config = new AdjustConfig('MY_ID', AdjustEnvironment.Sandbox);

  constructor(private adjust: Adjust) {}

  setAdjust() {
    this.config.setLogLevel(AdjustLogLevel.Verbose);
    this.adjust.create(this.config);
    console.log('Adjust created :', this.config);
  }
}

And I call setAdjust() method in app.component.ts :
this.adjusts.setAdjust();

Maybe I forgotten a little detail ? Have you an idea ?

Android - adjustConfig.setLogLevel generate an exception if AdjustConfig.EnvironmentProduction is set

Hi,
I have found an issue on the Android part if you call the setLogLevel when AdjustConfig.EnvironmentProduction is set.
Here the error from the logcat:

03-27 12:16:15.240: E/PluginManager(26062): Uncaught exception from plugin
03-27 12:16:15.240: E/PluginManager(26062): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
03-27 12:16:15.240: E/PluginManager(26062): at com.adjust.sdk.AdjustCordova.executeCreate(AdjustCordova.java:293)
03-27 12:16:15.240: E/PluginManager(26062): at com.adjust.sdk.AdjustCordova.execute(AdjustCordova.java:121)

Don't calling the setLogLevel method resolve the issue.
On iOS everything seems fine.
Thanks

Problem crashing app at trackSubsessionEnd

The iOS (7.0) is throwing the following exception when I send any trackEvent.

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[_NSObjectID_64_0 trackSubsessionEnd]: unrecognized selector sent to class 0x1659a390'
*** First throw call stack:
(0x2dae3fd3 0x3835cccf 0x2dae7873 0x2dae6253 0x2da357b8 0x2daa61f1 0x2da1a53f 0x2e404a3d 0x303648f1 0x2da1ca5d 0x2daa61f1 0x2daa6549 0x2daaf289 0x2daae60b 0x2daad279 0x2da17f0f 0x2da17cf3 0x32970663 0x3036316d 0x4896b 0x38869ab7)
libc++abi.dylib: terminating with uncaught exception of type NSException

Generic Javascript SDK planned?

Hey Adjust-Team
do you plan to release a standalone npm package that could be included into (for instance) react native applications?

setCallbackListener is never called/buged on iOS

Hello,

I use the Cocoon branch from your repo, we worked together some months ago to make it work.

However, it seems that something remains broken : setCallbackListener event is never called (or returns an unexpected result, I don't know) on iOS. What should I do to help you find the issue ?

Regards.

Process for checking the installs for marketing campaigns

Hi Team,
We are able to integrate the SDK in our code and able to check the installs for organic in sandbox mode.

We want to have two marketing campaigns.
One is SMS and other EMAIL. So we have created tracker urls for both SMS and Email.

We appreciate your quick response on the below queries.
1)Could you please let us know the procedure to check no of installs using the tracker urls.
2)What is the code need to be added for checking this.
3)Is there any process for checking the no of installs for marketing campaigns in sandbox mode.

Thanks
Phani

cordova build fails after adding adjust plugin

I'm adding the adjust plugin 4.3.0 to a project with only the Android platform. After adding the plugin, running cordova build fails with the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processArmv7DebugResources'.
> Error: more than one library with package name 'com.google.android.gms'

If I create a fresh Cordova project and only add the Adjust plugin, there is no problem building, so I know the error must be following from some sort of conflict with one or more if the existing plugins in my app.

I will continue to debug this problem and I will update when I've figured out exactly which plugin(s) is/are conflicting with adjust.

I was wondering if there is anything that could be done on the adjust plugin level to avoid this type of conflict. Maybe in the way it declares/adds this library?

The complete list of plugins now looks like this:

> cordova plugin ls
acidhax.cordova.chromecast 0.0.1-alpha "Cordova ChromeCast"
com.adjust.sdk 4.3.0 "Adjust"
com.amazon.device.iap.cpt.AmazonIapV2Plugin 1.0.0 "AmazonIapV2"
com.phonegap.plugins.facebookconnect 0.11.0 "Facebook Connect"
cordova-plugin-crosswalk-webview 1.6.1 "Crosswalk WebView Engine"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-email-composer 0.8.3 "EmailComposer"
cordova-plugin-file 4.1.1 "File"
cordova-plugin-file-transfer 1.5.0 "File Transfer"
cordova-plugin-globalization 1.0.3 "Globalization"
cordova-plugin-inappbrowser 1.3.0 "InAppBrowser"
cordova-plugin-network-information 1.2.0 "Network Information"
cordova-plugin-splashscreen 3.2.1 "Splashscreen"
cordova-plugin-statusbar 2.1.2 "StatusBar"
cordova-plugin-whitelist 1.2.1 "Whitelist"
cordova-plugin-x-socialsharing 5.0.11 "SocialSharing"

running Cordova 6.1.1

package org.apache.http.client does not exist

I'm getting an error like so when i run

Envrionment

cordova: 8.0.0
cordova-android: 6.4.0

Installed Plugins

com.adjust.sdk 3.4.1 "Adjust"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-facebook4 1.10.1 "Facebook Connect"
cordova-plugin-firebase-analytics 1.0.0 "FirebaseAnalyticsPlugin"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-inapppurchase 1.1.0 "In App Purchase"
cordova-plugin-intercom 3.2.2 "Intercom"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-screen-orientation 2.0.2 "Screen Orientation"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-streaming-media 2.1.2 "StreamingMedia"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
cordova-sqlite-storage 2.3.3 "Cordova sqlite storage plugin"
cordova-support-android-plugin 1.0.1 "cordova-support-android-plugin"
cordova-support-google-services 1.2.1 "cordova-support-google-services"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"

$ cordova run android

`
ANDROID_HOME=/usr/local/Caskroom/android-sdk/3859397
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home
Subproject Path: CordovaLib
Configuration 'compile' in project ':' is deprecated. Use 'implementation' instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_5urs8dv1xmzr9q32cuoq7wev6.run(/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/build.gradle:144)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
:preBuild UP-TO-DATE
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:compileDebugAidl UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:compileDebugRenderscript UP-TO-DATE
:checkDebugManifest UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:prepareLintJar UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:processDebugGoogleServices
Parsing json file: /Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/google-services.json
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:createDebugCompatibleScreenManifests UP-TO-DATE
:processDebugManifest UP-TO-DATE
:splitsDiscoveryTaskDebug UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:javaPreCompileDebug UP-TO-DATE
:compileDebugJavaWithJavac/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:3: error: package org.apache.http.client does not exist
import org.apache.http.client.HttpClient;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:4: error: package org.apache.http.impl.client does not exist
import org.apache.http.impl.client.DefaultHttpClient;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:13: error: cannot find symbol
private static HttpClient httpClient = null;
^
symbol: class HttpClient
location: class AdjustFactory
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:41: error: cannot find symbol
public static HttpClient getHttpClient(HttpParams params) {
^
symbol: class HttpClient
location: class AdjustFactory
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:81: error: cannot find symbol
public static void setHttpClient(HttpClient httpClient) {
^
symbol: class HttpClient
location: class AdjustFactory
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:22: error: cannot find symbol
import org.apache.http.HttpResponse;
^
symbol: class HttpResponse
location: package org.apache.http
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:23: error: cannot find symbol
import org.apache.http.HttpStatus;
^
symbol: class HttpStatus
location: package org.apache.http
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:24: error: cannot find symbol
import org.apache.http.NameValuePair;
^
symbol: class NameValuePair
location: package org.apache.http
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:25: error: package org.apache.http.client does not exist
import org.apache.http.client.ClientProtocolException;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:26: error: package org.apache.http.client does not exist
import org.apache.http.client.HttpClient;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:27: error: package org.apache.http.client.entity does not exist
import org.apache.http.client.entity.UrlEncodedFormEntity;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:28: error: package org.apache.http.client.methods does not exist
import org.apache.http.client.methods.HttpPost;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:29: error: package org.apache.http.client.methods does not exist
import org.apache.http.client.methods.HttpUriRequest;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:30: error: package org.apache.http.client.utils does not exist
import org.apache.http.client.utils.URLEncodedUtils;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:31: error: package org.apache.http.message does not exist
import org.apache.http.message.BasicNameValuePair;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:32: error: cannot find symbol
import org.apache.http.params.BasicHttpParams;
^
symbol: class BasicHttpParams
location: package org.apache.http.params
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:48: error: cannot find symbol
private HttpClient httpClient;
^
symbol: class HttpClient
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:130: error: cannot find symbol
private void requestFinished(HttpResponse response, ActivityPackage activityPackage) {
^
symbol: class HttpResponse
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:149: error: cannot find symbol
private String parseResponse(HttpResponse response) {
^
symbol: class HttpResponse
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:193: error: cannot find symbol
private HttpUriRequest getRequest(ActivityPackage activityPackage) throws UnsupportedEncodingException {
^
symbol: class HttpUriRequest
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:43: error: cannot find symbol
return new DefaultHttpClient(params);
^
symbol: class DefaultHttpClient
location: class AdjustFactory
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:106: error: cannot find symbol
HttpParams httpParams = new BasicHttpParams();
^
symbol: class BasicHttpParams
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:114: error: cannot find symbol
HttpUriRequest request = getRequest(activityPackage);
^
symbol: class HttpUriRequest
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:115: error: cannot find symbol
HttpResponse response = httpClient.execute(request);
^
symbol: class HttpResponse
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:119: error: cannot find symbol
} catch (ClientProtocolException e) {
^
symbol: class ClientProtocolException
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:136: error: cannot find symbol
if (HttpStatus.SC_OK == statusCode) {
^
symbol: variable HttpStatus
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:195: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:195: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:202: error: cannot find symbol
List pairs = new ArrayList();
^
symbol: class NameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:202: error: cannot find symbol
List pairs = new ArrayList();
^
symbol: class NameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:204: error: cannot find symbol
NameValuePair pair = new BasicNameValuePair(entity.getKey(), entity.getValue());
^
symbol: class NameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:204: error: cannot find symbol
NameValuePair pair = new BasicNameValuePair(entity.getKey(), entity.getValue());
^
symbol: class BasicNameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:210: error: cannot find symbol
NameValuePair sentAtPair = new BasicNameValuePair("sent_at", dateString);
^
symbol: class NameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:210: error: cannot find symbol
NameValuePair sentAtPair = new BasicNameValuePair("sent_at", dateString);
^
symbol: class BasicNameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:213: error: cannot find symbol
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(pairs);
^
symbol: class UrlEncodedFormEntity
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:213: error: cannot find symbol
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(pairs);
^
symbol: class UrlEncodedFormEntity
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:214: error: cannot find symbol
entity.setContentType(URLEncodedUtils.CONTENT_TYPE);
^
symbol: variable URLEncodedUtils
location: class RequestHandler
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
37 errors
FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s
28 actionable tasks: 2 executed, 26 up-to-date
(node:10408) UnhandledPromiseRejectionWarning: Error: /Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:3: error: package org.apache.http.client does not exist
import org.apache.http.client.HttpClient;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:4: error: package org.apache.http.impl.client does not exist
import org.apache.http.impl.client.DefaultHttpClient;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:13: error: cannot find symbol
private static HttpClient httpClient = null;
^
symbol: class HttpClient
location: class AdjustFactory
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:41: error: cannot find symbol
public static HttpClient getHttpClient(HttpParams params) {
^
symbol: class HttpClient
location: class AdjustFactory
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:81: error: cannot find symbol
public static void setHttpClient(HttpClient httpClient) {
^
symbol: class HttpClient
location: class AdjustFactory
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:22: error: cannot find symbol
import org.apache.http.HttpResponse;
^
symbol: class HttpResponse
location: package org.apache.http
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:23: error: cannot find symbol
import org.apache.http.HttpStatus;
^
symbol: class HttpStatus
location: package org.apache.http
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:24: error: cannot find symbol
import org.apache.http.NameValuePair;
^
symbol: class NameValuePair
location: package org.apache.http
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:25: error: package org.apache.http.client does not exist
import org.apache.http.client.ClientProtocolException;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:26: error: package org.apache.http.client does not exist
import org.apache.http.client.HttpClient;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:27: error: package org.apache.http.client.entity does not exist
import org.apache.http.client.entity.UrlEncodedFormEntity;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:28: error: package org.apache.http.client.methods does not exist
import org.apache.http.client.methods.HttpPost;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:29: error: package org.apache.http.client.methods does not exist
import org.apache.http.client.methods.HttpUriRequest;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:30: error: package org.apache.http.client.utils does not exist
import org.apache.http.client.utils.URLEncodedUtils;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:31: error: package org.apache.http.message does not exist
import org.apache.http.message.BasicNameValuePair;
^
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:32: error: cannot find symbol
import org.apache.http.params.BasicHttpParams;
^
symbol: class BasicHttpParams
location: package org.apache.http.params
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:48: error: cannot find symbol
private HttpClient httpClient;
^
symbol: class HttpClient
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:130: error: cannot find symbol
private void requestFinished(HttpResponse response, ActivityPackage activityPackage) {
^
symbol: class HttpResponse
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:149: error: cannot find symbol
private String parseResponse(HttpResponse response) {
^
symbol: class HttpResponse
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:193: error: cannot find symbol
private HttpUriRequest getRequest(ActivityPackage activityPackage) throws UnsupportedEncodingException {
^
symbol: class HttpUriRequest
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/AdjustFactory.java:43: error: cannot find symbol
return new DefaultHttpClient(params);
^
symbol: class DefaultHttpClient
location: class AdjustFactory
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:106: error: cannot find symbol
HttpParams httpParams = new BasicHttpParams();
^
symbol: class BasicHttpParams
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:114: error: cannot find symbol
HttpUriRequest request = getRequest(activityPackage);
^
symbol: class HttpUriRequest
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:115: error: cannot find symbol
HttpResponse response = httpClient.execute(request);
^
symbol: class HttpResponse
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:119: error: cannot find symbol
} catch (ClientProtocolException e) {
^
symbol: class ClientProtocolException
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:136: error: cannot find symbol
if (HttpStatus.SC_OK == statusCode) {
^
symbol: variable HttpStatus
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:195: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:195: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:202: error: cannot find symbol
List pairs = new ArrayList();
^
symbol: class NameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:202: error: cannot find symbol
List pairs = new ArrayList();
^
symbol: class NameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:204: error: cannot find symbol
NameValuePair pair = new BasicNameValuePair(entity.getKey(), entity.getValue());
^
symbol: class NameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:204: error: cannot find symbol
NameValuePair pair = new BasicNameValuePair(entity.getKey(), entity.getValue());
^
symbol: class BasicNameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:210: error: cannot find symbol
NameValuePair sentAtPair = new BasicNameValuePair("sent_at", dateString);
^
symbol: class NameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:210: error: cannot find symbol
NameValuePair sentAtPair = new BasicNameValuePair("sent_at", dateString);
^
symbol: class BasicNameValuePair
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:213: error: cannot find symbol
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(pairs);
^
symbol: class UrlEncodedFormEntity
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:213: error: cannot find symbol
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(pairs);
^
symbol: class UrlEncodedFormEntity
location: class RequestHandler
/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/src/com/adjust/sdk/RequestHandler.java:214: error: cannot find symbol
entity.setContentType(URLEncodedUtils.CONTENT_TYPE);
^
symbol: variable URLEncodedUtils
location: class RequestHandler
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
37 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s
at ChildProcess.whenDone (/Users/thesayyn/Documents/ionic projects/niix-app/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:10408) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10408) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.`

Cordova 8 support with cordova-android < 7.0.0

Hey, we are using cordova 8 with cordova-android 6.4.0.

We can not add the master branch because it does not support cordova 8 (package.json needs to be updated) and we can not use the cordova-8 branch either because we are using cordova-android 6.4.0 (results in java.lang.ClassNotFoundException: com.adjust.sdk.AdjustCordova).

Can you please support cordova 8 with the master branch?

Can't install plugin anymore (Cordova 8)

Doesn't look like the plugin is installing correctly any more... Could be since the upgrade of our build machine to OSX Mojave or XCode 10. I get the following when trying to install:

$ cordova plugin add https://github.com/adjust/cordova_sdk.git\#cordova-8 --verbose
No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "https://github.com/adjust/cordova_sdk.git#cordova-8"
saving
Running command: npm install https://github.com/adjust/cordova_sdk.git#cordova-8 --production --save
Command finished with error code 0: npm install,https://github.com/adjust/cordova_sdk.git#cordova-8,--production,--save
Copying plugin "/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/node_modules/com.adjust.sdk" => "/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/plugins/com.adjust.sdk"
Calling plugman.install on plugin "/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/plugins/com.adjust.sdk" for platform "android
Installing "com.adjust.sdk" for android
Running command: /Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/version
Command finished with error code 0: /Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/version
Finding scripts for "before_plugin_install" hook from plugin com.adjust.sdk on android platform only.
No scripts found for hook "before_plugin_install".
Install start for "com.adjust.sdk" on android.
PlatformApi successfully found for platform android
Android Studio project detected
Beginning processing of action stack for android project...
Error during processing of action! Attempting to revert...
Failed to install 'com.adjust.sdk': TypeError [ERR_INVALID_ARG_TYPE]: Uh oh!
The "path" argument must be of type string
    at assertPath (path.js:39:11)
    at Object.resolve (path.js:1091:7)
    at copyNewFile (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/lib/pluginHandlers.js:258:28)
    at install (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/lib/pluginHandlers.js:43:17)
    at ActionStack.process (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
    at PluginManager.addPlugin (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:144:17)
    at /Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/Api.js:247:74
    at _fulfilled (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:863:30)

Download from releases page does not contain native SDKs

This is because submodules are not included in the archive generated by Github. Instead of downloading the plugin from the release page, the user needs to clone the repo to get all of the code

git clone https://github.com/adjust/cordova_sdk.git
git submodule init

Alternatively, the native SDK could be included directly rather than as submodules. This would also allow installing it directly from the Cordova cli

cordova plugin add https://github.com/adjust/cordova_sdk.git

Plugin Not loading

I'm having this problem in iOS

2014-08-08 20:19:56.804 Clickbus[2418:60b] CDVPlugin class AdjustCordova (pluginName: Adjust) does not exist.
2014-08-08 20:19:56.806 Clickbus[2418:60b] ERROR: Plugin 'Adjust' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2014-08-08 20:19:56.808 Clickbus[2418:60b] -[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [
"Adjust1953335635",
"Adjust",
"appDidLaunch",
[
"n3z76r769mxy",
"sandbox",
"info",
false
]
]

Bug: no "setDeviceToken" function

The README states that there is a "setDeviceToken" function, but it's undefined.
Not sure if this is a documentation issue only, but I just found a "setPushToken()" function

Android build not working with adjust v4.0.0

Hey guys
I removed the old [email protected] plugin and added the v4.0.0 and get the following error:

:dexArmv7Debug
>> 
>> 
>> UNEXPECTED TOP-LEVEL EXCEPTION:
>> 
>> 
>> com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
>> 
>> 
>>  at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
>> 
>> 
>>  at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
>> 
>> 
>>  at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
>> 
>> 
>>  at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
>> 
>> 
>>  at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
>> 
>> 
>>  at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
>> 
>> 
>>  at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
>> 
>> 
>>  at com.android.dx.command.dexer.Main.run(Main.java:246)
>> 
>> 
>>  at com.android.dx.command.dexer.Main.main(Main.java:215)
>> 
>> 
>>  at com.android.dx.command.Main.main(Main.java:106)
>> 
>> 
>> 
>> 

FAILED

>> 
>> 
>> FAILURE: 
>> Build failed with an exception.
>> 
>> 
>> 
>> * What went wrong:
>> 
>> Execution failed for task ':dexArmv7Debug'.
>> 
>> > 
>> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
>> 
>>      /Users/zwacky/Library/Android/sdk/build-tools/22.0.1/dx --dex --no-optimize --output /Users/zwacky/data/mc-webapp/mobile/platforms/android/build/intermediates/dex/armv7/debug --input-list=/Users/zwacky/data/mc-webapp/mobile/platforms/android/build/intermediates/tmp/dex/armv7/debug/inputList.txt
>> 
>>   Error Code:
>> 
>>      2
>> 
>>   Output:
>> 
>>      
>> 
>>      UNEXPECTED TOP-LEVEL EXCEPTION:
>> 
>>      com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
>> 
>>          at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
>> 
>>          at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
>> 
>>          at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
>> 
>>          at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
>> 
>>          at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
>> 
>>          at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
>> 
>>          at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
>> 
>>          at com.android.dx.command.dexer.Main.run(Main.java:246)
>> 
>>          at com.android.dx.command.dexer.Main.main(Main.java:215)
>> 
>>          at com.android.dx.command.Main.main(Main.java:106)
>> 
>>      
>> 
>> 
>> 
>> 
>> 
>> * Try:
>> 
>> Run with 
>> --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
>> 


BUILD FAILED

I noticed the new adjust_sdk.jar. v3.4.1 works without any problems but I really need your v4.0.0 - great stuff btw!

Adjust.h missing on iOS

Hey,

what is the official state of the cordova plugin?
Currently I am unable to build any app with adjust for iOS (tested 4.11.&4.12.).
I didn't have that problem 2 months ago and it might be related to new phonegap versions (using cli-7.1.0)

Using build.phonegap:

CompileC /Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/appname.build/Objects-normal/armv7/AdjustCordovaDelegate.o appname/Plugins/com.adjust.sdk/AdjustCordovaDelegate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /project export LANG=en_US.US-ASCII /Applications/Xcode92.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DCOCOAPODS=1 -DCOCOAPODS=1 -isysroot /Applications/Xcode92.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.0 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -iquote /Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/appname.build/appname-generated-files.hmap -I/Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/appname.build/appname-own-target-headers.hmap -I/Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/appname.build/appname-all-target-headers.hmap -iquote /Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/appname.build/appname-project-headers.hmap -I/project/build/include -I/Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/InstallationBuildProductsLocation/Applications/usr/local/lib/include -I/Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/UninstalledProducts/include -I/Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/include -I/project/build -I/project/Pods/Headers/Public -I/project/Pods/Headers/Public/GGLInstanceID -I/project/Pods/Headers/Public/GoogleCloudMessaging -I/project/Pods/Headers/Public/GoogleIPhoneUtilities -I/project/Pods/Headers/Public/GoogleInterchangeUtilities -I/project/Pods/Headers/Public/GoogleSymbolUtilities -I/project/Pods/Headers/Public/GoogleUtilities -I/Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/appname.build/DerivedSources/armv7 -I/Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/appname.build/DerivedSources -F/project/build -F/project/Pods/GoogleIPhoneUtilities/Frameworks -F/project/Pods/GoogleInterchangeUtilities/Frameworks/frameworks -F/project/Pods/GoogleSymbolUtilities/Frameworks/frameworks -F/project/Pods/GoogleUtilities/Frameworks/frameworks -Fappname/Plugins/com.adjust.sdk -Fappname/Plugins/cordova-plugin-facebook4 -isystem /project/Pods/Headers/Public -isystem /project/Pods/Headers/Public/GGLInstanceID -isystem /project/Pods/Headers/Public/GoogleCloudMessaging -isystem /project/Pods/Headers/Public/GoogleIPhoneUtilities -isystem /project/Pods/Headers/Public/GoogleInterchangeUtilities -isystem /project/Pods/Headers/Public/GoogleSymbolUtilities -isystem /project/Pods/Headers/Public/GoogleUtilities -isystem /project/Pods/Headers/Public -isystem /project/Pods/Headers/Public/GGLInstanceID -isystem /project/Pods/Headers/Public/GoogleCloudMessaging -isystem /project/Pods/Headers/Public/GoogleIPhoneUtilities -isystem /project/Pods/Headers/Public/GoogleInterchangeUtilities -isystem /project/Pods/Headers/Public/GoogleSymbolUtilities -isystem /project/Pods/Headers/Public/GoogleUtilities -include /private/project/build/sharedpch/appname-Prefix-bverarvgruvmkegbldrowutncnfb/appname-Prefix.pch -MMD -MT dependencies -MF /Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/appname.build/Objects-normal/armv7/AdjustCordovaDelegate.d --serialize-diagnostics /Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/appname.build/Objects-normal/armv7/AdjustCordovaDelegate.dia -c /project/appname/Plugins/com.adjust.sdk/AdjustCordovaDelegate.m -o /Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/appname.build/Objects-normal/armv7/AdjustCordovaDelegate.o In file included from /project/appname/Plugins/com.adjust.sdk/AdjustCordovaDelegate.m:11: appname/Plugins/com.adjust.sdk/AdjustCordovaDelegate.h:10:9: fatal error: 'AdjustSdk/Adjust.h' file not found #import <AdjustSdk/Adjust.h>

The following build commands failed: CompileC /Library/Developer/Xcode/DerivedData/appname-araeacpzaxeyvoctlcqhzskwppzu/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/appname.build/Objects-normal/armv7/AdjustCordovaDelegate.o appname/Plugins/com.adjust.sdk/AdjustCordovaDelegate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Error code 65 for command: xcodebuild with args: -xcconfig,/private/project/cordova/build-release.xcconfig,-workspace,appname.xcworkspace,-scheme,appname,-configuration,Release,-destination,generic/platform=iOS,-archivePath,appname.xcarchive,archive,CONFIGURATION_BUILD_DIR=/private/project/build/device,SHARED_PRECOMPS_DIR=/private/project/build/sharedpch

Bitcode support

Hi,could you please provide bitcode support? I was forced to remove Adjust due to lack of bitcode support (which is mandatory now)

ld: bitcode bundle could not be generated because 'App/Plugins/com.adjust.sdk/AdjustSdk.framework/AdjustSdk(Adjust.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Build failing on existing project with ionic cordova plugin 4.18.0

My current project runs android 7.1.4

error


BUILD FAILED in 7s
Error: /Users/user/Workspace/project/project-app/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/user/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/bebc13959ec97b95fe481d1b5bb871d3/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.
    
/Users/user/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/bebc13959ec97b95fe481d1b5bb871d3/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/ttcIndex not found.
    
/Users/user/Workspace/project/project-app/platforms/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:1876: error: resource android:attr/fontVariationSettings not found.
/Users/user/Workspace/project/project-app/platforms/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:1876: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute aapt
	at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)
	at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)
	at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)
	at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
	at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
	at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
	at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
	at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
	at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
	... 41 more
Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462)
	at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
	at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179)
Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
	at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:463)
	at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:415)
	at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332)
	at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)

FAILURE: Build failed with an exception.


requirements

ionic-mac:scripts sudiptadutta$ ionic cordova requirements
> cordova requirements
Android Studio project detected

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-28,android-27,android-26,android-25,android-23,android-21
Gradle: installed /usr/local/Cellar/gradle/4.7/bin/gradle

Requirements check results for ios:
Apple macOS: installed darwin
Xcode: installed 10.3
ios-deploy: installed 1.9.4
CocoaPods: installed 1.7.2

plugin.xml



    <preference name="android-minSdkVersion" value="19" />

    <plugin name="cordova-plugin-file" spec="^6.0.2" />
    <plugin name="cordova-clipboard" spec="^1.2.1" />
    <plugin name="cordova-plugin-add-swift-support" spec="2.0.2" />
    <plugin name="cordova-plugin-advanced-http" spec="^2.1.1">
        <variable name="OKHTTP_VERSION" value="3.10.0" />
    </plugin>
    <plugin name="cordova-plugin-device" spec="^2.0.2" />
    <plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.3" />
    <plugin name="cordova-plugin-ionic-webview" spec="4.1.0">
        <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
    </plugin>
    <plugin name="cordova-plugin-is-debug" spec="1.0.0" />
    <plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
    <plugin name="cordova-plugin-statusbar" spec="2.4.2" />
    <plugin name="cordova-plugin-whitelist" spec="1.3.3" />
    <plugin name="cordova-plugin-x-socialsharing" spec="5.4.6">
        <variable name="ANDROID_SUPPORT_V4_VERSION" value="24.1.1+" />
        <variable name="PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION" value="This app requires photo library access to function properly." />
        <variable name="PHOTO_LIBRARY_USAGE_DESCRIPTION" value="This app requires photo library access to function properly." />
    </plugin>
    <plugin name="es6-promise-plugin" spec="4.2.2" />
    <plugin name="phonegap-plugin-barcodescanner" spec="8.1.0">
        <variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
    </plugin>
    <plugin name="com.adjust.sdk" spec="4.18.0" />
    <engine name="ios" spec="4.5.1" />

Android SDK versions > 4.0

Hello,
i am developer of mobile application which is using adjust.com services. I successfully installed and configured version for iOS, but Android version have issues. Installation went OK, but during building the release build process is crashing. Cordova is reporting some gradle conflicts. Can you help me on this matter?

Crash on IOS 12.1

Adjust Version: ^4.14.0
Cordova IOS: ^4.5.5
Cordova CLI: ^7

Device: Iphone XR (Simulator)

2018-11-12 16:09:28.730067+0300 niix[9032:2153932] Apache Cordova native platform version 4.5.5 is starting. 2018-11-12 16:09:28.730732+0300 niix[9032:2153932] Multi-tasking -> Device: YES, App: YES 2018-11-12 16:09:28.771182+0300 niix[9032:2153932] Using UIWebView 2018-11-12 16:09:28.773378+0300 niix[9032:2153932] [CDVTimer][console] 0.051022ms 2018-11-12 16:09:28.773584+0300 niix[9032:2153932] [CDVTimer][handleopenurl] 0.079036ms 2018-11-12 16:09:28.775795+0300 niix[9032:2153932] [CDVTimer][intentandnavigationfilter] 2.116084ms 2018-11-12 16:09:28.775995+0300 niix[9032:2153932] [CDVTimer][gesturehandler] 0.078082ms 2018-11-12 16:09:28.776244+0300 niix[9032:2153932] [CDVTimer][adjust] 0.129938ms 2018-11-12 16:09:28.776461+0300 niix[9032:2153932] Starting Facebook Connect plugin 2018-11-12 16:09:28.776564+0300 niix[9032:2153932] [CDVTimer][facebookconnectplugin] 0.218987ms 2018-11-12 16:09:28.777111+0300 niix[9032:2153932] [Intercom] ERROR - 💥👎 Intercom.bundle hasn't been added to your app correctly. This will result in images not appearing in the SDK's messaging UI. More information on how to correctly integrate Intercom is available here: https://developers.intercom.com/docs/ios-installation. 2018-11-12 16:09:28.782283+0300 niix[9032:2153932] [CDVTimer][intercom] 5.628943ms 2018-11-12 16:09:28.791005+0300 niix[9032:2153932] [CDVTimer][splashscreen] 8.596063ms 2018-11-12 16:09:28.794361+0300 niix[9032:2153932] [CDVTimer][statusbar] 3.244996ms 2018-11-12 16:09:28.795036+0300 niix[9032:2153932] [CDVTimer][socialsharing] 0.517011ms 2018-11-12 16:09:28.796367+0300 niix[9032:2153932] [CDVTimer][keyboard] 1.170993ms 2018-11-12 16:09:28.796525+0300 niix[9032:2153932] [CDVTimer][TotalPluginStartup] 23.625970ms 2018-11-12 16:09:28.803949+0300 niix[9032:2153932] Falling back to loading access token from NSUserDefaults because of simulator bug 2018-11-12 16:09:28.804085+0300 niix[9032:2153932] Falling back to storing access token in NSUserDefaults because of simulator bug 2018-11-12 16:09:28.804564+0300 niix[9032:2153932] Falling back to loading access token from NSUserDefaults because of simulator bug 2018-11-12 16:09:28.804673+0300 niix[9032:2153932] Falling back to storing access token in NSUserDefaults because of simulator bug 2018-11-12 16:09:28.805308+0300 niix[9032:2153932] Falling back to loading access token from NSUserDefaults because of simulator bug 2018-11-12 16:09:28.805486+0300 niix[9032:2153932] Falling back to storing access token in NSUserDefaults because of simulator bug 2018-11-12 16:09:28.972873+0300 niix[9032:2153932] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/thesayyn/Library/Developer/CoreSimulator/Devices/D1BC56EA-28E1-43D8-95F7-60AA56DBDDCD/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 2018-11-12 16:09:28.973706+0300 niix[9032:2153932] [MC] Reading from private effective user settings. 2018-11-12 16:09:28.984700+0300 niix[9032:2153932] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:28.984720+0300 niix[9032:2154772] [Client] Remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:28.984838+0300 niix[9032:2153932] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretel2018-11-12 16:09:28.984849+0300 niix[9032:2154772] [Client] Remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} ephony.xpc was invalidated.} 2018-11-12 16:09:28.985903+0300 niix[9032:2153932] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:28.985926+0300 niix[9032:2154772] [Client] Remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:28.985467+0300 niix[9032:2154638] [Client] Sending selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:28.985999+0300 niix[9032:2153932] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:28.986466+0300 niix[9032:2154638] [Client] Sending selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:28.986941+0300 niix[9032:2154638] [Client] Sending selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:28.986951+0300 niix[9032:2153932] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:28.987132+0300 niix[9032:2154772] [Client] Remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:28.987242+0300 niix[9032:2153932] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:28.987674+0300 niix[9032:2154638] [Client] Sending selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:29.230062+0300 niix[9032:2153932] Resetting plugins due to page load. 2018-11-12 16:09:30.008198+0300 niix[9032:2155022] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fd062c17260] get output frames failed, state 8196 2018-11-12 16:09:30.008487+0300 niix[9032:2155022] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fd062c17260] get output frames failed, state 8196 2018-11-12 16:09:30.008960+0300 niix[9032:2155022] TIC Read Status [1:0x0]: 1:57 2018-11-12 16:09:30.009040+0300 niix[9032:2155022] TIC Read Status [1:0x0]: 1:57 2018-11-12 16:09:31.039608+0300 niix[9032:2153932] [Intercom] ERROR - 💥 There was an error trying to access the Intercom.bundle but it is not present. It's possible that Xcode isn't seeing it correctly at build time. 2018-11-12 16:09:31.068785+0300 niix[9032:2155028] [Intercom] ERROR - 💥 There was an error trying to access the Intercom.bundle but it is not present. Check to see that it is included in your copy resources build phase. 2018-11-12 16:09:31.456973+0300 niix[9032:2153932] Finished load of: file:///Users/thesayyn/Library/Developer/CoreSimulator/Devices/D1BC56EA-28E1-43D8-95F7-60AA56DBDDCD/data/Containers/Bundle/Application/2FEDFDD3-8B6A-460E-A906-5DF93237AB34/niix.app/www/index.html 2018-11-12 16:09:31.553711+0300 niix[9032:2153932] Ionic Native: deviceready event fired after 1622 ms 2018-11-12 16:09:31.559715+0300 niix[9032:2153932] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.559730+0300 niix[9032:2155022] [Client] Remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.559852+0300 niix[9032:2153932] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.559867+0300 niix[9032:2155022] [Client] Remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.560063+0300 niix[9032:2155114] [Client] Sending selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.560437+0300 niix[9032:2155114] [Client] Sending selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidate2018-11-12 16:09:31.560753+0300 niix[9032:2153932] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.560892+0300 niix[9032:2155022] [Client] Remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} d.} 2018-11-12 16:09:31.561327+0300 niix[9032:2153932] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.562087+0300 niix[9032:2155114] [Client] Sending selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.562539+0300 niix[9032:2153932] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.562670+0300 niix[9032:2155022] [Client] Remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.562778+0300 niix[9032:2153932] [NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.563117+0300 niix[9032:2155114] [Client] Sending selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.} 2018-11-12 16:09:31.563229+0300 niix[9032:2153932] [Adjust]w: PRODUCTION: Adjust is running in Production mode. Use this setting only for the build that you want to publish. Set the environment to sandboxif you want to test your app! 2018-11-12 16:09:31.572680+0300 niix[9032:2153932] THREAD WARNING: ['Adjust'] took '18.640137' ms. Plugin should use a background thread. 2018-11-12 16:09:31.573176+0300 niix[9032:2153932] OPEN database: _ionicstorage 2018-11-12 16:09:31.573708+0300 niix[9032:2153932] -[SQLitePlugin pluginInitialize] [Line 29] Initializing SQLitePlugin 2018-11-12 16:09:31.573908+0300 niix[9032:2153932] -[SQLitePlugin pluginInitialize] [Line 40] Detected docs path: /Users/thesayyn/Library/Developer/CoreSimulator/Devices/D1BC56EA-28E1-43D8-95F7-60AA56DBDDCD/data/Containers/Data/Application/770C4AFB-2AA1-445C-AB7D-85741A70ACD4/Documents 2018-11-12 16:09:31.574008+0300 niix[9032:2153932] -[SQLitePlugin pluginInitialize] [Line 44] Detected Library path: /Users/thesayyn/Library/Developer/CoreSimulator/Devices/D1BC56EA-28E1-43D8-95F7-60AA56DBDDCD/data/Containers/Data/Application/770C4AFB-2AA1-445C-AB7D-85741A70ACD4/Library 2018-11-12 16:09:31.574175+0300 niix[9032:2153932] -[SQLitePlugin pluginInitialize] [Line 51] no cloud sync at path: /Users/thesayyn/Library/Developer/CoreSimulator/Devices/D1BC56EA-28E1-43D8-95F7-60AA56DBDDCD/data/Containers/Data/Application/770C4AFB-2AA1-445C-AB7D-85741A70ACD4/Library/LocalDatabase 2018-11-12 16:09:31.574341+0300 niix[9032:2153932] new transaction is queued, waiting for open operation to finish 2018-11-12 16:09:31.574488+0300 niix[9032:2155022] -[SQLitePlugin closeNow:] [Line 204] close: db name was not open: _ionicstorage 2018-11-12 16:09:31.592723+0300 niix[9032:2155022] -[SQLitePlugin openNow:] [Line 142] open full db path: /Users/thesayyn/Library/Developer/CoreSimulator/Devices/D1BC56EA-28E1-43D8-95F7-60AA56DBDDCD/data/Containers/Data/Application/770C4AFB-2AA1-445C-AB7D-85741A70ACD4/Library/LocalDatabase/_ionicstorage 2018-11-12 16:09:31.601923+0300 niix[9032:2155022] -[SQLitePlugin openNow:] [Line 169] Good news: SQLite is thread safe! 2018-11-12 16:09:31.614373+0300 niix[9032:2153932] OPEN database: _ionicstorage - OK 2018-11-12 16:09:31.614638+0300 niix[9032:2153932] DB opened: _ionicstorage 2018-11-12 16:09:31.793528+0300 niix[9032:2153932] User does not have access token 2018-11-12 16:09:31.793671+0300 niix[9032:2153932] pushToAdjust screen [object Object] 2018-11-12 16:09:31.793758+0300 niix[9032:2153932] name Landing 2018-11-12 16:12:25.454476+0300 niix[9032:2154638] NSURLConnection finished with error - code -1100 2018-11-12 16:12:25.502015+0300 niix[9032:2153932] pushToAdjust screen [object Object] 2018-11-12 16:12:25.502175+0300 niix[9032:2153932] name Tutorial 2018-11-12 16:12:28.097735+0300 niix[9032:2153932] pushToAdjust screen [object Object] 2018-11-12 16:12:28.097865+0300 niix[9032:2153932] name Login 2018-11-12 16:12:29.435864+0300 niix[9032:2153932] this.showLoginForm = true 2018-11-12 16:12:29.959988+0300 niix[9032:2153932] API error: <_UIKBCompatInputView: 0x7fd062e66f40; frame = (0 0; 0 0); layer = <CALayer: 0x600003ac6b80>> returned 0 width, assuming UIViewNoIntrinsicMetric 2018-11-12 16:12:29.960173+0300 niix[9032:2153932] API error: <_UIKBCompatInputView: 0x7fd062e66f40; frame = (0 0; 0 0); layer = <CALayer: 0x600003ac6b80>> returned 0 width, assuming UIViewNoIntrinsicMetric 2018-11-12 16:12:30.578849+0300 niix[9032:2155017] NSURLConnection finished with error - code -1100 2018-11-12 16:12:30.581328+0300 niix[9032:2153932] pushToAdjust screen [object Object] 2018-11-12 16:12:30.581547+0300 niix[9032:2153932] name Sign Up 2018-11-12 16:13:06.766151+0300 niix[9032:2153932] Loader: Please wait... 3 presented 2018-11-12 16:13:07.217973+0300 niix[9032:2153932] Loader: Please wait... 3 dismissed 2018-11-12 16:13:07.218366+0300 niix[9032:2153932] TrainingProgrammesPage called 2018-11-12 16:13:07.218434+0300 niix[9032:2197670] -[__NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0xf68f7fff58205a49 2018-11-12 16:13:07.231137+0300 niix[9032:2197670] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0xf68f7fff58205a49' *** First throw call stack: ( 0 CoreFoundation 0x0000000111c7e1bb __exceptionPreprocess + 331 1 libobjc.A.dylib 0x0000000110465735 objc_exception_throw + 48 2 CoreFoundation 0x0000000111c9cf44 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 3 CoreFoundation 0x0000000111c82ed6 ___forwarding___ + 1446 4 CoreFoundation 0x0000000111c84da8 _CF_forwarding_prep_0 + 120 5 niix 0x000000010bb8e757 +[ADJUtil isValidParameter:attributeType:parameterName:] + 151 6 niix 0x000000010bb7fb81 -[ADJActivityHandler addSessionPartnerParameterI:key:value:] + 139 7 niix 0x000000010bb8eb4a __42+[ADJUtil launchInQueue:selfInject:block:]_block_invoke + 37 8 libdispatch.dylib 0x0000000112273595 _dispatch_call_block_and_release + 12 9 libdispatch.dylib 0x0000000112274602 _dispatch_client_callout + 8 10 libdispatch.dylib 0x000000011227bb0b _dispatch_lane_serial_drain + 791 11 libdispatch.dylib 0x000000011227c784 _dispatch_lane_invoke + 428 12 libdispatch.dylib 0x000000011228689a _dispatch_workloop_worker_thread + 733 13 libsystem_pthread.dylib 0x000000011266361c _pthread_wqthread + 409 14 libsystem_pthread.dylib 0x0000000112663415 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

Ionic 1 supported ?

get error "AdjustConfig is not defined" on Ionic v1 project.
note: SDK and plugin installed.

Event not getting tracked

Hello,

I am constantly getting the following error when i am trying to track an event :
05-10 16:49:58.955: E/chromium(5595): [ERROR:aw_browser_terminator.cc(125)] Renderer process (5641) crash detected (code -1).
05-10 16:50:08.267: E/chromium(5595): [ERROR:aw_browser_terminator.cc(125)] Renderer process (5714) crash detected (code -1).

Multiple events tracking at single point

Hello,

We are trying to track multiple events from a single point in code - say on a button click. We tried to track 3 events, but only one of them was successful. Could you please let us know how to track simultaneous multiple events.

Can't install the SDK

Hi guys,

I was so suprised that you offer a Cordova SDK, but sadly, I can't install it. I receive following error:

Hirbods-MacBook-Pro-Retina:Nachbarschaft Hirbod$ cordova plugin add cordova_sdk
Installing "com.adjust.sdk" for android
Error during processing of action! Attempting to revert...
Failed to install 'com.adjust.sdk':Error: Uh oh!
"/Users/Hirbod/Desktop/appdev/Nachbarschaft/plugins/com.adjust.sdk/src/android/Adjust/Adjust/src/com/adjust/sdk" not found!
    at Object.module.exports.common.copyFile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:43:40)
    at Object.module.exports.common.copyNewFile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:72:16)
    at module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:65:20)
    at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:72:25)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:591:20)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:340:28
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49
Error: Uh oh!
"/Users/Hirbod/Desktop/appdev/Nachbarschaft/plugins/com.adjust.sdk/src/android/Adjust/Adjust/src/com/adjust/sdk" not found!
    at Object.module.exports.common.copyFile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:43:40)
    at Object.module.exports.common.copyNewFile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:72:16)
    at module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:65:20)
    at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:72:25)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:591:20)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:340:28
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49

What can I do? Cordova 3.7.0 for iOS and Cordova 3.6.3 for Android.

Android: Adjust.onResume() needs to be called before any events can be tracked

If you try to use Adjust.trackEvent() before Adjust.onResume() was called for the first time, the sdk will complain about a 'missing activity state' and the action will fail. The problem with this is that is that the documentation implies that Adjust.onResume and Adjust.onPause should be used with Cordovas resume and pause events respectively. The resume event however is not fired on initial app launch, which means tracking events will not work unless you call Adjust.onResume explicitly on app launch (i.e. in the deviceready handler).

All this makes me wonder if all this boylerplate code should be kept out of the JavaScript code and instead be handled in the Cordova plugin directly. The CordovaPlugin class has hooks for both the onResume and onPause events and it would be much simpler to manage the activity state there instead of relying on the app itself to call the respective functions at the appropriate time. Finally, the appDidLaunch logic could be handled completely by the Cordova plugin as well, the app token, environment, verbosity and buffering parameters provided in the config.xml or as plugin variables (see the 'Variables' section in the Cordova Plugin Specification) and optionally exposed separately via JS apis.

Minimally though, the documentation should be updated to compensate for the problem I described in the first paragraph. Thanks!

Cordova SDK integration

I've integrated the Adjust SDK into my project, but how do I know that it is working?

What should I look for in the logs?

Also, can you take a look into how I inserted the code to call the Adjust SDK in my index.js and if it is correct:

var app = {
    initialize: function() {
    this.bindEvents();
},
bindEvents: function() {
    document.addEventListener('deviceready', this.onDeviceReady, false);
},
onDeviceReady: function() {
    app.receivedEvent('deviceready');

    var adjustConfig = new AdjustConfig("APP_TOKEN", AdjustConfig.EnvironmentSandbox);

    Adjust.create(adjustConfig);
},
receivedEvent: function(id) {
    var parentElement = document.getElementById(id);
    var listeningElement = parentElement.querySelector('.listening');
    var receivedElement = parentElement.querySelector('.received');

    listeningElement.setAttribute('style', 'display:none;');
    receivedElement.setAttribute('style', 'display:block;');

    console.log('Received Event: ' + id);
 }
};

Build error after installing plugin

MacOS
Cordova 8.1.1 ([email protected])
Cordova Android 7.1.1

After installing the plugin using cordova plugin add https://github.com/adjust/cordova_sdk.git#cordova-8
And trying to build my app for Android, i get the following error message:

> Task :app:compileDebugJavaWithJavac FAILED
.../cordova/platforms/android/app/src/main/java/cordova/plugin/RequestLocationAccuracy.java:55: error: cannot access zzbfm
        ResultCallback<LocationSettingsResult> {
                      ^
  class file for com.google.android.gms.internal.zzbfm not found

So the error actually comes form the RequestLocationAccuracy plugin, but after removing the adjust plugin, the app will build fine

Linker command failed with exit code 1 in apache cordova iOS app

I have setup FCM in iOS apache cordova app with the following
-> cocoapods
->GoogleService-info.plist

Using:
Xcode 10.1
iOS 12.1
OSX 10.13.6
Installed platforms:
ios 4.5.5

npm 5.6.0
Cordova 8.0.0

cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-fcm 2.1.2 "FCMPlugin"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-media 5.0.2 "Media"
cordova-plugin-media-capture 3.0.2 "Capture"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-whitelist 1.3.3 "Whitelist"

After adding cordova-plugin-fcm 2.1.2 "FCMPlugin"
I got build ERROR

ld: 382 duplicate symbols for architecture arm64

Any suggestions please!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.