├── .gitignore
├── .gitmodules
├── .npmignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── VERSION
├── example-cordova
├── .gitignore
├── config.xml
├── package-lock.json
├── package.json
└── www
│ ├── css
│ └── index.css
│ ├── img
│ └── logo.png
│ ├── index.html
│ └── js
│ └── index.js
├── example-ionic-capacitor
├── .browserslistrc
├── .editorconfig
├── .eslintrc.json
├── .gitignore
├── .vscode
│ ├── extensions.json
│ └── settings.json
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── capacitor.build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── getcapacitor
│ │ │ │ └── myapp
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── assets
│ │ │ │ ├── capacitor.config.json
│ │ │ │ └── capacitor.plugins.json
│ │ │ ├── java
│ │ │ │ └── io
│ │ │ │ │ └── ionic
│ │ │ │ │ └── starter
│ │ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ │ ├── drawable-land-hdpi
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-land-mdpi
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-land-xhdpi
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-land-xxhdpi
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-land-xxxhdpi
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-port-hdpi
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-port-mdpi
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-port-xhdpi
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-port-xxhdpi
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-port-xxxhdpi
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ └── splash.png
│ │ │ │ ├── layout
│ │ │ │ └── activity_main.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── values
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ │ └── xml
│ │ │ │ ├── config.xml
│ │ │ │ └── file_paths.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── getcapacitor
│ │ │ └── myapp
│ │ │ └── ExampleUnitTest.java
│ ├── build.gradle
│ ├── capacitor.settings.gradle
│ ├── gradle.properties
│ ├── settings.gradle
│ └── variables.gradle
├── angular.json
├── capacitor.config.ts
├── ionic.config.json
├── ionic.starter.json
├── ios
│ ├── .gitignore
│ └── App
│ │ ├── App.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ ├── App.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── App
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── AppIcon-512@2x.png
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ └── Splash.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── splash-2732x2732-1.png
│ │ │ │ ├── splash-2732x2732-2.png
│ │ │ │ └── splash-2732x2732.png
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── capacitor.config.json
│ │ └── config.xml
│ │ ├── Podfile
│ │ └── Podfile.lock
├── karma.conf.js
├── package-lock.json
├── package.json
├── src
│ ├── app
│ │ ├── app-routing.module.ts
│ │ ├── app.component.html
│ │ ├── app.component.scss
│ │ ├── app.component.spec.ts
│ │ ├── app.component.ts
│ │ ├── app.module.ts
│ │ ├── explore-container
│ │ │ ├── explore-container.component.html
│ │ │ ├── explore-container.component.scss
│ │ │ ├── explore-container.component.spec.ts
│ │ │ ├── explore-container.component.ts
│ │ │ └── explore-container.module.ts
│ │ ├── tab1
│ │ │ ├── tab1-routing.module.ts
│ │ │ ├── tab1.module.ts
│ │ │ ├── tab1.page.html
│ │ │ ├── tab1.page.scss
│ │ │ ├── tab1.page.spec.ts
│ │ │ └── tab1.page.ts
│ │ ├── tab2
│ │ │ ├── tab2-routing.module.ts
│ │ │ ├── tab2.module.ts
│ │ │ ├── tab2.page.html
│ │ │ ├── tab2.page.scss
│ │ │ ├── tab2.page.spec.ts
│ │ │ └── tab2.page.ts
│ │ ├── tab3
│ │ │ ├── tab3-routing.module.ts
│ │ │ ├── tab3.module.ts
│ │ │ ├── tab3.page.html
│ │ │ ├── tab3.page.scss
│ │ │ ├── tab3.page.spec.ts
│ │ │ └── tab3.page.ts
│ │ └── tabs
│ │ │ ├── tabs-routing.module.ts
│ │ │ ├── tabs.module.ts
│ │ │ ├── tabs.page.html
│ │ │ ├── tabs.page.scss
│ │ │ ├── tabs.page.spec.ts
│ │ │ └── tabs.page.ts
│ ├── assets
│ │ ├── icon
│ │ │ └── favicon.png
│ │ └── shapes.svg
│ ├── environments
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── global.scss
│ ├── index.html
│ ├── main.ts
│ ├── polyfills.ts
│ ├── test.ts
│ ├── theme
│ │ └── variables.scss
│ └── zone-flags.ts
├── tsconfig.app.json
├── tsconfig.json
└── tsconfig.spec.json
├── ionic-native
└── index.ts
├── package.json
├── plugin.xml
├── src
├── android
│ ├── AdjustCordova.java
│ └── AdjustCordovaUtils.java
└── ios
│ ├── AdjustCordova.h
│ ├── AdjustCordova.m
│ ├── AdjustCordovaDelegate.h
│ └── AdjustCordovaDelegate.m
├── test
├── app
│ ├── config.xml
│ ├── hooks
│ │ └── README.md
│ ├── package-lock.json
│ ├── package.json
│ └── www
│ │ ├── css
│ │ └── index.css
│ │ ├── img
│ │ └── logo.png
│ │ ├── index.html
│ │ └── js
│ │ ├── command_executor.js
│ │ ├── index.js
│ │ └── test_options.js
└── plugin
│ ├── package.json
│ ├── plugin.xml
│ ├── src
│ ├── android
│ │ ├── AdjustCordovaTest.java
│ │ ├── CommandListener.java
│ │ ├── adjust-test-library.jar
│ │ └── adjust-test-options.jar
│ └── ios
│ │ ├── ADJCommandListener.h
│ │ ├── ADJCommandListener.m
│ │ ├── ADJCordovaTest.h
│ │ ├── ADJCordovaTest.m
│ │ └── AdjustTestLibrary.framework
│ │ ├── AdjustTestLibrary
│ │ └── Headers
│ │ ├── ATLBlockingQueue.h
│ │ ├── ATLConstants.h
│ │ ├── ATLControlSignal.h
│ │ ├── ATLControlWebSocketClient.h
│ │ ├── ATLNetworking.h
│ │ ├── ATLTestLibrary.h
│ │ └── ATLUtil.h
│ └── www
│ └── adjust_test.js
└── www
├── adjust.js
├── adjust_ad_revenue.js
├── adjust_app_store_purchase.js
├── adjust_app_store_subscription.js
├── adjust_config.js
├── adjust_deeplink.js
├── adjust_event.js
├── adjust_play_store_purchase.js
├── adjust_play_store_subscription.js
├── adjust_store_info.js
└── adjust_third_party_sharing.js
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS X
2 | .DS_Store
3 |
4 | # Xcode
5 | build/
6 | *.pbxuser
7 | !default.pbxuser
8 | *.mode1v3
9 | !default.mode1v3
10 | *.mode2v3
11 | !default.mode2v3
12 | *.perspectivev3
13 | !default.perspectivev3
14 | xcuserdata
15 | *.xccheckout
16 | profile
17 | *.moved-aside
18 | DerivedData
19 | *.hmap
20 | *.ipa
21 |
22 | # CocoaPods
23 | Pods
24 |
25 | # git files
26 | *.orig
27 | # Copyright: Benjamin Weiss (keyboardsurfer) https://github.com/keyboardsurfer
28 | # Under CC-BY-SA V3.0 (https://creativecommons.org/licenses/by-sa/3.0/legalcode)
29 |
30 | # orig files
31 | *.orig
32 |
33 | # built application files
34 | *.apk
35 | *.ap_
36 |
37 | # lint folder
38 | lint
39 |
40 | # files for the dex VM
41 | *.dex
42 |
43 | # Java class files
44 | *.class
45 |
46 | # generated files
47 | bin/
48 | gen/
49 | classes/
50 | gen-external-apklibs/
51 |
52 | # maven output folder
53 | target
54 |
55 | # Local configuration file (sdk path, etc)
56 | local.properties
57 |
58 | # Eclipse project files
59 | .classpath
60 | .project
61 | .metadata
62 | .settings
63 |
64 | # IntelliJ files
65 | .idea
66 | *.iml
67 |
68 | # OSX files
69 | .DS_Store
70 |
71 | # Windows files
72 | Thumbs.db
73 |
74 | # vi swap files
75 | *.swp
76 |
77 | # backup files
78 | *.bak
79 |
80 | # gradle directory
81 | .gradle
82 | .gradletasknamecache
83 | gradlew
84 | gradlew.bat
85 | gradle/
86 | build/
87 |
88 | # for oh-my-zsh jira plugin (https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins#jira)
89 | .jira-url
90 | atlassian-ide-plugin.xml
91 |
92 | temp_plugin/
93 | example-cordova/node_modules
94 | example-cordova/platforms
95 | example-cordova/plugins
96 | test/app/node_modules
97 | test/app/platforms
98 | test/app/plugins
99 | *.pyc
100 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "ext/ios/sdk"]
2 | path = ext/ios/sdk
3 | url = https://github.com/adjust/ios_sdk.git
4 | [submodule "ext/android/sdk"]
5 | path = ext/android/sdk
6 | url = https://github.com/adjust/android_sdk.git
7 | [submodule "ext/scripts"]
8 | path = ext/scripts
9 | url = https://github.com/adjust/sdk_scripts.git
10 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .vscode
2 |
3 | # OS X
4 | .DS_Store
5 |
6 | # Adjust SDK repository
7 | ext/
8 | example-cordova/
9 | example-ionic-capacitor/
10 | ionic-native/
11 | test/
12 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014-Present Adjust GmbH, http://www.adjust.com
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Adjust SDK for Cordova
2 |
3 | This is the [Adjust](https://adjust.com)™ SDK for Cordova. Documentation is available on our [developer docs](https://dev.adjust.com/en/sdk/cordova/?version=v5).
4 |
5 | ## License
6 |
7 | Distributed under the [`MIT license`](LICENSE).
8 |
--------------------------------------------------------------------------------
/VERSION:
--------------------------------------------------------------------------------
1 | 5.4.0
2 |
--------------------------------------------------------------------------------
/example-cordova/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
3 | # Generated by package manager
4 | node_modules/
5 |
6 | # Generated by Cordova
7 | /plugins/
8 | /platforms/
9 |
--------------------------------------------------------------------------------
/example-cordova/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | AdjustExample
4 |
5 | A sample Apache Cordova application that responds to the deviceready event.
6 |
7 |
8 | Apache Cordova Team
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example-cordova/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "com.adjust.examples",
3 | "displayName": "AdjustExample",
4 | "version": "1.0.0",
5 | "description": "A sample Apache Cordova application that responds to the deviceready event.",
6 | "main": "index.js",
7 | "scripts": {
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "keywords": [
11 | "ecosystem:cordova"
12 | ],
13 | "author": "Apache Cordova Team",
14 | "license": "Apache-2.0",
15 | "devDependencies": {
16 | "com.adjust.sdk": "file:../temp_plugin",
17 | "cordova-android": "^14.0.1",
18 | "cordova-ios": "^7.1.1",
19 | "cordova-plugin-console": "^1.1.0",
20 | "cordova-plugin-customurlscheme": "^5.0.2",
21 | "cordova-plugin-device": "github:apache/cordova-plugin-device",
22 | "cordova-plugin-dialogs": "^2.0.2",
23 | "cordova-plugin-whitelist": "^1.3.4",
24 | "cordova-universal-links-plugin": "^1.2.1"
25 | },
26 | "cordova": {
27 | "plugins": {
28 | "cordova-plugin-whitelist": {},
29 | "cordova-plugin-console": {},
30 | "cordova-plugin-customurlscheme": {
31 | "URL_SCHEME": "adjust-example"
32 | },
33 | "cordova-plugin-dialogs": {},
34 | "cordova-plugin-device": {},
35 | "cordova-universal-links-plugin": {},
36 | "com.adjust.sdk": {}
37 | },
38 | "platforms": [
39 | "android",
40 | "ios"
41 | ]
42 | },
43 | "dependencies": {
44 | "xmldom": "github:xmldom/xmldom#0.7.0"
45 | }
46 | }
--------------------------------------------------------------------------------
/example-cordova/www/css/index.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | * {
20 | -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
21 | }
22 |
23 | body {
24 | -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
25 | -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
26 | -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
27 | background-color:#FFFFFF;
28 | font-family: system-ui, -apple-system, -apple-system-font, 'Segoe UI', 'Roboto', sans-serif;
29 | font-size:12px;
30 | height:100vh;
31 | margin:0px;
32 | padding:0px;
33 | /* Padding to avoid the "unsafe" areas behind notches in the screen */
34 | padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
35 | text-transform:uppercase;
36 | width:100%;
37 | }
38 |
39 | /* Portrait layout (default) */
40 | .app {
41 | background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
42 | position:absolute; /* position in the center of the screen */
43 | left:50%;
44 | top:50%;
45 | height:50px; /* text area height */
46 | width:225px; /* text area width */
47 | text-align:center;
48 | padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */
49 | margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */
50 | /* offset horizontal: half of text area width */
51 | }
52 |
53 | /* Landscape layout (with min-width) */
54 | @media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
55 | .app {
56 | background-position:left center;
57 | padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */
58 | margin:-90px 0px 0px -198px; /* offset vertical: half of image height */
59 | /* offset horizontal: half of image width and text area width */
60 | }
61 | }
62 |
63 | h1 {
64 | font-size:24px;
65 | font-weight:normal;
66 | margin:0px;
67 | overflow:visible;
68 | padding:0px;
69 | text-align:center;
70 | }
71 |
72 | .event {
73 | border-radius:4px;
74 | color:#FFFFFF;
75 | font-size:12px;
76 | margin:0px 30px;
77 | padding:2px 0px;
78 | }
79 |
80 | .event.listening {
81 | background-color:#333333;
82 | display:block;
83 | }
84 |
85 | .event.received {
86 | background-color:#4B946A;
87 | display:none;
88 | }
89 |
90 | #deviceready.ready .event.listening { display: none; }
91 | #deviceready.ready .event.received { display: block; }
92 |
93 | @keyframes fade {
94 | from { opacity: 1.0; }
95 | 50% { opacity: 0.4; }
96 | to { opacity: 1.0; }
97 | }
98 |
99 | .blink {
100 | animation:fade 3000ms infinite;
101 | -webkit-animation:fade 3000ms infinite;
102 | }
103 |
104 |
105 | @media screen and (prefers-color-scheme: dark) {
106 | body {
107 | background-image:linear-gradient(to bottom, #585858 0%, #1B1B1B 51%);
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/example-cordova/www/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-cordova/www/img/logo.png
--------------------------------------------------------------------------------
/example-cordova/www/index.html:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
23 |
32 |
34 |
35 |
36 |
37 |
38 | Hello World
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/example-cordova/www/js/index.js:
--------------------------------------------------------------------------------
1 | var app = {
2 | // Application Constructor
3 | initialize: function() {
4 | this.bindEvents();
5 | },
6 |
7 | // Bind Event Listeners
8 | bindEvents: function() {
9 | document.addEventListener('deviceready', this.onDeviceReady, false);
10 | },
11 |
12 | onDeviceReady: function() {
13 | app.receivedEvent('deviceready');
14 |
15 | var adjustConfig = new AdjustConfig("2fm9gkqubvpc", AdjustConfig.EnvironmentSandbox);
16 | adjustConfig.setLogLevel(AdjustConfig.LogLevelVerbose);
17 |
18 | adjustConfig.setAttributionCallback(function(attribution) {
19 | console.log("[AdjustExample]: Attribution callback received.");
20 | console.log("[AdjustExample]: Tracker token = " + attribution.trackerToken);
21 | console.log("[AdjustExample]: Tracker name = " + attribution.trackerName);
22 | console.log("[AdjustExample]: Network = " + attribution.network);
23 | console.log("[AdjustExample]: Campaign = " + attribution.campaign);
24 | console.log("[AdjustExample]: Adgroup = " + attribution.adgroup);
25 | console.log("[AdjustExample]: Creative = " + attribution.creative);
26 | console.log("[AdjustExample]: Click label = " + attribution.clickLabel);
27 | console.log("[AdjustExample]: Adid = " + attribution.adid);
28 | });
29 |
30 | adjustConfig.setEventTrackingSucceededCallback(function(eventSuccess) {
31 | console.log("[AdjustExample]: Event tracking succeeded callback received.");
32 | console.log("[AdjustExample]: Message: " + eventSuccess.message);
33 | console.log("[AdjustExample]: Timestamp: " + eventSuccess.timestamp);
34 | console.log("[AdjustExample]: Adid: " + eventSuccess.adid);
35 | console.log("[AdjustExample]: Event token: " + eventSuccess.eventToken);
36 | console.log("[AdjustExample]: Callback Id: " + eventSuccess.callbackId);
37 | console.log("[AdjustExample]: JSON response: " + eventSuccess.jsonResponse);
38 | });
39 |
40 | adjustConfig.setEventTrackingFailedCallback(function(eventFailed) {
41 | console.log("[AdjustExample]: Event tracking failed callback received.");
42 | console.log("[AdjustExample]: Message: " + eventFailed.message);
43 | console.log("[AdjustExample]: Timestamp: " + eventFailed.timestamp);
44 | console.log("[AdjustExample]: Adid: " + eventFailed.adid);
45 | console.log("[AdjustExample]: Event token: " + eventFailed.eventToken);
46 | console.log("[AdjustExample]: Will retry: " + eventFailed.willRetry);
47 | console.log("[AdjustExample]: Callback Id: " + eventFailed.callbackId);
48 | console.log("[AdjustExample]: JSON response: " + eventFailed.jsonResponse);
49 | });
50 |
51 | adjustConfig.setSessionTrackingSucceededCallback(function(sessionSuccess) {
52 | console.log("[AdjustExample]: Session tracking succeeded callback received.");
53 | console.log("[AdjustExample]: Message: " + sessionSuccess.message);
54 | console.log("[AdjustExample]: Timestamp: " + sessionSuccess.timestamp);
55 | console.log("[AdjustExample]: Adid: " + sessionSuccess.adid);
56 | console.log("[AdjustExample]: JSON response: " + sessionSuccess.jsonResponse);
57 | });
58 |
59 | adjustConfig.setSessionTrackingFailedCallback(function(sessionFailed) {
60 | console.log("[AdjustExample]: Session tracking failed callback received.");
61 | console.log("[AdjustExample]: Message: " + sessionFailed.message);
62 | console.log("[AdjustExample]: Timestamp: " + sessionFailed.timestamp);
63 | console.log("[AdjustExample]: Adid: " + sessionFailed.adid);
64 | console.log("[AdjustExample]: Will retry: " + sessionFailed.willRetry);
65 | console.log("[AdjustExample]: JSON response: " + sessionFailed.jsonResponse);
66 | });
67 |
68 | adjustConfig.setDeferredDeeplinkCallback(function(uri) {
69 | console.log("[AdjustExample]: Deferred Deeplink Callback received.");
70 | console.log("[AdjustExample]: URL: " + uri);
71 | });
72 |
73 | adjustConfig.setSkanUpdatedCallback(function(skanData) {
74 | console.log("[AdjustExample]: SKAdNetwork conversion data updated!");
75 | console.log("[AdjustExample]: Conversion Value = " + skanData.conversionValue);
76 | console.log("[AdjustExample]: Coarse Value = " + skanData.coarseValue);
77 | console.log("[AdjustExample]: Lock Window = " + skanData.lockWindow);
78 | console.log("[AdjustExample]: Error = " + skanData.error);
79 | });
80 |
81 | Adjust.addGlobalCallbackParameter("dummy_foo", "dummy_bar");
82 | Adjust.addGlobalCallbackParameter("dummy_foo_foo", "dummy_bar");
83 |
84 | Adjust.addGlobalPartnerParameter("dummy_foo", "dummy_bar");
85 | Adjust.addGlobalPartnerParameter("dummy_foo_foo", "dummy_bar");
86 |
87 | Adjust.removeGlobalCallbackParameter("dummy_foo");
88 | Adjust.removeGlobalPartnerParameter("dummy_foo");
89 |
90 | // Adjust.removeGlobalCallbackParameters();
91 | // Adjust.removeGlobalPartnerParameters();
92 |
93 | Adjust.initSdk(adjustConfig);
94 | },
95 |
96 | // Update DOM on a Received Event
97 | receivedEvent: function(id) {
98 | console.log('[AdjustExample]: Received Event: ' + id);
99 |
100 | var btnTrackSimpleEvent = document.getElementById("btnTrackSimpleEvent");
101 | var btnTrackSimpleEventWithCallbackId = document.getElementById("btnTrackSimpleEventWithCallbackId");
102 | var btnTrackRevenueEvent = document.getElementById("btnTrackRevenueEvent");
103 | var btnTrackCallbackEvent = document.getElementById("btnTrackCallbackEvent");
104 | var btnTrackPartnerEvent = document.getElementById("btnTrackPartnerEvent");
105 | var btnEnableDisableOfflineMode = document.getElementById("btnEnableDisableOfflineMode");
106 | var btnEnableDisableSdk = document.getElementById("btnEnableDisableSdk");
107 | var btnIsSdkEnabled = document.getElementById("btnIsSdkEnabled");
108 | var btnGetSdkVersion = document.getElementById("btnGetSdkVersion");
109 |
110 | btnTrackSimpleEvent.addEventListener('click', function() {
111 | var adjustEvent = new AdjustEvent("g3mfiw");
112 | Adjust.trackEvent(adjustEvent);
113 | }, false);
114 |
115 | btnTrackRevenueEvent.addEventListener('click',function() {
116 | var adjustEvent = new AdjustEvent("a4fd35");
117 | adjustEvent.setRevenue(0.01, "USD");
118 | adjustEvent.setTransactionId("dummy_id");
119 | Adjust.trackEvent(adjustEvent);
120 | }, false);
121 |
122 | btnTrackCallbackEvent.addEventListener('click',function() {
123 | var adjustEvent = new AdjustEvent("34vgg9");
124 | adjustEvent.addCallbackParameter("key", "stuff");
125 | adjustEvent.addCallbackParameter("x", "y");
126 | adjustEvent.addCallbackParameter("key", "lock");
127 | Adjust.trackEvent(adjustEvent);
128 | }, false);
129 |
130 | btnTrackPartnerEvent.addEventListener('click',function() {
131 | var adjustEvent = new AdjustEvent("w788qs");
132 | adjustEvent.addPartnerParameter("foo", "bar");
133 | adjustEvent.addPartnerParameter("x", "y");
134 | adjustEvent.addPartnerParameter("foo", "foot");
135 | adjustEvent.addPartnerParameter("x", "z");
136 | Adjust.trackEvent(adjustEvent);
137 | }, false);
138 |
139 | btnEnableOfflineMode.addEventListener('click', function() {
140 | Adjust.switchToOfflineMode();
141 | }, false);
142 |
143 | btnDisableOfflineMode.addEventListener('click', function() {
144 | Adjust.switchBackToOnlineMode();
145 | }, false);
146 |
147 | btnEnableSdk.addEventListener('click', function() {
148 | Adjust.enable();
149 | }, false);
150 |
151 | btnDisableSdk.addEventListener('click', function() {
152 | Adjust.disable();
153 | }, false);
154 |
155 | btnIsSdkEnabled.addEventListener('click', function() {
156 | Adjust.isEnabled(function(isEnabled) {
157 | if (isEnabled) {
158 | navigator.notification.alert('Yes, it is enabled.', null, 'Is SDK Enabled?', 'OK');
159 | } else {
160 | navigator.notification.alert('No, it is not enabled.', null, 'Is SDK Enabled?', 'OK');
161 | }
162 | });
163 | }, false);
164 |
165 | btnGetIds.addEventListener('click', function() {
166 | Adjust.getIdfa(function(idfa) {
167 | console.log("[AdjustExample]: IDFA = " + idfa);
168 | });
169 |
170 | Adjust.getIdfv(function(idfv) {
171 | console.log("[AdjustExample]: IDFV = " + idfv);
172 | });
173 |
174 | Adjust.getGoogleAdId(function(gpsAdId) {
175 | console.log("[AdjustExample]: Google Ad Id = " + gpsAdId);
176 | });
177 |
178 | Adjust.getAmazonAdId(function(amazonAdId) {
179 | console.log("[AdjustExample]: Amazon Ad Id = " + amazonAdId);
180 | });
181 |
182 | Adjust.getAdid(function(adid) {
183 | console.log("[AdjustExample]: Adjust Id = " + adid);
184 | });
185 |
186 | Adjust.getAttribution(function(attribution) {
187 | console.log("[AdjustExample]: Tracker token = " + attribution.trackerToken);
188 | console.log("[AdjustExample]: Tracker name = " + attribution.trackerName);
189 | console.log("[AdjustExample]: Network = " + attribution.network);
190 | console.log("[AdjustExample]: Campaign = " + attribution.campaign);
191 | console.log("[AdjustExample]: Adgroup = " + attribution.adgroup);
192 | console.log("[AdjustExample]: Creative = " + attribution.creative);
193 | console.log("[AdjustExample]: Click label = " + attribution.clickLabel);
194 | console.log("[AdjustExample]: Cost Type = " + attribution.costType);
195 | console.log("[AdjustExample]: Cost Amount = " + attribution.costAmount);
196 | console.log("[AdjustExample]: Cost Currency = " + attribution.costCurrency);
197 | });
198 |
199 | Adjust.requestAppTrackingAuthorization(function(status) {
200 | console.log("[AdjustExample]: ATT status = " + status);
201 | });
202 |
203 | Adjust.getAppTrackingAuthorizationStatus(function(status) {
204 | console.log("[AdjustExample]: ATT status = " + status);
205 | });
206 | }, false);
207 |
208 | btnGetSdkVersion.addEventListener('click', function() {
209 | Adjust.getSdkVersion(function(sdkVersion) {
210 | navigator.notification.alert(sdkVersion, null, 'SDK Version', 'OK');
211 | });
212 | }, false);
213 | }
214 | };
215 |
216 | app.initialize();
217 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/.browserslistrc:
--------------------------------------------------------------------------------
1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 |
5 | # For the full list of supported browsers by the Angular framework, please see:
6 | # https://angular.io/guide/browser-support
7 |
8 | # You can see what browsers were selected by your queries by running:
9 | # npx browserslist
10 |
11 | Chrome >=79
12 | ChromeAndroid >=79
13 | Firefox >=70
14 | Edge >=79
15 | Safari >=14
16 | iOS >=14
17 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.ts]
12 | quote_type = single
13 |
14 | [*.md]
15 | max_line_length = off
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "ignorePatterns": ["projects/**/*"],
4 | "overrides": [
5 | {
6 | "files": ["*.ts"],
7 | "parserOptions": {
8 | "project": ["tsconfig.json"],
9 | "createDefaultProgram": true
10 | },
11 | "extends": [
12 | "plugin:@angular-eslint/recommended",
13 | "plugin:@angular-eslint/template/process-inline-templates"
14 | ],
15 | "rules": {
16 | "@angular-eslint/component-class-suffix": [
17 | "error",
18 | {
19 | "suffixes": ["Page", "Component"]
20 | }
21 | ],
22 | "@angular-eslint/component-selector": [
23 | "error",
24 | {
25 | "type": "element",
26 | "prefix": "app",
27 | "style": "kebab-case"
28 | }
29 | ],
30 | "@angular-eslint/directive-selector": [
31 | "error",
32 | {
33 | "type": "attribute",
34 | "prefix": "app",
35 | "style": "camelCase"
36 | }
37 | ]
38 | }
39 | },
40 | {
41 | "files": ["*.html"],
42 | "extends": ["plugin:@angular-eslint/template/recommended"],
43 | "rules": {}
44 | }
45 | ]
46 | }
47 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/.gitignore:
--------------------------------------------------------------------------------
1 | # Specifies intentionally untracked files to ignore when using Git
2 | # http://git-scm.com/docs/gitignore
3 |
4 | *~
5 | *.sw[mnpcod]
6 | .tmp
7 | *.tmp
8 | *.tmp.*
9 | UserInterfaceState.xcuserstate
10 | $RECYCLE.BIN/
11 |
12 | *.log
13 | log.txt
14 |
15 |
16 | /.sourcemaps
17 | /.versions
18 | /coverage
19 |
20 | # Ionic
21 | /.ionic
22 | /www
23 | /platforms
24 | /plugins
25 |
26 | # Compiled output
27 | /dist
28 | /tmp
29 | /out-tsc
30 | /bazel-out
31 |
32 | # Node
33 | /node_modules
34 | npm-debug.log
35 | yarn-error.log
36 |
37 | # IDEs and editors
38 | .idea/
39 | .project
40 | .classpath
41 | .c9/
42 | *.launch
43 | .settings/
44 | *.sublime-project
45 | *.sublime-workspace
46 |
47 | # Visual Studio Code
48 | .vscode/*
49 | !.vscode/settings.json
50 | !.vscode/tasks.json
51 | !.vscode/launch.json
52 | !.vscode/extensions.json
53 | .history/*
54 |
55 |
56 | # Miscellaneous
57 | /.angular
58 | /.angular/cache
59 | .sass-cache/
60 | /connect.lock
61 | /coverage
62 | /libpeerconnection.log
63 | testem.log
64 | /typings
65 |
66 | # System files
67 | .DS_Store
68 | Thumbs.db
69 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "ionic.ionic"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "typescript.preferences.autoImportFileExcludePatterns": ["@ionic/angular/common", "@ionic/angular/standalone"]
3 | }
4 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/.gitignore:
--------------------------------------------------------------------------------
1 | # Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
2 |
3 | # Built application files
4 | *.apk
5 | *.aar
6 | *.ap_
7 | *.aab
8 |
9 | # Files for the ART/Dalvik VM
10 | *.dex
11 |
12 | # Java class files
13 | *.class
14 |
15 | # Generated files
16 | bin/
17 | gen/
18 | out/
19 | # Uncomment the following line in case you need and you don't have the release build type files in your app
20 | # release/
21 |
22 | # Gradle files
23 | .gradle/
24 | build/
25 |
26 | # Local configuration file (sdk path, etc)
27 | local.properties
28 |
29 | # Proguard folder generated by Eclipse
30 | proguard/
31 |
32 | # Log Files
33 | *.log
34 |
35 | # Android Studio Navigation editor temp files
36 | .navigation/
37 |
38 | # Android Studio captures folder
39 | captures/
40 |
41 | # IntelliJ
42 | *.iml
43 | .idea/workspace.xml
44 | .idea/tasks.xml
45 | .idea/gradle.xml
46 | .idea/assetWizardSettings.xml
47 | .idea/dictionaries
48 | .idea/libraries
49 | # Android Studio 3 in .gitignore file.
50 | .idea/caches
51 | .idea/modules.xml
52 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you
53 | .idea/navEditor.xml
54 |
55 | # Keystore files
56 | # Uncomment the following lines if you do not want to check your keystore files in.
57 | #*.jks
58 | #*.keystore
59 |
60 | # External native build folder generated in Android Studio 2.2 and later
61 | .externalNativeBuild
62 | .cxx/
63 |
64 | # Google Services (e.g. APIs or Firebase)
65 | # google-services.json
66 |
67 | # Freeline
68 | freeline.py
69 | freeline/
70 | freeline_project_description.json
71 |
72 | # fastlane
73 | fastlane/report.xml
74 | fastlane/Preview.html
75 | fastlane/screenshots
76 | fastlane/test_output
77 | fastlane/readme.md
78 |
79 | # Version control
80 | vcs.xml
81 |
82 | # lint
83 | lint/intermediates/
84 | lint/generated/
85 | lint/outputs/
86 | lint/tmp/
87 | # lint/reports/
88 |
89 | # Android Profiling
90 | *.hprof
91 |
92 | # Cordova plugins for Capacitor
93 | capacitor-cordova-android-plugins
94 |
95 | # Copied web assets
96 | app/src/main/assets/public
97 |
98 | # Generated Config files
99 | app/src/main/assets/capacitor.config.json
100 | app/src/main/assets/capacitor.plugins.json
101 | app/src/main/res/xml/config.xml
102 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build/*
2 | !/build/.npmkeep
3 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | namespace "io.ionic.starter"
5 | compileSdkVersion rootProject.ext.compileSdkVersion
6 | defaultConfig {
7 | applicationId "io.ionic.starter"
8 | minSdkVersion rootProject.ext.minSdkVersion
9 | targetSdkVersion rootProject.ext.targetSdkVersion
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
13 | aaptOptions {
14 | // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
15 | // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
16 | ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
17 | }
18 | }
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | }
26 |
27 | repositories {
28 | flatDir{
29 | dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
30 | }
31 | }
32 |
33 | dependencies {
34 | implementation fileTree(include: ['*.jar'], dir: 'libs')
35 | implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
36 | implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
37 | implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
38 | implementation project(':capacitor-android')
39 | testImplementation "junit:junit:$junitVersion"
40 | androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
41 | androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
42 | implementation project(':capacitor-cordova-android-plugins')
43 | }
44 |
45 | apply from: 'capacitor.build.gradle'
46 |
47 | try {
48 | def servicesJSON = file('google-services.json')
49 | if (servicesJSON.text) {
50 | apply plugin: 'com.google.gms.google-services'
51 | }
52 | } catch(Exception e) {
53 | logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
54 | }
55 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/capacitor.build.gradle:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2 |
3 | android {
4 | compileOptions {
5 | sourceCompatibility JavaVersion.VERSION_17
6 | targetCompatibility JavaVersion.VERSION_17
7 | }
8 | }
9 |
10 | apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
11 | dependencies {
12 | implementation project(':capacitor-app')
13 | implementation project(':capacitor-haptics')
14 | implementation project(':capacitor-keyboard')
15 | implementation project(':capacitor-status-bar')
16 | implementation "com.adjust.sdk:adjust-android:4.35.1"
17 | implementation "com.google.android.gms:play-services-ads-identifier:18.0.1"
18 | implementation "com.android.installreferrer:installreferrer:2.2"
19 | }
20 |
21 |
22 | if (hasProperty('postBuildExtras')) {
23 | postBuildExtras()
24 | }
25 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.getcapacitor.myapp;
2 |
3 | import static org.junit.Assert.*;
4 |
5 | import android.content.Context;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 | import androidx.test.platform.app.InstrumentationRegistry;
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * @see Testing documentation
15 | */
16 | @RunWith(AndroidJUnit4.class)
17 | public class ExampleInstrumentedTest {
18 |
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
23 |
24 | assertEquals("com.getcapacitor.app", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
32 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/assets/capacitor.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "appId": "io.ionic.starter",
3 | "appName": "example-ionic-capacitor",
4 | "webDir": "www",
5 | "server": {
6 | "androidScheme": "https"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/assets/capacitor.plugins.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "pkg": "@capacitor/app",
4 | "classpath": "com.capacitorjs.plugins.app.AppPlugin"
5 | },
6 | {
7 | "pkg": "@capacitor/haptics",
8 | "classpath": "com.capacitorjs.plugins.haptics.HapticsPlugin"
9 | },
10 | {
11 | "pkg": "@capacitor/keyboard",
12 | "classpath": "com.capacitorjs.plugins.keyboard.KeyboardPlugin"
13 | },
14 | {
15 | "pkg": "@capacitor/status-bar",
16 | "classpath": "com.capacitorjs.plugins.statusbar.StatusBarPlugin"
17 | }
18 | ]
19 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/java/io/ionic/starter/MainActivity.java:
--------------------------------------------------------------------------------
1 | package io.ionic.starter;
2 |
3 | import com.getcapacitor.BridgeActivity;
4 |
5 | public class MainActivity extends BridgeActivity {}
6 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable-land-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/drawable-land-hdpi/splash.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable-land-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/drawable-land-mdpi/splash.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable-land-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/drawable-land-xhdpi/splash.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable-land-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/drawable-land-xxhdpi/splash.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable-land-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/drawable-land-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable-port-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/drawable-port-hdpi/splash.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable-port-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/drawable-port-mdpi/splash.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable-port-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/drawable-port-xhdpi/splash.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable-port-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/drawable-port-xxhdpi/splash.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable-port-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/drawable-port-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/drawable/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/drawable/splash.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | example-ionic-capacitor
4 | example-ionic-capacitor
5 | io.ionic.starter
6 | io.ionic.starter
7 |
8 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
17 |
18 |
19 |
22 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/xml/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.getcapacitor.myapp;
2 |
3 | import static org.junit.Assert.*;
4 |
5 | import org.junit.Test;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 |
14 | @Test
15 | public void addition_isCorrect() throws Exception {
16 | assertEquals(4, 2 + 2);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | mavenCentral()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:8.0.0'
11 | classpath 'com.google.gms:google-services:4.3.15'
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | apply from: "variables.gradle"
19 |
20 | allprojects {
21 | repositories {
22 | google()
23 | mavenCentral()
24 | }
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/capacitor.settings.gradle:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2 | include ':capacitor-android'
3 | project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
4 |
5 | include ':capacitor-app'
6 | project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
7 |
8 | include ':capacitor-haptics'
9 | project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android')
10 |
11 | include ':capacitor-keyboard'
12 | project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor/keyboard/android')
13 |
14 | include ':capacitor-status-bar'
15 | project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')
16 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
19 | # AndroidX package structure to make it clearer which packages are bundled with the
20 | # Android operating system, and which are packaged with your app's APK
21 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
22 | android.useAndroidX=true
23 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | include ':capacitor-cordova-android-plugins'
3 | project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')
4 |
5 | apply from: 'capacitor.settings.gradle'
--------------------------------------------------------------------------------
/example-ionic-capacitor/android/variables.gradle:
--------------------------------------------------------------------------------
1 | ext {
2 | minSdkVersion = 22
3 | compileSdkVersion = 33
4 | targetSdkVersion = 33
5 | androidxActivityVersion = '1.7.0'
6 | androidxAppCompatVersion = '1.6.1'
7 | androidxCoordinatorLayoutVersion = '1.2.0'
8 | androidxCoreVersion = '1.10.0'
9 | androidxFragmentVersion = '1.5.6'
10 | coreSplashScreenVersion = '1.0.0'
11 | androidxWebkitVersion = '1.6.1'
12 | junitVersion = '4.13.2'
13 | androidxJunitVersion = '1.1.5'
14 | androidxEspressoCoreVersion = '3.5.1'
15 | cordovaAndroidVersion = '10.1.1'
16 | }
--------------------------------------------------------------------------------
/example-ionic-capacitor/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "projects": {
6 | "app": {
7 | "projectType": "application",
8 | "schematics": {},
9 | "root": "",
10 | "sourceRoot": "src",
11 | "prefix": "app",
12 | "architect": {
13 | "build": {
14 | "builder": "@angular-devkit/build-angular:browser",
15 | "options": {
16 | "outputPath": "www",
17 | "index": "src/index.html",
18 | "main": "src/main.ts",
19 | "polyfills": "src/polyfills.ts",
20 | "tsConfig": "tsconfig.app.json",
21 | "inlineStyleLanguage": "scss",
22 | "assets": [
23 | {
24 | "glob": "**/*",
25 | "input": "src/assets",
26 | "output": "assets"
27 | },
28 | {
29 | "glob": "**/*.svg",
30 | "input": "node_modules/ionicons/dist/ionicons/svg",
31 | "output": "./svg"
32 | }
33 | ],
34 | "styles": ["src/theme/variables.scss", "src/global.scss"],
35 | "scripts": []
36 | },
37 | "configurations": {
38 | "production": {
39 | "budgets": [
40 | {
41 | "type": "initial",
42 | "maximumWarning": "2mb",
43 | "maximumError": "5mb"
44 | },
45 | {
46 | "type": "anyComponentStyle",
47 | "maximumWarning": "2kb",
48 | "maximumError": "4kb"
49 | }
50 | ],
51 | "fileReplacements": [
52 | {
53 | "replace": "src/environments/environment.ts",
54 | "with": "src/environments/environment.prod.ts"
55 | }
56 | ],
57 | "outputHashing": "all"
58 | },
59 | "development": {
60 | "buildOptimizer": false,
61 | "optimization": false,
62 | "vendorChunk": true,
63 | "extractLicenses": false,
64 | "sourceMap": true,
65 | "namedChunks": true
66 | },
67 | "ci": {
68 | "progress": false
69 | }
70 | },
71 | "defaultConfiguration": "production"
72 | },
73 | "serve": {
74 | "builder": "@angular-devkit/build-angular:dev-server",
75 | "configurations": {
76 | "production": {
77 | "buildTarget": "app:build:production"
78 | },
79 | "development": {
80 | "buildTarget": "app:build:development"
81 | },
82 | "ci": {
83 | "progress": false
84 | }
85 | },
86 | "defaultConfiguration": "development"
87 | },
88 | "extract-i18n": {
89 | "builder": "@angular-devkit/build-angular:extract-i18n",
90 | "options": {
91 | "buildTarget": "app:build"
92 | }
93 | },
94 | "test": {
95 | "builder": "@angular-devkit/build-angular:karma",
96 | "options": {
97 | "main": "src/test.ts",
98 | "polyfills": "src/polyfills.ts",
99 | "tsConfig": "tsconfig.spec.json",
100 | "karmaConfig": "karma.conf.js",
101 | "inlineStyleLanguage": "scss",
102 | "assets": [
103 | {
104 | "glob": "**/*",
105 | "input": "src/assets",
106 | "output": "assets"
107 | },
108 | {
109 | "glob": "**/*.svg",
110 | "input": "node_modules/ionicons/dist/ionicons/svg",
111 | "output": "./svg"
112 | }
113 | ],
114 | "styles": ["src/theme/variables.scss", "src/global.scss"],
115 | "scripts": []
116 | },
117 | "configurations": {
118 | "ci": {
119 | "progress": false,
120 | "watch": false
121 | }
122 | }
123 | },
124 | "lint": {
125 | "builder": "@angular-eslint/builder:lint",
126 | "options": {
127 | "lintFilePatterns": [
128 | "src/**/*.ts",
129 | "src/**/*.html"
130 | ]
131 | }
132 | }
133 | }
134 | }
135 | },
136 | "cli": {
137 | "schematicCollections": [
138 | "@ionic/angular-toolkit"
139 | ],
140 | "analytics": "7b04bca5-01d5-4643-ba44-9a922e81f4ed"
141 | },
142 | "schematics": {
143 | "@ionic/angular-toolkit:component": {
144 | "styleext": "scss"
145 | },
146 | "@ionic/angular-toolkit:page": {
147 | "styleext": "scss"
148 | }
149 | }
150 | }
151 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/capacitor.config.ts:
--------------------------------------------------------------------------------
1 | import { CapacitorConfig } from '@capacitor/cli';
2 |
3 | const config: CapacitorConfig = {
4 | appId: 'io.ionic.starter',
5 | appName: 'example-ionic-capacitor',
6 | webDir: 'www',
7 | server: {
8 | androidScheme: 'https'
9 | }
10 | };
11 |
12 | export default config;
13 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example-ionic-capacitor",
3 | "integrations": {
4 | "capacitor": {}
5 | },
6 | "type": "angular"
7 | }
8 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ionic.starter.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Tabs Starter",
3 | "baseref": "main",
4 | "tarignore": [
5 | "node_modules",
6 | "package-lock.json",
7 | "www"
8 | ],
9 | "scripts": {
10 | "test": "npm run lint && npm run build && npm run test -- --configuration=ci --browsers=ChromeHeadless"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/.gitignore:
--------------------------------------------------------------------------------
1 | App/build
2 | App/Pods
3 | App/output
4 | App/App/public
5 | DerivedData
6 | xcuserdata
7 |
8 | # Cordova plugins for Capacitor
9 | capacitor-cordova-ios-plugins
10 |
11 | # Generated Config files
12 | App/App/capacitor.config.json
13 | App/App/config.xml
14 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Capacitor
3 |
4 | @UIApplicationMain
5 | class AppDelegate: UIResponder, UIApplicationDelegate {
6 |
7 | var window: UIWindow?
8 |
9 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
10 | // Override point for customization after application launch.
11 | return true
12 | }
13 |
14 | func applicationWillResignActive(_ application: UIApplication) {
15 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
16 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
17 | }
18 |
19 | func applicationDidEnterBackground(_ application: UIApplication) {
20 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
21 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
22 | }
23 |
24 | func applicationWillEnterForeground(_ application: UIApplication) {
25 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
26 | }
27 |
28 | func applicationDidBecomeActive(_ application: UIApplication) {
29 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
30 | }
31 |
32 | func applicationWillTerminate(_ application: UIApplication) {
33 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
34 | }
35 |
36 | func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
37 | // Called when the app was launched with a url. Feel free to add additional processing here,
38 | // but if you want the App API to support tracking app url opens, make sure to keep this call
39 | return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
40 | }
41 |
42 | func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
43 | // Called when the app was launched with an activity, including Universal Links.
44 | // Feel free to add additional processing here, but if you want the App API to support
45 | // tracking app url opens, make sure to keep this call
46 | return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "AppIcon-512@2x.png",
5 | "idiom" : "universal",
6 | "platform" : "ios",
7 | "size" : "1024x1024"
8 | }
9 | ],
10 | "info" : {
11 | "author" : "xcode",
12 | "version" : 1
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "splash-2732x2732-2.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "splash-2732x2732-1.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "splash-2732x2732.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | example-ionic-capacitor
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(MARKETING_VERSION)
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 | UIViewControllerBasedStatusBarAppearance
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/capacitor.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "appId": "io.ionic.starter",
3 | "appName": "example-ionic-capacitor",
4 | "webDir": "www",
5 | "server": {
6 | "androidScheme": "https"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/App/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
2 |
3 | platform :ios, '13.0'
4 | use_frameworks!
5 |
6 | # workaround to avoid Xcode caching of Pods that requires
7 | # Product -> Clean Build Folder after new Cordova plugins installed
8 | # Requires CocoaPods 1.6 or newer
9 | install! 'cocoapods', :disable_input_output_paths => true
10 |
11 | def capacitor_pods
12 | pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
13 | pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
14 | pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
15 | pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
16 | pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
17 | pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
18 | pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
19 | end
20 |
21 | target 'App' do
22 | capacitor_pods
23 | # Add your Pods here
24 | end
25 |
26 | post_install do |installer|
27 | assertDeploymentTarget(installer)
28 | end
29 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/ios/App/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Adjust (4.35.2):
3 | - Adjust/Core (= 4.35.2)
4 | - Adjust/Core (4.35.2)
5 | - Capacitor (5.6.0):
6 | - CapacitorCordova
7 | - CapacitorApp (5.0.6):
8 | - Capacitor
9 | - CapacitorCordova (5.6.0)
10 | - CapacitorHaptics (5.0.6):
11 | - Capacitor
12 | - CapacitorKeyboard (5.0.7):
13 | - Capacitor
14 | - CapacitorStatusBar (5.0.6):
15 | - Capacitor
16 | - CordovaPlugins (5.6.0):
17 | - Adjust (= 4.35.2)
18 | - CapacitorCordova
19 |
20 | DEPENDENCIES:
21 | - "Capacitor (from `../../node_modules/@capacitor/ios`)"
22 | - "CapacitorApp (from `../../node_modules/@capacitor/app`)"
23 | - "CapacitorCordova (from `../../node_modules/@capacitor/ios`)"
24 | - "CapacitorHaptics (from `../../node_modules/@capacitor/haptics`)"
25 | - "CapacitorKeyboard (from `../../node_modules/@capacitor/keyboard`)"
26 | - "CapacitorStatusBar (from `../../node_modules/@capacitor/status-bar`)"
27 | - CordovaPlugins (from `../capacitor-cordova-ios-plugins`)
28 |
29 | SPEC REPOS:
30 | trunk:
31 | - Adjust
32 |
33 | EXTERNAL SOURCES:
34 | Capacitor:
35 | :path: "../../node_modules/@capacitor/ios"
36 | CapacitorApp:
37 | :path: "../../node_modules/@capacitor/app"
38 | CapacitorCordova:
39 | :path: "../../node_modules/@capacitor/ios"
40 | CapacitorHaptics:
41 | :path: "../../node_modules/@capacitor/haptics"
42 | CapacitorKeyboard:
43 | :path: "../../node_modules/@capacitor/keyboard"
44 | CapacitorStatusBar:
45 | :path: "../../node_modules/@capacitor/status-bar"
46 | CordovaPlugins:
47 | :path: "../capacitor-cordova-ios-plugins"
48 |
49 | SPEC CHECKSUMS:
50 | Adjust: cac836ba910f868b38d0350045aaf498f794719a
51 | Capacitor: ebfc16cdb8116d04c101686b080342872da42d43
52 | CapacitorApp: 024e1b1bea5f883d79f6330d309bc441c88ad04a
53 | CapacitorCordova: 931b48fcdbc9bc985fc2f16cec9f77c794a27729
54 | CapacitorHaptics: 1fffc1217c7e64a472d7845be50fb0c2f7d4204c
55 | CapacitorKeyboard: ce5e01064cf57a2c05b32565310713b7fe6cc6f9
56 | CapacitorStatusBar: 565c0a1ebd79bb40d797606a8992b4a105885309
57 | CordovaPlugins: 39fa331f60647760aa631bd60c4080a8805171f2
58 |
59 | PODFILE CHECKSUM: 0381d09167db361ed446a10f049fd27bab1b40b1
60 |
61 | COCOAPODS: 1.14.3
62 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage'),
13 | require('@angular-devkit/build-angular/plugins/karma')
14 | ],
15 | client: {
16 | jasmine: {
17 | // you can add configuration options for Jasmine here
18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19 | // for example, you can disable the random execution with `random: false`
20 | // or set a specific seed with `seed: 4321`
21 | },
22 | clearContext: false // leave Jasmine Spec Runner output visible in browser
23 | },
24 | jasmineHtmlReporter: {
25 | suppressAll: true // removes the duplicated traces
26 | },
27 | coverageReporter: {
28 | dir: require('path').join(__dirname, './coverage/app'),
29 | subdir: '.',
30 | reporters: [
31 | { type: 'html' },
32 | { type: 'text-summary' }
33 | ]
34 | },
35 | reporters: ['progress', 'kjhtml'],
36 | port: 9876,
37 | colors: true,
38 | logLevel: config.LOG_INFO,
39 | autoWatch: true,
40 | browsers: ['Chrome'],
41 | singleRun: false,
42 | restartOnFileChange: true
43 | });
44 | };
45 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example-ionic-capacitor",
3 | "version": "0.0.1",
4 | "author": "Ionic Framework",
5 | "homepage": "https://ionicframework.com/",
6 | "scripts": {
7 | "ng": "ng",
8 | "start": "ng serve",
9 | "build": "ng build",
10 | "watch": "ng build --watch --configuration development",
11 | "test": "ng test",
12 | "lint": "ng lint"
13 | },
14 | "private": true,
15 | "dependencies": {
16 | "@angular/animations": "^17.0.2",
17 | "@angular/common": "^17.0.2",
18 | "@angular/compiler": "^17.0.2",
19 | "@angular/core": "^17.0.2",
20 | "@angular/forms": "^17.0.2",
21 | "@angular/platform-browser": "^17.0.2",
22 | "@angular/platform-browser-dynamic": "^17.0.2",
23 | "@angular/router": "^17.0.2",
24 | "@awesome-cordova-plugins/adjust": "^6.6.0",
25 | "@capacitor/android": "5.6.0",
26 | "@capacitor/app": "5.0.6",
27 | "@capacitor/core": "5.6.0",
28 | "@capacitor/haptics": "5.0.6",
29 | "@capacitor/ios": "5.6.0",
30 | "@capacitor/keyboard": "5.0.7",
31 | "@capacitor/status-bar": "5.0.6",
32 | "@ionic/angular": "^7.0.0",
33 | "com.adjust.sdk": "^4.35.1",
34 | "ionicons": "^7.0.0",
35 | "rxjs": "~7.8.0",
36 | "tslib": "^2.3.0",
37 | "zone.js": "~0.14.2"
38 | },
39 | "devDependencies": {
40 | "@angular-devkit/build-angular": "^17.0.0",
41 | "@angular-eslint/builder": "^17.0.0",
42 | "@angular-eslint/eslint-plugin": "^17.0.0",
43 | "@angular-eslint/eslint-plugin-template": "^17.0.0",
44 | "@angular-eslint/schematics": "^17.0.0",
45 | "@angular-eslint/template-parser": "^17.0.0",
46 | "@angular/cli": "^17.0.0",
47 | "@angular/compiler-cli": "^17.0.2",
48 | "@angular/language-service": "^17.0.2",
49 | "@capacitor/cli": "5.6.0",
50 | "@ionic/angular-toolkit": "^9.0.0",
51 | "@types/jasmine": "~5.1.0",
52 | "@typescript-eslint/eslint-plugin": "^6.0.0",
53 | "@typescript-eslint/parser": "^6.0.0",
54 | "eslint": "^7.26.0",
55 | "eslint-plugin-import": "2.22.1",
56 | "eslint-plugin-jsdoc": "30.7.6",
57 | "eslint-plugin-prefer-arrow": "1.2.2",
58 | "jasmine-core": "~5.1.0",
59 | "jasmine-spec-reporter": "~5.0.0",
60 | "karma": "~6.4.0",
61 | "karma-chrome-launcher": "~3.2.0",
62 | "karma-coverage": "~2.2.0",
63 | "karma-jasmine": "~5.1.0",
64 | "karma-jasmine-html-reporter": "~2.1.0",
65 | "ts-node": "^8.3.0",
66 | "typescript": "~5.2.2"
67 | },
68 | "description": "An Ionic project"
69 | }
70 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
3 |
4 | const routes: Routes = [
5 | {
6 | path: '',
7 | loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
8 | }
9 | ];
10 | @NgModule({
11 | imports: [
12 | RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
13 | ],
14 | exports: [RouterModule]
15 | })
16 | export class AppRoutingModule {}
17 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/app.component.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/src/app/app.component.scss
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 | import { TestBed } from '@angular/core/testing';
3 |
4 | import { AppComponent } from './app.component';
5 |
6 | describe('AppComponent', () => {
7 |
8 | beforeEach(async () => {
9 | await TestBed.configureTestingModule({
10 | declarations: [AppComponent],
11 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
12 | }).compileComponents();
13 | });
14 |
15 | it('should create the app', () => {
16 | const fixture = TestBed.createComponent(AppComponent);
17 | const app = fixture.componentInstance;
18 | expect(app).toBeTruthy();
19 | });
20 |
21 | });
22 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { Adjust, AdjustConfig, AdjustEnvironment, AdjustLogLevel } from '@awesome-cordova-plugins/adjust/ngx';
3 |
4 | @Component({
5 | selector: 'app-root',
6 | templateUrl: 'app.component.html',
7 | styleUrls: ['app.component.scss'],
8 | })
9 | export class AppComponent {
10 | constructor(private adjust: Adjust) {
11 | const config = new AdjustConfig('2fm9gkqubvpc', AdjustEnvironment.Sandbox);
12 | config.setLogLevel(AdjustLogLevel.Verbose);
13 | this.adjust.create(config);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 | import { RouteReuseStrategy } from '@angular/router';
4 |
5 | import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
6 |
7 | import { AppRoutingModule } from './app-routing.module';
8 | import { AppComponent } from './app.component';
9 |
10 | import { Adjust, AdjustConfig, AdjustEnvironment, AdjustLogLevel } from '@awesome-cordova-plugins/adjust/ngx';
11 |
12 | @NgModule({
13 | declarations: [AppComponent],
14 | imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],
15 | providers: [Adjust,
16 | { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
17 | bootstrap: [AppComponent],
18 | })
19 | export class AppModule {}
20 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/explore-container/explore-container.component.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/explore-container/explore-container.component.scss:
--------------------------------------------------------------------------------
1 | #container {
2 | text-align: center;
3 |
4 | position: absolute;
5 | left: 0;
6 | right: 0;
7 | top: 50%;
8 | transform: translateY(-50%);
9 | }
10 |
11 | #container strong {
12 | font-size: 20px;
13 | line-height: 26px;
14 | }
15 |
16 | #container p {
17 | font-size: 16px;
18 | line-height: 22px;
19 |
20 | color: #8c8c8c;
21 |
22 | margin: 0;
23 | }
24 |
25 | #container a {
26 | text-decoration: none;
27 | }
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/explore-container/explore-container.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { ComponentFixture, TestBed } from '@angular/core/testing';
2 | import { IonicModule } from '@ionic/angular';
3 |
4 | import { ExploreContainerComponent } from './explore-container.component';
5 |
6 | describe('ExploreContainerComponent', () => {
7 | let component: ExploreContainerComponent;
8 | let fixture: ComponentFixture;
9 |
10 | beforeEach(async () => {
11 | await TestBed.configureTestingModule({
12 | declarations: [ExploreContainerComponent],
13 | imports: [IonicModule.forRoot()]
14 | }).compileComponents();
15 |
16 | fixture = TestBed.createComponent(ExploreContainerComponent);
17 | component = fixture.componentInstance;
18 | fixture.detectChanges();
19 | });
20 |
21 | it('should create', () => {
22 | expect(component).toBeTruthy();
23 | });
24 | });
25 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/explore-container/explore-container.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-explore-container',
5 | templateUrl: './explore-container.component.html',
6 | styleUrls: ['./explore-container.component.scss'],
7 | })
8 | export class ExploreContainerComponent {
9 |
10 | @Input() name?: string;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/explore-container/explore-container.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { FormsModule } from '@angular/forms';
4 |
5 | import { IonicModule } from '@ionic/angular';
6 |
7 | import { ExploreContainerComponent } from './explore-container.component';
8 |
9 | @NgModule({
10 | imports: [ CommonModule, FormsModule, IonicModule],
11 | declarations: [ExploreContainerComponent],
12 | exports: [ExploreContainerComponent]
13 | })
14 | export class ExploreContainerComponentModule {}
15 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab1/tab1-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 | import { Tab1Page } from './tab1.page';
4 |
5 | const routes: Routes = [
6 | {
7 | path: '',
8 | component: Tab1Page,
9 | }
10 | ];
11 |
12 | @NgModule({
13 | imports: [RouterModule.forChild(routes)],
14 | exports: [RouterModule]
15 | })
16 | export class Tab1PageRoutingModule {}
17 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab1/tab1.module.ts:
--------------------------------------------------------------------------------
1 | import { IonicModule } from '@ionic/angular';
2 | import { NgModule } from '@angular/core';
3 | import { CommonModule } from '@angular/common';
4 | import { FormsModule } from '@angular/forms';
5 | import { Tab1Page } from './tab1.page';
6 | import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
7 |
8 | import { Tab1PageRoutingModule } from './tab1-routing.module';
9 |
10 | @NgModule({
11 | imports: [
12 | IonicModule,
13 | CommonModule,
14 | FormsModule,
15 | ExploreContainerComponentModule,
16 | Tab1PageRoutingModule
17 | ],
18 | declarations: [Tab1Page]
19 | })
20 | export class Tab1PageModule {}
21 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab1/tab1.page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Tab 1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Tab 1
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab1/tab1.page.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/src/app/tab1/tab1.page.scss
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab1/tab1.page.spec.ts:
--------------------------------------------------------------------------------
1 | import { ComponentFixture, TestBed } from '@angular/core/testing';
2 | import { IonicModule } from '@ionic/angular';
3 |
4 | import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
5 |
6 | import { Tab1Page } from './tab1.page';
7 |
8 | describe('Tab1Page', () => {
9 | let component: Tab1Page;
10 | let fixture: ComponentFixture;
11 |
12 | beforeEach(async () => {
13 | await TestBed.configureTestingModule({
14 | declarations: [Tab1Page],
15 | imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
16 | }).compileComponents();
17 |
18 | fixture = TestBed.createComponent(Tab1Page);
19 | component = fixture.componentInstance;
20 | fixture.detectChanges();
21 | });
22 |
23 | it('should create', () => {
24 | expect(component).toBeTruthy();
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab1/tab1.page.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-tab1',
5 | templateUrl: 'tab1.page.html',
6 | styleUrls: ['tab1.page.scss']
7 | })
8 | export class Tab1Page {
9 |
10 | constructor() {}
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab2/tab2-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 | import { Tab2Page } from './tab2.page';
4 |
5 | const routes: Routes = [
6 | {
7 | path: '',
8 | component: Tab2Page,
9 | }
10 | ];
11 |
12 | @NgModule({
13 | imports: [RouterModule.forChild(routes)],
14 | exports: [RouterModule]
15 | })
16 | export class Tab2PageRoutingModule {}
17 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab2/tab2.module.ts:
--------------------------------------------------------------------------------
1 | import { IonicModule } from '@ionic/angular';
2 | import { NgModule } from '@angular/core';
3 | import { CommonModule } from '@angular/common';
4 | import { FormsModule } from '@angular/forms';
5 | import { Tab2Page } from './tab2.page';
6 | import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
7 |
8 | import { Tab2PageRoutingModule } from './tab2-routing.module';
9 |
10 | @NgModule({
11 | imports: [
12 | IonicModule,
13 | CommonModule,
14 | FormsModule,
15 | ExploreContainerComponentModule,
16 | Tab2PageRoutingModule
17 | ],
18 | declarations: [Tab2Page]
19 | })
20 | export class Tab2PageModule {}
21 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab2/tab2.page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Tab 2
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Tab 2
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab2/tab2.page.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/src/app/tab2/tab2.page.scss
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab2/tab2.page.spec.ts:
--------------------------------------------------------------------------------
1 | import { ComponentFixture, TestBed } from '@angular/core/testing';
2 | import { IonicModule } from '@ionic/angular';
3 |
4 | import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
5 |
6 | import { Tab2Page } from './tab2.page';
7 |
8 | describe('Tab2Page', () => {
9 | let component: Tab2Page;
10 | let fixture: ComponentFixture;
11 |
12 | beforeEach(async () => {
13 | await TestBed.configureTestingModule({
14 | declarations: [Tab2Page],
15 | imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
16 | }).compileComponents();
17 |
18 | fixture = TestBed.createComponent(Tab2Page);
19 | component = fixture.componentInstance;
20 | fixture.detectChanges();
21 | });
22 |
23 | it('should create', () => {
24 | expect(component).toBeTruthy();
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab2/tab2.page.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-tab2',
5 | templateUrl: 'tab2.page.html',
6 | styleUrls: ['tab2.page.scss']
7 | })
8 | export class Tab2Page {
9 |
10 | constructor() {}
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab3/tab3-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 | import { Tab3Page } from './tab3.page';
4 |
5 | const routes: Routes = [
6 | {
7 | path: '',
8 | component: Tab3Page,
9 | }
10 | ];
11 |
12 | @NgModule({
13 | imports: [RouterModule.forChild(routes)],
14 | exports: [RouterModule]
15 | })
16 | export class Tab3PageRoutingModule {}
17 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab3/tab3.module.ts:
--------------------------------------------------------------------------------
1 | import { IonicModule } from '@ionic/angular';
2 | import { NgModule } from '@angular/core';
3 | import { CommonModule } from '@angular/common';
4 | import { FormsModule } from '@angular/forms';
5 | import { Tab3Page } from './tab3.page';
6 | import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
7 |
8 | import { Tab3PageRoutingModule } from './tab3-routing.module';
9 |
10 | @NgModule({
11 | imports: [
12 | IonicModule,
13 | CommonModule,
14 | FormsModule,
15 | ExploreContainerComponentModule,
16 | Tab3PageRoutingModule
17 | ],
18 | declarations: [Tab3Page]
19 | })
20 | export class Tab3PageModule {}
21 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab3/tab3.page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Tab 3
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Tab 3
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab3/tab3.page.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/src/app/tab3/tab3.page.scss
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab3/tab3.page.spec.ts:
--------------------------------------------------------------------------------
1 | import { ComponentFixture, TestBed } from '@angular/core/testing';
2 | import { IonicModule } from '@ionic/angular';
3 |
4 | import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
5 |
6 | import { Tab3Page } from './tab3.page';
7 |
8 | describe('Tab3Page', () => {
9 | let component: Tab3Page;
10 | let fixture: ComponentFixture;
11 |
12 | beforeEach(async () => {
13 | await TestBed.configureTestingModule({
14 | declarations: [Tab3Page],
15 | imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
16 | }).compileComponents();
17 |
18 | fixture = TestBed.createComponent(Tab3Page);
19 | component = fixture.componentInstance;
20 | fixture.detectChanges();
21 | });
22 |
23 | it('should create', () => {
24 | expect(component).toBeTruthy();
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tab3/tab3.page.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-tab3',
5 | templateUrl: 'tab3.page.html',
6 | styleUrls: ['tab3.page.scss']
7 | })
8 | export class Tab3Page {
9 |
10 | constructor() {}
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tabs/tabs-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 | import { TabsPage } from './tabs.page';
4 |
5 | const routes: Routes = [
6 | {
7 | path: 'tabs',
8 | component: TabsPage,
9 | children: [
10 | {
11 | path: 'tab1',
12 | loadChildren: () => import('../tab1/tab1.module').then(m => m.Tab1PageModule)
13 | },
14 | {
15 | path: 'tab2',
16 | loadChildren: () => import('../tab2/tab2.module').then(m => m.Tab2PageModule)
17 | },
18 | {
19 | path: 'tab3',
20 | loadChildren: () => import('../tab3/tab3.module').then(m => m.Tab3PageModule)
21 | },
22 | {
23 | path: '',
24 | redirectTo: '/tabs/tab1',
25 | pathMatch: 'full'
26 | }
27 | ]
28 | },
29 | {
30 | path: '',
31 | redirectTo: '/tabs/tab1',
32 | pathMatch: 'full'
33 | }
34 | ];
35 |
36 | @NgModule({
37 | imports: [RouterModule.forChild(routes)],
38 | })
39 | export class TabsPageRoutingModule {}
40 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tabs/tabs.module.ts:
--------------------------------------------------------------------------------
1 | import { IonicModule } from '@ionic/angular';
2 | import { NgModule } from '@angular/core';
3 | import { CommonModule } from '@angular/common';
4 | import { FormsModule } from '@angular/forms';
5 |
6 | import { TabsPageRoutingModule } from './tabs-routing.module';
7 |
8 | import { TabsPage } from './tabs.page';
9 |
10 | @NgModule({
11 | imports: [
12 | IonicModule,
13 | CommonModule,
14 | FormsModule,
15 | TabsPageRoutingModule
16 | ],
17 | declarations: [TabsPage]
18 | })
19 | export class TabsPageModule {}
20 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tabs/tabs.page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Tab 1
7 |
8 |
9 |
10 |
11 | Tab 2
12 |
13 |
14 |
15 |
16 | Tab 3
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tabs/tabs.page.scss:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tabs/tabs.page.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 | import { ComponentFixture, TestBed } from '@angular/core/testing';
3 |
4 | import { TabsPage } from './tabs.page';
5 |
6 | describe('TabsPage', () => {
7 | let component: TabsPage;
8 | let fixture: ComponentFixture;
9 |
10 | beforeEach(async () => {
11 | await TestBed.configureTestingModule({
12 | declarations: [TabsPage],
13 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
14 | }).compileComponents();
15 | });
16 |
17 | beforeEach(() => {
18 | fixture = TestBed.createComponent(TabsPage);
19 | component = fixture.componentInstance;
20 | fixture.detectChanges();
21 | });
22 |
23 | it('should create', () => {
24 | expect(component).toBeTruthy();
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/app/tabs/tabs.page.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-tabs',
5 | templateUrl: 'tabs.page.html',
6 | styleUrls: ['tabs.page.scss']
7 | })
8 | export class TabsPage {
9 |
10 | constructor() {}
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/assets/icon/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/example-ionic-capacitor/src/assets/icon/favicon.png
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/assets/shapes.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/global.scss:
--------------------------------------------------------------------------------
1 | /*
2 | * App Global CSS
3 | * ----------------------------------------------------------------------------
4 | * Put style rules here that you want to apply globally. These styles are for
5 | * the entire app and not just one component. Additionally, this file can be
6 | * used as an entry point to import other CSS/Sass files to be included in the
7 | * output CSS.
8 | * For more information on global stylesheets, visit the documentation:
9 | * https://ionicframework.com/docs/layout/global-stylesheets
10 | */
11 |
12 | /* Core CSS required for Ionic components to work properly */
13 | @import "@ionic/angular/css/core.css";
14 |
15 | /* Basic CSS for apps built with Ionic */
16 | @import "@ionic/angular/css/normalize.css";
17 | @import "@ionic/angular/css/structure.css";
18 | @import "@ionic/angular/css/typography.css";
19 | @import "@ionic/angular/css/display.css";
20 |
21 | /* Optional CSS utils that can be commented out */
22 | @import "@ionic/angular/css/padding.css";
23 | @import "@ionic/angular/css/float-elements.css";
24 | @import "@ionic/angular/css/text-alignment.css";
25 | @import "@ionic/angular/css/text-transformation.css";
26 | @import "@ionic/angular/css/flex-utils.css";
27 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Ionic App
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file includes polyfills needed by Angular and is loaded before the app.
3 | * You can add your own extra polyfills to this file.
4 | *
5 | * This file is divided into 2 sections:
6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8 | * file.
9 | *
10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11 | * automatically update themselves. This includes recent versions of Safari, Chrome (including
12 | * Opera), Edge on the desktop, and iOS and Chrome on mobile.
13 | *
14 | * Learn more in https://angular.io/guide/browser-support
15 | */
16 |
17 | /***************************************************************************************************
18 | * BROWSER POLYFILLS
19 | */
20 |
21 | /**
22 | * By default, zone.js will patch all possible macroTask and DomEvents
23 | * user can disable parts of macroTask/DomEvents patch by setting following flags
24 | * because those flags need to be set before `zone.js` being loaded, and webpack
25 | * will put import in the top of bundle, so user need to create a separate file
26 | * in this directory (for example: zone-flags.ts), and put the following flags
27 | * into that file, and then add the following code before importing zone.js.
28 | * import './zone-flags';
29 | *
30 | * The flags allowed in zone-flags.ts are listed here.
31 | *
32 | * The following flags will work for all browsers.
33 | *
34 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
35 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
36 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
37 | *
38 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
39 | * with the following flag, it will bypass `zone.js` patch for IE/Edge
40 | *
41 | * (window as any).__Zone_enable_cross_context_check = true;
42 | *
43 | */
44 |
45 | import './zone-flags';
46 |
47 | /***************************************************************************************************
48 | * Zone JS is required by default for Angular itself.
49 | */
50 | import 'zone.js'; // Included with Angular CLI.
51 |
52 |
53 | /***************************************************************************************************
54 | * APPLICATION IMPORTS
55 | */
56 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | // First, initialize the Angular testing environment.
11 | getTestBed().initTestEnvironment(
12 | BrowserDynamicTestingModule,
13 | platformBrowserDynamicTesting(),
14 | );
15 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/theme/variables.scss:
--------------------------------------------------------------------------------
1 | // Ionic Variables and Theming. For more info, please see:
2 | // http://ionicframework.com/docs/theming/
3 |
4 | /** Ionic CSS Variables **/
5 | :root {
6 | /** primary **/
7 | --ion-color-primary: #3880ff;
8 | --ion-color-primary-rgb: 56, 128, 255;
9 | --ion-color-primary-contrast: #ffffff;
10 | --ion-color-primary-contrast-rgb: 255, 255, 255;
11 | --ion-color-primary-shade: #3171e0;
12 | --ion-color-primary-tint: #4c8dff;
13 |
14 | /** secondary **/
15 | --ion-color-secondary: #3dc2ff;
16 | --ion-color-secondary-rgb: 61, 194, 255;
17 | --ion-color-secondary-contrast: #ffffff;
18 | --ion-color-secondary-contrast-rgb: 255, 255, 255;
19 | --ion-color-secondary-shade: #36abe0;
20 | --ion-color-secondary-tint: #50c8ff;
21 |
22 | /** tertiary **/
23 | --ion-color-tertiary: #5260ff;
24 | --ion-color-tertiary-rgb: 82, 96, 255;
25 | --ion-color-tertiary-contrast: #ffffff;
26 | --ion-color-tertiary-contrast-rgb: 255, 255, 255;
27 | --ion-color-tertiary-shade: #4854e0;
28 | --ion-color-tertiary-tint: #6370ff;
29 |
30 | /** success **/
31 | --ion-color-success: #2dd36f;
32 | --ion-color-success-rgb: 45, 211, 111;
33 | --ion-color-success-contrast: #ffffff;
34 | --ion-color-success-contrast-rgb: 255, 255, 255;
35 | --ion-color-success-shade: #28ba62;
36 | --ion-color-success-tint: #42d77d;
37 |
38 | /** warning **/
39 | --ion-color-warning: #ffc409;
40 | --ion-color-warning-rgb: 255, 196, 9;
41 | --ion-color-warning-contrast: #000000;
42 | --ion-color-warning-contrast-rgb: 0, 0, 0;
43 | --ion-color-warning-shade: #e0ac08;
44 | --ion-color-warning-tint: #ffca22;
45 |
46 | /** danger **/
47 | --ion-color-danger: #eb445a;
48 | --ion-color-danger-rgb: 235, 68, 90;
49 | --ion-color-danger-contrast: #ffffff;
50 | --ion-color-danger-contrast-rgb: 255, 255, 255;
51 | --ion-color-danger-shade: #cf3c4f;
52 | --ion-color-danger-tint: #ed576b;
53 |
54 | /** dark **/
55 | --ion-color-dark: #222428;
56 | --ion-color-dark-rgb: 34, 36, 40;
57 | --ion-color-dark-contrast: #ffffff;
58 | --ion-color-dark-contrast-rgb: 255, 255, 255;
59 | --ion-color-dark-shade: #1e2023;
60 | --ion-color-dark-tint: #383a3e;
61 |
62 | /** medium **/
63 | --ion-color-medium: #92949c;
64 | --ion-color-medium-rgb: 146, 148, 156;
65 | --ion-color-medium-contrast: #ffffff;
66 | --ion-color-medium-contrast-rgb: 255, 255, 255;
67 | --ion-color-medium-shade: #808289;
68 | --ion-color-medium-tint: #9d9fa6;
69 |
70 | /** light **/
71 | --ion-color-light: #f4f5f8;
72 | --ion-color-light-rgb: 244, 245, 248;
73 | --ion-color-light-contrast: #000000;
74 | --ion-color-light-contrast-rgb: 0, 0, 0;
75 | --ion-color-light-shade: #d7d8da;
76 | --ion-color-light-tint: #f5f6f9;
77 | }
78 |
79 | @media (prefers-color-scheme: dark) {
80 | /*
81 | * Dark Colors
82 | * -------------------------------------------
83 | */
84 |
85 | body {
86 | --ion-color-primary: #428cff;
87 | --ion-color-primary-rgb: 66,140,255;
88 | --ion-color-primary-contrast: #ffffff;
89 | --ion-color-primary-contrast-rgb: 255,255,255;
90 | --ion-color-primary-shade: #3a7be0;
91 | --ion-color-primary-tint: #5598ff;
92 |
93 | --ion-color-secondary: #50c8ff;
94 | --ion-color-secondary-rgb: 80,200,255;
95 | --ion-color-secondary-contrast: #ffffff;
96 | --ion-color-secondary-contrast-rgb: 255,255,255;
97 | --ion-color-secondary-shade: #46b0e0;
98 | --ion-color-secondary-tint: #62ceff;
99 |
100 | --ion-color-tertiary: #6a64ff;
101 | --ion-color-tertiary-rgb: 106,100,255;
102 | --ion-color-tertiary-contrast: #ffffff;
103 | --ion-color-tertiary-contrast-rgb: 255,255,255;
104 | --ion-color-tertiary-shade: #5d58e0;
105 | --ion-color-tertiary-tint: #7974ff;
106 |
107 | --ion-color-success: #2fdf75;
108 | --ion-color-success-rgb: 47,223,117;
109 | --ion-color-success-contrast: #000000;
110 | --ion-color-success-contrast-rgb: 0,0,0;
111 | --ion-color-success-shade: #29c467;
112 | --ion-color-success-tint: #44e283;
113 |
114 | --ion-color-warning: #ffd534;
115 | --ion-color-warning-rgb: 255,213,52;
116 | --ion-color-warning-contrast: #000000;
117 | --ion-color-warning-contrast-rgb: 0,0,0;
118 | --ion-color-warning-shade: #e0bb2e;
119 | --ion-color-warning-tint: #ffd948;
120 |
121 | --ion-color-danger: #ff4961;
122 | --ion-color-danger-rgb: 255,73,97;
123 | --ion-color-danger-contrast: #ffffff;
124 | --ion-color-danger-contrast-rgb: 255,255,255;
125 | --ion-color-danger-shade: #e04055;
126 | --ion-color-danger-tint: #ff5b71;
127 |
128 | --ion-color-dark: #f4f5f8;
129 | --ion-color-dark-rgb: 244,245,248;
130 | --ion-color-dark-contrast: #000000;
131 | --ion-color-dark-contrast-rgb: 0,0,0;
132 | --ion-color-dark-shade: #d7d8da;
133 | --ion-color-dark-tint: #f5f6f9;
134 |
135 | --ion-color-medium: #989aa2;
136 | --ion-color-medium-rgb: 152,154,162;
137 | --ion-color-medium-contrast: #000000;
138 | --ion-color-medium-contrast-rgb: 0,0,0;
139 | --ion-color-medium-shade: #86888f;
140 | --ion-color-medium-tint: #a2a4ab;
141 |
142 | --ion-color-light: #222428;
143 | --ion-color-light-rgb: 34,36,40;
144 | --ion-color-light-contrast: #ffffff;
145 | --ion-color-light-contrast-rgb: 255,255,255;
146 | --ion-color-light-shade: #1e2023;
147 | --ion-color-light-tint: #383a3e;
148 | }
149 |
150 | /*
151 | * iOS Dark Theme
152 | * -------------------------------------------
153 | */
154 |
155 | .ios body {
156 | --ion-background-color: #000000;
157 | --ion-background-color-rgb: 0,0,0;
158 |
159 | --ion-text-color: #ffffff;
160 | --ion-text-color-rgb: 255,255,255;
161 |
162 | --ion-color-step-50: #0d0d0d;
163 | --ion-color-step-100: #1a1a1a;
164 | --ion-color-step-150: #262626;
165 | --ion-color-step-200: #333333;
166 | --ion-color-step-250: #404040;
167 | --ion-color-step-300: #4d4d4d;
168 | --ion-color-step-350: #595959;
169 | --ion-color-step-400: #666666;
170 | --ion-color-step-450: #737373;
171 | --ion-color-step-500: #808080;
172 | --ion-color-step-550: #8c8c8c;
173 | --ion-color-step-600: #999999;
174 | --ion-color-step-650: #a6a6a6;
175 | --ion-color-step-700: #b3b3b3;
176 | --ion-color-step-750: #bfbfbf;
177 | --ion-color-step-800: #cccccc;
178 | --ion-color-step-850: #d9d9d9;
179 | --ion-color-step-900: #e6e6e6;
180 | --ion-color-step-950: #f2f2f2;
181 |
182 | --ion-item-background: #000000;
183 |
184 | --ion-card-background: #1c1c1d;
185 | }
186 |
187 | .ios ion-modal {
188 | --ion-background-color: var(--ion-color-step-100);
189 | --ion-toolbar-background: var(--ion-color-step-150);
190 | --ion-toolbar-border-color: var(--ion-color-step-250);
191 | }
192 |
193 |
194 | /*
195 | * Material Design Dark Theme
196 | * -------------------------------------------
197 | */
198 |
199 | .md body {
200 | --ion-background-color: #121212;
201 | --ion-background-color-rgb: 18,18,18;
202 |
203 | --ion-text-color: #ffffff;
204 | --ion-text-color-rgb: 255,255,255;
205 |
206 | --ion-border-color: #222222;
207 |
208 | --ion-color-step-50: #1e1e1e;
209 | --ion-color-step-100: #2a2a2a;
210 | --ion-color-step-150: #363636;
211 | --ion-color-step-200: #414141;
212 | --ion-color-step-250: #4d4d4d;
213 | --ion-color-step-300: #595959;
214 | --ion-color-step-350: #656565;
215 | --ion-color-step-400: #717171;
216 | --ion-color-step-450: #7d7d7d;
217 | --ion-color-step-500: #898989;
218 | --ion-color-step-550: #949494;
219 | --ion-color-step-600: #a0a0a0;
220 | --ion-color-step-650: #acacac;
221 | --ion-color-step-700: #b8b8b8;
222 | --ion-color-step-750: #c4c4c4;
223 | --ion-color-step-800: #d0d0d0;
224 | --ion-color-step-850: #dbdbdb;
225 | --ion-color-step-900: #e7e7e7;
226 | --ion-color-step-950: #f3f3f3;
227 |
228 | --ion-item-background: #1e1e1e;
229 |
230 | --ion-toolbar-background: #1f1f1f;
231 |
232 | --ion-tab-bar-background: #1f1f1f;
233 |
234 | --ion-card-background: #1e1e1e;
235 | }
236 | }
237 |
238 | html {
239 | /*
240 | * For more information on dynamic font scaling, visit the documentation:
241 | * https://ionicframework.com/docs/layout/dynamic-font-scaling
242 | */
243 | --ion-dynamic-font: var(--ion-default-dynamic-font);
244 | }
--------------------------------------------------------------------------------
/example-ionic-capacitor/src/zone-flags.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Prevents Angular change detection from
3 | * running with certain Web Component callbacks
4 | */
5 | // eslint-disable-next-line no-underscore-dangle
6 | (window as any).__Zone_disable_customElements = true;
7 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/app",
6 | "types": []
7 | },
8 | "files": [
9 | "src/main.ts",
10 | "src/polyfills.ts"
11 | ],
12 | "include": [
13 | "src/**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/tsconfig.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "compileOnSave": false,
4 | "compilerOptions": {
5 | "baseUrl": "./",
6 | "outDir": "./dist/out-tsc",
7 | "forceConsistentCasingInFileNames": true,
8 | "strict": true,
9 | "noImplicitOverride": true,
10 | "noPropertyAccessFromIndexSignature": true,
11 | "noImplicitReturns": true,
12 | "noFallthroughCasesInSwitch": true,
13 | "sourceMap": true,
14 | "declaration": false,
15 | "downlevelIteration": true,
16 | "experimentalDecorators": true,
17 | "moduleResolution": "node",
18 | "importHelpers": true,
19 | "target": "es2022",
20 | "module": "es2020",
21 | "lib": [
22 | "es2018",
23 | "dom"
24 | ],
25 | "useDefineForClassFields": false
26 | },
27 | "angularCompilerOptions": {
28 | "enableI18nLegacyMessageIdFormat": false,
29 | "strictInjectionParameters": true,
30 | "strictInputAccessModifiers": true,
31 | "strictTemplates": true
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/example-ionic-capacitor/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */
2 | {
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "outDir": "./out-tsc/spec",
6 | "types": [
7 | "jasmine"
8 | ]
9 | },
10 | "files": [
11 | "src/test.ts",
12 | "src/polyfills.ts"
13 | ],
14 | "include": [
15 | "src/**/*.spec.ts",
16 | "src/**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "5.4.0",
3 | "name": "com.adjust.sdk",
4 | "cordova_name": "Adjust SDK Cordova Plugin",
5 | "description": "Cordova plugin for the Adjust SDK",
6 | "license": "MIT License",
7 | "platforms": [
8 | "ios",
9 | "android"
10 | ],
11 | "engines": [
12 | {
13 | "name": "cordova",
14 | "version": ">=3.0.0"
15 | },
16 | {
17 | "name": "cordova-ios",
18 | "version": ">=3.0.0"
19 | },
20 | {
21 | "name": "cordova-android",
22 | "version": ">=4.0.0"
23 | }
24 | ],
25 | "keywords": [
26 | "adjust",
27 | "sdk",
28 | "ecosystem:cordova"
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 | Adjust
8 | Adjust plugin for Cordova
9 | MIT License
10 | adjust
11 | adjust
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/src/ios/AdjustCordova.h:
--------------------------------------------------------------------------------
1 | //
2 | // AdjustCordova.h
3 | // Adjust SDK
4 | //
5 | // Created by Pedro Filipe (@nonelse) on 3rd April 2014.
6 | // Copyright (c) 2012-Present Adjust GmbH. All rights reserved.
7 | //
8 |
9 | #import
10 | #if defined(__has_include) && __has_include()
11 | #import
12 | #else
13 | #import
14 | #endif
15 |
16 | @interface AdjustCordova : CDVPlugin
17 |
18 | // common
19 | - (void)initSdk:(CDVInvokedUrlCommand *)command;
20 | - (void)setAttributionCallback:(CDVInvokedUrlCommand *)command;
21 | - (void)setEventTrackingSucceededCallback:(CDVInvokedUrlCommand *)command;
22 | - (void)setEventTrackingFailedCallback:(CDVInvokedUrlCommand *)command;
23 | - (void)setSessionTrackingSucceededCallback:(CDVInvokedUrlCommand *)command;
24 | - (void)setSessionTrackingFailedCallback:(CDVInvokedUrlCommand *)command;
25 | - (void)setDeferredDeeplinkCallback:(CDVInvokedUrlCommand *)command;
26 | - (void)setPushToken:(CDVInvokedUrlCommand *)command;
27 | - (void)getAttribution:(CDVInvokedUrlCommand *)command;
28 | - (void)getAdid:(CDVInvokedUrlCommand *)command;
29 | - (void)getSdkVersion:(CDVInvokedUrlCommand *)command;
30 | - (void)addGlobalCallbackParameter:(CDVInvokedUrlCommand *)command;
31 | - (void)removeGlobalCallbackParameter:(CDVInvokedUrlCommand *)command;
32 | - (void)removeGlobalCallbackParameters:(CDVInvokedUrlCommand *)command;
33 | - (void)addGlobalPartnerParameter:(CDVInvokedUrlCommand *)command;
34 | - (void)removeGlobalPartnerParameter:(CDVInvokedUrlCommand *)command;
35 | - (void)removeGlobalPartnerParameters:(CDVInvokedUrlCommand *)command;
36 | - (void)switchToOfflineMode:(CDVInvokedUrlCommand *)command;
37 | - (void)switchBackToOnlineMode:(CDVInvokedUrlCommand *)command;
38 | - (void)enable:(CDVInvokedUrlCommand *)command;
39 | - (void)disable:(CDVInvokedUrlCommand *)command;
40 | - (void)isEnabled:(CDVInvokedUrlCommand *)command;
41 | - (void)gdprForgetMe:(CDVInvokedUrlCommand *)command;
42 | - (void)trackEvent:(CDVInvokedUrlCommand *)command;
43 | - (void)trackAdRevenue:(CDVInvokedUrlCommand *)command;
44 | - (void)trackThirdPartySharing:(CDVInvokedUrlCommand *)command;
45 | - (void)trackMeasurementConsent:(CDVInvokedUrlCommand *)command;
46 | - (void)processDeeplink:(CDVInvokedUrlCommand *)command;
47 | - (void)processAndResolveDeeplink:(CDVInvokedUrlCommand *)command;
48 | - (void)getLastDeeplink:(CDVInvokedUrlCommand *)command;
49 | - (void)endFirstSessionDelay:(CDVInvokedUrlCommand *)command;
50 | - (void)enableCoppaComplianceInDelay:(CDVInvokedUrlCommand *)command;
51 | - (void)disableCoppaComplianceInDelay:(CDVInvokedUrlCommand *)command;
52 | - (void)setExternalDeviceIdInDelay:(CDVInvokedUrlCommand *)command;
53 | // ios only
54 | - (void)setSkanUpdatedCallback:(CDVInvokedUrlCommand *)command;
55 | - (void)getIdfa:(CDVInvokedUrlCommand *)command;
56 | - (void)getIdfv:(CDVInvokedUrlCommand *)command;
57 | - (void)requestAppTrackingAuthorization:(CDVInvokedUrlCommand *)command;
58 | - (void)getAppTrackingAuthorizationStatus:(CDVInvokedUrlCommand *)command;
59 | - (void)updateSkanConversionValue:(CDVInvokedUrlCommand *)command;
60 | - (void)trackAppStoreSubscription:(CDVInvokedUrlCommand *)command;
61 | - (void)verifyAppStorePurchase:(CDVInvokedUrlCommand *)command;
62 | - (void)verifyAndTrackAppStorePurchase:(CDVInvokedUrlCommand *)command;
63 | // android only
64 | - (void)getGoogleAdId:(CDVInvokedUrlCommand *)command;
65 | - (void)getAmazonAdId:(CDVInvokedUrlCommand *)command;
66 | - (void)trackPlayStoreSubscription:(CDVInvokedUrlCommand *)command;
67 | - (void)verifyPlayStorePurchase:(CDVInvokedUrlCommand *)command;
68 | - (void)verifyAndTrackPlayStorePurchase:(CDVInvokedUrlCommand *)command;
69 | // testing only
70 | - (void)onPause:(CDVInvokedUrlCommand *)command;
71 | - (void)onResume:(CDVInvokedUrlCommand *)command;
72 | - (void)setTestOptions:(CDVInvokedUrlCommand *)command;
73 | - (void)teardown:(CDVInvokedUrlCommand *)command;
74 |
75 | @end
76 |
--------------------------------------------------------------------------------
/src/ios/AdjustCordovaDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AdjustCordovaDelegate.h
3 | // Adjust SDK
4 | //
5 | // Created by Uglješa Erceg (@uerceg) on 16th November 2016.
6 | // Copyright (c) 2016-Present Adjust GmbH. All rights reserved.
7 | //
8 |
9 | #import
10 | #if defined(__has_include) && __has_include()
11 | #import
12 | #else
13 | //#import "Adjust.h"
14 | #import
15 | #endif
16 |
17 | @interface AdjustCordovaDelegate : NSObject
18 |
19 | @property (nonatomic) BOOL shouldLaunchDeferredDeeplink;
20 | @property (nonatomic, copy) NSString *attributionCallbackId;
21 | @property (nonatomic, copy) NSString *eventTrackingSucceededCallbackId;
22 | @property (nonatomic, copy) NSString *eventTrackingFailedCallbackId;
23 | @property (nonatomic, copy) NSString *sessionTrackingSucceededCallbackId;
24 | @property (nonatomic, copy) NSString *sessionTrackingFailedCallbackId;
25 | @property (nonatomic, copy) NSString *deferredDeeplinkCallbackId;
26 | @property (nonatomic, copy) NSString *skanUpdatedCallbackId;
27 | @property (nonatomic) id adjustCordovaCommandDelegate;
28 |
29 | + (id)getInstanceWithSwizzledAttributionCallbackId:(NSString *)attributionCallbackId
30 | eventTrackingSucceededCallbackId:(NSString *)eventTrackingSucceededCallbackId
31 | eventTrackingFailedCallbackId:(NSString *)eventTrackingFailedCallbackId
32 | sessionTrackingSucceededCallbackId:(NSString *)sessionTrackingSucceededCallbackId
33 | sessionTrackingFailedCallbackId:(NSString *)sessionTrackingFailedCallbackId
34 | deferredDeeplinkCallbackId:(NSString *)deferredDeeplinkCallbackId
35 | skanUpdatedCallbackId:(NSString *)skanUpdatedCallbackId
36 | shouldLaunchDeferredDeeplink:(BOOL)shouldLaunchDeferredDeeplink
37 | withCommandDelegate:(id)adjustCordovaCommandDelegate;
38 | + (void)teardown;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/test/app/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | HelloCordova
4 |
5 | A sample Apache Cordova application that responds to the deviceready event.
6 |
7 |
8 | Apache Cordova Team
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/test/app/hooks/README.md:
--------------------------------------------------------------------------------
1 |
21 | # Cordova Hooks
22 |
23 | Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide.
24 |
--------------------------------------------------------------------------------
/test/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "com.adjust.examples",
3 | "version": "5.4.0",
4 | "displayName": "AdjustTestApp",
5 | "cordova": {
6 | "platforms": [
7 | "android",
8 | "ios"
9 | ],
10 | "plugins": {
11 | "cordova-plugin-console": {},
12 | "cordova-plugin-device": {},
13 | "cordova-plugin-customurlscheme": {
14 | "URL_SCHEME": "adjust-test",
15 | "ANDROID_SCHEME": " ",
16 | "ANDROID_HOST": " ",
17 | "ANDROID_PATHPREFIX": "/"
18 | },
19 | "cordova-universal-links-plugin": {},
20 | "cordova-plugin-whitelist": {},
21 | "com.adjust.sdk": {},
22 | "com.adjust.test": {}
23 | }
24 | },
25 | "dependencies": {
26 | "cordova-plugin-console": "^1.1.0",
27 | "cordova-plugin-customurlscheme": "^4.3.0",
28 | "cordova-plugin-device": "^2.0.2",
29 | "cordova-universal-links-plugin": "^1.2.1",
30 | "ios-sim": "^9.0.0",
31 | "xmldom": "github:xmldom/xmldom#0.7.0"
32 | },
33 | "devDependencies": {
34 | "com.adjust.sdk": "file:../../temp_plugin",
35 | "com.adjust.test": "file:../plugin",
36 | "cordova-android": "^14.0.1",
37 | "cordova-ios": "^7.1.1",
38 | "cordova-plugin-whitelist": "^1.3.5"
39 | }
40 | }
--------------------------------------------------------------------------------
/test/app/www/css/index.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | * {
20 | -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
21 | }
22 |
23 | body {
24 | -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
25 | -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
26 | -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
27 | background-color:#E4E4E4;
28 | background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
29 | background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
30 | background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
31 | background-image:-webkit-gradient(
32 | linear,
33 | left top,
34 | left bottom,
35 | color-stop(0, #A7A7A7),
36 | color-stop(0.51, #E4E4E4)
37 | );
38 | background-attachment:fixed;
39 | font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
40 | font-size:12px;
41 | height:100%;
42 | margin:0px;
43 | padding:0px;
44 | text-transform:uppercase;
45 | width:100%;
46 | }
47 |
48 | /* Portrait layout (default) */
49 | .app {
50 | background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
51 | position:absolute; /* position in the center of the screen */
52 | left:50%;
53 | top:50%;
54 | height:50px; /* text area height */
55 | width:225px; /* text area width */
56 | text-align:center;
57 | padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */
58 | margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */
59 | /* offset horizontal: half of text area width */
60 | }
61 |
62 | /* Landscape layout (with min-width) */
63 | @media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
64 | .app {
65 | background-position:left center;
66 | padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */
67 | margin:-90px 0px 0px -198px; /* offset vertical: half of image height */
68 | /* offset horizontal: half of image width and text area width */
69 | }
70 | }
71 |
72 | h1 {
73 | font-size:24px;
74 | font-weight:normal;
75 | margin:0px;
76 | overflow:visible;
77 | padding:0px;
78 | text-align:center;
79 | }
80 |
81 | .event {
82 | border-radius:4px;
83 | -webkit-border-radius:4px;
84 | color:#FFFFFF;
85 | font-size:12px;
86 | margin:0px 30px;
87 | padding:2px 0px;
88 | }
89 |
90 | .event.listening {
91 | background-color:#333333;
92 | display:block;
93 | }
94 |
95 | .event.received {
96 | background-color:#4B946A;
97 | display:none;
98 | }
99 |
100 | @keyframes fade {
101 | from { opacity: 1.0; }
102 | 50% { opacity: 0.4; }
103 | to { opacity: 1.0; }
104 | }
105 |
106 | @-webkit-keyframes fade {
107 | from { opacity: 1.0; }
108 | 50% { opacity: 0.4; }
109 | to { opacity: 1.0; }
110 | }
111 |
112 | .blink {
113 | animation:fade 3000ms infinite;
114 | -webkit-animation:fade 3000ms infinite;
115 | }
116 |
--------------------------------------------------------------------------------
/test/app/www/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/test/app/www/img/logo.png
--------------------------------------------------------------------------------
/test/app/www/index.html:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
31 |
32 |
33 |
34 |
35 |
36 | Hello World
37 |
38 |
39 |
40 |
Apache Cordova
41 |
42 |
Connecting to Device
43 |
Device is Ready
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/test/app/www/js/index.js:
--------------------------------------------------------------------------------
1 | function handleOpenURL(url) {
2 | setTimeout(function() {
3 | console.log(`TestApp, handleOpenURL: initiate Adjust.processDeeplink, with URL = ${url}`);
4 | var adjustDeeplink = new AdjustDeeplink(url);
5 | Adjust.processDeeplink(adjustDeeplink);
6 | }, 0);
7 | }
8 |
9 | var app = {
10 | initialize: function() {
11 | document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
12 | },
13 |
14 | onDeviceReady: function() {
15 | this.receivedEvent('deviceready');
16 |
17 | Adjust.getSdkVersion(function(sdkVersion) {
18 | // Register for universal links.
19 | if (device.platform == 'iOS') {
20 | universalLinks.subscribe('adjustDeepLinking', app.didLaunchAppFromLink);
21 | }
22 |
23 | var urlOverwrite = "";
24 | var ipAddress = "192.168.86.227";
25 | if (device.platform === "Android") {
26 | urlOverwrite = "https://" + ipAddress + ":8443";
27 | } else if (device.platform === "iOS") {
28 | urlOverwrite = "http://" + ipAddress + ":8080";
29 | }
30 | var controlUrl = "ws://" + ipAddress + ":1987";
31 |
32 | var commandExecutor = new CommandExecutor(urlOverwrite);
33 | // AdjustTest.addTestDirectory('purchase-verification');
34 |
35 | AdjustTest.startTestSession(urlOverwrite, controlUrl, sdkVersion, function(json) {
36 | var commandDict = JSON.parse(json);
37 | var className = commandDict['className'];
38 | var functionName = commandDict['functionName'];
39 | var params = commandDict['params'];
40 | var order = commandDict['order'];
41 | commandExecutor.scheduleCommand(className, functionName, params, order);
42 | });
43 | });
44 | },
45 |
46 | didLaunchAppFromLink: function(eventData) {
47 | console.log(`TestApp, didLaunchAppFromLink: initiate Adjust.processDeeplink, with URL = ${eventData.url}`);
48 | Adjust.processDeeplink(eventData.url);
49 | },
50 |
51 | receivedEvent: function(id) {
52 | var parentElement = document.getElementById(id);
53 | var listeningElement = parentElement.querySelector('.listening');
54 | var receivedElement = parentElement.querySelector('.received');
55 | listeningElement.setAttribute('style', 'display:none;');
56 | receivedElement.setAttribute('style', 'display:block;');
57 | console.log('Received Event: ' + id);
58 | }
59 | };
60 |
61 | app.initialize();
62 |
--------------------------------------------------------------------------------
/test/app/www/js/test_options.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | function AdjustTestOptions() {
4 | this.testUrlOverwrite = null;
5 | this.timerIntervalInMilliseconds = null;
6 | this.timerStartInMilliseconds = null;
7 | this.sessionIntervalInMilliseconds = null;
8 | this.subsessionIntervalInMilliseconds = null;
9 | this.attStatus = null;
10 | this.idfa = null;
11 | this.noBackoffWait = null;
12 | this.adServicesFrameworkEnabled = null;
13 | this.teardown = null;
14 | this.extraPath = null;
15 | this.deleteState = false;
16 | this.ignoreSystemLifecycleBootstrap = null;
17 | };
18 |
--------------------------------------------------------------------------------
/test/plugin/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "5.4.0",
3 | "name": "com.adjust.test",
4 | "cordova_name": "Adjust Cordova Test Plugin",
5 | "description": "Cordova Plugin For Adjust SDK Testing",
6 | "license": "MIT License",
7 | "platforms": [
8 | "ios",
9 | "android"
10 | ],
11 | "engines": [
12 | {
13 | "name": "cordova",
14 | "version": ">=3.0.0"
15 | },
16 | {
17 | "name": "cordova-ios",
18 | "version": ">=3.0.0"
19 | },
20 | {
21 | "name": "cordova-android",
22 | "version": ">=4.0.0"
23 | }
24 | ],
25 | "keywords": [
26 | "adjust",
27 | "sdk",
28 | "ecosystem:cordova"
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/test/plugin/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 | Adjust Test
8 | Adjust Plugin For Cordova SDK Testing
9 | MIT License
10 | adjust
11 | adjust
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/test/plugin/src/android/AdjustCordovaTest.java:
--------------------------------------------------------------------------------
1 | package com.adjust.test;
2 |
3 | import android.net.Uri;
4 | import android.util.Log;
5 | import java.util.ArrayList;
6 | import java.util.List;
7 | import java.util.Map;
8 | import java.util.HashMap;
9 | import java.util.Iterator;
10 | import org.json.JSONArray;
11 | import org.json.JSONObject;
12 | import org.json.JSONException;
13 | import org.apache.cordova.PluginResult;
14 | import org.apache.cordova.CordovaPlugin;
15 | import org.apache.cordova.CallbackContext;
16 | import org.apache.cordova.PluginResult.Status;
17 | import com.adjust.test.TestLibrary;
18 | import com.adjust.test_options.TestConnectionOptions;
19 |
20 | public class AdjustCordovaTest extends CordovaPlugin {
21 | private static final String TAG = "AdjustCordovaTest";
22 | private static final String COMMAND_START_TEST_SESSION = "startTestSession";
23 | private static final String COMMAND_ADD_INFO_TO_SEND = "addInfoToSend";
24 | private static final String COMMAND_SEND_INFO_TO_SERVER = "sendInfoToServer";
25 | private static final String COMMAND_ADD_TEST = "addTest";
26 | private static final String COMMAND_ADD_TEST_DIRECTORY = "addTestDirectory";
27 | private static final String COMMAND_SET_TEST_CONNECTION_OPTIONS = "setTestConnectionOptions";
28 |
29 | private TestLibrary testLibrary;
30 | private CallbackContext commandCallbackContext;
31 | private List selectedTests = new ArrayList();
32 | private List selectedTestDirs = new ArrayList();
33 |
34 | @Override
35 | public boolean execute(String action, final JSONArray args, CallbackContext callbackContext) throws JSONException {
36 | if (action.equals(COMMAND_START_TEST_SESSION)) {
37 | final String baseUrl = args.getString(0);
38 | final String controlUrl = args.getString(1);
39 | final String sdkVersion = args.getString(2);
40 | this.commandCallbackContext = callbackContext;
41 | testLibrary = new TestLibrary(
42 | baseUrl,
43 | controlUrl,
44 | new CommandListener(
45 | this.cordova.getActivity().getApplicationContext(),
46 | this.commandCallbackContext));
47 |
48 | for (int i = 0; i < selectedTests.size(); i++) {
49 | testLibrary.addTest(selectedTests.get(i));
50 | }
51 | for(int i = 0; i < selectedTestDirs.size(); i++) {
52 | testLibrary.addTestDirectory(selectedTestDirs.get(i));
53 | }
54 |
55 | testLibrary.startTestSession(sdkVersion);
56 | return true;
57 | } else if (action.equals(COMMAND_ADD_INFO_TO_SEND)) {
58 | final String key = args.getString(0);
59 | final String value = args.getString(1);
60 | if (testLibrary != null) {
61 | testLibrary.addInfoToSend(key, value);
62 | }
63 | return true;
64 | } else if (action.equals(COMMAND_SEND_INFO_TO_SERVER)) {
65 | final String basePath = args.getString(0);
66 | if (testLibrary != null) {
67 | testLibrary.sendInfoToServer(basePath);
68 | }
69 | return true;
70 | } else if (action.equals(COMMAND_ADD_TEST)) {
71 | this.selectedTests.add(args.getString(0));
72 | return true;
73 | } else if (action.equals(COMMAND_ADD_TEST_DIRECTORY)) {
74 | this.selectedTestDirs.add(args.getString(0));
75 | return true;
76 | } else if (action.equals(COMMAND_SET_TEST_CONNECTION_OPTIONS)) {
77 | TestConnectionOptions.setTestConnectionOptions();
78 | }
79 |
80 | Log.e(TAG, "Invalid call: " + action);
81 | return false;
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/test/plugin/src/android/CommandListener.java:
--------------------------------------------------------------------------------
1 | package com.adjust.test;
2 |
3 | import android.util.Log;
4 | import android.content.Context;
5 | import java.util.Arrays;
6 | import java.util.List;
7 | import java.util.Locale;
8 | import java.util.Map;
9 | import org.json.JSONObject;
10 | import org.json.JSONException;
11 | import org.apache.cordova.PluginResult;
12 | import org.apache.cordova.CordovaPlugin;
13 | import org.apache.cordova.CallbackContext;
14 | import org.apache.cordova.PluginResult.Status;
15 | import java.util.concurrent.atomic.AtomicInteger;
16 | import com.adjust.test.ICommandRawJsonListener;
17 |
18 | public class CommandListener implements ICommandRawJsonListener {
19 | private Context mContext;
20 | private CallbackContext mCommandCallbackContext;
21 | private AtomicInteger orderCounter = null;
22 |
23 | public CommandListener(Context context, CallbackContext commandCallbackContext) {
24 | mContext = context;
25 | mCommandCallbackContext = commandCallbackContext;
26 | orderCounter = new AtomicInteger(0);
27 | }
28 |
29 | @Override
30 | public void executeCommand(String jsonStr) {
31 | try {
32 | JSONObject jsonObj = new JSONObject(jsonStr);
33 | // Order of packages sent through PluginResult is not reliable, this is solved
34 | // through a scheduling mechanism in command_executor.js#scheduleCommand() side.
35 | // The 'order' entry is used to schedule commands
36 | jsonObj.put("order", orderCounter.getAndIncrement());
37 | PluginResult pluginResult = new PluginResult(Status.OK, jsonObj.toString());
38 | pluginResult.setKeepCallback(true);
39 | CommandListener.this.mCommandCallbackContext.sendPluginResult(pluginResult);
40 | } catch(JSONException ex) {
41 | ex.printStackTrace();
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/test/plugin/src/android/adjust-test-library.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/test/plugin/src/android/adjust-test-library.jar
--------------------------------------------------------------------------------
/test/plugin/src/android/adjust-test-options.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/test/plugin/src/android/adjust-test-options.jar
--------------------------------------------------------------------------------
/test/plugin/src/ios/ADJCommandListener.h:
--------------------------------------------------------------------------------
1 | //
2 | // ADJCommandListener.h
3 | // Adjust SDK
4 | //
5 | // Created by Abdullah Obaied (@obaied) on 20th February 2018.
6 | // Copyright (c) 2018-Present Adjust GmbH. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | @interface ADJCommandListener : NSObject
14 |
15 | @property (nonatomic, strong) NSString *commandExecutorCallbackId;
16 | @property (nonatomic, strong) id commandDelegate;
17 |
18 | - (id)initWithCallbackId:(NSString *)callbackId andCommandDelegate:(id)commandDelegate;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/test/plugin/src/ios/ADJCommandListener.m:
--------------------------------------------------------------------------------
1 | //
2 | // ADJCommandListener.m
3 | // Adjust SDK
4 | //
5 | // Created by Abdullah Obaied (@obaied) on 20th February 2018.
6 | // Copyright (c) 2018-Present Adjust GmbH. All rights reserved.
7 | //
8 |
9 | #import "ADJCommandListener.h"
10 |
11 | @implementation ADJCommandListener {
12 | int orderCounter;
13 | }
14 |
15 | - (id)initWithCallbackId:(NSString *)callbackId andCommandDelegate:(id)commandDelegate {
16 | self = [super init];
17 | if (self == nil) {
18 | return nil;
19 | }
20 |
21 | orderCounter = 0;
22 | self.commandExecutorCallbackId = callbackId;
23 | self.commandDelegate = commandDelegate;
24 |
25 | return self;
26 | }
27 |
28 | - (void)executeCommandRawJson:(NSString *)json {
29 | NSError *jsonError;
30 | NSData *objectData = [json dataUsingEncoding:NSUTF8StringEncoding];
31 | NSMutableDictionary *dict = [NSJSONSerialization JSONObjectWithData:objectData
32 | options:NSJSONReadingMutableContainers
33 | error:&jsonError];
34 |
35 | // Order of packages sent through PluginResult is not reliable, this is solved
36 | // through a scheduling mechanism in command_executor.js#scheduleCommand() side.
37 | // The 'order' entry is used to schedule commands.
38 | NSNumber *num = [NSNumber numberWithInt:orderCounter];
39 | [dict setObject:num forKey:@"order"];
40 | orderCounter++;
41 |
42 | // Making a JSON string from dictionary: this step is necessary, using 'messageAsDictionary' with 'resultWithStatus' method below
43 | // produced extra objects in the string that were not necessary.
44 | NSError *err;
45 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dict options:0 error:&err];
46 | NSString *myString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
47 |
48 | CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:myString];
49 | [pluginResult setKeepCallbackAsBool:YES];
50 | [self.commandDelegate sendPluginResult:pluginResult callbackId:self.commandExecutorCallbackId];
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/test/plugin/src/ios/ADJCordovaTest.h:
--------------------------------------------------------------------------------
1 | //
2 | // ADJCordovaTest.h
3 | // Adjust SDK
4 | //
5 | // Created by Abdullah Obaied (@obaied) on 20th February 2018.
6 | // Copyright (c) 2018-Present Adjust GmbH. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ADJCordovaTest : CDVPlugin
12 |
13 | - (void)startTestSession:(CDVInvokedUrlCommand *)command;
14 | - (void)addInfoToSend:(CDVInvokedUrlCommand *)command;
15 | - (void)sendInfoToServer:(CDVInvokedUrlCommand *)command;
16 | - (void)addTest:(CDVInvokedUrlCommand *)command;
17 | - (void)addTestDirectory:(CDVInvokedUrlCommand *)command;
18 | - (void)setTestConnectionOptions:(CDVInvokedUrlCommand *)command;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/test/plugin/src/ios/ADJCordovaTest.m:
--------------------------------------------------------------------------------
1 | //
2 | // ADJCordovaTest.m
3 | // Adjust SDK
4 | //
5 | // Created by Abdullah Obaied (@obaied) on 20th February 2018.
6 | // Copyright (c) 2018-Present Adjust GmbH. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "ADJCordovaTest.h"
12 | #import "ADJCommandListener.h"
13 |
14 | @interface ADJCordovaTest ()
15 |
16 | @property (nonatomic, strong) ATLTestLibrary *testLibrary;
17 | @property (nonatomic, strong) ADJCommandListener *adjustCommandListener;
18 |
19 | @end
20 |
21 | @implementation ADJCordovaTest {
22 | NSMutableArray *selectedTests;
23 | NSMutableArray *selectedTestDirs;
24 | }
25 |
26 | #pragma mark - Object lifecycle methods
27 |
28 | - (void)pluginInitialize {
29 | selectedTests = [NSMutableArray array];
30 | selectedTestDirs = [NSMutableArray array];
31 | }
32 |
33 | #pragma mark - Public methods
34 |
35 | - (void)startTestSession:(CDVInvokedUrlCommand *)command {
36 | NSString *baseUrl = [command.arguments objectAtIndex:0];
37 | NSString *controlUrl = [command.arguments objectAtIndex:1];
38 | NSString *sdkVersion = [command.arguments objectAtIndex:2];
39 | if (![self isFieldValid:baseUrl]) {
40 | return;
41 | }
42 |
43 | self.adjustCommandListener = [[ADJCommandListener alloc] initWithCallbackId:command.callbackId
44 | andCommandDelegate:self.commandDelegate];
45 | self.testLibrary = [ATLTestLibrary testLibraryWithBaseUrl:baseUrl andControlUrl:controlUrl andCommandDelegate:self.adjustCommandListener];
46 |
47 | for (id object in selectedTests) {
48 | [self.testLibrary addTest:object];
49 | }
50 | for (id object in selectedTestDirs) {
51 | [self.testLibrary addTestDirectory:object];
52 | }
53 |
54 | [self.testLibrary startTestSession:sdkVersion];
55 | }
56 |
57 | - (void)addInfoToSend:(CDVInvokedUrlCommand *)command {
58 | NSString *key = [command.arguments objectAtIndex:0];
59 | NSString *value = [command.arguments objectAtIndex:1];
60 | if (self.testLibrary != nil) {
61 | [self.testLibrary addInfoToSend:key value:value];
62 | }
63 | }
64 |
65 | - (void)sendInfoToServer:(CDVInvokedUrlCommand *)command {
66 | NSString *basePath = [command.arguments objectAtIndex:0];
67 | if (self.testLibrary != nil) {
68 | [self.testLibrary sendInfoToServer:basePath];
69 | }
70 | }
71 |
72 | - (void)addTest:(CDVInvokedUrlCommand *)command {
73 | NSString *testToAdd = [command.arguments objectAtIndex:0];
74 | [selectedTests addObject:testToAdd];
75 | }
76 |
77 | - (void)addTestDirectory:(CDVInvokedUrlCommand *)command {
78 | NSString *testDirToAdd = [command.arguments objectAtIndex:0];
79 | [selectedTestDirs addObject:testDirToAdd];
80 | }
81 |
82 | - (void)setTestConnectionOptions:(CDVInvokedUrlCommand *)command {}
83 |
84 | #pragma mark - Private & helper methods
85 |
86 | - (BOOL)isFieldValid:(NSObject *)field {
87 | return field != nil && ![field isKindOfClass:[NSNull class]];
88 | }
89 |
90 | @end
91 |
--------------------------------------------------------------------------------
/test/plugin/src/ios/AdjustTestLibrary.framework/AdjustTestLibrary:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adjust/cordova_sdk/7195729fb8e319a43bde22e33cd9797d0a531a3b/test/plugin/src/ios/AdjustTestLibrary.framework/AdjustTestLibrary
--------------------------------------------------------------------------------
/test/plugin/src/ios/AdjustTestLibrary.framework/Headers/ATLBlockingQueue.h:
--------------------------------------------------------------------------------
1 | //
2 | // ATLBlockingQueue.h
3 | // AdjustTestLibrary
4 | //
5 | // Created by Pedro on 11.01.18.
6 | // Copyright © 2018 adjust. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ATLUtil.h"
11 |
12 | @interface ATLBlockingQueue : NSObject
13 |
14 | /**
15 | * Enqueues an object to the queue.
16 | * @param object Object to enqueue
17 | */
18 | - (void)enqueue:(id)object;
19 |
20 | /**
21 | * Dequeues an object from the queue. This method will block.
22 | */
23 | - (id)dequeue;
24 |
25 | - (void)teardown;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/test/plugin/src/ios/AdjustTestLibrary.framework/Headers/ATLConstants.h:
--------------------------------------------------------------------------------
1 | //
2 | // ATLConstants.h
3 | // AdjustTestLibrary
4 | //
5 | // Created by Pedro on 20.04.17.
6 | // Copyright © 2017 adjust. All rights reserved.
7 | //
8 |
9 | #ifndef ATLConstants_h
10 | #define ATLConstants_h
11 |
12 | static int const ONE_SECOND = 1000;
13 | static int const ONE_MINUTE = 60 * ONE_SECOND;
14 |
15 | static NSString * const TEST_LIBRARY_CLASSNAME = @"TestLibrary";
16 | static NSString * const ADJUST_CLASSNAME = @"Adjust";
17 | static NSString * const WAIT_FOR_CONTROL = @"control";
18 | static NSString * const WAIT_FOR_SLEEP = @"sleep";
19 | static NSString * const BASE_PATH_PARAM = @"basePath";
20 | static NSString * const TEST_NAME_PARAM = @"basePath";
21 | static NSString * const TEST_SESSION_ID_HEADER = @"Test-Session-Id";
22 |
23 | // web socket values
24 | static NSString * const SIGNAL_INFO = @"info";
25 | static NSString * const SIGNAL_INIT_TEST_SESSION = @"init-test-session";
26 | static NSString * const SIGNAL_END_WAIT = @"end-wait";
27 | static NSString * const SIGNAL_CANCEL_CURRENT_TEST = @"cancel-current-test";
28 | static NSString * const SIGNAL_UNKNOWN = @"unknown";
29 |
30 | #endif /* ATLConstants_h */
31 |
--------------------------------------------------------------------------------
/test/plugin/src/ios/AdjustTestLibrary.framework/Headers/ATLControlSignal.h:
--------------------------------------------------------------------------------
1 | //
2 | // ATLControlSignal.h
3 | // AdjustTestLibrary
4 | //
5 | // Created by Serj on 20.02.19.
6 | // Copyright © 2019 adjust. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | typedef enum {
14 | ATLSignalTypeInfo = 1,
15 | ATLSignalTypeInitTestSession = 2,
16 | ATLSignalTypeEndWait = 3,
17 | ATLSignalTypeCancelCurrentTest = 4,
18 | ATLSignalTypeUnknown = 5
19 | } ATLSignalType;
20 |
21 | @interface ATLControlSignal : NSObject
22 |
23 | - (id)initWithSignalType:(ATLSignalType)signalType;
24 |
25 | - (id)initWithSignalType:(ATLSignalType)signalType
26 | andSignalValue:(NSString*)signalValue;
27 |
28 | - (id)initWithJson:(NSString*)json;
29 |
30 | - (NSString*)toJson;
31 |
32 | - (NSString*)getValue;
33 |
34 | - (ATLSignalType)getType;
35 |
36 | @end
37 |
38 | NS_ASSUME_NONNULL_END
39 |
--------------------------------------------------------------------------------
/test/plugin/src/ios/AdjustTestLibrary.framework/Headers/ATLControlWebSocketClient.h:
--------------------------------------------------------------------------------
1 | //
2 | // ATLControlWebSocketClient.h
3 | // AdjustTestLibrary
4 | //
5 | // Created by Serj on 20.02.19.
6 | // Copyright © 2019 adjust. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "PocketSocket/PSWebSocket.h"
11 | #import "ATLTestLibrary.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface ATLControlWebSocketClient : NSObject
16 |
17 | - (void)initializeWebSocketWithControlUrl:(NSString*)controlUrl
18 | andTestLibrary:(ATLTestLibrary*)testLibrary;
19 |
20 | - (void)reconnectIfNeeded;
21 |
22 | - (void)sendInitTestSessionSignal:(NSString*)testSessionId;
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
--------------------------------------------------------------------------------
/test/plugin/src/ios/AdjustTestLibrary.framework/Headers/ATLNetworking.h:
--------------------------------------------------------------------------------
1 | //
2 | // ATLNetworking.h
3 | // AdjustTestLibrary
4 | //
5 | // Created by Pedro Silva on 24.05.24.
6 | // Copyright © 2024 adjust. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ATLHttpResponse : NSObject
12 |
13 | @property (nonatomic, nullable, strong) NSString * responseString;
14 | @property (nonatomic, nullable, strong) id jsonFoundation;
15 | @property (nonatomic, nullable, strong) NSDictionary *headerFields;
16 | @property (nonatomic, assign) NSInteger statusCode;
17 |
18 | @end
19 |
20 | @interface ATLHttpRequest : NSObject
21 |
22 | @property (nonatomic, nonnull, readonly, strong) NSString *path;
23 | @property (nonatomic, nullable, readonly, strong) NSString *base;
24 | @property (nonatomic, nullable, strong) NSString *bodyString;
25 | @property (nonatomic, nullable, strong) NSDictionary *headerFields;
26 |
27 | - (nonnull id)initWithPath:(nonnull NSString *)path
28 | base:(nullable NSString *)base;
29 | @end
30 |
31 | typedef void (^httpResponseHandler)(ATLHttpResponse *_Nonnull httpResponse);
32 |
33 | @interface ATLNetworking : NSObject
34 |
35 | - (void)sendPostRequestWithData:(nonnull ATLHttpRequest *)requestData
36 | baseUrl:(nonnull NSURL *)baseUrl
37 | responseHandler:(nonnull httpResponseHandler)responseHandler;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/test/plugin/src/ios/AdjustTestLibrary.framework/Headers/ATLTestLibrary.h:
--------------------------------------------------------------------------------
1 | //
2 | // AdjustTestLibrary.h
3 | // AdjustTestLibrary
4 | //
5 | // Created by Pedro on 18.04.17.
6 | // Copyright © 2017 adjust. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ATLNetworking.h"
11 | #import "ATLBlockingQueue.h"
12 |
13 | @protocol AdjustCommandDelegate
14 | @optional
15 | - (void)executeCommand:(NSString *)className
16 | methodName:(NSString *)methodName
17 | parameters:(NSDictionary *)parameters;
18 |
19 | - (void)executeCommand:(NSString *)className
20 | methodName:(NSString *)methodName
21 | jsonParameters:(NSString *)jsonParameters;
22 |
23 | - (void)executeCommandRawJson:(NSString *)json;
24 | @end
25 |
26 | @interface ATLTestLibrary : NSObject
27 |
28 | - (NSString *)currentBasePath;
29 |
30 | - (ATLBlockingQueue *)waitControlQueue;
31 |
32 | - (void)addTest:(NSString *)testName;
33 |
34 | - (void)addTestDirectory:(NSString *)testDirectory;
35 |
36 | - (void)startTestSession:(NSString *)clientSdk;
37 |
38 | - (void)resetTestLibrary;
39 |
40 | - (void)readResponse:(ATLHttpResponse *)httpResponse;
41 |
42 | - (void)addInfoToSend:(NSString *)key
43 | value:(NSString *)value;
44 |
45 | - (void)sendInfoToServer:(NSString *)basePath;
46 |
47 | - (void)signalEndWaitWithReason:(NSString *)reason;
48 |
49 | - (void)cancelTestAndGetNext;
50 |
51 | - (void)doNotExitAfterEnd;
52 |
53 | + (ATLTestLibrary *)testLibraryWithBaseUrl:(NSString *)baseUrl
54 | andControlUrl:(NSString *)controlUrl
55 | andCommandDelegate:(NSObject *)commandDelegate;
56 | @end
57 |
--------------------------------------------------------------------------------
/test/plugin/src/ios/AdjustTestLibrary.framework/Headers/ATLUtil.h:
--------------------------------------------------------------------------------
1 | //
2 | // ATLUtil.h
3 | // AdjustTestLibrary
4 | //
5 | // Created by Pedro on 18.04.17.
6 | // Copyright © 2017 adjust. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void (^selfInjectedBlock)(id);
12 | typedef void (^operationBlock)(NSBlockOperation *);
13 |
14 | @interface ATLUtil : NSObject
15 |
16 | + (void)debug:(NSString *)format, ...;
17 | + (void)launchInQueue:(dispatch_queue_t)queue
18 | selfInject:(id)selfInject
19 | block:(selfInjectedBlock)block;
20 | + (void)addOperationAfterLast:(NSOperationQueue *)operationQueue
21 | block:(dispatch_block_t)block;
22 | + (void)addOperationAfterLast:(NSOperationQueue *)operationQueue
23 | blockWithOperation:(operationBlock)blockWithOperation;
24 | + (BOOL)isNull:(id)value;
25 | + (NSString *)adjTrim:(NSString *)value;
26 | + (NSString *)formatDate:(NSDate *)value;
27 | + (NSString *)parseDictionaryToJsonString:(NSDictionary *) dictionary;
28 | + (NSString *)appendBasePath:(NSString *)basePath path:(NSString *)path;
29 | + (NSString *)queryString:(NSDictionary *)parameters;
30 | @end
31 |
--------------------------------------------------------------------------------
/test/plugin/www/adjust_test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | function callCordova(action) {
4 | var args = Array.prototype.slice.call(arguments, 1);
5 | cordova.exec(function callback(data) { },
6 | function errorHandler(err) { console.log("[AdjustTest]: Could not execute call inside of 'callCordova': " + err); },
7 | 'AdjustTest',
8 | action,
9 | args
10 | );
11 | }
12 |
13 | function callCordovaCallback(action, callback) {
14 | var args = Array.prototype.slice.call(arguments, 2);
15 | cordova.exec(callback,
16 | function errorHandler(err) { console.log("[AdjustTest]: Could not execute call inside of 'callCordovaCallback': " + err); },
17 | 'AdjustTest',
18 | action,
19 | args
20 | );
21 | }
22 |
23 | var AdjustTest = {
24 | startTestSession: function(baseUrl, controlUrl, sdkVersion, callback) {
25 | callCordovaCallback('startTestSession', callback, baseUrl, controlUrl, sdkVersion);
26 | },
27 |
28 | addInfoToSend: function(key, value) {
29 | callCordova('addInfoToSend', key, value);
30 | },
31 |
32 | sendInfoToServer: function(basePath) {
33 | callCordova('sendInfoToServer', basePath);
34 | },
35 |
36 | addTest: function(test) {
37 | callCordova('addTest', test);
38 | },
39 |
40 | addTestDirectory: function(testDir) {
41 | callCordova('addTestDirectory', testDir);
42 | },
43 |
44 | setTestConnectionOptions: function() {
45 | callCordova('setTestConnectionOptions', null);
46 | }
47 | };
48 |
49 | module.exports = AdjustTest;
50 |
--------------------------------------------------------------------------------
/www/adjust_ad_revenue.js:
--------------------------------------------------------------------------------
1 | function AdjustAdRevenue(source) {
2 | this.source = source;
3 | this.revenue = null;
4 | this.currency = null;
5 | this.adImpressionsCount = null;
6 | this.adRevenueNetwork = null;
7 | this.adRevenueUnit = null;
8 | this.adRevenuePlacement = null;
9 | this.callbackParameters = [];
10 | this.partnerParameters = [];
11 | }
12 |
13 | AdjustAdRevenue.prototype.setRevenue = function(revenue, currency) {
14 | if (typeof revenue !== 'number' || typeof currency !== 'string') {
15 | console.log("[Adjust] Ad revenue or currency is not of a proper data type");
16 | }
17 | this.revenue = revenue;
18 | this.currency = currency;
19 | };
20 |
21 | AdjustAdRevenue.prototype.setAdImpressionsCount = function(adImpressionsCount) {
22 | if (!Number.isInteger(adImpressionsCount)) {
23 | console.log("[Adjust] Ad impressions count is not of type integer");
24 | return;
25 | }
26 | this.adImpressionsCount = adImpressionsCount;
27 | };
28 |
29 | AdjustAdRevenue.prototype.setAdRevenueNetwork = function(adRevenueNetwork) {
30 | if (typeof adRevenueNetwork !== 'string') {
31 | console.log("[Adjust] Ad revenue network is not of type string");
32 | return;
33 | }
34 | this.adRevenueNetwork = adRevenueNetwork;
35 | };
36 |
37 | AdjustAdRevenue.prototype.setAdRevenueUnit = function(adRevenueUnit) {
38 | if (typeof adRevenueUnit !== 'string') {
39 | console.log("[Adjust] Ad revenue unit is not of type string");
40 | return;
41 | }
42 | this.adRevenueUnit = adRevenueUnit;
43 | };
44 |
45 | AdjustAdRevenue.prototype.setAdRevenuePlacement = function(adRevenuePlacement) {
46 | if (typeof adRevenuePlacement !== 'string') {
47 | console.log("[Adjust] Ad revenue placement is not of type string");
48 | return;
49 | }
50 | this.adRevenuePlacement = adRevenuePlacement;
51 | };
52 |
53 | AdjustAdRevenue.prototype.addCallbackParameter = function(key, value) {
54 | if (typeof key !== 'string' || typeof value !== 'string') {
55 | console.log("[Adjust] Ad revenue callback parameter key or value is not of type string");
56 | return;
57 | }
58 | this.callbackParameters.push(key);
59 | this.callbackParameters.push(value);
60 | };
61 |
62 | AdjustAdRevenue.prototype.addPartnerParameter = function(key, value) {
63 | if (typeof key !== 'string' || typeof value !== 'string') {
64 | console.log("[Adjust] Ad revenue partner parameter key or value is not of type string");
65 | return;
66 | }
67 | this.partnerParameters.push(key);
68 | this.partnerParameters.push(value);
69 | };
70 |
71 | module.exports = AdjustAdRevenue;
72 |
--------------------------------------------------------------------------------
/www/adjust_app_store_purchase.js:
--------------------------------------------------------------------------------
1 | function AdjustAppStorePurchase(productId, transactionId) {
2 | this.productId = productId;
3 | this.transactionId = transactionId;
4 | }
5 |
6 | module.exports = AdjustAppStorePurchase;
7 |
--------------------------------------------------------------------------------
/www/adjust_app_store_subscription.js:
--------------------------------------------------------------------------------
1 | function AdjustAppStoreSubscription(price, currency, transactionId) {
2 | this.price = price;
3 | this.currency = currency;
4 | this.transactionId = transactionId;
5 | this.transactionDate = null;
6 | this.salesRegion = null;
7 | this.callbackParameters = [];
8 | this.partnerParameters = [];
9 | }
10 |
11 | AdjustAppStoreSubscription.prototype.setTransactionDate = function(transactionDate) {
12 | if (typeof transactionDate !== 'string') {
13 | console.log("[Adjust] App Store subscription transaction date is not of type string");
14 | return;
15 | }
16 | this.transactionDate = transactionDate;
17 | };
18 |
19 | AdjustAppStoreSubscription.prototype.setSalesRegion = function(salesRegion) {
20 | if (typeof salesRegion !== 'string') {
21 | console.log("[Adjust] App Store subscription sales region is not of type string");
22 | return;
23 | }
24 | this.salesRegion = salesRegion;
25 | };
26 |
27 | AdjustAppStoreSubscription.prototype.addCallbackParameter = function(key, value) {
28 | if (typeof key !== 'string' || typeof value !== 'string') {
29 | console.log("[Adjust] App Store subscription callback parameter key or value is not of type string");
30 | return;
31 | }
32 | this.callbackParameters.push(key);
33 | this.callbackParameters.push(value);
34 | };
35 |
36 | AdjustAppStoreSubscription.prototype.addPartnerParameter = function(key, value) {
37 | if (typeof key !== 'string' || typeof value !== 'string') {
38 | console.log("[Adjust] App Store subscription partner parameter key or value is not of type string");
39 | return;
40 | }
41 | this.partnerParameters.push(key);
42 | this.partnerParameters.push(value);
43 | };
44 |
45 | module.exports = AdjustAppStoreSubscription;
46 |
--------------------------------------------------------------------------------
/www/adjust_config.js:
--------------------------------------------------------------------------------
1 | function AdjustConfig(appToken, environment) {
2 | // common
3 | this.appToken = appToken;
4 | this.environment = environment;
5 | this.isSendingInBackgroundEnabled = null;
6 | this.isCostDataInAttributionEnabled = null;
7 | this.isDeviceIdsReadingOnceEnabled = null;
8 | this.urlStrategyDomains = null;
9 | this.useSubdomains = null;
10 | this.isDataResidency = null;
11 | this.sdkPrefix = null;
12 | this.logLevel = null;
13 | this.defaultTracker = null;
14 | this.externalDeviceId = null;
15 | this.eventDeduplicationIdsMaxSize = null;
16 | this.isDeferredDeeplinkOpeningEnabled = null;
17 | this.isCoppaComplianceEnabled = null;
18 | this.isFirstSessionDelayEnabled = null;
19 | this.storeInfo = null;
20 |
21 | this.attributionCallback = null;
22 | this.eventTrackingSucceededCallback = null;
23 | this.eventTrackingFailedCallback = null;
24 | this.sessionTrackingSucceededCallback = null;
25 | this.sessionTrackingFailedCallback = null;
26 | this.deferredDeeplinkCallback = null;
27 |
28 | // android only
29 | this.processName = null;
30 | this.isPreinstallTrackingEnabled = null;
31 | this.preinstallFilePath = null;
32 | this.isPlayStoreKidsComplianceEnabled = null;
33 | this.fbAppId = null;
34 |
35 | // ios only
36 | this.isAdServicesEnabled = null;
37 | this.isIdfaReadingEnabled = null;
38 | this.isIdfvReadingEnabled = null;
39 | this.isSkanAttributionEnabled = null;
40 | this.isLinkMeEnabled = null;
41 | this.attConsentWaitingInterval = null;
42 | this.isAppTrackingTransparencyUsageEnabled = null;
43 |
44 | this.skanUpdatedCallback = null;
45 | }
46 |
47 | AdjustConfig.EnvironmentSandbox = "sandbox";
48 | AdjustConfig.EnvironmentProduction = "production";
49 |
50 | AdjustConfig.LogLevelVerbose = "VERBOSE";
51 | AdjustConfig.LogLevelDebug = "DEBUG";
52 | AdjustConfig.LogLevelInfo = "INFO";
53 | AdjustConfig.LogLevelWarn = "WARN";
54 | AdjustConfig.LogLevelError = "ERROR";
55 | AdjustConfig.LogLevelAssert = "ASSERT";
56 | AdjustConfig.LogLevelSuppress = "SUPPRESS";
57 |
58 | AdjustConfig.prototype.setSdkPrefix = function(sdkPrefix) {
59 | if (typeof sdkPrefix !== 'string') {
60 | console.log("[Adjust] SDK prefix is not of type string");
61 | return;
62 | }
63 | this.sdkPrefix = sdkPrefix;
64 | };
65 |
66 | AdjustConfig.prototype.setLogLevel = function(logLevel) {
67 | if (typeof logLevel !== 'string') {
68 | console.log("[Adjust] Log level is not of type string");
69 | return;
70 | }
71 | this.logLevel = logLevel;
72 | };
73 |
74 | AdjustConfig.prototype.setDefaultTracker = function(defaultTracker) {
75 | if (typeof defaultTracker !== 'string') {
76 | console.log("[Adjust] Default tracker is not of type string");
77 | return;
78 | }
79 | this.defaultTracker = defaultTracker;
80 | };
81 |
82 | AdjustConfig.prototype.setExternalDeviceId = function(externalDeviceId) {
83 | if (typeof externalDeviceId !== 'string') {
84 | console.log("[Adjust] External device ID is not of type string");
85 | return;
86 | }
87 | this.externalDeviceId = externalDeviceId;
88 | };
89 |
90 | AdjustConfig.prototype.enableSendingInBackground = function() {
91 | this.isSendingInBackgroundEnabled = true;
92 | };
93 |
94 | AdjustConfig.prototype.enableCostDataInAttribution = function() {
95 | this.isCostDataInAttributionEnabled = true;
96 | };
97 |
98 | AdjustConfig.prototype.enableDeviceIdsReadingOnce = function () {
99 | this.isDeviceIdsReadingOnceEnabled = true;
100 | };
101 |
102 | AdjustConfig.prototype.disableDeferredDeeplinkOpening = function() {
103 | this.isDeferredDeeplinkOpeningEnabled = false;
104 | };
105 |
106 | AdjustConfig.prototype.enableCoppaCompliance = function() {
107 | this.isCoppaComplianceEnabled = true;
108 | };
109 |
110 | AdjustConfig.prototype.enableFirstSessionDelay = function() {
111 | this.isFirstSessionDelayEnabled = true;
112 | };
113 |
114 | AdjustConfig.prototype.setStoreInfo = function(storeInfo) {
115 | this.storeInfo = storeInfo;
116 | };
117 |
118 | AdjustConfig.prototype.setEventDeduplicationIdsMaxSize = function(eventDeduplicationIdsMaxSize) {
119 | if (!Number.isInteger(eventDeduplicationIdsMaxSize)) {
120 | console.log("[Adjust] Maximum number of event deduplication IDs is not of type integer");
121 | return;
122 | }
123 | this.eventDeduplicationIdsMaxSize = eventDeduplicationIdsMaxSize;
124 | };
125 |
126 | AdjustConfig.prototype.setUrlStrategy = function(urlStrategyDomains, useSubdomains, isDataResidency) {
127 | if (!Array.isArray(urlStrategyDomains) ||
128 | typeof useSubdomains !== 'boolean' ||
129 | typeof isDataResidency !== 'boolean') {
130 | console.log("[Adjust] URL strategy parameters are not of a proper data types");
131 | return;
132 | }
133 | this.urlStrategyDomains = urlStrategyDomains;
134 | this.useSubdomains = useSubdomains;
135 | this.isDataResidency = isDataResidency;
136 | };
137 |
138 | AdjustConfig.prototype.getAttributionCallback = function() {
139 | return this.attributionCallback;
140 | };
141 |
142 | AdjustConfig.prototype.setAttributionCallback = function(callback) {
143 | this.attributionCallback = callback;
144 | };
145 |
146 | AdjustConfig.prototype.hasAttributionCallback = function() {
147 | return this.attributionCallback !== null;
148 | };
149 |
150 | AdjustConfig.prototype.getEventTrackingSucceededCallback = function() {
151 | return this.eventTrackingSucceededCallback;
152 | };
153 |
154 | AdjustConfig.prototype.setEventTrackingSucceededCallback = function(callback) {
155 | this.eventTrackingSucceededCallback = callback;
156 | };
157 |
158 | AdjustConfig.prototype.hasEventTrackingSucceededCallback = function() {
159 | return this.eventTrackingSucceededCallback !== null;
160 | };
161 |
162 | AdjustConfig.prototype.getEventTrackingFailedCallback = function() {
163 | return this.eventTrackingFailedCallback;
164 | };
165 |
166 | AdjustConfig.prototype.setEventTrackingFailedCallback = function(callback) {
167 | this.eventTrackingFailedCallback = callback;
168 | };
169 |
170 | AdjustConfig.prototype.hasEventTrackingFailedCallback = function() {
171 | return this.eventTrackingFailedCallback !== null;
172 | };
173 |
174 | AdjustConfig.prototype.getSessionTrackingSucceededCallback = function() {
175 | return this.sessionTrackingSucceededCallback;
176 | };
177 |
178 | AdjustConfig.prototype.setSessionTrackingSucceededCallback = function(callback) {
179 | this.sessionTrackingSucceededCallback = callback;
180 | };
181 |
182 | AdjustConfig.prototype.hasSessionTrackingSucceededCallback = function() {
183 | return this.sessionTrackingSucceededCallback !== null;
184 | };
185 |
186 | AdjustConfig.prototype.getSessionTrackingFailedCallback = function() {
187 | return this.sessionTrackingFailedCallback;
188 | };
189 |
190 | AdjustConfig.prototype.setSessionTrackingFailedCallback = function(callback) {
191 | this.sessionTrackingFailedCallback = callback;
192 | };
193 |
194 | AdjustConfig.prototype.hasSessionTrackingFailedCallback = function() {
195 | return this.sessionTrackingFailedCallback !== null;
196 | };
197 |
198 | AdjustConfig.prototype.getDeferredDeeplinkCallback = function() {
199 | return this.deferredDeeplinkCallback;
200 | };
201 |
202 | AdjustConfig.prototype.setDeferredDeeplinkCallback = function(callback) {
203 | this.deferredDeeplinkCallback = callback;
204 | };
205 |
206 | AdjustConfig.prototype.hasDeferredDeeplinkCallback = function() {
207 | return this.deferredDeeplinkCallback !== null;
208 | };
209 |
210 | // android only
211 |
212 | AdjustConfig.prototype.setProcessName = function(processName) {
213 | this.processName = processName;
214 | };
215 |
216 | AdjustConfig.prototype.enablePreinstallTracking = function() {
217 | this.isPreinstallTrackingEnabled = true;
218 | };
219 |
220 | AdjustConfig.prototype.setPreinstallFilePath = function(preinstallFilePath) {
221 | if (typeof preinstallFilePath !== 'string') {
222 | console.log("[Adjust] Preinstall file path is not of type string");
223 | return;
224 | }
225 | this.preinstallFilePath = preinstallFilePath;
226 | };
227 |
228 | AdjustConfig.prototype.enablePlayStoreKidsCompliance = function () {
229 | this.isPlayStoreKidsComplianceEnabled = true;
230 | };
231 |
232 | AdjustConfig.prototype.setFbAppId = function (fbAppId) {
233 | if (typeof fbAppId !== 'string') {
234 | console.log("[Adjust] FB app ID is not of type string");
235 | return;
236 | }
237 | this.fbAppId = fbAppId;
238 | };
239 |
240 | // ios only
241 |
242 | AdjustConfig.prototype.disableAdServices = function() {
243 | this.isAdServicesEnabled = false;
244 | };
245 |
246 | AdjustConfig.prototype.disableIdfaReading = function() {
247 | this.isIdfaReadingEnabled = false;
248 | };
249 |
250 | AdjustConfig.prototype.disableIdfvReading = function() {
251 | this.isIdfvReadingEnabled = false;
252 | };
253 |
254 | AdjustConfig.prototype.disableSkanAttribution = function() {
255 | this.isSkanAttributionEnabled = false;
256 | };
257 |
258 | AdjustConfig.prototype.enableLinkMe = function() {
259 | this.isLinkMeEnabled = true;
260 | };
261 |
262 | AdjustConfig.prototype.disableAppTrackingTransparencyUsage = function() {
263 | this.isAppTrackingTransparencyUsageEnabled = false;
264 | };
265 |
266 | AdjustConfig.prototype.setAttConsentWaitingInterval = function(attConsentWaitingInterval) {
267 | if (!Number.isInteger(attConsentWaitingInterval)) {
268 | console.log("[Adjust] ATT consent waiting interval is not of type integer");
269 | return;
270 | }
271 | this.attConsentWaitingInterval = attConsentWaitingInterval;
272 | };
273 |
274 | AdjustConfig.prototype.getSkanUpdatedCallback = function() {
275 | return this.skanUpdatedCallback;
276 | };
277 |
278 | AdjustConfig.prototype.setSkanUpdatedCallback = function(callback) {
279 | this.skanUpdatedCallback = callback;
280 | };
281 |
282 | AdjustConfig.prototype.hasSkanUpdatedCallback = function() {
283 | return this.skanUpdatedCallback !== null;
284 | };
285 |
286 | module.exports = AdjustConfig;
287 |
--------------------------------------------------------------------------------
/www/adjust_deeplink.js:
--------------------------------------------------------------------------------
1 | function AdjustDeeplink(deeplink) {
2 | this.deeplink = deeplink;
3 | this.referrer = null;
4 | }
5 |
6 | AdjustDeeplink.prototype.setReferrer = function(referrer) {
7 | this.referrer = referrer;
8 | };
9 |
10 | module.exports = AdjustDeeplink;
11 |
--------------------------------------------------------------------------------
/www/adjust_event.js:
--------------------------------------------------------------------------------
1 | function AdjustEvent(eventToken) {
2 | this.eventToken = eventToken;
3 | this.revenue = null;
4 | this.currency = null;
5 | this.deduplicationId = null;
6 | this.callbackId = null;
7 | this.productId = null;
8 | this.callbackParameters = [];
9 | this.partnerParameters = [];
10 |
11 | // ios only
12 | this.transactionId = null;
13 |
14 | // android only
15 | this.purchaseToken = null;
16 | }
17 |
18 | AdjustEvent.prototype.setRevenue = function(revenue, currency) {
19 | if (typeof revenue !== 'number' || typeof currency !== 'string') {
20 | console.log("[Adjust] Event revenue or currency is not of a proper data type");
21 | }
22 | this.revenue = revenue;
23 | this.currency = currency;
24 | };
25 |
26 | AdjustEvent.prototype.addCallbackParameter = function(key, value) {
27 | if (typeof key !== 'string' || typeof value !== 'string') {
28 | console.log("[Adjust] Event callback parameter key or value is not of type string");
29 | return;
30 | }
31 | this.callbackParameters.push(key);
32 | this.callbackParameters.push(value);
33 | };
34 |
35 | AdjustEvent.prototype.addPartnerParameter = function(key, value) {
36 | if (typeof key !== 'string' || typeof value !== 'string') {
37 | console.log("[Adjust] Event partner parameter key or value is not of type string");
38 | return;
39 | }
40 | this.partnerParameters.push(key);
41 | this.partnerParameters.push(value);
42 | };
43 |
44 | AdjustEvent.prototype.setCallbackId = function(callbackId) {
45 | if (typeof callbackId !== 'string') {
46 | console.log("[Adjust] Event callback ID is not of type string");
47 | return;
48 | }
49 | this.callbackId = callbackId;
50 | };
51 |
52 | AdjustEvent.prototype.setDeduplicationId = function(deduplicationId) {
53 | if (typeof deduplicationId !== 'string') {
54 | console.log("[Adjust] Event deduplication ID is not of type string");
55 | return;
56 | }
57 | this.deduplicationId = deduplicationId;
58 | };
59 |
60 | AdjustEvent.prototype.setProductId = function(productId) {
61 | if (typeof productId !== 'string') {
62 | console.log("[Adjust] Event product ID is not of type string");
63 | return;
64 | }
65 | this.productId = productId;
66 | };
67 |
68 | // ios only
69 |
70 | AdjustEvent.prototype.setTransactionId = function(transactionId) {
71 | if (typeof transactionId !== 'string') {
72 | console.log("[Adjust] Event transaction ID is not of type string");
73 | return;
74 | }
75 | this.transactionId = transactionId;
76 | };
77 |
78 | // android only
79 |
80 | AdjustEvent.prototype.setPurchaseToken = function(purchaseToken) {
81 | if (typeof purchaseToken !== 'string') {
82 | console.log("[Adjust] Event purchase token is not of type string");
83 | return;
84 | }
85 | this.purchaseToken = purchaseToken;
86 | };
87 |
88 | module.exports = AdjustEvent;
89 |
--------------------------------------------------------------------------------
/www/adjust_play_store_purchase.js:
--------------------------------------------------------------------------------
1 | function AdjustPlayStorePurchase(productId, purchaseToken) {
2 | this.productId = productId;
3 | this.purchaseToken = purchaseToken;
4 | }
5 |
6 | module.exports = AdjustPlayStorePurchase;
7 |
--------------------------------------------------------------------------------
/www/adjust_play_store_subscription.js:
--------------------------------------------------------------------------------
1 | function AdjustPlayStoreSubscription(price, currency, sku, orderId, signature, purchaseToken) {
2 | this.price = price;
3 | this.currency = currency;
4 | this.sku = sku;
5 | this.orderId = orderId;
6 | this.signature = signature;
7 | this.purchaseToken = purchaseToken;
8 | this.purchaseTime = null;
9 | this.callbackParameters = [];
10 | this.partnerParameters = [];
11 | }
12 |
13 | AdjustPlayStoreSubscription.prototype.setPurchaseTime = function(purchaseTime) {
14 | if (!Number.isInteger(purchaseTime)) {
15 | console.log("[Adjust] Play Store subscription purchase time is not of type integer");
16 | return;
17 | }
18 | this.purchaseTime = purchaseTime;
19 | };
20 |
21 | AdjustPlayStoreSubscription.prototype.addCallbackParameter = function(key, value) {
22 | if (typeof key !== 'string' || typeof value !== 'string') {
23 | console.log("[Adjust] Play Store subscription callback parameter key or value is not of type string");
24 | return;
25 | }
26 | this.callbackParameters.push(key);
27 | this.callbackParameters.push(value);
28 | };
29 |
30 | AdjustPlayStoreSubscription.prototype.addPartnerParameter = function(key, value) {
31 | if (typeof key !== 'string' || typeof value !== 'string') {
32 | console.log("[Adjust] Play Store subscription partner parameter key or value is not of type string");
33 | return;
34 | }
35 | this.partnerParameters.push(key);
36 | this.partnerParameters.push(value);
37 | };
38 |
39 | module.exports = AdjustPlayStoreSubscription;
40 |
--------------------------------------------------------------------------------
/www/adjust_store_info.js:
--------------------------------------------------------------------------------
1 | function AdjustStoreInfo(storeName) {
2 | this.storeName = storeName;
3 | this.storeAppId = null;
4 | }
5 |
6 | AdjustStoreInfo.prototype.setStoreAppId = function(storeAppId) {
7 | this.storeAppId = storeAppId;
8 | };
9 |
10 | module.exports = AdjustStoreInfo;
11 |
--------------------------------------------------------------------------------
/www/adjust_third_party_sharing.js:
--------------------------------------------------------------------------------
1 | function AdjustThirdPartySharing(isEnabled) {
2 | if (isEnabled == null) {
3 | this.isEnabled = undefined;
4 | } else {
5 | this.isEnabled = isEnabled == true ? "true" : "false";
6 | }
7 | this.granularOptions = [];
8 | this.partnerSharingSettings = [];
9 | }
10 |
11 | AdjustThirdPartySharing.prototype.addGranularOption = function(partnerName, key, value) {
12 | if (typeof partnerName !== 'string' || typeof key !== 'string' || typeof value !== 'string') {
13 | console.log("[Adjust] Granular option parameterName, key or value is not of a type string");
14 | return;
15 | }
16 | this.granularOptions.push(partnerName);
17 | this.granularOptions.push(key);
18 | this.granularOptions.push(value);
19 | };
20 |
21 | AdjustThirdPartySharing.prototype.addPartnerSharingSetting = function(partnerName, key, value) {
22 | if (typeof partnerName !== 'string' || typeof key !== 'string' || typeof value !== 'boolean') {
23 | console.log("[Adjust] Partner sharing setting parameters are not of a proper data type");
24 | return;
25 | }
26 | this.partnerSharingSettings.push(partnerName);
27 | this.partnerSharingSettings.push(key);
28 | this.partnerSharingSettings.push(value);
29 | };
30 |
31 | module.exports = AdjustThirdPartySharing;
32 |
--------------------------------------------------------------------------------