Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Latest commit

 

History

History
171 lines (101 loc) · 6.96 KB

File metadata and controls

171 lines (101 loc) · 6.96 KB

Developer quick start

Here is some information about how to implement the Universal Windows Platform library.

Important: To implement the SDK, you need Visual Studio 2013 or later.

Get the SDK

After you unzip the SDK download file, you will have a separate folder for each supported architecture and platform combination. You will also have an ADBMobileConfig.json file. For more information about this file, see ADBMobileConfig.json config file.

Select the correct version

Different .dll/.winmd files are provided for each supported architecture (x86, x64, ARM).

Important: The version of ADBMobile.winmd does not reflect the version of the library. The .winmd file contains only metadata and has a version number of 255.255.255.255, which is accepted behavior according to Microsoft. For more information, see How do I add assembly information for a WinRT C++ / CX component dll?. To check the version of the library you are using, check the version of the underlying ADBMobile.dll file.

Syntax Differences

The Universal Windows Platform library can be used in several programming languages. The examples in this guide are in WinJS (JavaScript), if you are using a different language, might need to be modified. When you consume winmd methods from winJS, all methods automatically have their first letter lowercased.

The main difference between the implementations is the data structure used for context data. Additionally, when using the SDK in a WinJS project, use an empty string ( "" or '') instead of null for empty string values.

Add the library and config File to your project - C#

  1. Launch Visual Studio and open your solution.

  2. In the Solution Explorer, right-click References and select Add Reference.

  3. Select the correct version of the library and browse to the associated ADBMobile.winmd file.

    For more information, see Select the correct version section on this page.

  4. Click Add.

  5. Verify that the ADBMobile.winmd file is checked in the Reference Manager window and click OK.

  6. In the Solution Explorer, right-click References and select Add Reference.

    If you also have a C++ project in your solution, skip this step.

  7. In the Windows tab on the left, select Extensions, select and add Visual C++ 2015 Runtime for Universal Windows Platform Apps.

  8. Add the following line to your class:

    using ADBMobile;
  9. Right-click your project and click Add > Existing Item.

  10. Browse to the ADBMobileConfig.json file and click Add.

  11. Right-click on the ADBMobileConfig.json file in your solution and select Properties.

  12. Change Build Action to Content.

Add the library and config file to your project - C++

  1. Launch Visual Studio and open your solution.

  2. In the Solution Explorer, right-click your project and select Add > References.

  3. Select the correct version of the library and add a reference to the associated ADBMobile.winmd file.

    For more information, see Select the correct version section on this page.

  4. Click Add.

  5. Verify that ADBMobile.winmd is checked in the Reference Manager window and click OK.

  6. Add the following line to your class:

    using namespace ADBMobile;
  7. Right-click your project and select Add > Existing Item.

  8. Browse to ADBMobileConfig.json file and click Add.

  9. Right-click the ADBMobileConfig.json file in your solution and select Properties.

  10. On the General tab, change Content to Yes and click OK.

Add the library and config file to your project - WinJS

  1. Launch Visual Studio and open your solution.

  2. In the Solution Explorer, right-click References and select Add Reference.

  3. Select the correct version of the library and browse to the associated ADBMobile.winmd file.

  4. Click Add.

  5. Verify that the ADBMobile.winmd file is checked in the Reference Manager window and click OK.

  6. In the Solution Explorer, right-click References and select Add Reference.

    If you also have a C++ project in your solution, skip this step.

  7. In the Windows tab on the left, select Extensions and select and add Visual C++ 2015 Runtime for Universal Windows Platform Apps.

  8. Right-click your project and select Add > Existing Item.

  9. Browse to the ADBMobileConfig.json file and click Add.

  10. Right-click the ADBMobileConfig.json file in your solution and select Properties.

  11. With File Properties selected, ensure Package Action is set to Content.

    For JavaScript projects, the file is set to Content by default.

Update The ADBMobileConfig.json config file

The ADBMobileConfig.json file contains global SDK settings and is located at your project root after you complete the steps in the Add the library and config file to your project section. If your ADBMobileConfig.json file was not pre-configured by Adobe Mobile Services, you need to update a few values to get started.

Here is an example of an ADBMobileConfig.json file:

{ 
    "version" : "1.0", 
    "analytics" : { 
        "rsids" : "coolApp", 
        "server" : "my.CoolApp.com", 
        "charset" : "UTF-8", 
        "ssl" : true, 
        "offlineEnabled" : true, 
        "lifecycleTimeout" : 300, 
        "privacyDefault" : "optedin", 
        "poi" : [ 
                    ["san francisco",37.757144,-122.44812,7000], 
                    ["santa cruz",36.972935,-122.01725,600] 
                ] 
    }, 
 "target" : { 
  "clientCode" : "myTargetClientCode", 
  "timeout" : 1 
 }, 
 "audienceManager" : { 
  "server" : "myServer.demdex.com" 
 } 
}

At a minimum, update the following values for the solutions you are using:

  • Adobe Analytics: rsids and server

  • Adobe Target: clientCode

  • Adobe Audience Manager: server

For more information, see SDK methods.

Debugging

To enable debugging for the SDK, call ADBMobile.Config.setDebugLogging(true);.

For C Sharp and JavaScript apps, you need to enable native code debugging by completing the following steps (native code debugging is the default setting for C++ apps):

C Sharp

  1. Right-click the project, click Properties > Debug tab.

  2. Change the debugger type drop down to Native Only.

JavaScript

  1. Right-click the project, click Properties > Configuration Properties > Debug tab.

  2. Change the debugger type drop down to Native Only.

That's it! You're now ready to implement Analytics, Target, and Audience Management in your Universal Windows Platform app.