From 8c064c7c84c62fe705af8acc46067d76744cdf84 Mon Sep 17 00:00:00 2001 From: urmilshroff Date: Thu, 12 Dec 2019 17:15:29 +0530 Subject: [PATCH] Release v1.3 --- .flutter-plugins-dependencies | 2 +- .gitignore | 1 + ios/Flutter/Flutter.podspec | 18 +++++ ios/Flutter/flutter_export_environment.sh | 5 +- ios/Podfile | 90 ++++++++++++++--------- ios/Podfile.lock | 26 +++++-- ios/Runner.xcodeproj/project.pbxproj | 22 +----- lib/utils/HelperUtils.dart | 7 +- pubspec.lock | 42 ++++++++++- pubspec.yaml | 4 +- 10 files changed, 146 insertions(+), 71 deletions(-) create mode 100644 ios/Flutter/Flutter.podspec diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 9687d18..e7cb06b 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_local_notifications","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"shared_preferences","dependencies":[]},{"name":"sqflite","dependencies":[]}]} \ No newline at end of file +{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_local_notifications","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"shared_preferences","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}]} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6a8c947..b8fbc01 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,4 @@ !**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages lib/temp.dart +android/app/key.jks diff --git a/ios/Flutter/Flutter.podspec b/ios/Flutter/Flutter.podspec new file mode 100644 index 0000000..5ca3041 --- /dev/null +++ b/ios/Flutter/Flutter.podspec @@ -0,0 +1,18 @@ +# +# NOTE: This podspec is NOT to be published. It is only used as a local source! +# + +Pod::Spec.new do |s| + s.name = 'Flutter' + s.version = '1.0.0' + s.summary = 'High-performance, high-fidelity mobile apps.' + s.description = <<-DESC +Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. + DESC + s.homepage = 'https://flutter.io' + s.license = { :type => 'MIT' } + s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } + s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } + s.ios.deployment_target = '8.0' + s.vendored_frameworks = 'Flutter.framework' +end diff --git a/ios/Flutter/flutter_export_environment.sh b/ios/Flutter/flutter_export_environment.sh index a0f1f3e..b8f19f9 100755 --- a/ios/Flutter/flutter_export_environment.sh +++ b/ios/Flutter/flutter_export_environment.sh @@ -2,9 +2,10 @@ # This is a generated file; do not edit or check into version control. export "FLUTTER_ROOT=/Users/urmilshroff/Development/GitHub/Clones/flutter" export "FLUTTER_APPLICATION_PATH=/Users/urmilshroff/Development/Apps/Projects/goalkeeper" -export "FLUTTER_TARGET=lib/main.dart" +export "FLUTTER_TARGET=/Users/urmilshroff/Development/Apps/Projects/goalkeeper/lib/main.dart" export "FLUTTER_BUILD_DIR=build" export "SYMROOT=${SOURCE_ROOT}/../build/ios" -export "FLUTTER_FRAMEWORK_DIR=/Users/urmilshroff/Development/GitHub/Clones/flutter/bin/cache/artifacts/engine/ios" +export "FLUTTER_FRAMEWORK_DIR=/Users/urmilshroff/Development/GitHub/Clones/flutter/bin/cache/artifacts/engine/ios-release" export "FLUTTER_BUILD_NAME=1.2.0" export "FLUTTER_BUILD_NUMBER=3" +export "TRACK_WIDGET_CREATION=true" diff --git a/ios/Podfile b/ios/Podfile index bf79045..b30a428 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '10.0' +# platform :ios, '9.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -15,58 +15,76 @@ def parse_KV_file(file, separator='=') if !File.exists? file_abs_path return []; end - pods_ary = [] + generated_key_values = {} skip_line_start_symbols = ["#", "/"] - File.foreach(file_abs_path) { |line| - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } - plugin = line.split(pattern=separator) - if plugin.length == 2 - podname = plugin[0].strip() - path = plugin[1].strip() - podpath = File.expand_path("#{path}", file_abs_path) - pods_ary.push({:name => podname, :path => podpath}); - else - puts "Invalid plugin specification: #{line}" - end - } - return pods_ary + File.foreach(file_abs_path) do |line| + next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } + plugin = line.split(pattern=separator) + if plugin.length == 2 + podname = plugin[0].strip() + path = plugin[1].strip() + podpath = File.expand_path("#{path}", file_abs_path) + generated_key_values[podname] = podpath + else + puts "Invalid plugin specification: #{line}" + end + end + generated_key_values end target 'Runner' do use_frameworks! + use_modular_headers! + + # Flutter Pod - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - system('rm -rf .symlinks') - system('mkdir -p .symlinks/plugins') + copied_flutter_dir = File.join(__dir__, 'Flutter') + copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') + copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') + unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) + # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. + # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. + # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. - # Flutter Pods - generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') - if generated_xcode_build_settings.empty? - puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." - end - generated_xcode_build_settings.map { |p| - if p[:name] == 'FLUTTER_FRAMEWORK_DIR' - symlink = File.join('.symlinks', 'flutter') - File.symlink(File.dirname(p[:path]), symlink) - pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) + generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') + unless File.exist?(generated_xcode_build_settings_path) + raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" end - } + generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) + cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; + + unless File.exist?(copied_framework_path) + FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) + end + unless File.exist?(copied_podspec_path) + FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) + end + end + + # Keep pod path relative so it can be checked into Podfile.lock. + pod 'Flutter', :path => 'Flutter' # Plugin Pods + + # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock + # referring to absolute paths on developers' machines. + system('rm -rf .symlinks') + system('mkdir -p .symlinks/plugins') plugin_pods = parse_KV_file('../.flutter-plugins') - plugin_pods.map { |p| - symlink = File.join('.symlinks', 'plugins', p[:name]) - File.symlink(p[:path], symlink) - pod p[:name], :path => File.join(symlink, 'ios') - } + plugin_pods.each do |name, path| + symlink = File.join('.symlinks', 'plugins', name) + File.symlink(path, symlink) + pod name, :path => File.join(symlink, 'ios') + end end +# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. +install! 'cocoapods', :disable_input_output_paths => true + post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ENABLE_BITCODE'] = 'NO' - config.build_settings['SWIFT_VERSION'] = '5.0' end end end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 10f177b..fe1bd23 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -14,14 +14,20 @@ PODS: - FMDB (~> 2.7.2) - url_launcher (0.0.1): - Flutter + - url_launcher_macos (0.0.1): + - Flutter + - url_launcher_web (0.0.1): + - Flutter DEPENDENCIES: - - Flutter (from `.symlinks/flutter/ios`) + - Flutter (from `Flutter`) - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - path_provider (from `.symlinks/plugins/path_provider/ios`) - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`) - url_launcher (from `.symlinks/plugins/url_launcher/ios`) + - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`) + - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`) SPEC REPOS: https://github.com/cocoapods/specs.git: @@ -29,7 +35,7 @@ SPEC REPOS: EXTERNAL SOURCES: Flutter: - :path: ".symlinks/flutter/ios" + :path: Flutter flutter_local_notifications: :path: ".symlinks/plugins/flutter_local_notifications/ios" path_provider: @@ -40,16 +46,22 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/sqflite/ios" url_launcher: :path: ".symlinks/plugins/url_launcher/ios" + url_launcher_macos: + :path: ".symlinks/plugins/url_launcher_macos/ios" + url_launcher_web: + :path: ".symlinks/plugins/url_launcher_web/ios" SPEC CHECKSUMS: - Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a + Flutter: 0e3d915762c693b495b44d77113d4970485de6ec flutter_local_notifications: 9e4738ce2471c5af910d961a6b7eadcf57c50186 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - path_provider: f96fff6166a8867510d2c25fdcc346327cc4b259 + path_provider: fb74bd0465e96b594bb3b5088ee4a4e7bb1f2a9d shared_preferences: 1feebfa37bb57264736e16865e7ffae7fc99b523 - sqflite: ff1d9da63c06588cc8d1faf7256d741f16989d5a - url_launcher: 0067ddb8f10d36786672aa0722a21717dba3a298 + sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 + url_launcher: a1c0cc845906122c4784c542523d8cacbded5626 + url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313 + url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c -PODFILE CHECKSUM: e9e4b08dad07817f0e575a49acddc68ee5e8031d +PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83 COCOAPODS: 1.7.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 68fb4b6..a8df96d 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -79,7 +79,6 @@ 5F6FC667464858B423BE4478 /* Pods-Runner.release.xcconfig */, F4F159983C2B2CCA5A30C78B /* Pods-Runner.profile.xcconfig */, ); - name = Pods; path = Pods; sourceTree = ""; }; @@ -278,24 +277,9 @@ files = ( ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", - "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", - "${BUILT_PRODUCTS_DIR}/flutter_local_notifications/flutter_local_notifications.framework", - "${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework", - "${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework", - "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework", - "${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_local_notifications.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -402,7 +386,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = tech.urmilshroff.goalkeeper; + PRODUCT_BUNDLE_IDENTIFIER = "tech.urmilshroff.goalkeeper-ios"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 4.0; VERSIONING_SYSTEM = "apple-generic"; @@ -531,7 +515,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = tech.urmilshroff.goalkeeper; + PRODUCT_BUNDLE_IDENTIFIER = "tech.urmilshroff.goalkeeper-ios"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -560,7 +544,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = tech.urmilshroff.goalkeeper; + PRODUCT_BUNDLE_IDENTIFIER = "tech.urmilshroff.goalkeeper-ios"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_SWIFT3_OBJC_INFERENCE = On; diff --git a/lib/utils/HelperUtils.dart b/lib/utils/HelperUtils.dart index 4ad2f97..164104b 100644 --- a/lib/utils/HelperUtils.dart +++ b/lib/utils/HelperUtils.dart @@ -1,5 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:url_launcher/url_launcher.dart'; void showSnackBar(BuildContext context, String message) { final snackBar = SnackBar( @@ -11,9 +12,9 @@ void showSnackBar(BuildContext context, String message) { } launchURL(String url) async { -// if (await canLaunch(url)) { -// await launch(url); -// } + if (await canLaunch(url)) { + await launch(url); + } } String getFormattedDate(DateTime datetime) { diff --git a/pubspec.lock b/pubspec.lock index 922bc21..e35a7d2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -109,6 +109,11 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" image: dependency: transitive description: @@ -172,6 +177,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.2.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" quiver: dependency: transitive description: @@ -254,6 +266,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.6" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + url: "https://pub.dartlang.org" + source: hosted + version: "5.4.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.0+1" vector_math: dependency: transitive description: @@ -277,4 +317,4 @@ packages: version: "2.1.16" sdks: dart: ">=2.5.0 <3.0.0" - flutter: ">=1.10.0 <2.0.0" + flutter: ">=1.12.8 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 23cf41e..4d092d4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: goalkeeper description: A simple Flutter app to help you achieve your goals! -version: 1.2+3 +version: 1.3+4 environment: sdk: ">=2.1.0 <3.0.0" @@ -17,7 +17,7 @@ dependencies: flutter_speed_dial: ^1.2.5 path_provider: ^1.5.1 sqflite: ^1.1.8 -# url_launcher: ^5.2.4 + url_launcher: ^5.4.1 dev_dependencies: flutter_test: