Julian Steenbakker

imp: fix build on macos

@@ -36,5 +36,8 @@ end @@ -36,5 +36,8 @@ end
36 post_install do |installer| 36 post_install do |installer|
37 installer.pods_project.targets.each do |target| 37 installer.pods_project.targets.each do |target|
38 flutter_additional_macos_build_settings(target) 38 flutter_additional_macos_build_settings(target)
  39 + target.build_configurations.each do |config|
  40 + config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.13'
  41 + end
39 end 42 end
40 end 43 end
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 26 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
27 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 27 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
28 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; 28 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
29 - 5B9BD2ADBC68B74D80B57DF1 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC099C2B6D6B30BFB3FA6DB8 /* Pods_Runner.framework */; }; 29 + 5348E36EDC155A01222C3599 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41950513928B2DA794C685E3 /* Pods_Runner.framework */; };
30 /* End PBXBuildFile section */ 30 /* End PBXBuildFile section */
31 31
32 /* Begin PBXContainerItemProxy section */ 32 /* Begin PBXContainerItemProxy section */
@@ -67,12 +67,12 @@ @@ -67,12 +67,12 @@
67 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; }; 67 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
68 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; }; 68 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
69 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; }; 69 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
70 - 3CEE8DB43A84811F33EB0202 /* 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 = "<group>"; }; 70 + 41950513928B2DA794C685E3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
  71 + 433FCBF2B1E3F653F96B3C79 /* 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 = "<group>"; };
71 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; }; 72 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
72 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; }; 73 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
73 - A1CBC07680A8ED396DBB68C0 /* 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 = "<group>"; };  
74 - CAD760C57A57D903AB03B47A /* 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 = "<group>"; };  
75 - EC099C2B6D6B30BFB3FA6DB8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 74 + 97D4F0103EE99761EF216A9C /* 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 = "<group>"; };
  75 + B67CB61EED45BF13A197D997 /* 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 = "<group>"; };
76 /* End PBXFileReference section */ 76 /* End PBXFileReference section */
77 77
78 /* Begin PBXFrameworksBuildPhase section */ 78 /* Begin PBXFrameworksBuildPhase section */
@@ -80,27 +80,19 @@ @@ -80,27 +80,19 @@
80 isa = PBXFrameworksBuildPhase; 80 isa = PBXFrameworksBuildPhase;
81 buildActionMask = 2147483647; 81 buildActionMask = 2147483647;
82 files = ( 82 files = (
83 - 5B9BD2ADBC68B74D80B57DF1 /* Pods_Runner.framework in Frameworks */, 83 + 5348E36EDC155A01222C3599 /* Pods_Runner.framework in Frameworks */,
84 ); 84 );
85 runOnlyForDeploymentPostprocessing = 0; 85 runOnlyForDeploymentPostprocessing = 0;
86 }; 86 };
87 /* End PBXFrameworksBuildPhase section */ 87 /* End PBXFrameworksBuildPhase section */
88 88
89 /* Begin PBXGroup section */ 89 /* Begin PBXGroup section */
90 - 18927D60C719EB75FC0A6633 /* Frameworks */ = {  
91 - isa = PBXGroup;  
92 - children = (  
93 - EC099C2B6D6B30BFB3FA6DB8 /* Pods_Runner.framework */,  
94 - );  
95 - name = Frameworks;  
96 - sourceTree = "<group>";  
97 - };  
98 20F8C9AA20C2A495C125E194 /* Pods */ = { 90 20F8C9AA20C2A495C125E194 /* Pods */ = {
99 isa = PBXGroup; 91 isa = PBXGroup;
100 children = ( 92 children = (
101 - CAD760C57A57D903AB03B47A /* Pods-Runner.debug.xcconfig */,  
102 - A1CBC07680A8ED396DBB68C0 /* Pods-Runner.release.xcconfig */,  
103 - 3CEE8DB43A84811F33EB0202 /* Pods-Runner.profile.xcconfig */, 93 + B67CB61EED45BF13A197D997 /* Pods-Runner.debug.xcconfig */,
  94 + 97D4F0103EE99761EF216A9C /* Pods-Runner.release.xcconfig */,
  95 + 433FCBF2B1E3F653F96B3C79 /* Pods-Runner.profile.xcconfig */,
104 ); 96 );
105 path = Pods; 97 path = Pods;
106 sourceTree = "<group>"; 98 sourceTree = "<group>";
@@ -123,7 +115,7 @@ @@ -123,7 +115,7 @@
123 33CEB47122A05771004F2AC0 /* Flutter */, 115 33CEB47122A05771004F2AC0 /* Flutter */,
124 33CC10EE2044A3C60003C045 /* Products */, 116 33CC10EE2044A3C60003C045 /* Products */,
125 20F8C9AA20C2A495C125E194 /* Pods */, 117 20F8C9AA20C2A495C125E194 /* Pods */,
126 - 18927D60C719EB75FC0A6633 /* Frameworks */, 118 + 64FFE901A03ED70F67D8DCD6 /* Frameworks */,
127 ); 119 );
128 sourceTree = "<group>"; 120 sourceTree = "<group>";
129 }; 121 };
@@ -170,6 +162,14 @@ @@ -170,6 +162,14 @@
170 path = Runner; 162 path = Runner;
171 sourceTree = "<group>"; 163 sourceTree = "<group>";
172 }; 164 };
  165 + 64FFE901A03ED70F67D8DCD6 /* Frameworks */ = {
  166 + isa = PBXGroup;
  167 + children = (
  168 + 41950513928B2DA794C685E3 /* Pods_Runner.framework */,
  169 + );
  170 + name = Frameworks;
  171 + sourceTree = "<group>";
  172 + };
173 /* End PBXGroup section */ 173 /* End PBXGroup section */
174 174
175 /* Begin PBXNativeTarget section */ 175 /* Begin PBXNativeTarget section */
@@ -177,13 +177,13 @@ @@ -177,13 +177,13 @@
177 isa = PBXNativeTarget; 177 isa = PBXNativeTarget;
178 buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; 178 buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
179 buildPhases = ( 179 buildPhases = (
180 - 20903D1E9D9F08576541FFD7 /* [CP] Check Pods Manifest.lock */, 180 + 11C0752B00246A027DB2D859 /* [CP] Check Pods Manifest.lock */,
181 33CC10E92044A3C60003C045 /* Sources */, 181 33CC10E92044A3C60003C045 /* Sources */,
182 33CC10EA2044A3C60003C045 /* Frameworks */, 182 33CC10EA2044A3C60003C045 /* Frameworks */,
183 33CC10EB2044A3C60003C045 /* Resources */, 183 33CC10EB2044A3C60003C045 /* Resources */,
184 33CC110E2044A8840003C045 /* Bundle Framework */, 184 33CC110E2044A8840003C045 /* Bundle Framework */,
185 3399D490228B24CF009A79C7 /* ShellScript */, 185 3399D490228B24CF009A79C7 /* ShellScript */,
186 - DF45614760BB9B24F49B2055 /* [CP] Embed Pods Frameworks */, 186 + E6424ECF3C1308BAAF6E5E67 /* [CP] Embed Pods Frameworks */,
187 ); 187 );
188 buildRules = ( 188 buildRules = (
189 ); 189 );
@@ -253,7 +253,7 @@ @@ -253,7 +253,7 @@
253 /* End PBXResourcesBuildPhase section */ 253 /* End PBXResourcesBuildPhase section */
254 254
255 /* Begin PBXShellScriptBuildPhase section */ 255 /* Begin PBXShellScriptBuildPhase section */
256 - 20903D1E9D9F08576541FFD7 /* [CP] Check Pods Manifest.lock */ = { 256 + 11C0752B00246A027DB2D859 /* [CP] Check Pods Manifest.lock */ = {
257 isa = PBXShellScriptBuildPhase; 257 isa = PBXShellScriptBuildPhase;
258 buildActionMask = 2147483647; 258 buildActionMask = 2147483647;
259 files = ( 259 files = (
@@ -312,7 +312,7 @@ @@ -312,7 +312,7 @@
312 shellPath = /bin/sh; 312 shellPath = /bin/sh;
313 shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; 313 shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
314 }; 314 };
315 - DF45614760BB9B24F49B2055 /* [CP] Embed Pods Frameworks */ = { 315 + E6424ECF3C1308BAAF6E5E67 /* [CP] Embed Pods Frameworks */ = {
316 isa = PBXShellScriptBuildPhase; 316 isa = PBXShellScriptBuildPhase;
317 buildActionMask = 2147483647; 317 buildActionMask = 2147483647;
318 files = ( 318 files = (
@@ -95,6 +95,10 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, @@ -95,6 +95,10 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler,
95 95
96 // Gets called when a new image is added to the buffer 96 // Gets called when a new image is added to the buffer
97 public func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) { 97 public func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
  98 + // Ignore invalid textureId
  99 + if textureId == nil {
  100 + return
  101 + }
98 guard let imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else { 102 guard let imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else {
99 print("Failed to get image buffer from sample buffer.") 103 print("Failed to get image buffer from sample buffer.")
100 return 104 return