diff --git a/ios/ExportOptionsDev.plist b/ios/ExportOptionsDev.plist new file mode 100644 index 0000000..a61db24 --- /dev/null +++ b/ios/ExportOptionsDev.plist @@ -0,0 +1,18 @@ + + + + + compileBitcode + + method + development + signingStyle + automatic + stripSwiftSymbols + + teamID + XXXXXXXXX + thinning + <none> + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index 592ceee..ec97fc6 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/Release.xcconfig b/ios/Flutter/Release.xcconfig index 592ceee..c4855bf 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 0000000..07a6873 --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project +platform :ios, '14.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 +pod 'GoogleMaps' +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +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 0000000..8f88fc9 --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,109 @@ +PODS: + - app_links (0.0.1): + - Flutter + - background_fetch (1.3.7): + - Flutter + - beacon_broadcast (0.0.1): + - Flutter + - Flutter (1.0.0) + - flutter_beacon (0.3.0): + - Flutter + - flutter_blue_plus (0.0.1): + - Flutter + - flutter_native_splash (0.0.1): + - Flutter + - google_maps_flutter_ios (0.0.1): + - Flutter + - GoogleMaps (< 10.0, >= 8.4) + - GoogleMaps (8.4.0): + - GoogleMaps/Maps (= 8.4.0) + - GoogleMaps/Base (8.4.0) + - GoogleMaps/Maps (8.4.0): + - GoogleMaps/Base + - image_picker_ios (0.0.1): + - Flutter + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS + - permission_handler_apple (9.3.0): + - Flutter + - shared_preferences_foundation (0.0.1): + - Flutter + - FlutterMacOS + - sqflite (0.0.3): + - Flutter + - FlutterMacOS + - url_launcher_ios (0.0.1): + - Flutter + +DEPENDENCIES: + - app_links (from `.symlinks/plugins/app_links/ios`) + - background_fetch (from `.symlinks/plugins/background_fetch/ios`) + - beacon_broadcast (from `.symlinks/plugins/beacon_broadcast/ios`) + - Flutter (from `Flutter`) + - flutter_beacon (from `.symlinks/plugins/flutter_beacon/ios`) + - flutter_blue_plus (from `.symlinks/plugins/flutter_blue_plus/ios`) + - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) + - google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`) + - GoogleMaps + - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) + - sqflite (from `.symlinks/plugins/sqflite/darwin`) + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) + +SPEC REPOS: + trunk: + - GoogleMaps + +EXTERNAL SOURCES: + app_links: + :path: ".symlinks/plugins/app_links/ios" + background_fetch: + :path: ".symlinks/plugins/background_fetch/ios" + beacon_broadcast: + :path: ".symlinks/plugins/beacon_broadcast/ios" + Flutter: + :path: Flutter + flutter_beacon: + :path: ".symlinks/plugins/flutter_beacon/ios" + flutter_blue_plus: + :path: ".symlinks/plugins/flutter_blue_plus/ios" + flutter_native_splash: + :path: ".symlinks/plugins/flutter_native_splash/ios" + google_maps_flutter_ios: + :path: ".symlinks/plugins/google_maps_flutter_ios/ios" + image_picker_ios: + :path: ".symlinks/plugins/image_picker_ios/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" + permission_handler_apple: + :path: ".symlinks/plugins/permission_handler_apple/ios" + shared_preferences_foundation: + :path: ".symlinks/plugins/shared_preferences_foundation/darwin" + sqflite: + :path: ".symlinks/plugins/sqflite/darwin" + url_launcher_ios: + :path: ".symlinks/plugins/url_launcher_ios/ios" + +SPEC CHECKSUMS: + app_links: e70ca16b4b0f88253b3b3660200d4a10b4ea9795 + background_fetch: 39f11371c0dce04b001c4bfd5e782bcccb0a85e2 + beacon_broadcast: 2c2562111f7b7e0f1ab59487f6bc805805e3c9f3 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_beacon: 2525df9d96b904623f325968a73bac805e648119 + flutter_blue_plus: 4837da7d00cf5d441fdd6635b3a57f936778ea96 + flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778 + google_maps_flutter_ios: 5bc2be60ad012e79b182ce0fb0ef5030a50fb03e + GoogleMaps: 8939898920281c649150e0af74aa291c60f2e77d + image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1 + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 + shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 + sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec + url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe + +PODFILE CHECKSUM: 5417121c4c560a793b26e519bab532d6d4b14174 + +COCOAPODS: 1.15.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 1977670..40a6015 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -8,12 +8,14 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 1ADEE7784A8F2042454BDC8A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67DED794A8C06C932FD0E596 /* Pods_Runner.framework */; }; 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 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 */; }; + BE227A3095EE0B0580D77696 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B5B6A5CE0A16B41B7B72191 /* Pods_RunnerTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -40,11 +42,17 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 12FC7AF6D7F449933F1F63AE /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 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 = ""; }; + 18D7317874E33916AD0519E6 /* 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 = ""; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 3B5B6A5CE0A16B41B7B72191 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3CBE9C163AEF9B42513AAEDB /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 632F6D6A85FE4CEB09773388 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 67DED794A8C06C932FD0E596 /* 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 = ""; }; @@ -55,19 +63,43 @@ 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 = ""; }; + D7170EEBEAC6220397D32B9A /* 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 = ""; }; + F237034E4782A77ECC50461B /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 6264B9BBA9F1A8E965F921AD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BE227A3095EE0B0580D77696 /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 1ADEE7784A8F2042454BDC8A /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 2B7583A2745A918AAD0A22A8 /* Pods */ = { + isa = PBXGroup; + children = ( + 18D7317874E33916AD0519E6 /* Pods-Runner.debug.xcconfig */, + D7170EEBEAC6220397D32B9A /* Pods-Runner.release.xcconfig */, + F237034E4782A77ECC50461B /* Pods-Runner.profile.xcconfig */, + 3CBE9C163AEF9B42513AAEDB /* Pods-RunnerTests.debug.xcconfig */, + 12FC7AF6D7F449933F1F63AE /* Pods-RunnerTests.release.xcconfig */, + 632F6D6A85FE4CEB09773388 /* Pods-RunnerTests.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; 331C8082294A63A400263BE5 /* RunnerTests */ = { isa = PBXGroup; children = ( @@ -76,6 +108,15 @@ path = RunnerTests; sourceTree = ""; }; + 95C513F485D015462A6C3E43 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 67DED794A8C06C932FD0E596 /* Pods_Runner.framework */, + 3B5B6A5CE0A16B41B7B72191 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -94,6 +135,8 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, + 2B7583A2745A918AAD0A22A8 /* Pods */, + 95C513F485D015462A6C3E43 /* Frameworks */, ); sourceTree = ""; }; @@ -128,8 +171,10 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( + B48D6B6088C326A550B881A7 /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, + 6264B9BBA9F1A8E965F921AD /* Frameworks */, ); buildRules = ( ); @@ -145,12 +190,15 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + C1DF7A2F3C0DB56F7CEE4C36 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + A7938D2BB94A78D90A347494 /* [CP] Embed Pods Frameworks */, + 017D5EE98B57A425072AEDED /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -222,6 +270,23 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 017D5EE98B57A425072AEDED /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -253,6 +318,67 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + A7938D2BB94A78D90A347494 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + B48D6B6088C326A550B881A7 /* [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-RunnerTests-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; + }; + C1DF7A2F3C0DB56F7CEE4C36 /* [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; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -327,6 +453,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -346,7 +473,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -361,7 +488,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = ios_launcher_icon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 4UT66M63VB; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -370,6 +500,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = dev.mitsutan.sysdevSuretti; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -378,6 +509,7 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3CBE9C163AEF9B42513AAEDB /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -395,6 +527,7 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 12FC7AF6D7F449933F1F63AE /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -410,6 +543,7 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 632F6D6A85FE4CEB09773388 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -447,6 +581,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -472,7 +607,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -504,6 +639,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -523,7 +659,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -540,7 +676,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = ios_launcher_icon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 4UT66M63VB; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -549,6 +688,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = dev.mitsutan.sysdevSuretti; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -562,7 +702,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = ios_launcher_icon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 4UT66M63VB; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -571,6 +714,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = dev.mitsutan.sysdevSuretti; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a1..21a3cc1 100644 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 68c1d16..2a20338 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,5 +1,6 @@ import Flutter import UIKit +import GoogleMaps @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { @@ -11,4 +12,4 @@ import UIKit GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } -} \ No newline at end of file +} diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 69a6400..3122b4b 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -6,6 +6,20 @@ このアプリはフォトライブラリにアクセスする必要があります NSCameraUsageDescription このアプリはカメラにファイルを追加する必要があります + + NSLocationWhenInUseUsageDescription + Reason why app needs location + + + NSLocationAlwaysAndWhenInUseUsageDescription + Reason why app needs location + + NSLocationAlwaysUsageDescription + Reason why app needs location + + + NSBluetoothAlwaysUsageDescription + Reason why app needs bluetooth CFBundleURLTypes diff --git a/lib/utils/beacon.dart b/lib/utils/beacon.dart index 8a23a98..70b598c 100644 --- a/lib/utils/beacon.dart +++ b/lib/utils/beacon.dart @@ -1,8 +1,10 @@ import 'dart:async'; import 'dart:developer'; +import 'dart:io'; import 'package:beacon_broadcast/beacon_broadcast.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_beacon/flutter_beacon.dart' hide BeaconBroadcast; import 'package:flutter_blue_plus/flutter_blue_plus.dart' hide BluetoothState; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -17,6 +19,9 @@ class BeaconFunc extends ChangeNotifier { late SharedPreferences prefs; bool isInitialized = false; + StreamSubscription? _streamMonitoring; + bool isStart = false; + // int major; // int minor; @@ -87,6 +92,7 @@ class BeaconFunc extends ChangeNotifier { ]); Future startBeacon(int major, int minor) async { + isStart = true; // flutterBeacon start broadcast // log((await flutterBeacon.isBroadcasting()).toString(), // name: 'flutterBeacon.isBroadcasting()'); @@ -113,10 +119,20 @@ class BeaconFunc extends ChangeNotifier { debugPrint('Start broadcast error: $e'); } - // FBP start scan + final regions = []; + try { - await FlutterBluePlus.startScan( - withMsd: [_msdFilterData], androidUsesFineLocation: true); + if (Platform.isAndroid) { + // FBP start scan + await FlutterBluePlus.startScan( + withMsd: [_msdFilterData], androidUsesFineLocation: true); + } else if (Platform.isIOS) { + // flutterBeacon initialize + regions.add(Region( + identifier: 'dev.mitsutan.sysdev_suretti', + proximityUUID: const String.fromEnvironment("IBEACON_UUID"), + )); + } } catch (e) { // log('Start scan Err', name: 'beacon', error: e); debugPrint('Start scan Err: $e'); @@ -124,61 +140,92 @@ class BeaconFunc extends ChangeNotifier { // debugPrint("isAd:${(await beacon.isAdvertising()).toString()}"); - // FBP scanResults listen - FlutterBluePlus.scanResults.listen((results) async { - final List> resultsList = []; + if (Platform.isAndroid) { + // FBP scanResults listen + FlutterBluePlus.scanResults.listen((results) async { + final List> resultsList = []; - for (final result in results) { - if (result.advertisementData.manufacturerData.isEmpty) { - continue; - } - final major1 = result.advertisementData.manufacturerData.values.first - .elementAt(18) - .toRadixString(16); - final major2 = result.advertisementData.manufacturerData.values.first - .elementAt(19) - .toRadixString(16); - final minor1 = result.advertisementData.manufacturerData.values.first - .elementAt(20) - .toRadixString(16); - final minor2 = result.advertisementData.manufacturerData.values.first - .elementAt(21) - .toRadixString(16); - - final id = int.parse('$major1$major2$minor1$minor2', radix: 16); - - try { - await Supabase.initialize( - url: const String.fromEnvironment("SUPABASE_URL"), - anonKey: const String.fromEnvironment("SUPABASE_ANON_KEY"), - ); - } on AssertionError catch (e) { - log('Supabase initialize error', name: 'Supabase', error: e); + for (final result in results) { + if (result.advertisementData.manufacturerData.isEmpty) { + continue; + } + final major1 = result.advertisementData.manufacturerData.values.first + .elementAt(18) + .toRadixString(16); + final major2 = result.advertisementData.manufacturerData.values.first + .elementAt(19) + .toRadixString(16); + final minor1 = result.advertisementData.manufacturerData.values.first + .elementAt(20) + .toRadixString(16); + final minor2 = result.advertisementData.manufacturerData.values.first + .elementAt(21) + .toRadixString(16); + + final id = int.parse('$major1$major2$minor1$minor2', radix: 16); + + try { + await Supabase.initialize( + url: const String.fromEnvironment("SUPABASE_URL"), + anonKey: const String.fromEnvironment("SUPABASE_ANON_KEY"), + ); + } on AssertionError catch (e) { + log('Supabase initialize error', name: 'Supabase', error: e); + } + + final supabase = Supabase.instance.client; + try { + await supabase + .from('users') + .select( + 'nickname, icon, message_id, messages!users_message_id_fkey(message_id, message_text, post_timestamp)') + .eq('user_id', id) + .then((data) { + resultsList.add(data.first); + // log('msgData: $data'); + debugPrint('msgData: $data'); + }); + } catch (e) { + log("get message fail", error: e, name: 'msgData'); + } } + updateScanResults(resultsList); + }, onError: (e) { + log('Scan error', name: 'FlutterBluePlus', error: e); + }); + } else if (Platform.isIOS) { + // to start monitoring beacons + _streamMonitoring = + flutterBeacon.monitoring(regions).listen((MonitoringResult result) { + // result contains a region, event type and event state + debugPrint('Monitoring: $result'); - final supabase = Supabase.instance.client; - try { - await supabase - .from('users') - .select( - '*, messages!users_message_id_fkey(*)') - .eq('user_id', id) - .then((data) { - resultsList.add(data.first); - // log('msgData: $data'); - debugPrint('msgData: $data'); - }); - } catch (e) { - log("get message fail", error: e, name: 'msgData'); + if (result.monitoringState == MonitoringState.inside) { + debugPrint( + 'Inside region: ${result.region.major}, ${result.region.minor}'); } - } - updateScanResults(resultsList); - }, onError: (e) { - log('Scan error', name: 'FlutterBluePlus', error: e); - }); + + // final supabase = Supabase.instance.client; + // try { + // await supabase + // .from('users') + // .select( + // '*, messages!users_message_id_fkey(*)') + // .eq('user_id', id) + // .then((data) { + // resultsList.add(data.first); + // // log('msgData: $data'); + // debugPrint('msgData: $data'); + // }); + // } catch (e) { + // log("get message fail", error: e, name: 'msgData'); + // } + }); + } } Future stopBeacon() async { + isStart = false; // flutterBeacon stop broadcast // log((await flutterBeacon.isBroadcasting()).toString(), // name: 'flutterBeacon.isBroadcasting()'); @@ -190,7 +237,11 @@ class BeaconFunc extends ChangeNotifier { // FBP stop scan try { - await FlutterBluePlus.stopScan(); + if (Platform.isAndroid) { + await FlutterBluePlus.stopScan(); + } else if (Platform.isIOS) { + _streamMonitoring?.cancel(); + } } catch (e) { log('Stop scan Err', name: 'beacon', error: e); } @@ -203,7 +254,17 @@ class BeaconFunc extends ChangeNotifier { } bool isScanning() { - return FlutterBluePlus.isScanningNow; + if (Platform.isAndroid) { + return FlutterBluePlus.isScanningNow; + } else if (Platform.isIOS) { + if (isStart) { + return _streamMonitoring!.isPaused; + } else { + return false; + } + } else { + return false; + } } Stream getAdapterState() { diff --git a/pubspec.lock b/pubspec.lock index 9e1a1a5..9d38221 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -238,6 +238,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_beacon: + dependency: "direct main" + description: + name: flutter_beacon + sha256: c93ee7a2e572a2dba31eb8db9f7a2c514b2b3e22584ea7d78d8cc854fdbded79 + url: "https://pub.dev" + source: hosted + version: "0.5.1" flutter_blue_plus: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 0193c2b..edc6f00 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -27,6 +27,7 @@ dependencies: background_fetch: ^1.3.7 beacon_broadcast: ^0.3.1 shared_preferences: ^2.3.2 + flutter_beacon: ^0.5.1 intl: ^0.19.0 geolocator: ^8.2.1 geocoding: ^3.0.0