├── platforms
├── android
│ └── include.gradle
└── ios
│ ├── Podfile
│ └── typings
│ └── objc!GDPerformanceView.d.ts
├── .npmignore
├── demo
├── app
│ ├── app.ts
│ ├── App_Resources
│ │ ├── iOS
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ ├── icon-29.png
│ │ │ │ │ ├── icon-40.png
│ │ │ │ │ ├── icon-50.png
│ │ │ │ │ ├── icon-57.png
│ │ │ │ │ ├── icon-72.png
│ │ │ │ │ ├── icon-76.png
│ │ │ │ │ ├── icon-29@2x.png
│ │ │ │ │ ├── icon-29@3x.png
│ │ │ │ │ ├── icon-40@2x.png
│ │ │ │ │ ├── icon-40@3x.png
│ │ │ │ │ ├── icon-50@2x.png
│ │ │ │ │ ├── icon-57@2x.png
│ │ │ │ │ ├── icon-60@2x.png
│ │ │ │ │ ├── icon-60@3x.png
│ │ │ │ │ ├── icon-72@2x.png
│ │ │ │ │ ├── icon-76@2x.png
│ │ │ │ │ ├── icon-83.5@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── LaunchImage.launchimage
│ │ │ │ │ ├── Default.png
│ │ │ │ │ ├── Default@2x.png
│ │ │ │ │ ├── Default-568h@2x.png
│ │ │ │ │ ├── Default-667h@2x.png
│ │ │ │ │ ├── Default-736h@3x.png
│ │ │ │ │ ├── Default-Portrait.png
│ │ │ │ │ ├── Default-Landscape.png
│ │ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ │ ├── Default-Landscape@2x.png
│ │ │ │ │ ├── Default-Landscape@3x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── LaunchScreen.Center.imageset
│ │ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ │ ├── LaunchScreen-Center@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ └── LaunchScreen.AspectFill.imageset
│ │ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ │ ├── LaunchScreen-AspectFill@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ ├── build.xcconfig
│ │ │ ├── Info.plist
│ │ │ └── LaunchScreen.storyboard
│ │ └── Android
│ │ │ ├── src
│ │ │ └── main
│ │ │ │ ├── res
│ │ │ │ ├── values-v21
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── drawable-hdpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── drawable-ldpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── values
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ └── drawable-nodpi
│ │ │ │ │ └── splash_screen.xml
│ │ │ │ └── AndroidManifest.xml
│ │ │ └── app.gradle
│ ├── app.css
│ ├── main-page.ts
│ ├── tests
│ │ └── tests.js
│ ├── main-page.xml
│ ├── main-view-model.ts
│ └── package.json
├── tsconfig.tns.json
├── package.json
├── tsconfig.json
└── karma.conf.js
├── .gitignore
├── references.d.ts
├── index.d.ts
├── performance-monitor.android.d.ts
├── performance-monitor.ios.d.ts
├── performance-monitor.common.ts
├── performance-monitor.common.d.ts
├── tsconfig.json
├── LICENSE
├── performance-monitor.android.ts
├── package.json
├── performance-monitor.ios.ts
└── README.md
/platforms/android/include.gradle:
--------------------------------------------------------------------------------
1 | android {
2 |
3 | }
4 |
5 | dependencies {
6 | compile 'jp.wasabeef:takt:2.0.1'
7 | }
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .vscode
3 | demo/
4 | screenshots/
5 | *.gif
6 | *.png
7 | *.log
8 | *.map
9 | *.ts
10 | !*.d.ts
11 |
--------------------------------------------------------------------------------
/demo/app/app.ts:
--------------------------------------------------------------------------------
1 | import * as application from "tns-core-modules/application";
2 |
3 | application.run({moduleName: "main-page"});
4 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/platforms/ios/Podfile:
--------------------------------------------------------------------------------
1 | pod 'GDPerformanceView', :git => 'https://github.com/EddyVerbruggen/GDPerformanceView.git', :commit => '5d3281f1bb3fb66fa0a3a6ed7ef331eb135ecd17'
2 |
--------------------------------------------------------------------------------
/demo/tsconfig.tns.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig",
3 | "compilerOptions": {
4 | "module": "es2015",
5 | "moduleResolution": "node"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .vscode
3 | *.js
4 | *.js.map
5 | *.log
6 | !scripts/*.js
7 | demo/app/*.js
8 | !demo/karma.conf.js
9 | !demo/app/tests/*.js
10 | demo/*.d.ts
11 | demo/lib
12 | demo/platforms
13 | demo/node_modules
14 | node_modules
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/references.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | ///
5 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | android {
2 | defaultConfig {
3 | generatedDensities = []
4 | applicationId = "org.nativescript.starter"
5 | }
6 | aaptOptions {
7 | additionalParameters "--no-version-vectors"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVerbruggen/nativescript-performance-monitor/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/index.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * iOS and Android apis should match.
3 | * It doesn't matter if you export `.ios` or `.android`, either one but only one.
4 | */
5 | export * from './performance-monitor.ios';
6 |
7 | // Export any shared classes, constants, etc.
8 | export * from './performance-monitor.common';
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/performance-monitor.android.d.ts:
--------------------------------------------------------------------------------
1 | import { PerformanceMonitorApi, PerformanceMonitorStartOptions } from "./performance-monitor.common";
2 | export declare class PerformanceMonitor implements PerformanceMonitorApi {
3 | start(options?: PerformanceMonitorStartOptions): Promise;
4 | stop(): Promise;
5 | }
6 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/build.xcconfig:
--------------------------------------------------------------------------------
1 | // You can add custom settings here
2 | // for example you can uncomment the following line to force distribution code signing
3 | // CODE_SIGN_IDENTITY = iPhone Distribution
4 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
5 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
6 |
--------------------------------------------------------------------------------
/performance-monitor.ios.d.ts:
--------------------------------------------------------------------------------
1 | import { PerformanceMonitorApi, PerformanceMonitorStartOptions } from "./performance-monitor.common";
2 | export declare class PerformanceMonitor implements PerformanceMonitorApi {
3 | private _monitor;
4 | private _delegate;
5 | start(options?: PerformanceMonitorStartOptions): Promise;
6 | stop(): Promise;
7 | }
8 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/app.css:
--------------------------------------------------------------------------------
1 | Page {
2 | background-color: aliceblue;
3 | }
4 |
5 | .outer {
6 | padding: 40;
7 | }
8 |
9 | .message {
10 | color: #000;
11 | font-size: 20;
12 | horizontal-align: center;
13 | padding:20;
14 | }
15 |
16 | Button {
17 | background-color: #3598db;
18 | color: #ffffff;
19 | padding: 8 16;
20 | margin: 8;
21 | font-size: 14;
22 | border-radius: 4;
23 | }
--------------------------------------------------------------------------------
/demo/app/main-page.ts:
--------------------------------------------------------------------------------
1 | import * as observable from "tns-core-modules/data/observable";
2 | import * as pages from "tns-core-modules/ui/page";
3 | import { HelloWorldModel } from "./main-view-model";
4 |
5 | // Event handler for Page 'loaded' event attached in main-page.xml
6 | export function pageLoaded(args: observable.EventData) {
7 | // Get the event sender
8 | let page = args.object;
9 | page.bindingContext = new HelloWorldModel();
10 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-Center.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-Center@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-AspectFill.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-AspectFill@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/performance-monitor.common.ts:
--------------------------------------------------------------------------------
1 | import { Color } from "tns-core-modules/color";
2 |
3 | export interface PerformanceMonitorSample {
4 | fps?: number;
5 | cpu?: number;
6 | }
7 |
8 | export interface PerformanceMonitorStartOptions {
9 | onSample?: (PerformanceMonitorSample) => void;
10 | hide?: boolean;
11 | backgroundColor?: Color;
12 | textColor?: Color;
13 | borderColor?: Color;
14 | }
15 |
16 | export interface PerformanceMonitorApi {
17 | start(options?: PerformanceMonitorStartOptions): Promise;
18 | stop(): Promise;
19 | }
--------------------------------------------------------------------------------
/performance-monitor.common.d.ts:
--------------------------------------------------------------------------------
1 | import { Color } from "tns-core-modules/color";
2 | export interface PerformanceMonitorSample {
3 | fps?: number;
4 | cpu?: number;
5 | }
6 | export interface PerformanceMonitorStartOptions {
7 | onSample?: (PerformanceMonitorSample: any) => void;
8 | hide?: boolean;
9 | backgroundColor?: Color;
10 | textColor?: Color;
11 | borderColor?: Color;
12 | }
13 | export interface PerformanceMonitorApi {
14 | start(options?: PerformanceMonitorStartOptions): Promise;
15 | stop(): Promise;
16 | }
17 |
--------------------------------------------------------------------------------
/demo/app/tests/tests.js:
--------------------------------------------------------------------------------
1 | var PerfMon = require("nativescript-performance-monitor").PerformanceMonitor;
2 | var performanceMonitor = new PerfMon();
3 |
4 | describe("start", function() {
5 | it("exists", function() {
6 | expect(performanceMonitor.start).toBeDefined();
7 | });
8 |
9 | it("returns a promise", function() {
10 | expect(performanceMonitor.start()).toEqual(jasmine.any(Promise));
11 | });
12 | });
13 |
14 | describe("stop", function() {
15 | it("exists", function() {
16 | expect(performanceMonitor.stop).toBeDefined();
17 | });
18 |
19 | it("returns a promise", function() {
20 | expect(performanceMonitor.stop()).toEqual(jasmine.any(Promise));
21 | });
22 | });
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "nativescript": {
3 | "id": "org.nativescript.PerfMon",
4 | "tns-ios": {
5 | "version": "6.2.0"
6 | },
7 | "tns-android": {
8 | "version": "6.2.0"
9 | }
10 | },
11 | "dependencies": {
12 | "nativescript-performance-monitor": "file:..",
13 | "nativescript-unit-test-runner": "0.7.0",
14 | "tns-core-modules": "~6.2.0"
15 | },
16 | "devDependencies": {
17 | "babel-traverse": "6.12.0",
18 | "babel-types": "6.11.1",
19 | "babylon": "6.8.4",
20 | "filewalker": "0.1.2",
21 | "jasmine-core": "^2.5.2",
22 | "karma": "4.1.0",
23 | "karma-jasmine": "2.0.1",
24 | "karma-nativescript-launcher": "^0.4.0",
25 | "lazy": "1.0.11",
26 | "tns-platform-declarations": "~6.2.0",
27 | "typescript": "3.4.5",
28 | "nativescript-dev-webpack": "~1.3.0",
29 | "karma-webpack": "3.0.5"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/demo/app/main-page.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "commonjs",
5 | "declaration": true,
6 | "removeComments": true,
7 | "noLib": false,
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "skipLibCheck": true,
11 | "lib": [
12 | "es2016"
13 | ],
14 | "sourceMap": true,
15 | "pretty": true,
16 | "allowUnreachableCode": false,
17 | "allowUnusedLabels": false,
18 | "noEmitHelpers": true,
19 | "noEmitOnError": false,
20 | "noImplicitAny": false,
21 | "noImplicitReturns": true,
22 | "noImplicitUseStrict": false,
23 | "noFallthroughCasesInSwitch": true,
24 | "typeRoots": [
25 | "./node_modules/@types",
26 | "./node_modules"
27 | ],
28 | "types": [
29 | ]
30 | },
31 | "exclude": [
32 | "demo",
33 | "node_modules"
34 | ],
35 | "compileOnSave": false
36 | }
--------------------------------------------------------------------------------
/demo/app/main-view-model.ts:
--------------------------------------------------------------------------------
1 | import { PerformanceMonitor, PerformanceMonitorSample } from "nativescript-performance-monitor";
2 | import { Color } from 'tns-core-modules/color';
3 | import { Observable } from "tns-core-modules/data/observable";
4 |
5 | export class HelloWorldModel extends Observable {
6 | private performanceMonitor: PerformanceMonitor;
7 |
8 | constructor() {
9 | super();
10 | this.performanceMonitor = new PerformanceMonitor();
11 | }
12 |
13 | public onStartTap() {
14 | this.set("active", true);
15 | this.performanceMonitor.start({
16 | textColor: new Color("white"),
17 | backgroundColor: new Color("black"),
18 | borderColor: new Color("black"),
19 | hide: false,
20 | onSample: (sample: PerformanceMonitorSample) => {
21 | this.set("fps", sample.fps);
22 | if (sample.cpu) {
23 | this.set("cpu", sample.cpu);
24 | }
25 | }
26 | });
27 | }
28 |
29 | public onStopTap() {
30 | this.set("active", false);
31 | this.performanceMonitor.stop();
32 | }
33 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | nativescript-performance-monitor
4 | Copyright (c) 2017, Eddy Verbruggen
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | this software and associated documentation files (the "Software"), to deal in
8 | the Software without restriction, including without limitation the rights to
9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10 | the Software, and to permit persons to whom the Software is furnished to do so,
11 | subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "commonjs",
5 | "declaration": false,
6 | "removeComments": true,
7 | "noLib": false,
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "skipLibCheck": true,
11 | "lib": [
12 | "es6",
13 | "dom",
14 | "es2015.iterable"
15 | ],
16 | "pretty": true,
17 | "allowUnreachableCode": false,
18 | "allowUnusedLabels": false,
19 | "noEmitHelpers": true,
20 | "noEmitOnError": false,
21 | "noImplicitAny": false,
22 | "noImplicitReturns": true,
23 | "noImplicitUseStrict": false,
24 | "noFallthroughCasesInSwitch": true,
25 | "typeRoots": [
26 | "./node_modules/@types",
27 | "./node_modules"
28 | ],
29 | "types": [],
30 | "baseUrl": ".",
31 | "paths": {
32 | "*": [
33 | "./node_modules/tns-core-modules/*",
34 | "./node_modules/*"
35 | ],
36 | "~/*": [
37 | "app/*"
38 | ]
39 | }
40 | },
41 | "exclude": [
42 | "node_modules",
43 | "platforms"
44 | ],
45 | "compileOnSave": false
46 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/performance-monitor.android.ts:
--------------------------------------------------------------------------------
1 | import { PerformanceMonitorApi, PerformanceMonitorStartOptions } from "./performance-monitor.common";
2 | import * as appModule from "tns-core-modules/application";
3 |
4 | declare let jp: any;
5 |
6 | /**
7 | * See https://github.com/wasabeef/Takt
8 | */
9 | export class PerformanceMonitor implements PerformanceMonitorApi {
10 |
11 | public start(options?: PerformanceMonitorStartOptions): Promise {
12 | return new Promise((resolve, reject) => {
13 | // needs a little delay on certain devices, otherwise it hides again almost instantly
14 | setTimeout(() => {
15 | let opts = options || {};
16 |
17 | let monitor = jp.wasabeef.takt.Takt.stock(appModule.android.nativeApp);
18 |
19 | // TODO add as option
20 | monitor.seat(jp.wasabeef.takt.Seat.TOP_CENTER);
21 |
22 | if (opts.textColor) {
23 | monitor.color(opts.textColor.android);
24 | }
25 | monitor.size(15.0);
26 | monitor.alpha(0.7);
27 |
28 | if (opts.onSample) {
29 | monitor.listener(new jp.wasabeef.takt.Audience({
30 | heartbeat: function (fps: number) {
31 | opts.onSample({
32 | fps: Math.round(fps * 10) / 10
33 | });
34 | }
35 | }))
36 | }
37 |
38 | if (opts.hide) {
39 | monitor.hide();
40 | }
41 |
42 | monitor.play();
43 | resolve();
44 | }, 3000);
45 | });
46 | }
47 |
48 | public stop(): Promise {
49 | return new Promise((resolve, reject) => {
50 | jp.wasabeef.takt.Takt.finish();
51 | resolve();
52 | });
53 | }
54 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiresFullScreen
28 |
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 |
47 |
48 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-performance-monitor",
3 | "version": "1.1.0",
4 | "description": "Measure and show FPS and (on iOS) CPU usage.",
5 | "main": "performance-monitor",
6 | "typings": "index.d.ts",
7 | "nativescript": {
8 | "platforms": {
9 | "android": "2.3.0",
10 | "ios": "2.3.0"
11 | }
12 | },
13 | "scripts": {
14 | "build": "tsc",
15 | "demo.ios": "npm run preparedemo && cd demo && tns emulate ios --device \"iPhone SE\"",
16 | "demo.ios.device": "npm run preparedemo && cd demo && tns run ios",
17 | "demo.android": "npm run preparedemo && cd demo && tns run android",
18 | "test.ios": "cd demo && tns test ios --emulator",
19 | "test.ios.device": "cd demo && tns test ios",
20 | "test.android": "cd demo && tns test android",
21 | "preparedemo": "npm run build && cd demo && tns plugin remove nativescript-performance-monitor && tns plugin add .. && tns install",
22 | "setup": "npm i && cd demo && npm i && cd .. && npm run build && cd demo && tns plugin add .. && cd ..",
23 | "generate.typings.ios": "cd demo && TNS_DEBUG_METADATA_PATH=\"$(pwd)/metadata\" tns build ios && TNS_TYPESCRIPT_DECLARATIONS_PATH=\"$(pwd)/typings\" tns build ios",
24 | "generate.typings.android": "java -jar ../../android-dts-generator/dts-generator/build/libs/dts-generator.jar -input ./classes.jar -output platforms/android/typings/ && rimraf classes.jar"
25 | },
26 | "repository": {
27 | "type": "git",
28 | "url": "https://github.com/EddyVerbruggen/nativescript-performance-monitor.git"
29 | },
30 | "keywords": [
31 | "ecosystem:NativeScript",
32 | "NativeScript",
33 | "iOS",
34 | "Android",
35 | "Performance",
36 | "FPS",
37 | "CPU"
38 | ],
39 | "author": {
40 | "name": "Eddy Verbruggen",
41 | "email": "eddyverbruggen@gmail.com"
42 | },
43 | "bugs": {
44 | "url": "https://github.com/EddyVerbruggen/nativescript-performance-monitor/issues"
45 | },
46 | "license": "MIT",
47 | "homepage": "https://github.com/EddyVerbruggen/nativescript-performance-monitor",
48 | "readmeFilename": "README.md",
49 | "devDependencies": {
50 | "tns-core-modules": "~6.2.0",
51 | "tns-platform-declarations": "~6.2.0",
52 | "typescript": "~3.4.5",
53 | "prompt": "^1.0.0",
54 | "rimraf": "^2.5.0"
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/performance-monitor.ios.ts:
--------------------------------------------------------------------------------
1 | import { PerformanceMonitorApi, PerformanceMonitorSample, PerformanceMonitorStartOptions } from "./performance-monitor.common";
2 |
3 | export class PerformanceMonitor implements PerformanceMonitorApi {
4 | private _monitor: GDPerformanceMonitor;
5 | private _delegate: GDPerformanceMonitorDelegate;
6 |
7 | public start(options?: PerformanceMonitorStartOptions): Promise {
8 | return new Promise((resolve, reject) => {
9 | let opts = options || {};
10 | this._monitor = GDPerformanceMonitor.new();
11 |
12 | this._monitor.startMonitoringWithConfiguration((label) => {
13 | if (opts.backgroundColor) {
14 | label.backgroundColor = opts.backgroundColor.ios;
15 | }
16 | if (opts.textColor) {
17 | label.textColor = opts.textColor.ios;
18 | }
19 | if (opts.borderColor) {
20 | label.layer.borderColor = opts.borderColor.ios.CGColor;
21 | }
22 | });
23 |
24 | this._monitor.appVersionHidden = true;
25 | this._monitor.deviceVersionHidden = true;
26 |
27 | if (opts.onSample) {
28 | this._delegate = GDPerformanceMonitorDelegateImpl.initWithOwnerAndCallback(new WeakRef(this), opts.onSample);
29 | this._monitor.delegate = this._delegate;
30 | }
31 |
32 | if (opts.hide) {
33 | this._monitor.hideMonitoring();
34 | }
35 |
36 | resolve();
37 | });
38 | }
39 |
40 | public stop(): Promise {
41 | return new Promise((resolve, reject) => {
42 | if (this._monitor) {
43 | this._monitor.stopMonitoring();
44 | resolve();
45 | } else {
46 | reject();
47 | }
48 | });
49 | }
50 | }
51 |
52 | class GDPerformanceMonitorDelegateImpl extends NSObject implements GDPerformanceMonitorDelegate {
53 | public static ObjCProtocols = [GDPerformanceMonitorDelegate];
54 |
55 | private _owner: WeakRef;
56 | private _callback: (sample: PerformanceMonitorSample) => void;
57 |
58 | public static initWithOwnerAndCallback(owner: WeakRef, callback: (PerformanceMonitorSample) => void): GDPerformanceMonitorDelegateImpl {
59 | let delegate = GDPerformanceMonitorDelegateImpl.new();
60 | delegate._owner = owner;
61 | delegate._callback = callback;
62 | return delegate;
63 | }
64 |
65 | static new(): GDPerformanceMonitorDelegateImpl {
66 | return super.new();
67 | }
68 |
69 | public performanceMonitorDidReportFPSCPU(fps: number, cpu: number) {
70 | if (this._callback && fps >= 0) {
71 | this._callback({
72 | fps: fps,
73 | cpu: Math.round(cpu * 10) / 10
74 | });
75 | }
76 | }
77 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "icon-29.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "icon-29@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29@3x.png",
19 | "scale" : "3x"
20 | },
21 | {
22 | "size" : "40x40",
23 | "idiom" : "iphone",
24 | "filename" : "icon-40@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "icon-40@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "57x57",
35 | "idiom" : "iphone",
36 | "filename" : "icon-57.png",
37 | "scale" : "1x"
38 | },
39 | {
40 | "size" : "57x57",
41 | "idiom" : "iphone",
42 | "filename" : "icon-57@2x.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "icon-60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "icon-60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "29x29",
59 | "idiom" : "ipad",
60 | "filename" : "icon-29.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "29x29",
65 | "idiom" : "ipad",
66 | "filename" : "icon-29@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "40x40",
71 | "idiom" : "ipad",
72 | "filename" : "icon-40.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "40x40",
77 | "idiom" : "ipad",
78 | "filename" : "icon-40@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "50x50",
83 | "idiom" : "ipad",
84 | "filename" : "icon-50.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "50x50",
89 | "idiom" : "ipad",
90 | "filename" : "icon-50@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "72x72",
95 | "idiom" : "ipad",
96 | "filename" : "icon-72.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "72x72",
101 | "idiom" : "ipad",
102 | "filename" : "icon-72@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "76x76",
107 | "idiom" : "ipad",
108 | "filename" : "icon-76.png",
109 | "scale" : "1x"
110 | },
111 | {
112 | "size" : "76x76",
113 | "idiom" : "ipad",
114 | "filename" : "icon-76@2x.png",
115 | "scale" : "2x"
116 | },
117 | {
118 | "size" : "83.5x83.5",
119 | "idiom" : "ipad",
120 | "filename" : "icon-83.5@2x.png",
121 | "scale" : "2x"
122 | }
123 | ],
124 | "info" : {
125 | "version" : 1,
126 | "author" : "xcode"
127 | }
128 | }
--------------------------------------------------------------------------------
/demo/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tns-template-hello-world-ts",
3 | "main": "app.js",
4 | "version": "1.6.0",
5 | "author": {
6 | "name": "Telerik",
7 | "email": "support@telerik.com"
8 | },
9 | "description": "Nativescript hello-world-ts project template",
10 | "license": "Apache-2.0",
11 | "keywords": [
12 | "telerik",
13 | "mobile",
14 | "nativescript",
15 | "{N}",
16 | "tns",
17 | "appbuilder",
18 | "template"
19 | ],
20 | "repository": {
21 | "type": "git",
22 | "url": "git+ssh://git@github.com/NativeScript/template-hello-world-ts.git"
23 | },
24 | "bugs": {
25 | "url": "https://github.com/NativeScript/template-hello-world-ts/issues"
26 | },
27 | "homepage": "https://github.com/NativeScript/template-hello-world-ts",
28 | "android": {
29 | "v8Flags": "--expose_gc",
30 | "markingMode": "none"
31 | },
32 | "devDependencies": {
33 | "nativescript-dev-typescript": "^0.3.0"
34 | },
35 | "_id": "tns-template-hello-world-ts@1.6.0",
36 | "_shasum": "a567c2b9a56024818c06596dab9629d155c5b8a8",
37 | "_resolved": "https://registry.npmjs.org/tns-template-hello-world-ts/-/tns-template-hello-world-ts-1.6.0.tgz",
38 | "_from": "tns-template-hello-world-ts@latest",
39 | "scripts": {},
40 | "_npmVersion": "2.14.7",
41 | "_nodeVersion": "4.2.2",
42 | "_npmUser": {
43 | "name": "enchev",
44 | "email": "vladimir.enchev@gmail.com"
45 | },
46 | "dist": {
47 | "shasum": "a567c2b9a56024818c06596dab9629d155c5b8a8",
48 | "tarball": "http://registry.npmjs.org/tns-template-hello-world-ts/-/tns-template-hello-world-ts-1.6.0.tgz"
49 | },
50 | "maintainers": [
51 | {
52 | "name": "enchev",
53 | "email": "vladimir.enchev@gmail.com"
54 | },
55 | {
56 | "name": "erjangavalji",
57 | "email": "erjan.gavalji@gmail.com"
58 | },
59 | {
60 | "name": "fatme",
61 | "email": "hfatme@gmail.com"
62 | },
63 | {
64 | "name": "hdeshev",
65 | "email": "hristo@deshev.com"
66 | },
67 | {
68 | "name": "kerezov",
69 | "email": "d.kerezov@gmail.com"
70 | },
71 | {
72 | "name": "ligaz",
73 | "email": "stefan.dobrev@gmail.com"
74 | },
75 | {
76 | "name": "nsndeck",
77 | "email": "nedyalko.nikolov@telerik.com"
78 | },
79 | {
80 | "name": "rosen-vladimirov",
81 | "email": "rosen.vladimirov.91@gmail.com"
82 | },
83 | {
84 | "name": "sdobrev",
85 | "email": "stefan.dobrev@gmail.com"
86 | },
87 | {
88 | "name": "tailsu",
89 | "email": "tailsu@gmail.com"
90 | },
91 | {
92 | "name": "teobugslayer",
93 | "email": "teobugslayer@gmail.com"
94 | },
95 | {
96 | "name": "valio.stoychev",
97 | "email": "valio.stoychev@gmail.com"
98 | }
99 | ],
100 | "_npmOperationalInternal": {
101 | "host": "packages-5-east.internal.npmjs.com",
102 | "tmp": "tmp/tns-template-hello-world-ts-1.6.0.tgz_1455717516189_0.6427943941671401"
103 | },
104 | "directories": {},
105 | "readme": "ERROR: No README data found!"
106 | }
107 |
--------------------------------------------------------------------------------
/demo/karma.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function (config) {
2 | const options = {
3 |
4 | // base path that will be used to resolve all patterns (eg. files, exclude)
5 | basePath: '',
6 |
7 |
8 | // frameworks to use
9 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
10 | frameworks: ['jasmine'],
11 |
12 |
13 | // list of files / patterns to load in the browser
14 | files: ['app/tests/**/*.*'],
15 |
16 |
17 | // list of files to exclude
18 | exclude: [
19 | ],
20 |
21 |
22 | // preprocess matching files before serving them to the browser
23 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
24 | preprocessors: {
25 | },
26 |
27 |
28 | // test results reporter to use
29 | // possible values: 'dots', 'progress'
30 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter
31 | reporters: ['progress'],
32 |
33 |
34 | // web server port
35 | port: 9876,
36 |
37 |
38 | // enable / disable colors in the output (reporters and logs)
39 | colors: true,
40 |
41 |
42 | // level of logging
43 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
44 | logLevel: config.LOG_INFO,
45 |
46 |
47 | // enable / disable watching file and executing tests whenever any file changes
48 | autoWatch: true,
49 |
50 |
51 | // start these browsers
52 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
53 | browsers: [],
54 |
55 | customLaunchers: {
56 | android: {
57 | base: 'NS',
58 | platform: 'android'
59 | },
60 | ios: {
61 | base: 'NS',
62 | platform: 'ios'
63 | },
64 | ios_simulator: {
65 | base: 'NS',
66 | platform: 'ios',
67 | arguments: ['--emulator']
68 | }
69 | },
70 |
71 | // Continuous Integration mode
72 | // if true, Karma captures browsers, runs the tests and exits
73 | singleRun: false
74 | };
75 |
76 | setWebpackPreprocessor(config, options);
77 | setWebpack(config, options);
78 |
79 | config.set(options);
80 | }
81 |
82 | function setWebpackPreprocessor(config, options) {
83 | if (config && config.bundle) {
84 | if (!options.preprocessors) {
85 | options.preprocessors = {};
86 | }
87 |
88 | options.files.forEach(file => {
89 | if (!options.preprocessors[file]) {
90 | options.preprocessors[file] = [];
91 | }
92 | options.preprocessors[file].push('webpack');
93 | });
94 | }
95 | }
96 |
97 | function setWebpack(config, options) {
98 | if (config && config.bundle) {
99 | const env = {};
100 | env[config.platform] = true;
101 | env.sourceMap = config.debugBrk;
102 | env.appPath = config.appPath;
103 | options.webpack = require('./webpack.config')(env);
104 | delete options.webpack.entry;
105 | delete options.webpack.output.libraryTarget;
106 | const invalidPluginsForUnitTesting = ["GenerateBundleStarterPlugin", "GenerateNativeScriptEntryPointsPlugin"];
107 | options.webpack.plugins = options.webpack.plugins.filter(p => !invalidPluginsForUnitTesting.includes(p.constructor.name));
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # NativeScript Performance Monitor
2 | Measure and show FPS and (on iOS) CPU usage!
3 |
4 | [](https://www.youtube.com/watch?v=qeqWDWCYbvY)
5 |
6 | _20 sec video, showing off the plugin on iOS and Android_
7 |
8 | ## Installation
9 | From the command prompt go to your app's root folder and execute:
10 |
11 | ```
12 | tns plugin add nativescript-performance-monitor
13 | ```
14 |
15 | ## Start monitoring
16 | After adding the plugin you can start monitoring from code. There are a few options you can pass in as well (the options object itself is optional as well):
17 |
18 | | Option | iOS? | Android? | Description
19 | --- | --- | --- | ---
20 | | `onSample?` | :white_check_mark: | :white_check_mark: | A callback function that gets invoked on every sample. If you don't want to use the default UI of this plugin you can use this to render your own UI. See the examples below for the function spec.
21 | | `hide?` | :white_check_mark: | :white_check_mark: | Set to `true` if you don't want the default UI to show. So roll your own or go ito stealth mode entirely.
22 | | `textColor?` | :white_check_mark: | :white_check_mark: | The text color of the monitor view (default white).
23 | | `backgroundColor?` | :white_check_mark: | :white_medium_square: | Background color of the monitor view (default black).
24 | | `borderColor?` | :white_check_mark: | :white_medium_square: | The border color of the monitor view (default black).
25 |
26 | ### TypeScript
27 |
28 | ```js
29 | import { PerformanceMonitor, PerformanceMonitorSample } from 'nativescript-performance-monitor';
30 | import { Color } from "color";
31 |
32 | const performanceMonitor: PerformanceMonitor = new PerformanceMonitor();
33 |
34 | // this would suffice..
35 | performanceMonitor.start();
36 |
37 | // .. but we want to show off the options ;)
38 | performanceMonitor.start({
39 | textColor: new Color("white"),
40 | backgroundColor: new Color("black"),
41 | borderColor: new Color("black"),
42 | hide: false,
43 | onSample: (sample: PerformanceMonitorSample) => {
44 | console.log("FPS: " + sample.fps);
45 | if (sample.cpu) { // iOS only
46 | console.log("CPU %: " + sample.cpu);
47 | }
48 | }
49 | });
50 | ```
51 |
52 | ### JavaScript
53 |
54 | ```js
55 | var perfMon = require("nativescript-performance-monitor");
56 | var color = require("color");
57 |
58 | var performanceMonitor = new perfMon.PerformanceMonitor();
59 |
60 | performanceMonitor.start({
61 | textColor: new color.Color("white"),
62 | backgroundColor: new color.Color("black"),
63 | borderColor: new color.Color("black"),
64 | hide: false,
65 | onSample: function (sample) {
66 | console.log("FPS: " + sample.fps);
67 | if (sample.cpu) { // iOS only
68 | console.log("CPU %: " + sample.cpu);
69 | }
70 | }
71 | });
72 | ```
73 |
74 | ## Stop monitoring
75 | To stop receiving measurements and hide the monitor UI you can simply do this:
76 |
77 | ```js
78 | performanceMonitor.stop();
79 | ```
80 |
81 | ## Usage with Angular
82 | In any component, or even `app.module.ts` add:
83 |
84 | ```js
85 | import { PerformanceMonitor } from "nativescript-performance-monitor";
86 |
87 | export class MyComponent {
88 | // use the constructor, or OnInit, or trigger from a button, or whatever really
89 | constructor() {
90 | new PerformanceMonitor().start({
91 | // options
92 | });
93 | }
94 | }
95 | ```
96 |
97 | ## Known issues (Android)
98 | - May crash when a Toast is shown on newer Android versions while you're using the default UI.
99 | - UI will hide when app is pauzed / resumed.
100 |
101 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/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 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/platforms/ios/typings/objc!GDPerformanceView.d.ts:
--------------------------------------------------------------------------------
1 |
2 | declare class GDMarginLabel extends UILabel {
3 |
4 | static alloc(): GDMarginLabel; // inherited from NSObject
5 |
6 | static appearance(): GDMarginLabel; // inherited from UIAppearance
7 |
8 | static appearanceForTraitCollection(trait: UITraitCollection): GDMarginLabel; // inherited from UIAppearance
9 |
10 | static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): GDMarginLabel; // inherited from UIAppearance
11 |
12 | static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): GDMarginLabel; // inherited from UIAppearance
13 |
14 | static appearanceWhenContainedIn(ContainerClass: typeof NSObject): GDMarginLabel; // inherited from UIAppearance
15 |
16 | static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): GDMarginLabel; // inherited from UIAppearance
17 |
18 | static new(): GDMarginLabel; // inherited from NSObject
19 | }
20 |
21 | declare class GDPerformanceMonitor extends NSObject {
22 |
23 | static alloc(): GDPerformanceMonitor; // inherited from NSObject
24 |
25 | static new(): GDPerformanceMonitor; // inherited from NSObject
26 |
27 | static sharedInstance(): GDPerformanceMonitor;
28 |
29 | appVersionHidden: boolean;
30 |
31 | delegate: GDPerformanceMonitorDelegate;
32 |
33 | deviceVersionHidden: boolean;
34 |
35 | configureStatusBarAppearanceWithPrefersStatusBarHiddenPreferredStatusBarStyle(prefersStatusBarHidden: boolean, preferredStatusBarStyle: number): void;
36 |
37 | configureWithConfiguration(configuration: (p1: UILabel) => void): void;
38 |
39 | hideMonitoring(): void;
40 |
41 | pauseMonitoring(): void;
42 |
43 | startMonitoring(): void;
44 |
45 | startMonitoringWithConfiguration(configuration: (p1: UILabel) => void): void;
46 |
47 | stopMonitoring(): void;
48 | }
49 |
50 | interface GDPerformanceMonitorDelegate extends NSObjectProtocol {
51 |
52 | performanceMonitorDidReportFPSCPU(fpsValue: number, cpuValue: number): void;
53 | }
54 | declare var GDPerformanceMonitorDelegate: {
55 |
56 | prototype: GDPerformanceMonitorDelegate;
57 | };
58 |
59 | declare class GDPerformanceView extends UIWindow {
60 |
61 | static alloc(): GDPerformanceView; // inherited from NSObject
62 |
63 | static appearance(): GDPerformanceView; // inherited from UIAppearance
64 |
65 | static appearanceForTraitCollection(trait: UITraitCollection): GDPerformanceView; // inherited from UIAppearance
66 |
67 | static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): GDPerformanceView; // inherited from UIAppearance
68 |
69 | static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): GDPerformanceView; // inherited from UIAppearance
70 |
71 | static appearanceWhenContainedIn(ContainerClass: typeof NSObject): GDPerformanceView; // inherited from UIAppearance
72 |
73 | static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): GDPerformanceView; // inherited from UIAppearance
74 |
75 | static new(): GDPerformanceView; // inherited from NSObject
76 |
77 | appVersionHidden: boolean;
78 |
79 | deviceVersionHidden: boolean;
80 |
81 | performanceDelegate: GDPerformanceMonitorDelegate;
82 |
83 | preferredStatusBarStyle: UIStatusBarStyle;
84 |
85 | prefersStatusBarHidden: boolean;
86 |
87 | addMonitoringViewAboveStatusBar(): void;
88 |
89 | configureRootViewController(): void;
90 |
91 | hideMonitoring(): void;
92 |
93 | pauseMonitoring(): void;
94 |
95 | resumeMonitoringAndShowMonitoringView(showMonitoringView: boolean): void;
96 |
97 | stopMonitoring(): void;
98 |
99 | textLabel(): UILabel;
100 | }
101 |
102 | declare var GDPerformanceViewVersionNumber: number;
103 |
104 | declare var GDPerformanceViewVersionString: interop.Reference;
105 |
106 | declare class GDWindowViewController extends UIViewController {
107 |
108 | static alloc(): GDWindowViewController; // inherited from NSObject
109 |
110 | static new(): GDWindowViewController; // inherited from NSObject
111 |
112 | configureStatusBarAppearanceWithPrefersStatusBarHiddenPreferredStatusBarStyle(prefersStatusBarHidden: boolean, preferredStatusBarStyle: UIStatusBarStyle): void;
113 | }
114 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "extent" : "full-screen",
5 | "idiom" : "iphone",
6 | "subtype" : "736h",
7 | "filename" : "Default-736h@3x.png",
8 | "minimum-system-version" : "8.0",
9 | "orientation" : "portrait",
10 | "scale" : "3x"
11 | },
12 | {
13 | "extent" : "full-screen",
14 | "idiom" : "iphone",
15 | "subtype" : "736h",
16 | "filename" : "Default-Landscape@3x.png",
17 | "minimum-system-version" : "8.0",
18 | "orientation" : "landscape",
19 | "scale" : "3x"
20 | },
21 | {
22 | "extent" : "full-screen",
23 | "idiom" : "iphone",
24 | "subtype" : "667h",
25 | "filename" : "Default-667h@2x.png",
26 | "minimum-system-version" : "8.0",
27 | "orientation" : "portrait",
28 | "scale" : "2x"
29 | },
30 | {
31 | "orientation" : "portrait",
32 | "idiom" : "iphone",
33 | "filename" : "Default@2x.png",
34 | "extent" : "full-screen",
35 | "minimum-system-version" : "7.0",
36 | "scale" : "2x"
37 | },
38 | {
39 | "extent" : "full-screen",
40 | "idiom" : "iphone",
41 | "subtype" : "retina4",
42 | "filename" : "Default-568h@2x.png",
43 | "minimum-system-version" : "7.0",
44 | "orientation" : "portrait",
45 | "scale" : "2x"
46 | },
47 | {
48 | "orientation" : "portrait",
49 | "idiom" : "ipad",
50 | "filename" : "Default-Portrait.png",
51 | "extent" : "full-screen",
52 | "minimum-system-version" : "7.0",
53 | "scale" : "1x"
54 | },
55 | {
56 | "orientation" : "landscape",
57 | "idiom" : "ipad",
58 | "filename" : "Default-Landscape.png",
59 | "extent" : "full-screen",
60 | "minimum-system-version" : "7.0",
61 | "scale" : "1x"
62 | },
63 | {
64 | "orientation" : "portrait",
65 | "idiom" : "ipad",
66 | "filename" : "Default-Portrait@2x.png",
67 | "extent" : "full-screen",
68 | "minimum-system-version" : "7.0",
69 | "scale" : "2x"
70 | },
71 | {
72 | "orientation" : "landscape",
73 | "idiom" : "ipad",
74 | "filename" : "Default-Landscape@2x.png",
75 | "extent" : "full-screen",
76 | "minimum-system-version" : "7.0",
77 | "scale" : "2x"
78 | },
79 | {
80 | "orientation" : "portrait",
81 | "idiom" : "iphone",
82 | "filename" : "Default.png",
83 | "extent" : "full-screen",
84 | "scale" : "1x"
85 | },
86 | {
87 | "orientation" : "portrait",
88 | "idiom" : "iphone",
89 | "filename" : "Default@2x.png",
90 | "extent" : "full-screen",
91 | "scale" : "2x"
92 | },
93 | {
94 | "orientation" : "portrait",
95 | "idiom" : "iphone",
96 | "filename" : "Default-568h@2x.png",
97 | "extent" : "full-screen",
98 | "subtype" : "retina4",
99 | "scale" : "2x"
100 | },
101 | {
102 | "orientation" : "portrait",
103 | "idiom" : "ipad",
104 | "extent" : "to-status-bar",
105 | "scale" : "1x"
106 | },
107 | {
108 | "orientation" : "portrait",
109 | "idiom" : "ipad",
110 | "filename" : "Default-Portrait.png",
111 | "extent" : "full-screen",
112 | "scale" : "1x"
113 | },
114 | {
115 | "orientation" : "landscape",
116 | "idiom" : "ipad",
117 | "extent" : "to-status-bar",
118 | "scale" : "1x"
119 | },
120 | {
121 | "orientation" : "landscape",
122 | "idiom" : "ipad",
123 | "filename" : "Default-Landscape.png",
124 | "extent" : "full-screen",
125 | "scale" : "1x"
126 | },
127 | {
128 | "orientation" : "portrait",
129 | "idiom" : "ipad",
130 | "extent" : "to-status-bar",
131 | "scale" : "2x"
132 | },
133 | {
134 | "orientation" : "portrait",
135 | "idiom" : "ipad",
136 | "filename" : "Default-Portrait@2x.png",
137 | "extent" : "full-screen",
138 | "scale" : "2x"
139 | },
140 | {
141 | "orientation" : "landscape",
142 | "idiom" : "ipad",
143 | "extent" : "to-status-bar",
144 | "scale" : "2x"
145 | },
146 | {
147 | "orientation" : "landscape",
148 | "idiom" : "ipad",
149 | "filename" : "Default-Landscape@2x.png",
150 | "extent" : "full-screen",
151 | "scale" : "2x"
152 | }
153 | ],
154 | "info" : {
155 | "version" : 1,
156 | "author" : "xcode"
157 | }
158 | }
--------------------------------------------------------------------------------