Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Julian Steenbakker
2022-12-22 09:27:34 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0ba4b53e81bee03d60f86570863d024b54ba2425
0ba4b53e
1 parent
cd582f9a
imp: fix build on macos
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
22 deletions
example/macos/Podfile
example/macos/Runner.xcodeproj/project.pbxproj
macos/Classes/MobileScannerPlugin.swift
example/macos/Podfile
View file @
0ba4b53
...
...
@@ -36,5 +36,8 @@ end
post_install
do
|
installer
|
installer
.
pods_project
.
targets
.
each
do
|
target
|
flutter_additional_macos_build_settings
(
target
)
target
.
build_configurations
.
each
do
|
config
|
config
.
build_settings
[
'MACOSX_DEPLOYMENT_TARGET'
]
=
'10.13'
end
end
end
...
...
example/macos/Runner.xcodeproj/project.pbxproj
View file @
0ba4b53
...
...
@@ -26,7 +26,7 @@
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
5
B9BD2ADBC68B74D80B57DF1 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC099C2B6D6B30BFB3FA6DB8
/* Pods_Runner.framework */; };
5
348E36EDC155A01222C3599 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41950513928B2DA794C685E3
/* Pods_Runner.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
...
...
@@ -67,12 +67,12 @@
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
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>"; };
41950513928B2DA794C685E3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
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>"; };
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>"; };
EC099C2B6D6B30BFB3FA6DB8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
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>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -80,27 +80,19 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5
B9BD2ADBC68B74D80B57DF1
/* Pods_Runner.framework in Frameworks */,
5
348E36EDC155A01222C3599
/* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
18927D60C719EB75FC0A6633 /* Frameworks */ = {
isa = PBXGroup;
children = (
EC099C2B6D6B30BFB3FA6DB8 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
20F8C9AA20C2A495C125E194 /* Pods */ = {
isa = PBXGroup;
children = (
CAD760C57A57D903AB03B47A /* Pods-Runner.debug.xcconfig */,
A1CBC07680A8ED396DBB68C0 /* Pods-Runner.release.xcconfig */,
3CEE8DB43A84811F33EB0202 /* Pods-Runner.profile.xcconfig */,
B67CB61EED45BF13A197D997 /* Pods-Runner.debug.xcconfig */,
97D4F0103EE99761EF216A9C /* Pods-Runner.release.xcconfig */,
433FCBF2B1E3F653F96B3C79 /* Pods-Runner.profile.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
...
...
@@ -123,7 +115,7 @@
33CEB47122A05771004F2AC0 /* Flutter */,
33CC10EE2044A3C60003C045 /* Products */,
20F8C9AA20C2A495C125E194 /* Pods */,
18927D60C719EB75FC0A6633
/* Frameworks */,
64FFE901A03ED70F67D8DCD6
/* Frameworks */,
);
sourceTree = "<group>";
};
...
...
@@ -170,6 +162,14 @@
path = Runner;
sourceTree = "<group>";
};
64FFE901A03ED70F67D8DCD6 /* Frameworks */ = {
isa = PBXGroup;
children = (
41950513928B2DA794C685E3 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
...
...
@@ -177,13 +177,13 @@
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
20903D1E9D9F08576541FFD7
/* [CP] Check Pods Manifest.lock */,
11C0752B00246A027DB2D859
/* [CP] Check Pods Manifest.lock */,
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
DF45614760BB9B24F49B2055
/* [CP] Embed Pods Frameworks */,
E6424ECF3C1308BAAF6E5E67
/* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
...
...
@@ -253,7 +253,7 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
20903D1E9D9F08576541FFD7
/* [CP] Check Pods Manifest.lock */ = {
11C0752B00246A027DB2D859
/* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
...
...
@@ -312,7 +312,7 @@
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
DF45614760BB9B24F49B2055
/* [CP] Embed Pods Frameworks */ = {
E6424ECF3C1308BAAF6E5E67
/* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
...
...
macos/Classes/MobileScannerPlugin.swift
View file @
0ba4b53
...
...
@@ -95,6 +95,10 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler,
// Gets called when a new image is added to the buffer
public
func
captureOutput
(
_
output
:
AVCaptureOutput
,
didOutput
sampleBuffer
:
CMSampleBuffer
,
from
connection
:
AVCaptureConnection
)
{
// Ignore invalid textureId
if
textureId
==
nil
{
return
}
guard
let
imageBuffer
=
CMSampleBufferGetImageBuffer
(
sampleBuffer
)
else
{
print
(
"Failed to get image buffer from sample buffer."
)
return
...
...
Please
register
or
login
to post a comment