Skip to content

af-fess/af-cordova-ionic-demo

Repository files navigation

af-cordova-ionic-demo Build Status

This is Cordova+Ionic project that demonstrates detailed usage of AppsFlyer plugin with some unitesting (Jasmine)

Environment

Cordova 6.3.1

platforms

  • Android platform 5.2.2
  • Android Studio 2.2 -- Gradle ver. - 3.1 --Android Plugin ver. 2.2.0
  • iOS platform 4.1.1
    • Xcode 8

How to build

  1. install globally ionic and cordova: npm install -g cordova ionic (may require sudo)
  2. install dependances (for ionic): npm install
  3. cd to af-cordova-ionic-demo
  4. add android to platforms list: ionic platform add android
  5. add ios to platforms list (might drop error that ios is already installed): ionic platform add ios
  6. build Android and iOS: ionic build ios ionic build android or both: ionic build
  7. check plugin status: cordova plugin list

Android

Now you can open project in Visual Studio (target it to af-cordova-ionic-demo/platforms/android)

iOS

Open project af-cordova-ionic-demo/platforms/ios/af-cordova-ionic-demo.xcodeproj in Xcode


Structure

  • 1st tab should display Wifi scan list (as dummy plugin)
  • 2nd tab activates Appsflyer SDK with API methods (for now we have initSDK)

Genearally Appsflyer initiation should be started on application start but for demo and easy debug we put it in second tab (1st tab is active by default)

We also added several test cases for testing our API (so far only initSDK)

How to run tests:

Actually if you still didn't test your cordova application its a good time to start.

We use simple plugin cordova-plugin-test-framework that most cordova plugins use.

To run tests.js under tests folder you just need to change:

For iOS: Go to config.xml file under Staging folder, see an image:

replace <content src="index.html" /> with <content src="cdvtests/index.html" /> No worries, once you run from CLI cordova build ios your config.xml will be rebuild.

For Android: Go to res/xml/config.xml, see image:

replace <content src="index.html"/> with <content src="cdvtests/index.html" />

After running, and pressing on Run button in Jasmine UI you should get something like:

In the future we will expand API usage and unitesting.

About

Cordova+Ionic demo for Appsflyer SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published