├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── android
├── .classpath
├── .gitignore
├── .idea
│ ├── .name
│ ├── caches
│ │ ├── build_file_checksums.ser
│ │ └── gradle_models.ser
│ ├── gradle.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── runConfigurations.xml
├── .project
├── .settings
│ └── org.eclipse.buildship.core.prefs
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── anish
│ └── trust_fall
│ ├── Emulator
│ └── EmulatorCheck.java
│ ├── ExternalStorage
│ └── ExternalStorageCheck.java
│ ├── MockLocation
│ └── MockLocationCheck.java
│ ├── Rooted
│ ├── CheckApiVersion.java
│ ├── GreaterThan23.java
│ ├── LessThan23.java
│ └── RootedCheck.java
│ └── TrustFallPlugin.java
├── example
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── .project
│ ├── .settings
│ │ └── org.eclipse.buildship.core.prefs
│ ├── app
│ │ ├── .classpath
│ │ ├── .project
│ │ ├── .settings
│ │ │ └── org.eclipse.buildship.core.prefs
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── anish
│ │ │ │ │ └── trust_fall_example
│ │ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── main.m
├── lib
│ └── main.dart
├── pubspec.lock
├── pubspec.yaml
├── res
│ └── values
│ │ └── strings_en.arb
└── test
│ └── widget_test.dart
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ ├── TrustFallPlugin.h
│ └── TrustFallPlugin.m
└── trust_fall.podspec
├── lib
├── generated
│ └── i18n.dart
└── trust_fall.dart
├── pubspec.lock
├── pubspec.yaml
├── res
└── values
│ └── strings_en.arb
├── test
└── trust_fall_test.dart
└── trust_fall.iml
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 | .idea/
9 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 1.0.4
2 | * Updated README.md
3 |
4 | ## 1.0.3
5 | * Updated README.md
6 |
7 | ## 1.0.2
8 | * Added AndroidX support
9 | * Fixed mock location issue
10 | * More accurate mock location detection
11 |
12 | ## 1.0.1
13 | * Removed default platformVersion functionality
14 | * Made changes in to test file
15 |
16 | ## 1.0.0
17 | * Added comments
18 | * Changed README.md
19 |
20 | ## 0.0.1
21 |
22 | * Initial Release
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2019 anish-adm
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # trust_fall
2 |
3 | A Flutter plugin for detecting the trust fall of the device(Jailbroken, root, emulator and mock location detection).
4 |
5 | Uses [RootBeer](https://github.com/scottyab/rootbeer) for Android root detection and [DTTJailbreakDetection](https://github.com/thii/DTTJailbreakDetection) for iOS jailbreak detection.
6 | Inspired by [jail-monkey](https://github.com/GantMan/jail-monkey) and [this blog article](http://blog.geomoby.com/2015/01/25/how-to-avoid-getting-your-location-based-app-spoofed/)
7 |
8 | ## Getting Started
9 |
10 | In your flutter project add the dependency:
11 |
12 | ```yml
13 | dependencies:
14 | ...
15 | trust_fall: ^1.0.4
16 | ```
17 |
18 |
19 | ## Usage
20 | #### Importing package
21 | ```
22 | import 'package:trust_fall/trust_fall.dart';
23 | ```
24 | #### Using it
25 |
26 | Checks whether device JailBroken on iOS/Android?
27 | ```
28 | bool isJailBroken = await TrustFall.isJailBroken;
29 | ```
30 | Checks whether device is real or emulator
31 | ```
32 | bool isRealDevice = await TrustFall.isRealDevice;
33 | ```
34 | Can this device mock location - no need to root!
35 | ```
36 | bool canMockLocation = await TrustFall.canMockLocation;
37 | ```
38 | (ANDROID ONLY) Check if application is running on external storage
39 | ```
40 | bool isOnExternalStorage = await TrustFall.isOnExternalStorage;
41 | ```
42 | Check if device violates any of the above
43 | ```
44 | bool isTrustFall = await TrustFall.isTrustFall;
45 | ```
46 |
47 | # Note:
48 | #### Mock location detection
49 | * **Android** - Location permission needs to be granted in app in order to detect mock location properly
50 | * **iOS** - For now we are checking if device is Jail Broken or if it's not real device. There is no strong detection of mock location in iOS *(Open the PR if you have better way for mock location detection in iOS)*
51 |
52 | ## ❗Since emulators are usually rooted, you might want to bypass these checks during development. Unless you're keen on constant false alarms ⏰
--------------------------------------------------------------------------------
/android/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/android/.idea/.name:
--------------------------------------------------------------------------------
1 | trust_fall
--------------------------------------------------------------------------------
/android/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/android/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/android/.idea/caches/gradle_models.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/android/.idea/caches/gradle_models.ser
--------------------------------------------------------------------------------
/android/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
17 |
--------------------------------------------------------------------------------
/android/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/android/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | trust_fall
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'com.anish.trust_fall'
2 | version '1.0-SNAPSHOT'
3 |
4 | buildscript {
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 |
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.4.1'
12 | }
13 | }
14 |
15 | rootProject.allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | apply plugin: 'com.android.library'
23 |
24 | android {
25 | compileSdkVersion 28
26 |
27 | defaultConfig {
28 | minSdkVersion 18
29 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
30 | }
31 | lintOptions {
32 | disable 'InvalidPackage'
33 | }
34 | dependencies {
35 | implementation 'com.scottyab:rootbeer-lib:0.0.7'
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | android.enableJetifier=true
2 | android.useAndroidX=true
3 | org.gradle.jvmargs=-Xmx1536M
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Jun 04 06:30:03 EET 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
7 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'trust_fall'
2 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/src/main/java/com/anish/trust_fall/Emulator/EmulatorCheck.java:
--------------------------------------------------------------------------------
1 | package com.anish.trust_fall.Emulator;
2 |
3 | import android.os.Build;
4 |
5 | public class EmulatorCheck {
6 | public static boolean isEmulator() {
7 | return Build.FINGERPRINT.startsWith("generic")
8 | || Build.FINGERPRINT.startsWith("unknown")
9 | || Build.MODEL.contains("google_sdk")
10 | || Build.MODEL.contains("Emulator")
11 | || Build.MODEL.contains("Android SDK built for x86")
12 | || Build.MANUFACTURER.contains("Genymotion")
13 | || (Build.BRAND.startsWith("generic") && Build.DEVICE.startsWith("generic"))
14 | || "google_sdk".equals(Build.PRODUCT);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/android/src/main/java/com/anish/trust_fall/ExternalStorage/ExternalStorageCheck.java:
--------------------------------------------------------------------------------
1 | package com.anish.trust_fall.ExternalStorage;
2 |
3 | import android.content.Context;
4 | import android.content.pm.ApplicationInfo;
5 | import android.content.pm.PackageInfo;
6 | import android.content.pm.PackageManager;
7 | import android.os.Build;
8 |
9 | public class ExternalStorageCheck {
10 | /**
11 | * Checks if the application is installed on the SD card.
12 | *
13 | * @return true if the application is installed on the sd card
14 | */
15 | public static boolean isOnExternalStorage(Context context) {
16 | // check for API level 8 and higher
17 | if (Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.ECLAIR_MR1) {
18 | PackageManager pm = context.getPackageManager();
19 | try {
20 | PackageInfo pi = pm.getPackageInfo(context.getPackageName(), 0);
21 | ApplicationInfo ai = pi.applicationInfo;
22 | return (ai.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) == ApplicationInfo.FLAG_EXTERNAL_STORAGE;
23 | } catch (PackageManager.NameNotFoundException e) {
24 | // ignore
25 | }
26 | }
27 |
28 | // check for API level 7 - check files dir
29 | try {
30 | String filesDir = context.getFilesDir().getAbsolutePath();
31 | if (filesDir.startsWith("/data/")) {
32 | return false;
33 | } else if (filesDir.contains("/mnt/") || filesDir.contains("/sdcard/")) {
34 | return true;
35 | }
36 | } catch (Throwable e) {
37 | // ignore
38 | }
39 |
40 | return false;
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/android/src/main/java/com/anish/trust_fall/MockLocation/MockLocationCheck.java:
--------------------------------------------------------------------------------
1 | package com.anish.trust_fall.MockLocation;
2 |
3 | import java.util.Timer;
4 | import java.util.TimerTask;
5 | import android.content.Context;
6 | import android.location.Location;
7 | import android.location.LocationListener;
8 | import android.location.LocationManager;
9 | import android.os.Bundle;
10 | import android.util.Log;
11 |
12 | public class MockLocationCheck {
13 | Timer timer1;
14 | LocationManager lm;
15 | LocationResult locationResult;
16 | boolean gps_enabled=false;
17 | boolean network_enabled=false;
18 |
19 | public boolean getLocation(Context context, LocationResult result)
20 | {
21 | //I use LocationResult callback class to pass location value from MockLocationCheck to user code.
22 | locationResult=result;
23 | if(lm==null)
24 | lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
25 |
26 | //exceptions will be thrown if provider is not permitted.
27 | try{gps_enabled=lm.isProviderEnabled(LocationManager.GPS_PROVIDER);}catch(Exception ex){}
28 | try{network_enabled=lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER);}catch(Exception ex){}
29 |
30 | //don't start listeners if no provider is enabled
31 | if(!gps_enabled && !network_enabled)
32 | return false;
33 |
34 | if(gps_enabled)
35 | lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListenerGps);
36 | else{
37 | if(network_enabled)
38 | lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListenerNetwork);
39 | }
40 | timer1=new Timer();
41 | timer1.schedule(new GetLastLocation(), 20000);
42 | return true;
43 | }
44 |
45 | LocationListener locationListenerGps = new LocationListener() {
46 | public void onLocationChanged(Location location) {
47 | timer1.cancel();
48 | locationResult.gotLocation(location);
49 | lm.removeUpdates(this);
50 | lm.removeUpdates(locationListenerNetwork);
51 | if(locationListenerGps != null)
52 | lm.removeUpdates(locationListenerGps);
53 | }
54 | public void onProviderDisabled(String provider) {}
55 | public void onProviderEnabled(String provider) {}
56 | public void onStatusChanged(String provider, int status, Bundle extras) {}
57 | };
58 |
59 | LocationListener locationListenerNetwork = new LocationListener() {
60 | public void onLocationChanged(Location location) {
61 | timer1.cancel();
62 | locationResult.gotLocation(location);
63 | lm.removeUpdates(this);
64 | lm.removeUpdates(locationListenerGps);
65 | if(locationListenerNetwork != null)
66 | lm.removeUpdates(locationListenerNetwork);
67 | }
68 | public void onProviderDisabled(String provider) {}
69 | public void onProviderEnabled(String provider) {}
70 | public void onStatusChanged(String provider, int status, Bundle extras) {}
71 | };
72 |
73 | class GetLastLocation extends TimerTask {
74 | @Override
75 | public void run() {
76 | lm.removeUpdates(locationListenerGps);
77 | lm.removeUpdates(locationListenerNetwork);
78 |
79 | Location net_loc=null, gps_loc=null;
80 | if(gps_enabled)
81 | gps_loc=lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
82 | if(network_enabled)
83 | net_loc=lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
84 |
85 | //if there are both values use the latest one
86 | if(gps_loc!=null && net_loc!=null){
87 | if(gps_loc.getTime()>net_loc.getTime())
88 | locationResult.gotLocation(gps_loc);
89 | else
90 | locationResult.gotLocation(net_loc);
91 | return;
92 | }
93 |
94 | if(gps_loc!=null){
95 | locationResult.gotLocation(gps_loc);
96 | return;
97 | }
98 | if(net_loc!=null){
99 | locationResult.gotLocation(net_loc);
100 | return;
101 | }
102 | locationResult.gotLocation(null);
103 | }
104 | }
105 |
106 | public static abstract class LocationResult{
107 | public abstract void gotLocation(Location location);
108 | }
109 | }
110 |
111 |
--------------------------------------------------------------------------------
/android/src/main/java/com/anish/trust_fall/Rooted/CheckApiVersion.java:
--------------------------------------------------------------------------------
1 | package com.anish.trust_fall.Rooted;
2 |
3 | public interface CheckApiVersion {
4 | boolean checkRooted();
5 | }
6 |
--------------------------------------------------------------------------------
/android/src/main/java/com/anish/trust_fall/Rooted/GreaterThan23.java:
--------------------------------------------------------------------------------
1 | package com.anish.trust_fall.Rooted;
2 |
3 | import java.io.BufferedReader;
4 | import java.io.File;
5 | import java.io.InputStreamReader;
6 |
7 | public class GreaterThan23 implements CheckApiVersion {
8 | @Override
9 | public boolean checkRooted() {
10 | return checkRootMethod1() || checkRootMethod2();
11 | }
12 |
13 | private boolean checkRootMethod1() {
14 | String[] paths = {
15 | "/system/app/Superuser.apk",
16 | "/sbin/su",
17 | "/system/bin/su",
18 | "/system/xbin/su",
19 | "/data/local/xbin/su",
20 | "/data/local/bin/su",
21 | "/system/sd/xbin/su",
22 | "/system/bin/failsafe/su",
23 | "/data/local/su"};
24 | for (String path : paths) {
25 | if (new File(path).exists()) return true;
26 | }
27 | return false;
28 | }
29 |
30 | private boolean checkRootMethod2() {
31 | Process process = null;
32 | try {
33 | process = Runtime.getRuntime().exec(new String[] { "/system/xbin/which", "su" });
34 | BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
35 | if (in.readLine() != null) return true;
36 | return false;
37 | } catch (Throwable t) {
38 | return false;
39 | } finally {
40 | if (process != null) process.destroy();
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/android/src/main/java/com/anish/trust_fall/Rooted/LessThan23.java:
--------------------------------------------------------------------------------
1 | package com.anish.trust_fall.Rooted;
2 |
3 | import java.io.File;
4 |
5 | public class LessThan23 implements CheckApiVersion {
6 |
7 | @Override
8 | public boolean checkRooted() {
9 | return canExecuteCommand("/system/xbin/which su") || isSuperuserPresent();
10 | }
11 |
12 | // executes a command on the system
13 | private static boolean canExecuteCommand(String command) {
14 | boolean executeResult;
15 | try {
16 | Process process = Runtime.getRuntime().exec(command);
17 | if(process.waitFor() == 0) {
18 | executeResult = true;
19 | } else {
20 | executeResult = false;
21 | }
22 | } catch (Exception e) {
23 | executeResult = false;
24 | }
25 |
26 | return executeResult;
27 | }
28 |
29 | private static boolean isSuperuserPresent() {
30 | // Check if /system/app/Superuser.apk is present
31 | String[] paths = {
32 | "/system/app/Superuser.apk",
33 | "/sbin/su",
34 | "/system/bin/su",
35 | "/system/xbin/su",
36 | "/data/local/xbin/su",
37 | "/data/local/bin/su",
38 | "/system/sd/xbin/su",
39 | "/system/bin/failsafe/su",
40 | "/data/local/su"
41 | };
42 |
43 | for (String path : paths) {
44 | if (new File(path).exists()) {
45 | return true;
46 | }
47 | }
48 |
49 | return false;
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/android/src/main/java/com/anish/trust_fall/Rooted/RootedCheck.java:
--------------------------------------------------------------------------------
1 | package com.anish.trust_fall.Rooted;
2 |
3 | import android.content.Context;
4 |
5 | import com.scottyab.rootbeer.RootBeer;
6 | import android.os.Build;
7 |
8 | public class RootedCheck {
9 | private static final String ONEPLUS = "oneplus";
10 | private static final String MOTO = "moto";
11 | private static final String XIAOMI = "Xiaomi";
12 |
13 | /**
14 | * Checks if the device is rooted.
15 | *
16 | * @return true if the device is rooted, false otherwise.
17 | */
18 | public static boolean isJailBroken(Context context) {
19 | CheckApiVersion check;
20 |
21 | if (android.os.Build.VERSION.SDK_INT >= 23) {
22 | check = new GreaterThan23();
23 | } else {
24 | check = new LessThan23();
25 | }
26 | return check.checkRooted() || rootBeerCheck(context);
27 | }
28 |
29 | private static boolean rootBeerCheck(Context context) {
30 | RootBeer rootBeer = new RootBeer(context);
31 | Boolean rv;
32 | if(Build.BRAND.contains(ONEPLUS) || Build.BRAND.contains(MOTO) || Build.BRAND.contains(XIAOMI)) {
33 | rv = rootBeer.isRootedWithoutBusyBoxCheck();
34 | } else {
35 | rv = rootBeer.isRooted();
36 | }
37 | return rv;
38 | }
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/android/src/main/java/com/anish/trust_fall/TrustFallPlugin.java:
--------------------------------------------------------------------------------
1 | package com.anish.trust_fall;
2 |
3 | import android.content.Context;
4 | import android.location.Location;
5 |
6 | import com.anish.trust_fall.Emulator.EmulatorCheck;
7 | import com.anish.trust_fall.ExternalStorage.ExternalStorageCheck;
8 | import com.anish.trust_fall.MockLocation.MockLocationCheck;
9 | import com.anish.trust_fall.Rooted.RootedCheck;
10 |
11 | import io.flutter.plugin.common.MethodCall;
12 | import io.flutter.plugin.common.MethodChannel;
13 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
14 | import io.flutter.plugin.common.MethodChannel.Result;
15 | import io.flutter.plugin.common.PluginRegistry.Registrar;
16 |
17 | /** TrustFallPlugin */
18 | public class TrustFallPlugin implements MethodCallHandler {
19 | /** Plugin registration. */
20 |
21 | private final Context context;
22 | public static void registerWith(Registrar registrar) {
23 | final MethodChannel channel = new MethodChannel(registrar.messenger(), "trust_fall");
24 | channel.setMethodCallHandler(new TrustFallPlugin(registrar.context()));
25 | }
26 |
27 | private TrustFallPlugin(Context context){
28 | this.context = context;
29 | }
30 |
31 | @Override
32 | public void onMethodCall(MethodCall call, final Result result) {
33 | if (call.method.equals("getPlatformVersion")) {
34 | result.success("Android " + android.os.Build.VERSION.RELEASE);
35 | } else if (call.method.equals("isJailBroken")) {
36 | result.success(RootedCheck.isJailBroken(context));
37 | } else if (call.method.equals("canMockLocation")) {
38 | MockLocationCheck.LocationResult locationResult = new MockLocationCheck.LocationResult(){
39 | @Override
40 | public void gotLocation(Location location){
41 | //Got the location!
42 | if(location != null){
43 | result.success(location.isFromMockProvider());
44 | }else {
45 | result.success(false);
46 | }
47 | }
48 | };
49 | MockLocationCheck mockLocationCheck = new MockLocationCheck();
50 | mockLocationCheck.getLocation(context, locationResult);
51 | }else if (call.method.equals("isRealDevice")) {
52 | result.success(!EmulatorCheck.isEmulator());
53 | }else if (call.method.equals("isOnExternalStorage")) {
54 | result.success(ExternalStorageCheck.isOnExternalStorage(context));
55 | }
56 | else {
57 | result.notImplemented();
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # Visual Studio Code related
19 | .vscode/
20 |
21 | # Flutter/Dart/Pub related
22 | **/doc/api/
23 | .dart_tool/
24 | .flutter-plugins
25 | .packages
26 | .pub-cache/
27 | .pub/
28 | /build/
29 |
30 | # Android related
31 | **/android/**/gradle-wrapper.jar
32 | **/android/.gradle
33 | **/android/captures/
34 | **/android/gradlew
35 | **/android/gradlew.bat
36 | **/android/local.properties
37 | **/android/**/GeneratedPluginRegistrant.java
38 |
39 | # iOS/XCode related
40 | **/ios/**/*.mode1v3
41 | **/ios/**/*.mode2v3
42 | **/ios/**/*.moved-aside
43 | **/ios/**/*.pbxuser
44 | **/ios/**/*.perspectivev3
45 | **/ios/**/*sync/
46 | **/ios/**/.sconsign.dblite
47 | **/ios/**/.tags*
48 | **/ios/**/.vagrant/
49 | **/ios/**/DerivedData/
50 | **/ios/**/Icon?
51 | **/ios/**/Pods/
52 | **/ios/**/.symlinks/
53 | **/ios/**/profile
54 | **/ios/**/xcuserdata
55 | **/ios/.generated/
56 | **/ios/Flutter/App.framework
57 | **/ios/Flutter/Flutter.framework
58 | **/ios/Flutter/Generated.xcconfig
59 | **/ios/Flutter/app.flx
60 | **/ios/Flutter/app.zip
61 | **/ios/Flutter/flutter_assets/
62 | **/ios/ServiceDefinitions.json
63 | **/ios/Runner/GeneratedPluginRegistrant.*
64 |
65 | # Exceptions to above rules.
66 | !**/ios/**/default.mode1v3
67 | !**/ios/**/default.mode2v3
68 | !**/ios/**/default.pbxuser
69 | !**/ios/**/default.perspectivev3
70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
71 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # trust_fall_example
2 |
3 | Demonstrates how to use the trust_fall plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.io/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/example/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/example/android/app/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/example/android/app/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | app
4 | Project app created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/example/android/app/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=..
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.anish.trust_fall_example"
37 | minSdkVersion 18
38 | targetSdkVersion 28
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | testImplementation 'junit:junit:4.12'
59 | androidTestImplementation 'androidx.test:runner:1.2.0'
60 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
61 | }
62 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
11 |
15 |
22 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/anish/trust_fall_example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.anish.trust_fall_example;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.4.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | android.enableJetifier=true
2 | android.useAndroidX=true
3 | org.gradle.jvmargs=-Xmx1536M
4 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Jun 04 06:15:56 EET 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
7 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def parse_KV_file(file, separator='=')
14 | file_abs_path = File.expand_path(file)
15 | if !File.exists? file_abs_path
16 | return [];
17 | end
18 | pods_ary = []
19 | skip_line_start_symbols = ["#", "/"]
20 | File.foreach(file_abs_path) { |line|
21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22 | plugin = line.split(pattern=separator)
23 | if plugin.length == 2
24 | podname = plugin[0].strip()
25 | path = plugin[1].strip()
26 | podpath = File.expand_path("#{path}", file_abs_path)
27 | pods_ary.push({:name => podname, :path => podpath});
28 | else
29 | puts "Invalid plugin specification: #{line}"
30 | end
31 | }
32 | return pods_ary
33 | end
34 |
35 | target 'Runner' do
36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
37 | # referring to absolute paths on developers' machines.
38 | system('rm -rf .symlinks')
39 | system('mkdir -p .symlinks/plugins')
40 |
41 | # Flutter Pods
42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
43 | if generated_xcode_build_settings.empty?
44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
45 | end
46 | generated_xcode_build_settings.map { |p|
47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
48 | symlink = File.join('.symlinks', 'flutter')
49 | File.symlink(File.dirname(p[:path]), symlink)
50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
51 | end
52 | }
53 |
54 | # Plugin Pods
55 | plugin_pods = parse_KV_file('../.flutter-plugins')
56 | plugin_pods.map { |p|
57 | symlink = File.join('.symlinks', 'plugins', p[:name])
58 | File.symlink(p[:path], symlink)
59 | pod p[:name], :path => File.join(symlink, 'ios')
60 | }
61 | end
62 |
63 | post_install do |installer|
64 | installer.pods_project.targets.each do |target|
65 | target.build_configurations.each do |config|
66 | config.build_settings['ENABLE_BITCODE'] = 'NO'
67 | end
68 | end
69 | end
70 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - DTTJailbreakDetection (0.4.0)
3 | - Flutter (1.0.0)
4 | - trust_fall (0.0.1):
5 | - DTTJailbreakDetection
6 | - Flutter
7 |
8 | DEPENDENCIES:
9 | - Flutter (from `.symlinks/flutter/ios`)
10 | - trust_fall (from `.symlinks/plugins/trust_fall/ios`)
11 |
12 | SPEC REPOS:
13 | https://github.com/cocoapods/specs.git:
14 | - DTTJailbreakDetection
15 |
16 | EXTERNAL SOURCES:
17 | Flutter:
18 | :path: ".symlinks/flutter/ios"
19 | trust_fall:
20 | :path: ".symlinks/plugins/trust_fall/ios"
21 |
22 | SPEC CHECKSUMS:
23 | DTTJailbreakDetection: 5e356c5badc17995f65a83ed9483f787a0057b71
24 | Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
25 | trust_fall: 167045fe6f031eed854e7665ba9379e1faa386c4
26 |
27 | PODFILE CHECKSUM: aff02bfeed411c636180d6812254b2daeea14d09
28 |
29 | COCOAPODS: 1.5.3
30 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 | 40C11EFA009887EFFFB36B71 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CB1130FDCD5A18C0A978AFEA /* libPods-Runner.a */; };
15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
18 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
19 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
20 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
21 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
22 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXCopyFilesBuildPhase section */
26 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
27 | isa = PBXCopyFilesBuildPhase;
28 | buildActionMask = 2147483647;
29 | dstPath = "";
30 | dstSubfolderSpec = 10;
31 | files = (
32 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
33 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
34 | );
35 | name = "Embed Frameworks";
36 | runOnlyForDeploymentPostprocessing = 0;
37 | };
38 | /* End PBXCopyFilesBuildPhase section */
39 |
40 | /* Begin PBXFileReference section */
41 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
42 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
43 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
44 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
45 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
46 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
47 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
48 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
49 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
50 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
51 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
52 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
53 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
54 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
55 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
56 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
57 | CB1130FDCD5A18C0A978AFEA /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
66 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
67 | 40C11EFA009887EFFFB36B71 /* libPods-Runner.a in Frameworks */,
68 | );
69 | runOnlyForDeploymentPostprocessing = 0;
70 | };
71 | /* End PBXFrameworksBuildPhase section */
72 |
73 | /* Begin PBXGroup section */
74 | 7663CC4683E53BFEC97A1248 /* Pods */ = {
75 | isa = PBXGroup;
76 | children = (
77 | );
78 | name = Pods;
79 | sourceTree = "";
80 | };
81 | 9740EEB11CF90186004384FC /* Flutter */ = {
82 | isa = PBXGroup;
83 | children = (
84 | 3B80C3931E831B6300D905FE /* App.framework */,
85 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
86 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
87 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
88 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
89 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
90 | );
91 | name = Flutter;
92 | sourceTree = "";
93 | };
94 | 97C146E51CF9000F007C117D = {
95 | isa = PBXGroup;
96 | children = (
97 | 9740EEB11CF90186004384FC /* Flutter */,
98 | 97C146F01CF9000F007C117D /* Runner */,
99 | 97C146EF1CF9000F007C117D /* Products */,
100 | 7663CC4683E53BFEC97A1248 /* Pods */,
101 | EC7F6D1B78FF98C07615D0F9 /* Frameworks */,
102 | );
103 | sourceTree = "";
104 | };
105 | 97C146EF1CF9000F007C117D /* Products */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 97C146EE1CF9000F007C117D /* Runner.app */,
109 | );
110 | name = Products;
111 | sourceTree = "";
112 | };
113 | 97C146F01CF9000F007C117D /* Runner */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
117 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
118 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
119 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
120 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
121 | 97C147021CF9000F007C117D /* Info.plist */,
122 | 97C146F11CF9000F007C117D /* Supporting Files */,
123 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
124 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
125 | );
126 | path = Runner;
127 | sourceTree = "";
128 | };
129 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
130 | isa = PBXGroup;
131 | children = (
132 | 97C146F21CF9000F007C117D /* main.m */,
133 | );
134 | name = "Supporting Files";
135 | sourceTree = "";
136 | };
137 | EC7F6D1B78FF98C07615D0F9 /* Frameworks */ = {
138 | isa = PBXGroup;
139 | children = (
140 | CB1130FDCD5A18C0A978AFEA /* libPods-Runner.a */,
141 | );
142 | name = Frameworks;
143 | sourceTree = "";
144 | };
145 | /* End PBXGroup section */
146 |
147 | /* Begin PBXNativeTarget section */
148 | 97C146ED1CF9000F007C117D /* Runner */ = {
149 | isa = PBXNativeTarget;
150 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
151 | buildPhases = (
152 | 03DACE941C3D9559AE7F789B /* [CP] Check Pods Manifest.lock */,
153 | 9740EEB61CF901F6004384FC /* Run Script */,
154 | 97C146EA1CF9000F007C117D /* Sources */,
155 | 97C146EB1CF9000F007C117D /* Frameworks */,
156 | 97C146EC1CF9000F007C117D /* Resources */,
157 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
158 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
159 | 12CBE6E213B01940B9F5254B /* [CP] Embed Pods Frameworks */,
160 | );
161 | buildRules = (
162 | );
163 | dependencies = (
164 | );
165 | name = Runner;
166 | productName = Runner;
167 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
168 | productType = "com.apple.product-type.application";
169 | };
170 | /* End PBXNativeTarget section */
171 |
172 | /* Begin PBXProject section */
173 | 97C146E61CF9000F007C117D /* Project object */ = {
174 | isa = PBXProject;
175 | attributes = {
176 | LastUpgradeCheck = 0910;
177 | ORGANIZATIONNAME = "The Chromium Authors";
178 | TargetAttributes = {
179 | 97C146ED1CF9000F007C117D = {
180 | CreatedOnToolsVersion = 7.3.1;
181 | };
182 | };
183 | };
184 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
185 | compatibilityVersion = "Xcode 3.2";
186 | developmentRegion = English;
187 | hasScannedForEncodings = 0;
188 | knownRegions = (
189 | en,
190 | Base,
191 | );
192 | mainGroup = 97C146E51CF9000F007C117D;
193 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
194 | projectDirPath = "";
195 | projectRoot = "";
196 | targets = (
197 | 97C146ED1CF9000F007C117D /* Runner */,
198 | );
199 | };
200 | /* End PBXProject section */
201 |
202 | /* Begin PBXResourcesBuildPhase section */
203 | 97C146EC1CF9000F007C117D /* Resources */ = {
204 | isa = PBXResourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
208 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
209 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
210 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
211 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
212 | );
213 | runOnlyForDeploymentPostprocessing = 0;
214 | };
215 | /* End PBXResourcesBuildPhase section */
216 |
217 | /* Begin PBXShellScriptBuildPhase section */
218 | 03DACE941C3D9559AE7F789B /* [CP] Check Pods Manifest.lock */ = {
219 | isa = PBXShellScriptBuildPhase;
220 | buildActionMask = 2147483647;
221 | files = (
222 | );
223 | inputPaths = (
224 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
225 | "${PODS_ROOT}/Manifest.lock",
226 | );
227 | name = "[CP] Check Pods Manifest.lock";
228 | outputPaths = (
229 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
230 | );
231 | runOnlyForDeploymentPostprocessing = 0;
232 | shellPath = /bin/sh;
233 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
234 | showEnvVarsInLog = 0;
235 | };
236 | 12CBE6E213B01940B9F5254B /* [CP] Embed Pods Frameworks */ = {
237 | isa = PBXShellScriptBuildPhase;
238 | buildActionMask = 2147483647;
239 | files = (
240 | );
241 | inputPaths = (
242 | "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
243 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
244 | );
245 | name = "[CP] Embed Pods Frameworks";
246 | outputPaths = (
247 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | shellPath = /bin/sh;
251 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
252 | showEnvVarsInLog = 0;
253 | };
254 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
255 | isa = PBXShellScriptBuildPhase;
256 | buildActionMask = 2147483647;
257 | files = (
258 | );
259 | inputPaths = (
260 | );
261 | name = "Thin Binary";
262 | outputPaths = (
263 | );
264 | runOnlyForDeploymentPostprocessing = 0;
265 | shellPath = /bin/sh;
266 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
267 | };
268 | 9740EEB61CF901F6004384FC /* Run Script */ = {
269 | isa = PBXShellScriptBuildPhase;
270 | buildActionMask = 2147483647;
271 | files = (
272 | );
273 | inputPaths = (
274 | );
275 | name = "Run Script";
276 | outputPaths = (
277 | );
278 | runOnlyForDeploymentPostprocessing = 0;
279 | shellPath = /bin/sh;
280 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
281 | };
282 | /* End PBXShellScriptBuildPhase section */
283 |
284 | /* Begin PBXSourcesBuildPhase section */
285 | 97C146EA1CF9000F007C117D /* Sources */ = {
286 | isa = PBXSourcesBuildPhase;
287 | buildActionMask = 2147483647;
288 | files = (
289 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
290 | 97C146F31CF9000F007C117D /* main.m in Sources */,
291 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
292 | );
293 | runOnlyForDeploymentPostprocessing = 0;
294 | };
295 | /* End PBXSourcesBuildPhase section */
296 |
297 | /* Begin PBXVariantGroup section */
298 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
299 | isa = PBXVariantGroup;
300 | children = (
301 | 97C146FB1CF9000F007C117D /* Base */,
302 | );
303 | name = Main.storyboard;
304 | sourceTree = "";
305 | };
306 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
307 | isa = PBXVariantGroup;
308 | children = (
309 | 97C147001CF9000F007C117D /* Base */,
310 | );
311 | name = LaunchScreen.storyboard;
312 | sourceTree = "";
313 | };
314 | /* End PBXVariantGroup section */
315 |
316 | /* Begin XCBuildConfiguration section */
317 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
318 | isa = XCBuildConfiguration;
319 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
320 | buildSettings = {
321 | ALWAYS_SEARCH_USER_PATHS = NO;
322 | CLANG_ANALYZER_NONNULL = YES;
323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
324 | CLANG_CXX_LIBRARY = "libc++";
325 | CLANG_ENABLE_MODULES = YES;
326 | CLANG_ENABLE_OBJC_ARC = YES;
327 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
328 | CLANG_WARN_BOOL_CONVERSION = YES;
329 | CLANG_WARN_COMMA = YES;
330 | CLANG_WARN_CONSTANT_CONVERSION = YES;
331 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
332 | CLANG_WARN_EMPTY_BODY = YES;
333 | CLANG_WARN_ENUM_CONVERSION = YES;
334 | CLANG_WARN_INFINITE_RECURSION = YES;
335 | CLANG_WARN_INT_CONVERSION = YES;
336 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
337 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
338 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
339 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
340 | CLANG_WARN_STRICT_PROTOTYPES = YES;
341 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
342 | CLANG_WARN_UNREACHABLE_CODE = YES;
343 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
344 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
345 | COPY_PHASE_STRIP = NO;
346 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
347 | ENABLE_NS_ASSERTIONS = NO;
348 | ENABLE_STRICT_OBJC_MSGSEND = YES;
349 | GCC_C_LANGUAGE_STANDARD = gnu99;
350 | GCC_NO_COMMON_BLOCKS = YES;
351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
353 | GCC_WARN_UNDECLARED_SELECTOR = YES;
354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
355 | GCC_WARN_UNUSED_FUNCTION = YES;
356 | GCC_WARN_UNUSED_VARIABLE = YES;
357 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
358 | MTL_ENABLE_DEBUG_INFO = NO;
359 | SDKROOT = iphoneos;
360 | TARGETED_DEVICE_FAMILY = "1,2";
361 | VALIDATE_PRODUCT = YES;
362 | };
363 | name = Profile;
364 | };
365 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
366 | isa = XCBuildConfiguration;
367 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
368 | buildSettings = {
369 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
370 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
371 | DEVELOPMENT_TEAM = S8QB4VV633;
372 | ENABLE_BITCODE = NO;
373 | FRAMEWORK_SEARCH_PATHS = (
374 | "$(inherited)",
375 | "$(PROJECT_DIR)/Flutter",
376 | );
377 | INFOPLIST_FILE = Runner/Info.plist;
378 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
379 | LIBRARY_SEARCH_PATHS = (
380 | "$(inherited)",
381 | "$(PROJECT_DIR)/Flutter",
382 | );
383 | PRODUCT_BUNDLE_IDENTIFIER = com.anish.trustFallExample;
384 | PRODUCT_NAME = "$(TARGET_NAME)";
385 | VERSIONING_SYSTEM = "apple-generic";
386 | };
387 | name = Profile;
388 | };
389 | 97C147031CF9000F007C117D /* Debug */ = {
390 | isa = XCBuildConfiguration;
391 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
392 | buildSettings = {
393 | ALWAYS_SEARCH_USER_PATHS = NO;
394 | CLANG_ANALYZER_NONNULL = YES;
395 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
396 | CLANG_CXX_LIBRARY = "libc++";
397 | CLANG_ENABLE_MODULES = YES;
398 | CLANG_ENABLE_OBJC_ARC = YES;
399 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
400 | CLANG_WARN_BOOL_CONVERSION = YES;
401 | CLANG_WARN_COMMA = YES;
402 | CLANG_WARN_CONSTANT_CONVERSION = YES;
403 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
404 | CLANG_WARN_EMPTY_BODY = YES;
405 | CLANG_WARN_ENUM_CONVERSION = YES;
406 | CLANG_WARN_INFINITE_RECURSION = YES;
407 | CLANG_WARN_INT_CONVERSION = YES;
408 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
412 | CLANG_WARN_STRICT_PROTOTYPES = YES;
413 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
414 | CLANG_WARN_UNREACHABLE_CODE = YES;
415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
417 | COPY_PHASE_STRIP = NO;
418 | DEBUG_INFORMATION_FORMAT = dwarf;
419 | ENABLE_STRICT_OBJC_MSGSEND = YES;
420 | ENABLE_TESTABILITY = YES;
421 | GCC_C_LANGUAGE_STANDARD = gnu99;
422 | GCC_DYNAMIC_NO_PIC = NO;
423 | GCC_NO_COMMON_BLOCKS = YES;
424 | GCC_OPTIMIZATION_LEVEL = 0;
425 | GCC_PREPROCESSOR_DEFINITIONS = (
426 | "DEBUG=1",
427 | "$(inherited)",
428 | );
429 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
430 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
431 | GCC_WARN_UNDECLARED_SELECTOR = YES;
432 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
433 | GCC_WARN_UNUSED_FUNCTION = YES;
434 | GCC_WARN_UNUSED_VARIABLE = YES;
435 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
436 | MTL_ENABLE_DEBUG_INFO = YES;
437 | ONLY_ACTIVE_ARCH = YES;
438 | SDKROOT = iphoneos;
439 | TARGETED_DEVICE_FAMILY = "1,2";
440 | };
441 | name = Debug;
442 | };
443 | 97C147041CF9000F007C117D /* Release */ = {
444 | isa = XCBuildConfiguration;
445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
446 | buildSettings = {
447 | ALWAYS_SEARCH_USER_PATHS = NO;
448 | CLANG_ANALYZER_NONNULL = YES;
449 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
450 | CLANG_CXX_LIBRARY = "libc++";
451 | CLANG_ENABLE_MODULES = YES;
452 | CLANG_ENABLE_OBJC_ARC = YES;
453 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
454 | CLANG_WARN_BOOL_CONVERSION = YES;
455 | CLANG_WARN_COMMA = YES;
456 | CLANG_WARN_CONSTANT_CONVERSION = YES;
457 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
458 | CLANG_WARN_EMPTY_BODY = YES;
459 | CLANG_WARN_ENUM_CONVERSION = YES;
460 | CLANG_WARN_INFINITE_RECURSION = YES;
461 | CLANG_WARN_INT_CONVERSION = YES;
462 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
463 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
464 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
465 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
466 | CLANG_WARN_STRICT_PROTOTYPES = YES;
467 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
468 | CLANG_WARN_UNREACHABLE_CODE = YES;
469 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
470 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
471 | COPY_PHASE_STRIP = NO;
472 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
473 | ENABLE_NS_ASSERTIONS = NO;
474 | ENABLE_STRICT_OBJC_MSGSEND = YES;
475 | GCC_C_LANGUAGE_STANDARD = gnu99;
476 | GCC_NO_COMMON_BLOCKS = YES;
477 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
478 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
479 | GCC_WARN_UNDECLARED_SELECTOR = YES;
480 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
481 | GCC_WARN_UNUSED_FUNCTION = YES;
482 | GCC_WARN_UNUSED_VARIABLE = YES;
483 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
484 | MTL_ENABLE_DEBUG_INFO = NO;
485 | SDKROOT = iphoneos;
486 | TARGETED_DEVICE_FAMILY = "1,2";
487 | VALIDATE_PRODUCT = YES;
488 | };
489 | name = Release;
490 | };
491 | 97C147061CF9000F007C117D /* Debug */ = {
492 | isa = XCBuildConfiguration;
493 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
494 | buildSettings = {
495 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
496 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
497 | ENABLE_BITCODE = NO;
498 | FRAMEWORK_SEARCH_PATHS = (
499 | "$(inherited)",
500 | "$(PROJECT_DIR)/Flutter",
501 | );
502 | INFOPLIST_FILE = Runner/Info.plist;
503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
504 | LIBRARY_SEARCH_PATHS = (
505 | "$(inherited)",
506 | "$(PROJECT_DIR)/Flutter",
507 | );
508 | PRODUCT_BUNDLE_IDENTIFIER = com.anish.trustFallExample;
509 | PRODUCT_NAME = "$(TARGET_NAME)";
510 | VERSIONING_SYSTEM = "apple-generic";
511 | };
512 | name = Debug;
513 | };
514 | 97C147071CF9000F007C117D /* Release */ = {
515 | isa = XCBuildConfiguration;
516 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
517 | buildSettings = {
518 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
519 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
520 | ENABLE_BITCODE = NO;
521 | FRAMEWORK_SEARCH_PATHS = (
522 | "$(inherited)",
523 | "$(PROJECT_DIR)/Flutter",
524 | );
525 | INFOPLIST_FILE = Runner/Info.plist;
526 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
527 | LIBRARY_SEARCH_PATHS = (
528 | "$(inherited)",
529 | "$(PROJECT_DIR)/Flutter",
530 | );
531 | PRODUCT_BUNDLE_IDENTIFIER = com.anish.trustFallExample;
532 | PRODUCT_NAME = "$(TARGET_NAME)";
533 | VERSIONING_SYSTEM = "apple-generic";
534 | };
535 | name = Release;
536 | };
537 | /* End XCBuildConfiguration section */
538 |
539 | /* Begin XCConfigurationList section */
540 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
541 | isa = XCConfigurationList;
542 | buildConfigurations = (
543 | 97C147031CF9000F007C117D /* Debug */,
544 | 97C147041CF9000F007C117D /* Release */,
545 | 249021D3217E4FDB00AE95B9 /* Profile */,
546 | );
547 | defaultConfigurationIsVisible = 0;
548 | defaultConfigurationName = Release;
549 | };
550 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
551 | isa = XCConfigurationList;
552 | buildConfigurations = (
553 | 97C147061CF9000F007C117D /* Debug */,
554 | 97C147071CF9000F007C117D /* Release */,
555 | 249021D4217E4FDB00AE95B9 /* Profile */,
556 | );
557 | defaultConfigurationIsVisible = 0;
558 | defaultConfigurationName = Release;
559 | };
560 | /* End XCConfigurationList section */
561 | };
562 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
563 | }
564 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildSystemType
6 | Original
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/ios/Runner/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 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | trust_fall_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/example/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'dart:async';
3 |
4 | import 'package:trust_fall/trust_fall.dart';
5 |
6 | void main() => runApp(MyApp());
7 |
8 | class MyApp extends StatefulWidget {
9 | @override
10 | _MyAppState createState() => _MyAppState();
11 | }
12 |
13 | class _MyAppState extends State {
14 | String _platformVersion = 'Unknown';
15 | bool isJailBroken = false;
16 | bool canMockLocation = false;
17 | bool isRealDevice = true;
18 | bool isOnExternalStorage = false;
19 | bool isTrustFall = false;
20 | @override
21 | void initState() {
22 | super.initState();
23 | initPlatformState();
24 | }
25 |
26 | // Platform messages are asynchronous, so we initialize in an async method.
27 | Future initPlatformState() async {
28 | // String platformVersion;
29 |
30 | // If the widget was removed from the tree while the asynchronous platform
31 | // message was in flight, we want to discard the reply rather than calling
32 | // setState to update our non-existent appearance.
33 | if (!mounted) return;
34 |
35 | // Platform messages may fail, so we use a try/catch PlatformException.ßß
36 | try{
37 | isJailBroken = await TrustFall.isJailBroken;
38 | canMockLocation = await TrustFall.canMockLocation;
39 | isRealDevice = await TrustFall.isRealDevice;
40 | isOnExternalStorage = await TrustFall.isOnExternalStorage;
41 | isTrustFall = await TrustFall.isTrustFall;
42 | }catch(error){
43 | print(error);
44 | }
45 |
46 | setState(() {
47 | isJailBroken = isJailBroken;
48 | canMockLocation = canMockLocation;
49 | isRealDevice = isRealDevice;
50 | isOnExternalStorage = isOnExternalStorage;
51 | isTrustFall = isTrustFall;
52 | });
53 | }
54 |
55 | @override
56 | Widget build(BuildContext context) {
57 | return MaterialApp(
58 | home: Scaffold(
59 | appBar: AppBar(
60 | title: const Text('Device trust fall check'),
61 | ),
62 | body: Center(
63 | child: Card(
64 | child: Padding(
65 | padding: const EdgeInsets.all(8.0),
66 | child: Column(
67 | mainAxisAlignment: MainAxisAlignment.center,
68 | mainAxisSize: MainAxisSize.min,
69 | children:[
70 | Row(
71 | mainAxisAlignment: MainAxisAlignment.center,
72 | children: [
73 | Text('isJailBroken():'),
74 | SizedBox(
75 | width: 8,
76 | ),
77 | Text('${isJailBroken ? "Yes" : "No"}', style: TextStyle(fontWeight: FontWeight.w600),),
78 | ],
79 | ),
80 | SizedBox(
81 | height: 8,
82 | ),
83 | Row(
84 | mainAxisAlignment: MainAxisAlignment.center,
85 | children: [
86 | Text('canMockLocation():'),
87 | SizedBox(
88 | width: 8,
89 | ),
90 | Text('${canMockLocation ? "Yes" : "No"}', style: TextStyle(fontWeight: FontWeight.w600),),
91 | ],
92 | ),
93 | SizedBox(
94 | height: 8,
95 | ),
96 | Row(
97 | mainAxisAlignment: MainAxisAlignment.center,
98 | children: [
99 | Text('isRealDevice():'),
100 | SizedBox(
101 | width: 8,
102 | ),
103 | Text('${isRealDevice ? "Yes" : "No"}', style: TextStyle(fontWeight: FontWeight.w600),),
104 | ],
105 | ),
106 | SizedBox(
107 | height: 8,
108 | ),
109 | Row(
110 | mainAxisAlignment: MainAxisAlignment.center,
111 | children: [
112 | Text('isOnExternalStorage():'),
113 | SizedBox(
114 | width: 8,
115 | ),
116 | Text('${isOnExternalStorage ? "Yes" : "No"}', style: TextStyle(fontWeight: FontWeight.w600),),
117 | ],
118 | ),SizedBox(
119 | height: 8,
120 | ),
121 | Row(
122 | mainAxisAlignment: MainAxisAlignment.center,
123 | children: [
124 | Text('isTrustFall():'),
125 | SizedBox(
126 | width: 8,
127 | ),
128 | Text('${isTrustFall ? "Yes" : "False"}', style: TextStyle(fontWeight: FontWeight.w600),),
129 | ],
130 | ),
131 | ] ,
132 | ),
133 |
134 | ),
135 | ),
136 | ),
137 | ),
138 | );
139 | }
140 | }
141 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.1.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.0.4"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.14.11"
32 | cupertino_icons:
33 | dependency: "direct main"
34 | description:
35 | name: cupertino_icons
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "0.1.2"
39 | flutter:
40 | dependency: "direct main"
41 | description: flutter
42 | source: sdk
43 | version: "0.0.0"
44 | flutter_test:
45 | dependency: "direct dev"
46 | description: flutter
47 | source: sdk
48 | version: "0.0.0"
49 | matcher:
50 | dependency: transitive
51 | description:
52 | name: matcher
53 | url: "https://pub.dartlang.org"
54 | source: hosted
55 | version: "0.12.5"
56 | meta:
57 | dependency: transitive
58 | description:
59 | name: meta
60 | url: "https://pub.dartlang.org"
61 | source: hosted
62 | version: "1.1.6"
63 | path:
64 | dependency: transitive
65 | description:
66 | name: path
67 | url: "https://pub.dartlang.org"
68 | source: hosted
69 | version: "1.6.2"
70 | pedantic:
71 | dependency: transitive
72 | description:
73 | name: pedantic
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "1.5.0"
77 | quiver:
78 | dependency: transitive
79 | description:
80 | name: quiver
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "2.0.2"
84 | sky_engine:
85 | dependency: transitive
86 | description: flutter
87 | source: sdk
88 | version: "0.0.99"
89 | source_span:
90 | dependency: transitive
91 | description:
92 | name: source_span
93 | url: "https://pub.dartlang.org"
94 | source: hosted
95 | version: "1.5.5"
96 | stack_trace:
97 | dependency: transitive
98 | description:
99 | name: stack_trace
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "1.9.3"
103 | stream_channel:
104 | dependency: transitive
105 | description:
106 | name: stream_channel
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "2.0.0"
110 | string_scanner:
111 | dependency: transitive
112 | description:
113 | name: string_scanner
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "1.0.4"
117 | term_glyph:
118 | dependency: transitive
119 | description:
120 | name: term_glyph
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.1.0"
124 | test_api:
125 | dependency: transitive
126 | description:
127 | name: test_api
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "0.2.4"
131 | trust_fall:
132 | dependency: "direct dev"
133 | description:
134 | path: ".."
135 | relative: true
136 | source: path
137 | version: "1.0.3"
138 | typed_data:
139 | dependency: transitive
140 | description:
141 | name: typed_data
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.1.6"
145 | vector_math:
146 | dependency: transitive
147 | description:
148 | name: vector_math
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "2.0.8"
152 | sdks:
153 | dart: ">=2.2.0 <3.0.0"
154 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: trust_fall_example
2 | description: Demonstrates how to use the trust_fall plugin.
3 | publish_to: 'none'
4 |
5 | environment:
6 | sdk: ">=2.1.0 <3.0.0"
7 |
8 | dependencies:
9 | flutter:
10 | sdk: flutter
11 |
12 | # The following adds the Cupertino Icons font to your application.
13 | # Use with the CupertinoIcons class for iOS style icons.
14 | cupertino_icons: ^0.1.2
15 |
16 | dev_dependencies:
17 | flutter_test:
18 | sdk: flutter
19 |
20 | trust_fall:
21 | path: ../
22 |
23 | # For information on the generic Dart part of this file, see the
24 | # following page: https://www.dartlang.org/tools/pub/pubspec
25 |
26 | # The following section is specific to Flutter.
27 | flutter:
28 |
29 | # The following line ensures that the Material Icons font is
30 | # included with your application, so that you can use the icons in
31 | # the material Icons class.
32 | uses-material-design: true
33 |
34 | # To add assets to your application, add an assets section, like this:
35 | # assets:
36 | # - images/a_dot_burr.jpeg
37 | # - images/a_dot_ham.jpeg
38 |
39 | # An image asset can refer to one or more resolution-specific "variants", see
40 | # https://flutter.io/assets-and-images/#resolution-aware.
41 |
42 | # For details regarding adding assets from package dependencies, see
43 | # https://flutter.io/assets-and-images/#from-packages
44 |
45 | # To add custom fonts to your application, add a fonts section here,
46 | # in this "flutter" section. Each entry in this list should have a
47 | # "family" key with the font family name, and a "fonts" key with a
48 | # list giving the asset and other descriptors for the font. For
49 | # example:
50 | # fonts:
51 | # - family: Schyler
52 | # fonts:
53 | # - asset: fonts/Schyler-Regular.ttf
54 | # - asset: fonts/Schyler-Italic.ttf
55 | # style: italic
56 | # - family: Trajan Pro
57 | # fonts:
58 | # - asset: fonts/TrajanPro.ttf
59 | # - asset: fonts/TrajanPro_Bold.ttf
60 | # weight: 700
61 | #
62 | # For details regarding fonts from package dependencies,
63 | # see https://flutter.io/custom-fonts/#from-packages
64 |
--------------------------------------------------------------------------------
/example/res/values/strings_en.arb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/example/res/values/strings_en.arb
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import '../lib/main.dart';
12 |
13 | void main() {
14 | testWidgets('Verify Platform version', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that platform version is retrieved.
19 | expect(
20 | find.byWidgetPredicate(
21 | (Widget widget) => widget is Text &&
22 | widget.data.startsWith('Running on:'),
23 | ),
24 | findsOneWidget,
25 | );
26 | });
27 | }
28 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/Generated.xcconfig
37 |
--------------------------------------------------------------------------------
/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/ios/Assets/.gitkeep
--------------------------------------------------------------------------------
/ios/Classes/TrustFallPlugin.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface TrustFallPlugin : NSObject
4 | @end
5 |
--------------------------------------------------------------------------------
/ios/Classes/TrustFallPlugin.m:
--------------------------------------------------------------------------------
1 | #import "TrustFallPlugin.h"
2 | #import
3 |
4 | @implementation TrustFallPlugin
5 | + (void)registerWithRegistrar:(NSObject*)registrar {
6 | FlutterMethodChannel* channel = [FlutterMethodChannel
7 | methodChannelWithName:@"trust_fall"
8 | binaryMessenger:[registrar messenger]];
9 | TrustFallPlugin* instance = [[TrustFallPlugin alloc] init];
10 | [registrar addMethodCallDelegate:instance channel:channel];
11 | }
12 |
13 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
14 | if ([@"getPlatformVersion" isEqualToString:call.method]) {
15 | result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
16 | }else if ([@"isJailBroken" isEqualToString:call.method]) {
17 | result([NSNumber numberWithBool:[self isJailBroken]]);
18 | }else if ([@"canMockLocation" isEqualToString:call.method]) {
19 | //For now we have returned if device is Jail Broken or if it's not real device. There is no
20 | //strong detection of Mock location in iOS
21 | result([NSNumber numberWithBool:([self isJailBroken] || ![self isRealDevice])]);
22 | }else if ([@"isRealDevice" isEqualToString:call.method]) {
23 | result([NSNumber numberWithBool:[self isRealDevice]]);
24 | } else {
25 | result(FlutterMethodNotImplemented);
26 | }
27 | }
28 |
29 | - (BOOL)isJailBroken{
30 | // return [self checkPaths] || [self checkSchemes] || [self canViolateSandbox];
31 | return [DTTJailbreakDetection isJailbroken];
32 | }
33 |
34 | - (BOOL) isRealDevice{
35 | return !TARGET_OS_SIMULATOR;
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/ios/trust_fall.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
3 | #
4 | Pod::Spec.new do |s|
5 | s.name = 'trust_fall'
6 | s.version = '0.0.1'
7 | s.summary = 'A new Flutter plugin.'
8 | s.description = <<-DESC
9 | A new Flutter plugin.
10 | DESC
11 | s.homepage = 'http://example.com'
12 | s.license = { :file => '../LICENSE' }
13 | s.author = { 'Your Company' => 'email@example.com' }
14 | s.source = { :path => '.' }
15 | s.source_files = 'Classes/**/*'
16 | s.public_header_files = 'Classes/**/*.h'
17 | s.dependency 'Flutter'
18 | s.dependency 'DTTJailbreakDetection'
19 |
20 | s.ios.deployment_target = '8.0'
21 | end
22 |
23 |
--------------------------------------------------------------------------------
/lib/generated/i18n.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/foundation.dart';
4 | import 'package:flutter/material.dart';
5 |
6 | // ignore_for_file: non_constant_identifier_names
7 | // ignore_for_file: camel_case_types
8 | // ignore_for_file: prefer_single_quotes
9 |
10 | // This file is automatically generated. DO NOT EDIT, all your changes would be lost.
11 | class S implements WidgetsLocalizations {
12 | const S();
13 |
14 | static const GeneratedLocalizationsDelegate delegate =
15 | GeneratedLocalizationsDelegate();
16 |
17 | static S of(BuildContext context) => Localizations.of(context, S);
18 |
19 | @override
20 | TextDirection get textDirection => TextDirection.ltr;
21 |
22 | }
23 |
24 | class $en extends S {
25 | const $en();
26 | }
27 |
28 | class GeneratedLocalizationsDelegate extends LocalizationsDelegate {
29 | const GeneratedLocalizationsDelegate();
30 |
31 | List get supportedLocales {
32 | return const [
33 | Locale("en", ""),
34 | ];
35 | }
36 |
37 | LocaleListResolutionCallback listResolution({Locale fallback, bool withCountry = true}) {
38 | return (List locales, Iterable supported) {
39 | if (locales == null || locales.isEmpty) {
40 | return fallback ?? supported.first;
41 | } else {
42 | return _resolve(locales.first, fallback, supported, withCountry);
43 | }
44 | };
45 | }
46 |
47 | LocaleResolutionCallback resolution({Locale fallback, bool withCountry = true}) {
48 | return (Locale locale, Iterable supported) {
49 | return _resolve(locale, fallback, supported, withCountry);
50 | };
51 | }
52 |
53 | @override
54 | Future load(Locale locale) {
55 | final String lang = getLang(locale);
56 | if (lang != null) {
57 | switch (lang) {
58 | case "en":
59 | return SynchronousFuture(const $en());
60 | default:
61 | // NO-OP.
62 | }
63 | }
64 | return SynchronousFuture(const S());
65 | }
66 |
67 | @override
68 | bool isSupported(Locale locale) => _isSupported(locale, true);
69 |
70 | @override
71 | bool shouldReload(GeneratedLocalizationsDelegate old) => false;
72 |
73 | ///
74 | /// Internal method to resolve a locale from a list of locales.
75 | ///
76 | Locale _resolve(Locale locale, Locale fallback, Iterable supported, bool withCountry) {
77 | if (locale == null || !_isSupported(locale, withCountry)) {
78 | return fallback ?? supported.first;
79 | }
80 |
81 | final Locale languageLocale = Locale(locale.languageCode, "");
82 | if (supported.contains(locale)) {
83 | return locale;
84 | } else if (supported.contains(languageLocale)) {
85 | return languageLocale;
86 | } else {
87 | final Locale fallbackLocale = fallback ?? supported.first;
88 | return fallbackLocale;
89 | }
90 | }
91 |
92 | ///
93 | /// Returns true if the specified locale is supported, false otherwise.
94 | ///
95 | bool _isSupported(Locale locale, bool withCountry) {
96 | if (locale != null) {
97 | for (Locale supportedLocale in supportedLocales) {
98 | // Language must always match both locales.
99 | if (supportedLocale.languageCode != locale.languageCode) {
100 | continue;
101 | }
102 |
103 | // If country code matches, return this locale.
104 | if (supportedLocale.countryCode == locale.countryCode) {
105 | return true;
106 | }
107 |
108 | // If no country requirement is requested, check if this locale has no country.
109 | if (true != withCountry && (supportedLocale.countryCode == null || supportedLocale.countryCode.isEmpty)) {
110 | return true;
111 | }
112 | }
113 | }
114 | return false;
115 | }
116 | }
117 |
118 | String getLang(Locale l) => l == null
119 | ? null
120 | : l.countryCode != null && l.countryCode.isEmpty
121 | ? l.languageCode
122 | : l.toString();
123 |
--------------------------------------------------------------------------------
/lib/trust_fall.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:io';
3 |
4 | import 'package:flutter/services.dart';
5 |
6 | class TrustFall {
7 | static const MethodChannel _channel = const MethodChannel('trust_fall');
8 |
9 | //Checks whether device JailBroken on iOS/Android?
10 | static Future get isJailBroken async {
11 | final bool isJailBroken = await _channel.invokeMethod('isJailBroken');
12 | return isJailBroken;
13 | }
14 |
15 | //Can this device mock location - no need to root!
16 | static Future get canMockLocation async {
17 | final bool canMockLocation = await _channel.invokeMethod('canMockLocation');
18 | return canMockLocation;
19 | }
20 |
21 | // Checks whether device is real or emulator
22 | static Future get isRealDevice async {
23 | final bool isRealDevice = await _channel.invokeMethod('isRealDevice');
24 | return isRealDevice;
25 | }
26 |
27 | // (ANDROID ONLY) Check if application is running on external storage
28 | static Future get isOnExternalStorage async {
29 | final bool isOnExternalStorage =
30 | await _channel.invokeMethod('isOnExternalStorage');
31 | return isOnExternalStorage;
32 | }
33 |
34 | // Check if device violates any of the above
35 | static Future get isTrustFall async {
36 | final bool isJailBroken = await _channel.invokeMethod('isJailBroken');
37 | final bool canMockLocation = await _channel.invokeMethod('canMockLocation');
38 | final bool isRealDevice = await _channel.invokeMethod('isRealDevice');
39 | if (Platform.isAndroid) {
40 | final bool isOnExternalStorage =
41 | await _channel.invokeMethod('isOnExternalStorage');
42 | return isJailBroken ||
43 | canMockLocation ||
44 | !isRealDevice ||
45 | isOnExternalStorage;
46 | } else {
47 | return isJailBroken || canMockLocation || !isRealDevice;
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.1.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.0.4"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.14.11"
32 | flutter:
33 | dependency: "direct main"
34 | description: flutter
35 | source: sdk
36 | version: "0.0.0"
37 | flutter_test:
38 | dependency: "direct dev"
39 | description: flutter
40 | source: sdk
41 | version: "0.0.0"
42 | matcher:
43 | dependency: transitive
44 | description:
45 | name: matcher
46 | url: "https://pub.dartlang.org"
47 | source: hosted
48 | version: "0.12.5"
49 | meta:
50 | dependency: transitive
51 | description:
52 | name: meta
53 | url: "https://pub.dartlang.org"
54 | source: hosted
55 | version: "1.1.6"
56 | path:
57 | dependency: transitive
58 | description:
59 | name: path
60 | url: "https://pub.dartlang.org"
61 | source: hosted
62 | version: "1.6.2"
63 | pedantic:
64 | dependency: transitive
65 | description:
66 | name: pedantic
67 | url: "https://pub.dartlang.org"
68 | source: hosted
69 | version: "1.5.0"
70 | quiver:
71 | dependency: transitive
72 | description:
73 | name: quiver
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "2.0.2"
77 | sky_engine:
78 | dependency: transitive
79 | description: flutter
80 | source: sdk
81 | version: "0.0.99"
82 | source_span:
83 | dependency: transitive
84 | description:
85 | name: source_span
86 | url: "https://pub.dartlang.org"
87 | source: hosted
88 | version: "1.5.5"
89 | stack_trace:
90 | dependency: transitive
91 | description:
92 | name: stack_trace
93 | url: "https://pub.dartlang.org"
94 | source: hosted
95 | version: "1.9.3"
96 | stream_channel:
97 | dependency: transitive
98 | description:
99 | name: stream_channel
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "2.0.0"
103 | string_scanner:
104 | dependency: transitive
105 | description:
106 | name: string_scanner
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "1.0.4"
110 | term_glyph:
111 | dependency: transitive
112 | description:
113 | name: term_glyph
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "1.1.0"
117 | test_api:
118 | dependency: transitive
119 | description:
120 | name: test_api
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "0.2.4"
124 | typed_data:
125 | dependency: transitive
126 | description:
127 | name: typed_data
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.1.6"
131 | vector_math:
132 | dependency: transitive
133 | description:
134 | name: vector_math
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "2.0.8"
138 | sdks:
139 | dart: ">=2.2.0 <3.0.0"
140 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: trust_fall
2 | description: A Flutter plugin for detecting the trust fall of the device(Jailbroken, root, emulator and mock location detection).
3 | version: 1.0.4
4 | author: Anish Madhu
5 | homepage: https://github.com/anish-adm/trust_fall
6 |
7 | environment:
8 | sdk: ">=2.1.0 <3.0.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 |
14 | dev_dependencies:
15 | flutter_test:
16 | sdk: flutter
17 |
18 | # For information on the generic Dart part of this file, see the
19 | # following page: https://www.dartlang.org/tools/pub/pubspec
20 |
21 | # The following section is specific to Flutter.
22 | flutter:
23 | # This section identifies this Flutter project as a plugin project.
24 | # The androidPackage and pluginClass identifiers should not ordinarily
25 | # be modified. They are used by the tooling to maintain consistency when
26 | # adding or updating assets for this project.
27 | plugin:
28 | androidPackage: com.anish.trust_fall
29 | pluginClass: TrustFallPlugin
30 |
31 | # To add assets to your plugin package, add an assets section, like this:
32 | # assets:
33 | # - images/a_dot_burr.jpeg
34 | # - images/a_dot_ham.jpeg
35 | #
36 | # For details regarding assets in packages, see
37 | # https://flutter.io/assets-and-images/#from-packages
38 | #
39 | # An image asset can refer to one or more resolution-specific "variants", see
40 | # https://flutter.io/assets-and-images/#resolution-aware.
41 |
42 | # To add custom fonts to your plugin package, add a fonts section here,
43 | # in this "flutter" section. Each entry in this list should have a
44 | # "family" key with the font family name, and a "fonts" key with a
45 | # list giving the asset and other descriptors for the font. For
46 | # example:
47 | # fonts:
48 | # - family: Schyler
49 | # fonts:
50 | # - asset: fonts/Schyler-Regular.ttf
51 | # - asset: fonts/Schyler-Italic.ttf
52 | # style: italic
53 | # - family: Trajan Pro
54 | # fonts:
55 | # - asset: fonts/TrajanPro.ttf
56 | # - asset: fonts/TrajanPro_Bold.ttf
57 | # weight: 700
58 | #
59 | # For details regarding fonts in packages, see
60 | # https://flutter.io/custom-fonts/#from-packages
61 |
--------------------------------------------------------------------------------
/res/values/strings_en.arb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anish-adm/trust_fall/05908632a65462acb94dcba9e9c1cf564947345f/res/values/strings_en.arb
--------------------------------------------------------------------------------
/test/trust_fall_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 | import 'package:flutter_test/flutter_test.dart';
3 | import 'package:trust_fall/trust_fall.dart';
4 |
5 | void main() {
6 | const MethodChannel channel = MethodChannel('trust_fall');
7 |
8 | setUp(() {
9 | channel.setMockMethodCallHandler((MethodCall methodCall) async {
10 | return false;
11 | });
12 | });
13 |
14 | tearDown(() {
15 | channel.setMockMethodCallHandler(null);
16 | });
17 |
18 | test('getPlatformVersion', () async {
19 | expect(await TrustFall.isTrustFall, false);
20 | });
21 | }
22 |
--------------------------------------------------------------------------------
/trust_fall.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------