diff --git a/CHANGELOG.md b/CHANGELOG.md
index bcdbc84..41cc7d8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,11 +1,3 @@
-## [0.0.3] - Return cardType.
+## 0.0.1
-* Return credit card type
-
-## [0.0.2] - Updated readme.
-
-* Update readme so it looks good on pub.dartlang.org
-
-## [0.0.1] - Initial release.
-
-* Add android and iOS sdk
+* TODO: Describe initial release.
diff --git a/android/build.gradle b/android/build.gradle
index d531709..e37456c 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,5 +1,6 @@
-group 'com.varunvairavan.fluttercardio'
+group 'com.appleeducate.fluttercardio'
version '1.0-SNAPSHOT'
+
buildscript {
repositories {
google()
@@ -7,18 +8,21 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.0.1'
+ classpath 'com.android.tools.build:gradle:3.2.1'
}
}
+
rootProject.allprojects {
repositories {
google()
jcenter()
}
}
+
apply plugin: 'com.android.library'
+
android {
- compileSdkVersion 27
+ compileSdkVersion 28
defaultConfig {
minSdkVersion 16
@@ -30,4 +34,4 @@ android {
dependencies {
api 'io.card:android-sdk:5.5.1'
}
-}
\ No newline at end of file
+}
diff --git a/android/gen/com/varunvairavan/fluttercardio/BuildConfig.java b/android/gen/com/varunvairavan/fluttercardio/BuildConfig.java
deleted file mode 100644
index cdbb0c4..0000000
--- a/android/gen/com/varunvairavan/fluttercardio/BuildConfig.java
+++ /dev/null
@@ -1,8 +0,0 @@
-/*___Generated_by_IDEA___*/
-
-package com.varunvairavan.fluttercardio;
-
-/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
-public final class BuildConfig {
- public final static boolean DEBUG = Boolean.parseBoolean(null);
-}
\ No newline at end of file
diff --git a/android/gen/com/varunvairavan/fluttercardio/Manifest.java b/android/gen/com/varunvairavan/fluttercardio/Manifest.java
deleted file mode 100644
index d4cab89..0000000
--- a/android/gen/com/varunvairavan/fluttercardio/Manifest.java
+++ /dev/null
@@ -1,7 +0,0 @@
-/*___Generated_by_IDEA___*/
-
-package com.varunvairavan.fluttercardio;
-
-/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
-public final class Manifest {
-}
\ No newline at end of file
diff --git a/android/gen/com/varunvairavan/fluttercardio/R.java b/android/gen/com/varunvairavan/fluttercardio/R.java
deleted file mode 100644
index 33d023d..0000000
--- a/android/gen/com/varunvairavan/fluttercardio/R.java
+++ /dev/null
@@ -1,7 +0,0 @@
-/*___Generated_by_IDEA___*/
-
-package com.varunvairavan.fluttercardio;
-
-/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
-public final class R {
-}
\ No newline at end of file
diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 13372ae..0000000
Binary files a/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 61f39af..0000000
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Feb 26 12:00:02 AST 2018
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
diff --git a/android/gradle/wrapper/gradle-wrapper.properties~ b/android/gradle/wrapper/gradle-wrapper.properties~
deleted file mode 100644
index d766564..0000000
--- a/android/gradle/wrapper/gradle-wrapper.properties~
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Feb 26 12:00:02 AST 2018
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip
diff --git a/android/gradlew b/android/gradlew
deleted file mode 100644
index 9d82f78..0000000
--- a/android/gradlew
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
- echo "$*"
-}
-
-die ( ) {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
-esac
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/android/gradlew.bat b/android/gradlew.bat
deleted file mode 100644
index 8a0b282..0000000
--- a/android/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index cdf5c9e..082a8a4 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -1,3 +1,3 @@
+ package="com.appleeducate.fluttercardio">
diff --git a/android/src/main/java/com/varunvairavan/fluttercardio/FlutterCardIoPlugin.java b/android/src/main/com/appleeducate/fluttercardio/FlutterCardIoPlugin.java
similarity index 99%
rename from android/src/main/java/com/varunvairavan/fluttercardio/FlutterCardIoPlugin.java
rename to android/src/main/com/appleeducate/fluttercardio/FlutterCardIoPlugin.java
index e17d54d..2998e69 100644
--- a/android/src/main/java/com/varunvairavan/fluttercardio/FlutterCardIoPlugin.java
+++ b/android/src/main/com/appleeducate/fluttercardio/FlutterCardIoPlugin.java
@@ -1,4 +1,4 @@
-package com.varunvairavan.fluttercardio;
+package android.src.main.com.appleeducate.fluttercardio;
import android.app.Activity;
import android.content.Intent;
diff --git a/android/src/main/java/com/appleeducate/fluttercardio/FlutterCardIoPlugin.java b/android/src/main/java/com/appleeducate/fluttercardio/FlutterCardIoPlugin.java
new file mode 100644
index 0000000..cbac2ce
--- /dev/null
+++ b/android/src/main/java/com/appleeducate/fluttercardio/FlutterCardIoPlugin.java
@@ -0,0 +1,203 @@
+package com.appleeducate.fluttercardio;
+
+import android.app.Activity;
+import android.content.Intent;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import io.card.payment.CardIOActivity;
+import io.card.payment.CardType;
+import io.card.payment.CreditCard;
+import io.flutter.plugin.common.MethodCall;
+import io.flutter.plugin.common.MethodChannel;
+import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
+import io.flutter.plugin.common.MethodChannel.Result;
+import io.flutter.plugin.common.PluginRegistry;
+import io.flutter.plugin.common.PluginRegistry.ActivityResultListener;
+import io.flutter.plugin.common.PluginRegistry.Registrar;
+
+/**
+ * FlutterCardIoPlugin
+ */
+public class FlutterCardIoPlugin implements MethodCallHandler, ActivityResultListener {
+ private static final int MY_SCAN_REQUEST_CODE = 100;
+
+ private final PluginRegistry.Registrar registrar;
+ private Result pendingResult;
+ private MethodCall methodCall;
+
+ /**
+ * Plugin registration.
+ */
+ public static void registerWith(Registrar registrar) {
+ final MethodChannel channel = new MethodChannel(registrar.messenger(), "flutter_card_io");
+ FlutterCardIoPlugin instance = new FlutterCardIoPlugin(registrar);
+ registrar.addActivityResultListener(instance);
+ channel.setMethodCallHandler(instance);
+ }
+
+ private FlutterCardIoPlugin(PluginRegistry.Registrar registrar) {
+ this.registrar = registrar;
+ }
+
+ @Override
+ public void onMethodCall(MethodCall call, Result result) {
+ if (pendingResult != null) {
+ result.error("ALREADY_ACTIVE", "Scan card is already active", null);
+ return;
+ }
+
+ Activity activity = registrar.activity();
+ if (activity == null) {
+ result.error("no_activity", "flutter_card_io plugin requires a foreground activity.", null);
+ return;
+ }
+
+ pendingResult = result;
+ methodCall = call;
+
+ if (call.method.equals("scanCard")) {
+ Intent scanIntent = new Intent(activity, CardIOActivity.class);
+
+ boolean requireExpiry = false;
+ if (methodCall.hasArgument("requireExpiry")) {
+ requireExpiry = methodCall.argument("requireExpiry");
+ }
+
+ boolean requireCVV = false;
+ if (methodCall.hasArgument("requireCVV")) {
+ requireCVV = methodCall.argument("requireCVV");
+ }
+
+ boolean requirePostalCode = false;
+ if (methodCall.hasArgument("requirePostalCode")) {
+ requirePostalCode = methodCall.argument("requirePostalCode");
+ }
+
+ boolean requireCardHolderName = false;
+ if (methodCall.hasArgument("requireCardHolderName")) {
+ requireCardHolderName = methodCall.argument("requireCardHolderName");
+ }
+
+ boolean restrictPostalCodeToNumericOnly = false;
+ if (methodCall.hasArgument("restrictPostalCodeToNumericOnly")) {
+ restrictPostalCodeToNumericOnly = methodCall.argument("restrictPostalCodeToNumericOnly");
+ }
+
+ boolean scanExpiry = true;
+ if (methodCall.hasArgument("scanExpiry")) {
+ scanExpiry = methodCall.argument("scanExpiry");
+ }
+
+ String scanInstructions = null;
+ if (methodCall.hasArgument("scanInstructions")) {
+ scanInstructions = methodCall.argument("scanInstructions");
+ }
+
+ boolean suppressManualEntry = false;
+ if (methodCall.hasArgument("suppressManualEntry")) {
+ suppressManualEntry = methodCall.argument("suppressManualEntry");
+ }
+
+ boolean suppressConfirmation = false;
+ if (methodCall.hasArgument("suppressConfirmation")) {
+ suppressConfirmation = methodCall.argument("suppressConfirmation");
+ }
+
+ boolean useCardIOLogo = false;
+ if (methodCall.hasArgument("useCardIOLogo")) {
+ useCardIOLogo = methodCall.argument("useCardIOLogo");
+ }
+
+ boolean hideCardIOLogo = false;
+ if (methodCall.hasArgument("hideCardIOLogo")) {
+ hideCardIOLogo = methodCall.argument("hideCardIOLogo");
+ }
+
+ boolean usePayPalActionbarIcon = true;
+ if (methodCall.hasArgument("usePayPalActionbarIcon")) {
+ usePayPalActionbarIcon = methodCall.argument("usePayPalActionbarIcon");
+ }
+
+ boolean keepApplicationTheme = false;
+ if (methodCall.hasArgument("keepApplicationTheme")) {
+ keepApplicationTheme = methodCall.argument("keepApplicationTheme");
+ }
+
+ // customize these values to suit your needs.
+ scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, requireExpiry); // default: false
+ scanIntent.putExtra(CardIOActivity.EXTRA_SCAN_EXPIRY, scanExpiry);
+ scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, requireCVV); // default: false
+ scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, requirePostalCode); // default: false
+ scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CARDHOLDER_NAME, requireCardHolderName);
+ scanIntent.putExtra(CardIOActivity.EXTRA_RESTRICT_POSTAL_CODE_TO_NUMERIC_ONLY, restrictPostalCodeToNumericOnly);
+ scanIntent.putExtra(CardIOActivity.EXTRA_SCAN_INSTRUCTIONS, scanInstructions);
+ scanIntent.putExtra(CardIOActivity.EXTRA_SUPPRESS_MANUAL_ENTRY, suppressManualEntry);
+ scanIntent.putExtra(CardIOActivity.EXTRA_SUPPRESS_CONFIRMATION, suppressConfirmation);
+ scanIntent.putExtra(CardIOActivity.EXTRA_USE_CARDIO_LOGO, useCardIOLogo);
+ scanIntent.putExtra(CardIOActivity.EXTRA_HIDE_CARDIO_LOGO, hideCardIOLogo);
+ scanIntent.putExtra(CardIOActivity.EXTRA_USE_PAYPAL_ACTIONBAR_ICON, usePayPalActionbarIcon);
+ scanIntent.putExtra(CardIOActivity.EXTRA_KEEP_APPLICATION_THEME, keepApplicationTheme);
+
+ // MY_SCAN_REQUEST_CODE is arbitrary and is only used within this activity.
+ activity.startActivityForResult(scanIntent, MY_SCAN_REQUEST_CODE);
+ } else {
+ result.notImplemented();
+ }
+ }
+
+ @Override
+ public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
+ if (requestCode == MY_SCAN_REQUEST_CODE) {
+ if (data != null && data.hasExtra(CardIOActivity.EXTRA_SCAN_RESULT)) {
+ CreditCard scanResult = data.getParcelableExtra(CardIOActivity.EXTRA_SCAN_RESULT);
+
+ Map response = new HashMap<>();
+ response.put("cardholderName", scanResult.cardholderName);
+ response.put("cardNumber", scanResult.cardNumber);
+ String cardType = null;
+ if (scanResult.getCardType() != CardType.UNKNOWN && scanResult.getCardType() != CardType.INSUFFICIENT_DIGITS) {
+ switch (scanResult.getCardType()) {
+ case AMEX:
+ cardType = "Amex";
+ break;
+ case DINERSCLUB:
+ cardType = "DinersClub";
+ break;
+ case DISCOVER:
+ cardType = "Discover";
+ break;
+ case JCB:
+ cardType = "JCB";
+ break;
+ case MASTERCARD:
+ cardType = "MasterCard";
+ break;
+ case VISA:
+ cardType = "Visa";
+ break;
+ case MAESTRO:
+ cardType = "Maestro";
+ break;
+ default:
+ break;
+ }
+ }
+ response.put("cardType", cardType);
+ response.put("redactedCardNumber", scanResult.getRedactedCardNumber());
+ response.put("expiryMonth", scanResult.expiryMonth);
+ response.put("expiryYear", scanResult.expiryYear);
+ response.put("cvv", scanResult.cvv);
+ response.put("postalCode", scanResult.postalCode);
+ pendingResult.success(response);
+ } else {
+ pendingResult.success(null);
+ }
+ pendingResult = null;
+ methodCall = null;
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/example/.gitignore b/example/.gitignore
index 3b9b8ba..07488ba 100644
--- a/example/.gitignore
+++ b/example/.gitignore
@@ -1,11 +1,70 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
.DS_Store
.atom/
-.idea
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# Visual Studio Code related
.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+.dart_tool/
+.flutter-plugins
.packages
+.pub-cache/
.pub/
-build/
-ios/.generated/
-packages
-pubspec.lock
-.flutter-plugins
+/build/
+
+# Android related
+**/android/**/gradle-wrapper.jar
+**/android/.gradle
+**/android/captures/
+**/android/gradlew
+**/android/gradlew.bat
+**/android/local.properties
+**/android/**/GeneratedPluginRegistrant.java
+
+# iOS/XCode related
+**/ios/**/*.mode1v3
+**/ios/**/*.mode2v3
+**/ios/**/*.moved-aside
+**/ios/**/*.pbxuser
+**/ios/**/*.perspectivev3
+**/ios/**/*sync/
+**/ios/**/.sconsign.dblite
+**/ios/**/.tags*
+**/ios/**/.vagrant/
+**/ios/**/DerivedData/
+**/ios/**/Icon?
+**/ios/**/Pods/
+**/ios/**/.symlinks/
+**/ios/**/profile
+**/ios/**/xcuserdata
+**/ios/.generated/
+**/ios/Flutter/App.framework
+**/ios/Flutter/Flutter.framework
+**/ios/Flutter/Generated.xcconfig
+**/ios/Flutter/app.flx
+**/ios/Flutter/app.zip
+**/ios/Flutter/flutter_assets/
+**/ios/ServiceDefinitions.json
+**/ios/Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!**/ios/**/default.mode1v3
+!**/ios/**/default.mode2v3
+!**/ios/**/default.pbxuser
+!**/ios/**/default.perspectivev3
+!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
diff --git a/example/.metadata b/example/.metadata
index c3eeb03..2c93eda 100644
--- a/example/.metadata
+++ b/example/.metadata
@@ -4,5 +4,7 @@
# This file should be version controlled and should not be manually edited.
version:
- revision: 8fa332d6af3db26d217ef969f17ae1774128cacc
+ revision: 2aad59314fb98f29a4dcdcacda77c0926418ea95
channel: master
+
+project_type: app
diff --git a/example/android.iml b/example/android.iml
deleted file mode 100644
index 462b903..0000000
--- a/example/android.iml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/android/.gitignore b/example/android/.gitignore
deleted file mode 100644
index 65b7315..0000000
--- a/example/android/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-*.iml
-*.class
-.gradle
-/local.properties
-/.idea/workspace.xml
-/.idea/libraries
-.DS_Store
-/build
-/captures
-GeneratedPluginRegistrant.java
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index 95de3f3..3fbad90 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -11,11 +11,21 @@ if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
+
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 27
+ compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
@@ -23,11 +33,11 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId "com.varunvairavan.fluttercardioexample"
+ applicationId "com.appleeducate.fluttercardioexample"
minSdkVersion 16
- targetSdkVersion 27
- versionCode 1
- versionName "1.0"
+ targetSdkVersion 28
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
@@ -46,6 +56,6 @@ flutter {
dependencies {
testImplementation 'junit:junit:4.12'
- androidTestImplementation 'com.android.support.test:runner:1.0.1'
- androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
+ androidTestImplementation 'com.android.support.test:runner:1.0.2'
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..9518072
--- /dev/null
+++ b/example/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
index 8cee255..6cad32e 100644
--- a/example/android/app/src/main/AndroidManifest.xml
+++ b/example/android/app/src/main/AndroidManifest.xml
@@ -1,17 +1,14 @@
-
-
-
+ package="com.appleeducate.fluttercardioexample">
+
+
+
+
+
diff --git a/example/android/build.gradle b/example/android/build.gradle
index 4476887..bb8a303 100644
--- a/example/android/build.gradle
+++ b/example/android/build.gradle
@@ -5,7 +5,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.0.1'
+ classpath 'com.android.tools.build:gradle:3.2.1'
}
}
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties
index aa901e1..2819f02 100644
--- a/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
diff --git a/example/android/gradlew.bat b/example/android/gradlew.bat
index 8a0b282..aec9973 100644
--- a/example/android/gradlew.bat
+++ b/example/android/gradlew.bat
@@ -1,90 +1,90 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/example/flutter_card_io_example.iml b/example/flutter_card_io_example.iml
index 4881df8..e5c8371 100644
--- a/example/flutter_card_io_example.iml
+++ b/example/flutter_card_io_example.iml
@@ -1,10 +1,11 @@
-
+
+
diff --git a/example/flutter_card_io_example_android.iml b/example/flutter_card_io_example_android.iml
deleted file mode 100644
index 0ca70ed..0000000
--- a/example/flutter_card_io_example_android.iml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/ios/.gitignore b/example/ios/.gitignore
deleted file mode 100644
index 1e1aafd..0000000
--- a/example/ios/.gitignore
+++ /dev/null
@@ -1,42 +0,0 @@
-.idea/
-.vagrant/
-.sconsign.dblite
-.svn/
-
-.DS_Store
-*.swp
-profile
-
-DerivedData/
-build/
-GeneratedPluginRegistrant.h
-GeneratedPluginRegistrant.m
-
-*.pbxuser
-*.mode1v3
-*.mode2v3
-*.perspectivev3
-
-!default.pbxuser
-!default.mode1v3
-!default.mode2v3
-!default.perspectivev3
-
-xcuserdata
-
-*.moved-aside
-
-*.pyc
-*sync/
-Icon?
-.tags*
-
-/Flutter/app.flx
-/Flutter/app.zip
-/Flutter/flutter_assets/
-/Flutter/App.framework
-/Flutter/Flutter.framework
-/Flutter/Generated.xcconfig
-/ServiceDefinitions.json
-
-Pods/
diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist
index 6c2de80..9367d48 100644
--- a/example/ios/Flutter/AppFrameworkInfo.plist
+++ b/example/ios/Flutter/AppFrameworkInfo.plist
@@ -20,10 +20,6 @@
????
CFBundleVersion
1.0
- UIRequiredDeviceCapabilities
-
- arm64
-
MinimumOSVersion
8.0
diff --git a/example/ios/Podfile b/example/ios/Podfile
index cdaa7b5..64eddc6 100644
--- a/example/ios/Podfile
+++ b/example/ios/Podfile
@@ -4,6 +4,12 @@
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+project 'Runner', {
+ 'Debug' => :debug,
+ 'Profile' => :release,
+ 'Release' => :release,
+}
+
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
@@ -27,11 +33,12 @@ def parse_KV_file(file, separator='=')
end
target 'Runner' do
+ use_frameworks!
+
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
- system('rm -rf Pods/.symlinks')
- system('mkdir -p Pods/.symlinks/flutter')
- system('mkdir -p Pods/.symlinks/plugins')
+ system('rm -rf .symlinks')
+ system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
@@ -40,16 +47,16 @@ target 'Runner' do
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
- symlink = File.join('Pods', '.symlinks', 'flutter', File.basename(p[:path]))
- File.symlink(p[:path], symlink)
- pod 'Flutter', :path => symlink
+ symlink = File.join('.symlinks', 'flutter')
+ File.symlink(File.dirname(p[:path]), symlink)
+ pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
- symlink = File.join('Pods', '.symlinks', 'plugins', File.basename(p[:path]))
+ symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock
index ce2b735..eae1892 100644
--- a/example/ios/Podfile.lock
+++ b/example/ios/Podfile.lock
@@ -6,20 +6,24 @@ PODS:
- Flutter
DEPENDENCIES:
- - Flutter (from `Pods/.symlinks/flutter/ios`)
- - flutter_card_io (from `Pods/.symlinks/plugins/flutter_card_io/ios`)
+ - Flutter (from `.symlinks/flutter/ios`)
+ - flutter_card_io (from `.symlinks/plugins/flutter_card_io/ios`)
+
+SPEC REPOS:
+ https://github.com/cocoapods/specs.git:
+ - CardIO
EXTERNAL SOURCES:
Flutter:
- :path: Pods/.symlinks/flutter/ios
+ :path: ".symlinks/flutter/ios"
flutter_card_io:
- :path: Pods/.symlinks/plugins/flutter_card_io/ios
+ :path: ".symlinks/plugins/flutter_card_io/ios"
SPEC CHECKSUMS:
CardIO: 56983b39b62f495fc6dae9ad7cf875143df06443
- Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
- flutter_card_io: f686b56d5530d0b3992aabb98a6b9147d7752b35
+ Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
+ flutter_card_io: c72cebc3e0af063e30ae3e105159892cc9d5aa0b
-PODFILE CHECKSUM: 0420ab312a523ae0eecfb1fc19ea51dd82cc17c7
+PODFILE CHECKSUM: ebd43b443038e611b86ede96e613bd6033c49497
-COCOAPODS: 1.3.1
+COCOAPODS: 1.5.3
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index 7b131c7..b44f544 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -8,20 +8,17 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
- 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
- 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
- 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
- 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
- A434E466FF2A6D28848563C4 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C923164082D318DAD12ABF85 /* libPods-Runner.a */; };
+ 9C499DB42A739BB6384C3C31 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4924E85F877A397E095BAC40 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -42,22 +39,20 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
- 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
+ 4924E85F877A397E095BAC40 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
- 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- C923164082D318DAD12ABF85 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -67,24 +62,16 @@
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
- A434E466FF2A6D28848563C4 /* libPods-Runner.a in Frameworks */,
+ 9C499DB42A739BB6384C3C31 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
- 870441854909FB29AFC75826 /* Pods */ = {
- isa = PBXGroup;
- children = (
- );
- name = Pods;
- sourceTree = "";
- };
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
- 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
@@ -101,8 +88,8 @@
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
- 870441854909FB29AFC75826 /* Pods */,
- D05C9CFAD25AED369CF8409F /* Frameworks */,
+ 9B0BCCF7DE0EA6631D2DAE7A /* Pods */,
+ D56DAD3B66B104BF15CDC6B1 /* Frameworks */,
);
sourceTree = "";
};
@@ -117,8 +104,6 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
- 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
- 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
@@ -126,6 +111,8 @@
97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "";
@@ -133,15 +120,21 @@
97C146F11CF9000F007C117D /* Supporting Files */ = {
isa = PBXGroup;
children = (
- 97C146F21CF9000F007C117D /* main.m */,
);
name = "Supporting Files";
sourceTree = "";
};
- D05C9CFAD25AED369CF8409F /* Frameworks */ = {
+ 9B0BCCF7DE0EA6631D2DAE7A /* Pods */ = {
isa = PBXGroup;
children = (
- C923164082D318DAD12ABF85 /* libPods-Runner.a */,
+ );
+ name = Pods;
+ sourceTree = "";
+ };
+ D56DAD3B66B104BF15CDC6B1 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 4924E85F877A397E095BAC40 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "";
@@ -153,15 +146,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- 2F44159B6E7E06BC55C79517 /* [CP] Check Pods Manifest.lock */,
+ 5EA726953EDE65B3E30EA99E /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- CCDA262307B8E482935DF056 /* [CP] Embed Pods Frameworks */,
- 7BAA6ADFE10B2256913408A4 /* [CP] Copy Pods Resources */,
+ 23F9B107A544030DD1EFF118 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -183,7 +175,8 @@
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
- ProvisioningStyle = Automatic;
+ DevelopmentTeam = 9FK3425VTA;
+ LastSwiftMigration = 0910;
};
};
};
@@ -211,11 +204,9 @@
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
- 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
- 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -223,22 +214,26 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- 2F44159B6E7E06BC55C79517 /* [CP] Check Pods Manifest.lock */ = {
+ 23F9B107A544030DD1EFF118 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
+ inputFileListPaths = (
+ );
inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
+ "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
+ "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
);
- name = "[CP] Check Pods Manifest.lock";
outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- 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";
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
@@ -255,19 +250,26 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
};
- 7BAA6ADFE10B2256913408A4 /* [CP] Copy Pods Resources */ = {
+ 5EA726953EDE65B3E30EA99E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
+ inputFileListPaths = (
+ );
inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
);
- name = "[CP] Copy Pods Resources";
outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
+ 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";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
@@ -284,24 +286,6 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
- CCDA262307B8E482935DF056 /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
- "${PODS_ROOT}/.symlinks/flutter/ios/Flutter.framework",
- );
- name = "[CP] Embed Pods Frameworks";
- outputPaths = (
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -309,8 +293,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
- 97C146F31CF9000F007C117D /* main.m in Sources */,
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -337,6 +320,79 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = 9FK3425VTA;
+ ENABLE_BITCODE = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.appleeducate.flutterCardIoExample;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
@@ -434,6 +490,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
+ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@@ -443,11 +500,10 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
- ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = "";
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = 9FK3425VTA;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -459,9 +515,13 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.varunvairavan.flutterCardIoExample;
+ PRODUCT_BUNDLE_IDENTIFIER = com.appleeducate.flutterCardIoExample;
PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_SWIFT3_OBJC_INFERENCE = On;
+ SWIFT_VERSION = 4.0;
+ VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
@@ -469,11 +529,10 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
- ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = "";
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = 9FK3425VTA;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -485,9 +544,12 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.varunvairavan.flutterCardIoExample;
+ PRODUCT_BUNDLE_IDENTIFIER = com.appleeducate.flutterCardIoExample;
PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_SWIFT3_OBJC_INFERENCE = On;
+ SWIFT_VERSION = 4.0;
+ VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
@@ -499,6 +561,7 @@
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -508,6 +571,7 @@
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 1263ac8..786d6aa 100644
--- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -67,7 +67,7 @@
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..949b678
--- /dev/null
+++ b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ BuildSystemType
+ Original
+
+
diff --git a/example/ios/Runner/AppDelegate.h b/example/ios/Runner/AppDelegate.h
deleted file mode 100644
index cf210d2..0000000
--- a/example/ios/Runner/AppDelegate.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#import
-#import
-
-@interface AppDelegate : FlutterAppDelegate
-
-@end
diff --git a/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m
deleted file mode 100644
index 112becd..0000000
--- a/example/ios/Runner/AppDelegate.m
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "AppDelegate.h"
-#include "GeneratedPluginRegistrant.h"
-
-@implementation AppDelegate
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- [GeneratedPluginRegistrant registerWithRegistry:self];
- // Override point for customization after application launch.
- return [super application:application didFinishLaunchingWithOptions:launchOptions];
-}
-
-@end
diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..71cc41e
--- /dev/null
+++ b/example/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist
index 94078cc..077c8fb 100644
--- a/example/ios/Runner/Info.plist
+++ b/example/ios/Runner/Info.plist
@@ -15,23 +15,19 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.0
+ $(FLUTTER_BUILD_NAME)
CFBundleSignature
????
CFBundleVersion
- 1
+ $(FLUTTER_BUILD_NUMBER)
LSRequiresIPhoneOS
- NSCameraUsageDescription
- To scan credit cards
UILaunchStoryboardName
LaunchScreen
+ NSCameraUsageDescription
+ To scan credit cards
UIMainStoryboardFile
Main
- UIRequiredDeviceCapabilities
-
- arm64
-
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
diff --git a/example/ios/Runner/Runner-Bridging-Header.h b/example/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..7335fdf
--- /dev/null
+++ b/example/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
\ No newline at end of file
diff --git a/example/ios/Runner/main.m b/example/ios/Runner/main.m
deleted file mode 100644
index 0ccc450..0000000
--- a/example/ios/Runner/main.m
+++ /dev/null
@@ -1,9 +0,0 @@
-#import
-#import
-#import "AppDelegate.h"
-
-int main(int argc, char * argv[]) {
- @autoreleasepool {
- return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
- }
-}
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 6fc72c7..0b3ce09 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
+import 'dart:convert';
import 'package:flutter_card_io/flutter_card_io.dart';
void main() => runApp(new MyApp());
@@ -22,17 +23,18 @@ class _MyAppState extends State {
Map details;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
- details = await FlutterCardIo.scanCard({
+ var _result = await FlutterCardIo.scanCard({
"requireExpiry": true,
"scanExpiry": true,
"requireCVV": true,
"requirePostalCode": true,
"restrictPostalCodeToNumericOnly": true,
"requireCardHolderName": true,
- "scanInstructions": "Hola! Fit the card within the box",
+ "scanInstructions": "Please fit the card in the box!",
});
-
+ details = json.decode(json.encode(_result));
} on PlatformException {
+ print("Failed");
print("Failed");
return;
}
@@ -56,7 +58,7 @@ class _MyAppState extends State {
appBar: new AppBar(
title: new Text('CardIO sample app'),
),
- body: new Column(
+ body: new ListView(
children: [
new Column(
children: _data.keys.map((String key) {
@@ -71,7 +73,7 @@ class _MyAppState extends State {
onPressed: _scanCard,
),
),
- )
+ ),
],
),
),
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index bad1f3c..28cbd5e 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -1,5 +1,9 @@
name: flutter_card_io_example
description: Demonstrates how to use the flutter_card_io plugin.
+publish_to: 'none'
+
+environment:
+ sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
@@ -7,7 +11,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
- cupertino_icons: ^0.1.0
+ cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
@@ -55,5 +59,5 @@ flutter:
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
- # For details regarding fonts from package dependencies,
+ # For details regarding fonts from package dependencies,
# see https://flutter.io/custom-fonts/#from-packages
diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart
index b37c140..60c80ea 100644
--- a/example/test/widget_test.dart
+++ b/example/test/widget_test.dart
@@ -1,8 +1,9 @@
// This is a basic Flutter widget test.
-// To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter
-// provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to
-// find child widgets in the widget tree, read text, and verify that the values of widget properties
-// are correct.
+//
+// To perform an interaction with a widget in your test, use the WidgetTester
+// utility that Flutter provides. For example, you can send tap and scroll
+// gestures. You can also use WidgetTester to find child widgets in the widget
+// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
@@ -12,14 +13,15 @@ import 'package:flutter_card_io_example/main.dart';
void main() {
testWidgets('Verify Platform version', (WidgetTester tester) async {
// Build our app and trigger a frame.
- await tester.pumpWidget(new MyApp());
+ await tester.pumpWidget(MyApp());
// Verify that platform version is retrieved.
expect(
- find.byWidgetPredicate(
- (Widget widget) =>
- widget is Text && widget.data.startsWith('Running on:'),
- ),
- findsOneWidget);
+ find.byWidgetPredicate(
+ (Widget widget) => widget is Text &&
+ widget.data.startsWith('Running on:'),
+ ),
+ findsOneWidget,
+ );
});
}
diff --git a/flutter_card_io.iml b/flutter_card_io.iml
index 9331652..73e7ebd 100644
--- a/flutter_card_io.iml
+++ b/flutter_card_io.iml
@@ -1,12 +1,14 @@
-
+
+
+
diff --git a/flutter_card_io_android.iml b/flutter_card_io_android.iml
deleted file mode 100644
index c5cfb39..0000000
--- a/flutter_card_io_android.iml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ios/.gitignore b/ios/.gitignore
index 956c87f..710ec6c 100644
--- a/ios/.gitignore
+++ b/ios/.gitignore
@@ -9,6 +9,10 @@ profile
DerivedData/
build/
+GeneratedPluginRegistrant.h
+GeneratedPluginRegistrant.m
+
+.generated/
*.pbxuser
*.mode1v3
@@ -29,3 +33,4 @@ xcuserdata
Icon?
.tags*
+/Flutter/Generated.xcconfig
diff --git a/ios/Classes/FlutterCardIoPlugin.m b/ios/Classes/FlutterCardIoPlugin.m
index d44926e..15e5eee 100644
--- a/ios/Classes/FlutterCardIoPlugin.m
+++ b/ios/Classes/FlutterCardIoPlugin.m
@@ -37,13 +37,13 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
details:nil]);
_result = nil;
}
-
+
if ([@"scanCard" isEqualToString:call.method]) {
_scanViewController.delegate = self;
-
+
_result = result;
_arguments = call.arguments;
-
+
_scanViewController.scanExpiry = [_arguments objectForKey:@"scanExpiry"] ? [[_arguments objectForKey:@"scanExpiry"] boolValue] : false;
_scanViewController.collectExpiry = [_arguments objectForKey:@"requireExpiry"] ? [[_arguments objectForKey:@"requireExpiry"] boolValue] : false;
_scanViewController.collectCVV = [_arguments objectForKey:@"requireCVV"] ? [[_arguments objectForKey:@"requireCVV"] boolValue] : false;
@@ -56,7 +56,7 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
_scanViewController.useCardIOLogo = [_arguments objectForKey:@"useCardIOLogo"] ? [[_arguments objectForKey:@"useCardIOLogo"] boolValue] : false;
_scanViewController.suppressScanConfirmation = [_arguments objectForKey:@"suppressConfirmation"] ? [[_arguments objectForKey:@"suppressConfirmation"] boolValue] : false;
_scanViewController.disableManualEntryButtons = [_arguments objectForKey:@"suppressManualEntry"] ? [[_arguments objectForKey:@"suppressManualEntry"] boolValue] : false;
-
+
[_viewController presentViewController:_scanViewController animated:YES completion:nil];
} else {
result(FlutterMethodNotImplemented);
diff --git a/ios/Classes/SwiftFlutterCardIoPlugin.swift b/ios/Classes/SwiftFlutterCardIoPlugin.swift
new file mode 100644
index 0000000..3cfc84e
--- /dev/null
+++ b/ios/Classes/SwiftFlutterCardIoPlugin.swift
@@ -0,0 +1,14 @@
+import Flutter
+import UIKit
+
+public class SwiftFlutterCardIoPlugin: NSObject, FlutterPlugin {
+ public static func register(with registrar: FlutterPluginRegistrar) {
+ let channel = FlutterMethodChannel(name: "flutter_card_io", binaryMessenger: registrar.messenger())
+ let instance = SwiftFlutterCardIoPlugin()
+ registrar.addMethodCallDelegate(instance, channel: channel)
+ }
+
+ public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
+ result("iOS " + UIDevice.current.systemVersion)
+ }
+}
diff --git a/ios/flutter_card_io.podspec b/ios/flutter_card_io.podspec
index 0dc8198..e5425c1 100644
--- a/ios/flutter_card_io.podspec
+++ b/ios/flutter_card_io.podspec
@@ -4,18 +4,19 @@
Pod::Spec.new do |s|
s.name = 'flutter_card_io'
s.version = '0.0.1'
- s.summary = 'CardIO flutter plugin.'
+ s.summary = 'A Flutter Plugin for Capturing Credit Cards with the Camera.'
s.description = <<-DESC
-CardIO flutter plugin.
+A Flutter Plugin for Capturing Credit Cards with the Camera.
DESC
- s.homepage = 'https://github.com/procedurallygenerated/flutter_card_io'
+ s.homepage = 'http://example.com'
s.license = { :file => '../LICENSE' }
- s.author = { 'Your Company' => 'hello@world.com' }
+ s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'CardIO'
+ s.static_framework = true
s.ios.deployment_target = '8.0'
end
diff --git a/lib/flutter_card_io.dart b/lib/flutter_card_io.dart
index 841a6ab..32c67ee 100644
--- a/lib/flutter_card_io.dart
+++ b/lib/flutter_card_io.dart
@@ -3,11 +3,9 @@ import 'dart:async';
import 'package:flutter/services.dart';
class FlutterCardIo {
- static const MethodChannel _channel =
- const MethodChannel('flutter_card_io');
+ static const MethodChannel _channel = const MethodChannel('flutter_card_io');
static Future scanCard(Map args) {
return _channel.invokeMethod('scanCard', args);
}
-
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 5fb8587..da8a416 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,11 +1,14 @@
name: flutter_card_io
description: CardIO plugin for flutter
-version: 0.0.3
-author: ProcedurallyGenerated
+version: 0.1.0
+authors:
+ - ProcedurallyGenerated
+ - Rody Davis Jr
homepage: https://github.com/procedurallygenerated/flutter_card_io
+
environment:
- sdk: ">=1.8.0 <3.0.0"
+ sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
@@ -16,8 +19,12 @@ dependencies:
# The following section is specific to Flutter.
flutter:
+ # This section identifies this Flutter project as a plugin project.
+ # The androidPackage and pluginClass identifiers should not ordinarily
+ # be modified. They are used by the tooling to maintain consistency when
+ # adding or updating assets for this project.
plugin:
- androidPackage: com.varunvairavan.fluttercardio
+ androidPackage: com.appleeducate.fluttercardio
pluginClass: FlutterCardIoPlugin
# To add assets to your plugin package, add an assets section, like this: