Skip to content

Commit

Permalink
Merge pull request #15 from BlinkID/fix/sampleUpdate
Browse files Browse the repository at this point in the history
Fix/sample update
  • Loading branch information
Cerovec committed Feb 9, 2016
2 parents 42dea0d + 2c6f6ae commit a918714
Show file tree
Hide file tree
Showing 10 changed files with 225 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
Expand All @@ -18,7 +18,8 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YLB-Rp-Wrt">
<rect key="frame" x="249" y="285" width="102" height="30"/>
<rect key="frame" x="234" y="285" width="132" height="36"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<state key="normal" title="Start Scanning"/>
<connections>
<action selector="didTapScan:" destination="BYZ-38-t0r" eventType="touchUpInside" id="jWD-gB-6vp"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import MicroBlink

class ViewController: UIViewController, PPScanDelegate {

var rawOcrParserId : String = "Raw ocr"
var priceParserId : String = "Price"

func coordinatorWithError(error: NSErrorPointer) -> PPCoordinator? {

/** 0. Check if scanning is supported */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
3139C87E1C245950005AC32C /* PPCameraOverlayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3139C87D1C245950005AC32C /* PPCameraOverlayViewController.swift */; };
3139C8801C2838B3005AC32C /* PPCameraOverlayViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3139C87F1C2838B3005AC32C /* PPCameraOverlayViewController.xib */; };
315881721C3C16D50083850C /* MicroBlink.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 315881701C3C16D50083850C /* MicroBlink.framework */; };
315881731C3C16D50083850C /* MicroBlinkResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 315881711C3C16D50083850C /* MicroBlinkResources.bundle */; };
31F013641C69EDFC00F6DBCD /* MicroBlink.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 31F013631C69EDFC00F6DBCD /* MicroBlink.bundle */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -42,7 +42,7 @@
3139C87F1C2838B3005AC32C /* PPCameraOverlayViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PPCameraOverlayViewController.xib; sourceTree = "<group>"; };
3139CA9B1C3555B2005AC32C /* pdf417-sample-Swift-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "pdf417-sample-Swift-Bridging-Header.h"; sourceTree = "<group>"; };
315881701C3C16D50083850C /* MicroBlink.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MicroBlink.framework; path = ../../MicroBlink.framework; sourceTree = "<group>"; };
315881711C3C16D50083850C /* MicroBlinkResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = MicroBlinkResources.bundle; path = ../../MicroBlinkResources.bundle; sourceTree = "<group>"; };
31F013631C69EDFC00F6DBCD /* MicroBlink.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = MicroBlink.bundle; path = ../../MicroBlink.bundle; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -98,8 +98,8 @@
3139C82C1C22B30C005AC32C /* Frameworks */ = {
isa = PBXGroup;
children = (
31F013631C69EDFC00F6DBCD /* MicroBlink.bundle */,
315881701C3C16D50083850C /* MicroBlink.framework */,
315881711C3C16D50083850C /* MicroBlinkResources.bundle */,
3139C8371C22B33E005AC32C /* libiconv.tbd */,
3139C8351C22B338005AC32C /* libc++.tbd */,
3139C8331C22B333005AC32C /* AudioToolbox.framework */,
Expand Down Expand Up @@ -185,8 +185,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
31F013641C69EDFC00F6DBCD /* MicroBlink.bundle in Resources */,
3139C8251C22B2AC005AC32C /* LaunchScreen.storyboard in Resources */,
315881731C3C16D50083850C /* MicroBlinkResources.bundle in Resources */,
3139C8221C22B2AC005AC32C /* Assets.xcassets in Resources */,
3139C8201C22B2AC005AC32C /* Main.storyboard in Resources */,
3139C8801C2838B3005AC32C /* PPCameraOverlayViewController.xib in Resources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3139C8161C22B2AC005AC32C"
BuildableName = "pdf417-sample-Swift.app"
BlueprintName = "pdf417-sample-Swift"
ReferencedContainer = "container:pdf417-sample-Swift.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3139C8161C22B2AC005AC32C"
BuildableName = "pdf417-sample-Swift.app"
BlueprintName = "pdf417-sample-Swift"
ReferencedContainer = "container:pdf417-sample-Swift.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3139C8161C22B2AC005AC32C"
BuildableName = "pdf417-sample-Swift.app"
BlueprintName = "pdf417-sample-Swift"
ReferencedContainer = "container:pdf417-sample-Swift.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3139C8161C22B2AC005AC32C"
BuildableName = "pdf417-sample-Swift.app"
BlueprintName = "pdf417-sample-Swift"
ReferencedContainer = "container:pdf417-sample-Swift.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ViewController: UIViewController, PPScanDelegate {

/** 0. Check if scanning is supported */

if (PPCoordinator.isScanningUnsupported(error)) {
if PPCoordinator.isScanningUnsupportedForCameraType(PPCameraType.Back, error: error) {
return nil;
}

Expand Down
8 changes: 4 additions & 4 deletions Samples/pdf417-sample/pdf417-sample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3158810F1C3C0C750083850C /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3158810E1C3C0C750083850C /* AudioToolbox.framework */; };
315881111C3C0C7C0083850C /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 315881101C3C0C7C0083850C /* AVFoundation.framework */; };
315881501C3C150D0083850C /* MicroBlink.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3158814E1C3C150D0083850C /* MicroBlink.framework */; };
315881511C3C150D0083850C /* MicroBlinkResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3158814F1C3C150D0083850C /* MicroBlinkResources.bundle */; };
31F013661C69EED800F6DBCD /* MicroBlink.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 31F013651C69EED800F6DBCD /* MicroBlink.bundle */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -46,7 +46,7 @@
3158810E1C3C0C750083850C /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
315881101C3C0C7C0083850C /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
3158814E1C3C150D0083850C /* MicroBlink.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MicroBlink.framework; path = ../../MicroBlink.framework; sourceTree = "<group>"; };
3158814F1C3C150D0083850C /* MicroBlinkResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = MicroBlinkResources.bundle; path = ../../MicroBlinkResources.bundle; sourceTree = "<group>"; };
31F013651C69EED800F6DBCD /* MicroBlink.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = MicroBlink.bundle; path = ../../MicroBlink.bundle; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -130,8 +130,8 @@
315881051C3C0C400083850C /* Frameworks */ = {
isa = PBXGroup;
children = (
31F013651C69EED800F6DBCD /* MicroBlink.bundle */,
3158814E1C3C150D0083850C /* MicroBlink.framework */,
3158814F1C3C150D0083850C /* MicroBlinkResources.bundle */,
315881101C3C0C7C0083850C /* AVFoundation.framework */,
3158810E1C3C0C750083850C /* AudioToolbox.framework */,
3158810C1C3C0C6C0083850C /* CoreMedia.framework */,
Expand Down Expand Up @@ -199,8 +199,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
31F013661C69EED800F6DBCD /* MicroBlink.bundle in Resources */,
315881041C3C0C1E0083850C /* PPCameraOverlayViewController.xib in Resources */,
315881511C3C150D0083850C /* MicroBlinkResources.bundle in Resources */,
315880F71C3C0B990083850C /* LaunchScreen.storyboard in Resources */,
315880F41C3C0B990083850C /* Assets.xcassets in Resources */,
315880F21C3C0B990083850C /* Main.storyboard in Resources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "315880E31C3C0B990083850C"
BuildableName = "pdf417-sample.app"
BlueprintName = "pdf417-sample"
ReferencedContainer = "container:pdf417-sample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "315880E31C3C0B990083850C"
BuildableName = "pdf417-sample.app"
BlueprintName = "pdf417-sample"
ReferencedContainer = "container:pdf417-sample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "315880E31C3C0B990083850C"
BuildableName = "pdf417-sample.app"
BlueprintName = "pdf417-sample"
ReferencedContainer = "container:pdf417-sample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "315880E31C3C0B990083850C"
BuildableName = "pdf417-sample.app"
BlueprintName = "pdf417-sample"
ReferencedContainer = "container:pdf417-sample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion Samples/pdf417-sample/pdf417-sample/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ - (PPCoordinator *)coordinatorWithError:(NSError**)error {

/** 0. Check if scanning is supported */

if ([PPCoordinator isScanningUnsupported:error]) {
if ([PPCoordinator isScanningUnsupportedForCameraType:PPCameraTypeBack error:nil]) {
return nil;
}

Expand Down
30 changes: 29 additions & 1 deletion travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,32 @@ xctool -project Samples/Detector-sample/Detector-sample.xcodeproj \
-configuration Release \
-sdk iphonesimulator \
ONLY_ACTIVE_ARCH=NO \
clean build
clean build

xctool -project Samples/pdf417-sample/pdf417-sample.xcodeproj \
-scheme pdf417-sample \
-configuration Debug \
-sdk iphonesimulator \
ONLY_ACTIVE_ARCH=NO \
clean build

xctool -project Samples/pdf417-sample/pdf417-sample.xcodeproj \
-scheme pdf417-sample \
-configuration Release \
-sdk iphonesimulator \
ONLY_ACTIVE_ARCH=NO \
clean build

xctool -project Samples/pdf417-sample-Swift/pdf417-sample-Swift.xcodeproj \
-scheme pdf417-sample-Swift \
-configuration Debug \
-sdk iphonesimulator \
ONLY_ACTIVE_ARCH=NO \
clean build

xctool -project Samples/pdf417-sample-Swift/pdf417-sample-Swift.xcodeproj \
-scheme pdf417-sample-Swift \
-configuration Release \
-sdk iphonesimulator \
ONLY_ACTIVE_ARCH=NO \
clean build

0 comments on commit a918714

Please sign in to comment.