GithubHelp home page GithubHelp logo

isabella232 / unity-acpgriffon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adobe/unity-aepassurance

0.0 0.0 0.0 34.53 MB

Adobe Experience Platform - Project Griffon package for Unity apps.

License: Apache License 2.0

C# 49.92% Objective-C 27.22% C++ 5.27% Objective-C++ 6.52% Makefile 11.07%

unity-acpgriffon's Introduction

Adobe Experience Platform - Griffon package for Unity apps

Prerequisites

The Unity Hub application is required for development and testing. Inside of Unity Hub, you will be required to download the current version of the Unity app.

Download the Unity Hub. The free version works for development and testing, but a Unity Pro license is required for distribution. See Distribution below for details.

FOLDER STRUCTURE

Plugins for a Unity project use the following folder structure:

{Project}/Assets/Plugins/{Platform}

Installation

Note: Unity Griffon plugin needs ACP Core Plugin to work. Import ACPCore.unitypackage to you project before using Griffon.

Usage

Griffon

Initialization

Registering the extension with ACPGriffon

Note: It is required to initialize the SDK via native code inside your AppDelegate and MainApplication for iOS and Android respectively. For more information see how to initialize Griffon

using com.adobe.marketing.mobile;
using AOT;

public class MainScript : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {   
      ACPGriffon.RegisterExtension();
    }
}
Start the ACP Core and set the Wrapper Type
Getting the SDK version:
  string griffonVersion = ACPGriffon.ExtensionVersion();
Start Griffon session:

Note: Refer Griffon to learn more about Griffon session.

  ACPGriffon.StartSession(url);

Note: Read more about Griffon Session url

Start Griffon session using Deeplink

Android

Ensure that Assets/Plugin/Android/AndroidManifest.xml contains the following Intent-Filter in UnityPlayerActivity(or it's child class).

<activity android:name="com.unity3d.player.UnityPlayerActivity"
                  android:theme="@style/UnityThemeSelector">
    <intent-filter>
         <action android:name="android.intent.action.VIEW" />
         <category android:name="android.intent.category.DEFAULT" />
         <category android:name="android.intent.category.BROWSABLE" />
         <data android:scheme="grifflab" />
    </intent-filter>
</activity>    

Note: Replace the scheme grifflab with your scheme.

iOS

Go to iOS Player setting and you scheme under supported URL scheme.

Running Tests

Tests are located at at unity-acpgriffon/ACP-Griffon/Assets/Scenes/Tests.

Note: Before running the tests ensure that you have Android or iOS phone/simulator connected.

  1. Select platform Android/iOS in Build Settings and choose test phone/simulator.
  2. Open Test Runner via Window > General > Test Runner
  3. Select the tests to run and hit Run Tests.

Sample App

Sample App is located at unity-acpgriffon/ACP-Griffon/Assets/Scenes. To build demo app for specific platform follow the below instructions.

Add core plugin
  • Download ACPCore-0.0.1-Unity.zip
  • Unzip ACPCore-0.0.1-Unity.zip
  • Import ACPCore.unitypackage via Assets->Import Package
Android
  1. Make sure you have an Android device connected.
  2. From the menu of the Unity app, select File > Build Settings...
  3. Select Android from the Platform window
  4. If Android is not the active platform, hit the button that says Switch Platform (it will only be available if you actually need to switch active platforms)
  5. Press the Build And Run button
  6. You will be asked to provide a location to save the build. Make a new directory at unity-acpgriffon/ACPGriffon/Builds (this folder is in the .gitignore file)
  7. Name build whatever you want and press Save
  8. Unity will build an apk file and automatically deploy it to the connected device
iOS
  1. From the menu of the Unity app, select File > Build Settings...
  2. Select iOS from the Platform window
  3. If iOS is not the active platform, hit the button that says Switch Platform (it will only be available if you actually need to switch active platforms)
  4. Press the Build And Run button
  5. You will be asked to provide a location to save the build. Make a new directory at unity-acpgriffon/ACPGriffon/Builds (this folder is in the .gitignore file)
  6. Name build whatever you want and press Save
  7. Unity will create and open an Xcode project
  8. From the Xcode project run the app on a simulator.
  9. If you get an error Symbol not found: _OBJC_CLASS_$_WKWebView. Select the Unity-iPhone target -> Go to Build Phases tab -> Add Webkit.Framework to Link Binary with Libraries.

Additional Cordova Plugins

Below is a list of additional Unity plugins from the AEP SDK suite:

Extension GitHub Unity Package
Core SDK https://github.com/adobe/unity-acpcore ACPCore
Adobe Analytics https://github.com/adobe/unity-acpanalytics ACPAnalytics

Contributing

Looking to contribute to this project? Please review our Contributing guidelines prior to opening a pull request.

We look forward to working with you!

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

unity-acpgriffon's People

Contributors

ravjain-adb avatar sbenedicadb avatar shtomar-adb avatar spoorthipujariadobe avatar

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.