From c2ac2512ab0cb97f42381a0d87ae2e5484548d81 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 9 Aug 2021 22:11:04 +1000 Subject: [PATCH 01/11] ignore export_environment file --- .gitignore | 1 + ios/Flutter/flutter_export_environment.sh | 14 -------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 ios/Flutter/flutter_export_environment.sh diff --git a/.gitignore b/.gitignore index c8c53d7a..0b6c8f04 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ android/key.properties .vscode/ # Flutter/Dart/Pub related +ios/Flutter/flutter_export_environment.sh **/doc/api/ .dart_tool/ .flutter-plugins diff --git a/ios/Flutter/flutter_export_environment.sh b/ios/Flutter/flutter_export_environment.sh deleted file mode 100644 index 7205b3af..00000000 --- a/ios/Flutter/flutter_export_environment.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=c:\flutter" -export "FLUTTER_APPLICATION_PATH=C:\inventree-app" -export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_TARGET=lib\main.dart" -export "FLUTTER_BUILD_DIR=build" -export "SYMROOT=${SOURCE_ROOT}/../build\ios" -export "FLUTTER_BUILD_NAME=0.4.3" -export "FLUTTER_BUILD_NUMBER=25" -export "DART_OBFUSCATION=false" -export "TRACK_WIDGET_CREATION=false" -export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=.packages" From 540c6e58fa2347d0a2a1e63f6075765ad5a2fb8f Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 9 Aug 2021 23:07:54 +1000 Subject: [PATCH 02/11] Fix hard-coded path --- lib/widget/home.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widget/home.dart b/lib/widget/home.dart index 58ffad5e..08c3a5ef 100644 --- a/lib/widget/home.dart +++ b/lib/widget/home.dart @@ -3,7 +3,7 @@ import 'package:inventree/user_profile.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'file:///C:/inventree-app/lib/l10.dart'; +import 'package:inventree/l10.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; From c658ae48d8684ad93e08b24650bffe5e33eb4310 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 9 Aug 2021 23:41:15 +1000 Subject: [PATCH 03/11] Getting iOS build to compile --- ios/Flutter/Debug.xcconfig | 1 + ios/Flutter/Flutter.podspec | 18 +++ ios/Flutter/Release.xcconfig | 1 + ios/Podfile | 42 +++++++ ios/Podfile.lock | 101 ++++++++++++++++ ios/Runner.xcodeproj/project.pbxproj | 113 +++++++++++++++--- .../contents.xcworkspacedata | 2 +- .../contents.xcworkspacedata | 3 + 8 files changed, 263 insertions(+), 18 deletions(-) create mode 100644 ios/Flutter/Flutter.podspec create mode 100644 ios/Podfile create mode 100644 ios/Podfile.lock diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index 592ceee8..ec97fc6f 100644 --- a/ios/Flutter/Debug.xcconfig +++ b/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Flutter/Flutter.podspec b/ios/Flutter/Flutter.podspec new file mode 100644 index 00000000..2c4421cf --- /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! +# This is a generated file; do not edit or check into version control. +# + +Pod::Spec.new do |s| + s.name = 'Flutter' + s.version = '1.0.0' + s.summary = 'High-performance, high-fidelity mobile apps.' + 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' + # Framework linking is handled by Flutter tooling, not CocoaPods. + # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. + s.vendored_frameworks = 'path/to/nothing' +end diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig index 592ceee8..c4855bfe 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 00000000..aac43059 --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,42 @@ +# Uncomment this line to define a global platform for your projects +platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 00000000..1ace8c7a --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,101 @@ +PODS: + - audioplayers (0.0.1): + - Flutter + - camera (0.0.1): + - Flutter + - device_info_plus (0.0.1): + - Flutter + - Flutter (1.0.0) + - FMDB (2.7.5): + - FMDB/standard (= 2.7.5) + - FMDB/standard (2.7.5) + - image_picker (0.0.1): + - Flutter + - MTBBarcodeScanner (5.0.11) + - package_info_plus (0.4.5): + - Flutter + - path_provider (0.0.1): + - Flutter + - qr_code_scanner (0.2.0): + - Flutter + - MTBBarcodeScanner + - Sentry (6.2.1): + - Sentry/Core (= 6.2.1) + - Sentry/Core (6.2.1) + - sentry_flutter (0.0.1): + - Flutter + - Sentry (~> 6.2.1) + - shared_preferences (0.0.1): + - Flutter + - sqflite (0.0.2): + - Flutter + - FMDB (>= 2.7.5) + - url_launcher (0.0.1): + - Flutter + +DEPENDENCIES: + - audioplayers (from `.symlinks/plugins/audioplayers/ios`) + - camera (from `.symlinks/plugins/camera/ios`) + - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) + - Flutter (from `Flutter`) + - image_picker (from `.symlinks/plugins/image_picker/ios`) + - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) + - path_provider (from `.symlinks/plugins/path_provider/ios`) + - qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`) + - sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`) + - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) + - sqflite (from `.symlinks/plugins/sqflite/ios`) + - url_launcher (from `.symlinks/plugins/url_launcher/ios`) + +SPEC REPOS: + trunk: + - FMDB + - MTBBarcodeScanner + - Sentry + +EXTERNAL SOURCES: + audioplayers: + :path: ".symlinks/plugins/audioplayers/ios" + camera: + :path: ".symlinks/plugins/camera/ios" + device_info_plus: + :path: ".symlinks/plugins/device_info_plus/ios" + Flutter: + :path: Flutter + image_picker: + :path: ".symlinks/plugins/image_picker/ios" + package_info_plus: + :path: ".symlinks/plugins/package_info_plus/ios" + path_provider: + :path: ".symlinks/plugins/path_provider/ios" + qr_code_scanner: + :path: ".symlinks/plugins/qr_code_scanner/ios" + sentry_flutter: + :path: ".symlinks/plugins/sentry_flutter/ios" + shared_preferences: + :path: ".symlinks/plugins/shared_preferences/ios" + sqflite: + :path: ".symlinks/plugins/sqflite/ios" + url_launcher: + :path: ".symlinks/plugins/url_launcher/ios" + +SPEC CHECKSUMS: + audioplayers: 455322b54050b30ea4b1af7cd9e9d105f74efa8c + camera: 3164201dc344383e62282964016528c4f5a9ad50 + device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed + Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c + FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a + image_picker: e06f7a68f000bd36f552c1847e33cda96ed31f1f + MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb + package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e + path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c + qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e + Sentry: 9b922b396b0e0bca8516a10e36b0ea3ebea5faf7 + sentry_flutter: 5b3c6d717db5b7482504a313c831b318297d4d37 + shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d + sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 + url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef + +PODFILE CHECKSUM: a0aa7ddb96bc3e003aa8b0367963d0cf20ba3eed + +COCOAPODS: 1.10.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 3a4c6fd9..7c9c9b67 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -9,16 +9,13 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 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, ); }; }; - 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 */; }; 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 */; }; + D95D9CD46BE28F7F69DBC0F6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17174C4875437972A2F81384 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -28,8 +25,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -39,20 +34,22 @@ /* 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 = ""; }; + 17174C4875437972A2F81384 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2915B746BE5A49808AEF0B53 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 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 = ""; }; + 4DF6EB60A0DFDD5DCC6068B9 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; 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 = ""; }; + B736EA92037881D66B904D50 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -60,20 +57,25 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, + D95D9CD46BE28F7F69DBC0F6 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 3B8B22940C363C2F0DDB698A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 17174C4875437972A2F81384 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 3B80C3931E831B6300D905FE /* App.framework */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEBA1CF902C7004384FC /* Flutter.framework */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */, @@ -87,7 +89,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, + A1294DC28EC0B14618BC3AE2 /* Pods */, + 3B8B22940C363C2F0DDB698A /* Frameworks */, ); sourceTree = ""; }; @@ -123,6 +126,17 @@ name = "Supporting Files"; sourceTree = ""; }; + A1294DC28EC0B14618BC3AE2 /* Pods */ = { + isa = PBXGroup; + children = ( + B736EA92037881D66B904D50 /* Pods-Runner.debug.xcconfig */, + 2915B746BE5A49808AEF0B53 /* Pods-Runner.release.xcconfig */, + 4DF6EB60A0DFDD5DCC6068B9 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -130,12 +144,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 1FC41317773568DEA41BE5E8 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + D99043282EEEA9EEE1DDBA31 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -194,6 +210,28 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 1FC41317773568DEA41BE5E8 /* [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 = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + 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"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -206,7 +244,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; @@ -222,6 +260,50 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + D99043282EEEA9EEE1DDBA31 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", + "${BUILT_PRODUCTS_DIR}/MTBBarcodeScanner/MTBBarcodeScanner.framework", + "${BUILT_PRODUCTS_DIR}/Sentry/Sentry.framework", + "${BUILT_PRODUCTS_DIR}/audioplayers/audioplayers.framework", + "${BUILT_PRODUCTS_DIR}/camera/camera.framework", + "${BUILT_PRODUCTS_DIR}/device_info_plus/device_info_plus.framework", + "${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework", + "${BUILT_PRODUCTS_DIR}/package_info_plus/package_info_plus.framework", + "${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework", + "${BUILT_PRODUCTS_DIR}/qr_code_scanner/qr_code_scanner.framework", + "${BUILT_PRODUCTS_DIR}/sentry_flutter/sentry_flutter.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}/MTBBarcodeScanner.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Sentry.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/audioplayers.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/camera.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info_plus.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info_plus.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/qr_code_scanner.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sentry_flutter.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; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -259,7 +341,6 @@ /* Begin XCBuildConfiguration section */ 249021D3217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -331,7 +412,6 @@ }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -385,7 +465,6 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a16..919434a6 100644 --- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a16..21a3cc14 100644 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + From d442206c1265a43200657203b3a166d052f92cdc Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 9 Aug 2021 23:53:18 +1000 Subject: [PATCH 04/11] change default user settings values --- lib/settings/app_settings.dart | 8 ++++---- lib/widget/category_display.dart | 2 +- lib/widget/location_display.dart | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/settings/app_settings.dart b/lib/settings/app_settings.dart index ddad7fd6..0f0938b9 100644 --- a/lib/settings/app_settings.dart +++ b/lib/settings/app_settings.dart @@ -35,8 +35,8 @@ class _InvenTreeAppSettingsState extends State { barcodeSounds = await InvenTreeSettingsManager().getValue("barcodeSounds", true) as bool; serverSounds = await InvenTreeSettingsManager().getValue("serverSounds", true) as bool; - partSubcategory = await InvenTreeSettingsManager().getValue("partSubcategory", false) as bool; - stockSublocation = await InvenTreeSettingsManager().getValue("stockSublocation", false) as bool; + partSubcategory = await InvenTreeSettingsManager().getValue("partSubcategory", true) as bool; + stockSublocation = await InvenTreeSettingsManager().getValue("stockSublocation", true) as bool; setState(() { }); @@ -62,7 +62,7 @@ class _InvenTreeAppSettingsState extends State { void setPartSubcategory(bool en) async { await InvenTreeSettingsManager().setValue("partSubcategory", en); - partSubcategory = await InvenTreeSettingsManager().getValue("partSubcategory", false); + partSubcategory = await InvenTreeSettingsManager().getValue("partSubcategory", true); setState(() { }); @@ -70,7 +70,7 @@ class _InvenTreeAppSettingsState extends State { void setStockSublocation(bool en) async { await InvenTreeSettingsManager().setValue("stockSublocation", en); - stockSublocation = await InvenTreeSettingsManager().getValue("stockSublocation", false); + stockSublocation = await InvenTreeSettingsManager().getValue("stockSublocation", true); setState(() { }); diff --git a/lib/widget/category_display.dart b/lib/widget/category_display.dart index 04f03a74..e309b535 100644 --- a/lib/widget/category_display.dart +++ b/lib/widget/category_display.dart @@ -383,7 +383,7 @@ class _PaginatedPartListState extends State { params["search"] = _searchTerm; - final bool cascade = await InvenTreeSettingsManager().getValue("partSubcategory", false); + final bool cascade = await InvenTreeSettingsManager().getValue("partSubcategory", true); params["cascade"] = "${cascade}"; final page = await InvenTreePart().listPaginated(_pageSize, pageKey, filters: params); diff --git a/lib/widget/location_display.dart b/lib/widget/location_display.dart index 233d0c3e..cab65a1f 100644 --- a/lib/widget/location_display.dart +++ b/lib/widget/location_display.dart @@ -438,7 +438,7 @@ class _PaginatedStockListState extends State { params["search"] = "${_searchTerm}"; // Do we include stock items from sub-locations? - final bool cascade = await InvenTreeSettingsManager().getValue("stockSublocation", false); + final bool cascade = await InvenTreeSettingsManager().getValue("stockSublocation", true); params["cascade"] = "${cascade}"; final page = await InvenTreeStockItem().listPaginated(_pageSize, pageKey, filters: params); From 248ca6f328fb7c0f91e68498f4afcfbf8127d3f7 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 9 Aug 2021 23:53:48 +1000 Subject: [PATCH 05/11] Do no provide a "drawer" unless on the home screen --- lib/widget/refreshable_state.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widget/refreshable_state.dart b/lib/widget/refreshable_state.dart index 27b0d6a6..94134e00 100644 --- a/lib/widget/refreshable_state.dart +++ b/lib/widget/refreshable_state.dart @@ -97,7 +97,7 @@ abstract class RefreshableState extends State { return Scaffold( key: refreshableKey, appBar: getAppBar(context), - drawer: getDrawer(context), + drawer: null, // getDrawer(context), floatingActionButton: getFab(context), body: Builder( builder: (BuildContext context) { From 2d005ba86b9e081e943832ecc7ef16178e3d2ac4 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 9 Aug 2021 23:59:53 +1000 Subject: [PATCH 06/11] Adds app bar with back button to barcode scanning widget --- lib/barcode.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/barcode.dart b/lib/barcode.dart index 3fb7bf96..0e305c6f 100644 --- a/lib/barcode.dart +++ b/lib/barcode.dart @@ -514,6 +514,9 @@ class _QRViewState extends State { Widget build(BuildContext context) { return Scaffold( + appBar: AppBar( + title: Text(_handler.getOverlayText(context)), + ), body: Stack( children: [ Column( From baa3d3a1bb4f1f370e10b234465a23a3fa442c38 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 10 Aug 2021 00:10:20 +1000 Subject: [PATCH 07/11] Display "batch code" for stock item --- .gitmodules | 2 +- lib/inventree/stock.dart | 2 ++ lib/l10n | 2 +- lib/widget/stock_detail.dart | 10 ++++++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index d82de0d3..6f815f87 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "lib/l10n"] path = lib/l10n - url = https://github.com/inventree/inventree-app-i18n + url = git@github.com:SchrodingersGat/inventreeapp.git diff --git a/lib/inventree/stock.dart b/lib/inventree/stock.dart index 2147bd05..5cc44739 100644 --- a/lib/inventree/stock.dart +++ b/lib/inventree/stock.dart @@ -220,6 +220,8 @@ class InvenTreeStockItem extends InvenTreeModel { int get status => jsondata['status'] ?? -1; + String get batch => jsondata["batch"] ?? ""; + int get partId => jsondata['part'] ?? -1; String get purchasePrice => jsondata['purchase_price'] ?? ""; diff --git a/lib/l10n b/lib/l10n index c19a9d9a..1e1e4f9b 160000 --- a/lib/l10n +++ b/lib/l10n @@ -1 +1 @@ -Subproject commit c19a9d9af449f6a36df780c69cf1bd2bb087c252 +Subproject commit 1e1e4f9b2494121098d2862f65e995ef8e420b8b diff --git a/lib/widget/stock_detail.dart b/lib/widget/stock_detail.dart index aecfec18..c6e5f2e7 100644 --- a/lib/widget/stock_detail.dart +++ b/lib/widget/stock_detail.dart @@ -458,6 +458,16 @@ class _StockItemDisplayState extends RefreshableState { ); } + if (item.batch.isNotEmpty) { + tiles.add( + ListTile( + title: Text(L10().batchCode), + subtitle: Text(item.batch), + leading: FaIcon(FontAwesomeIcons.layerGroup), + ) + ); + } + // Last update? var update_date = item.updatedDateString; From 87864d2f07bbc8c90ebfaae3157c7873d0170e62 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 10 Aug 2021 00:12:41 +1000 Subject: [PATCH 08/11] display stock item packaging --- lib/inventree/stock.dart | 2 ++ lib/l10n | 2 +- lib/widget/stock_detail.dart | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/inventree/stock.dart b/lib/inventree/stock.dart index 5cc44739..ebd9cdb6 100644 --- a/lib/inventree/stock.dart +++ b/lib/inventree/stock.dart @@ -220,6 +220,8 @@ class InvenTreeStockItem extends InvenTreeModel { int get status => jsondata['status'] ?? -1; + String get packaging => jsondata["packaging"] ?? ""; + String get batch => jsondata["batch"] ?? ""; int get partId => jsondata['part'] ?? -1; diff --git a/lib/l10n b/lib/l10n index 1e1e4f9b..925abac9 160000 --- a/lib/l10n +++ b/lib/l10n @@ -1 +1 @@ -Subproject commit 1e1e4f9b2494121098d2862f65e995ef8e420b8b +Subproject commit 925abac9acce5a2abffd6f311ee2a4617710e0a3 diff --git a/lib/widget/stock_detail.dart b/lib/widget/stock_detail.dart index c6e5f2e7..b1f64123 100644 --- a/lib/widget/stock_detail.dart +++ b/lib/widget/stock_detail.dart @@ -468,6 +468,16 @@ class _StockItemDisplayState extends RefreshableState { ); } + if (item.packaging.isNotEmpty) { + tiles.add( + ListTile( + title: Text(L10().packaging), + subtitle: Text(item.packaging), + leading: FaIcon(FontAwesomeIcons.box), + ) + ); + } + // Last update? var update_date = item.updatedDateString; From 6233102c46237e94ea7ef43dc5cbc5ec7ac4ea76 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 10 Aug 2021 00:13:53 +1000 Subject: [PATCH 09/11] Update release notes --- assets/release_notes.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/assets/release_notes.md b/assets/release_notes.md index b98744e2..6460a48a 100644 --- a/assets/release_notes.md +++ b/assets/release_notes.md @@ -1,6 +1,13 @@ ## InvenTree App Release Notes --- +### 0.4.4 - August 2021 +--- + +- App bar now always displays "back" button +- Display "batch code" information for stock item +- Display "packagin" information for stock item + ### 0.4.3 - August 2021 --- From 8a8b38da933839db8f5993d69994b21f610bcec1 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 10 Aug 2021 08:04:27 +1000 Subject: [PATCH 10/11] Fix translation submodule --- lib/l10n | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/l10n b/lib/l10n index 925abac9..ad2e43ea 160000 --- a/lib/l10n +++ b/lib/l10n @@ -1 +1 @@ -Subproject commit 925abac9acce5a2abffd6f311ee2a4617710e0a3 +Subproject commit ad2e43ea5e105b776e9eba81f0295cfda2cb0451 From 140687c3861656be5f8e4fe8e554253863f72603 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 10 Aug 2021 08:06:52 +1000 Subject: [PATCH 11/11] Refactorin' --- lib/inventree/stock.dart | 8 ++++---- lib/widget/stock_detail.dart | 12 ++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/inventree/stock.dart b/lib/inventree/stock.dart index ebd9cdb6..fa7c4e8b 100644 --- a/lib/inventree/stock.dart +++ b/lib/inventree/stock.dart @@ -246,11 +246,11 @@ class InvenTreeStockItem extends InvenTreeModel { } } - String? get updatedDateString { + String get updatedDateString { var _updated = updatedDate; if (_updated == null) { - return null; + return ""; } final DateFormat _format = DateFormat("yyyy-MM-dd"); @@ -266,11 +266,11 @@ class InvenTreeStockItem extends InvenTreeModel { } } - String? get stocktakeDateString { + String get stocktakeDateString { var _stocktake = stocktakeDate; if (_stocktake == null) { - return null; + return ""; } final DateFormat _format = DateFormat("yyyy-MM-dd"); diff --git a/lib/widget/stock_detail.dart b/lib/widget/stock_detail.dart index b1f64123..2f7e6103 100644 --- a/lib/widget/stock_detail.dart +++ b/lib/widget/stock_detail.dart @@ -479,27 +479,23 @@ class _StockItemDisplayState extends RefreshableState { } // Last update? - var update_date = item.updatedDateString; - - if (update_date != null) { + if (item.updatedDateString.isNotEmpty) { tiles.add( ListTile( title: Text(L10().lastUpdated), - subtitle: Text(update_date), + subtitle: Text(item.updatedDateString), leading: FaIcon(FontAwesomeIcons.calendarAlt) ) ); } // Stocktake? - var stocktake_date = item.stocktakeDateString; - - if (stocktake_date != null) { + if (item.stocktakeDateString.isNotEmpty) { tiles.add( ListTile( title: Text(L10().lastStocktake), - subtitle: Text(stocktake_date), + subtitle: Text(item.stocktakeDateString), leading: FaIcon(FontAwesomeIcons.calendarAlt) ) );