Skip to content

Commit c6d71c1

Browse files
authored
Merge pull request #12 from hyperoslo/fix/type
Add type info
2 parents 92a7416 + b44bb3b commit c6d71c1

5 files changed

Lines changed: 24 additions & 16 deletions

File tree

Example/BarcodeScannerExample/BarcodeScannerExample.xcodeproj/project.pbxproj

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@
9292
isa = PBXNativeTarget;
9393
buildConfigurationList = D50BE4071C9FE8870000A34C /* Build configuration list for PBXNativeTarget "BarcodeScannerExample" */;
9494
buildPhases = (
95-
36F8214472FD1CA639982CE8 /* 📦 Check Pods Manifest.lock */,
95+
36F8214472FD1CA639982CE8 /* [CP] Check Pods Manifest.lock */,
9696
D50BE3F11C9FE8870000A34C /* Sources */,
9797
D50BE3F21C9FE8870000A34C /* Frameworks */,
9898
D50BE3F31C9FE8870000A34C /* Resources */,
99-
E090C912AA824DD28A310598 /* 📦 Embed Pods Frameworks */,
100-
B23721B8976E46E75F5C472C /* 📦 Copy Pods Resources */,
99+
E090C912AA824DD28A310598 /* [CP] Embed Pods Frameworks */,
100+
B23721B8976E46E75F5C472C /* [CP] Copy Pods Resources */,
101101
);
102102
buildRules = (
103103
);
@@ -120,6 +120,7 @@
120120
TargetAttributes = {
121121
D50BE3F41C9FE8870000A34C = {
122122
CreatedOnToolsVersion = 7.2.1;
123+
DevelopmentTeam = LG4DBY4QF9;
123124
};
124125
};
125126
};
@@ -154,44 +155,44 @@
154155
/* End PBXResourcesBuildPhase section */
155156

156157
/* Begin PBXShellScriptBuildPhase section */
157-
36F8214472FD1CA639982CE8 /* 📦 Check Pods Manifest.lock */ = {
158+
36F8214472FD1CA639982CE8 /* [CP] Check Pods Manifest.lock */ = {
158159
isa = PBXShellScriptBuildPhase;
159160
buildActionMask = 2147483647;
160161
files = (
161162
);
162163
inputPaths = (
163164
);
164-
name = "📦 Check Pods Manifest.lock";
165+
name = "[CP] Check Pods Manifest.lock";
165166
outputPaths = (
166167
);
167168
runOnlyForDeploymentPostprocessing = 0;
168169
shellPath = /bin/sh;
169170
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
170171
showEnvVarsInLog = 0;
171172
};
172-
B23721B8976E46E75F5C472C /* 📦 Copy Pods Resources */ = {
173+
B23721B8976E46E75F5C472C /* [CP] Copy Pods Resources */ = {
173174
isa = PBXShellScriptBuildPhase;
174175
buildActionMask = 2147483647;
175176
files = (
176177
);
177178
inputPaths = (
178179
);
179-
name = "📦 Copy Pods Resources";
180+
name = "[CP] Copy Pods Resources";
180181
outputPaths = (
181182
);
182183
runOnlyForDeploymentPostprocessing = 0;
183184
shellPath = /bin/sh;
184185
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BarcodeScannerExample/Pods-BarcodeScannerExample-resources.sh\"\n";
185186
showEnvVarsInLog = 0;
186187
};
187-
E090C912AA824DD28A310598 /* 📦 Embed Pods Frameworks */ = {
188+
E090C912AA824DD28A310598 /* [CP] Embed Pods Frameworks */ = {
188189
isa = PBXShellScriptBuildPhase;
189190
buildActionMask = 2147483647;
190191
files = (
191192
);
192193
inputPaths = (
193194
);
194-
name = "📦 Embed Pods Frameworks";
195+
name = "[CP] Embed Pods Frameworks";
195196
outputPaths = (
196197
);
197198
runOnlyForDeploymentPostprocessing = 0;
@@ -311,10 +312,13 @@
311312
baseConfigurationReference = 560D7A8F00215E8F16A67009 /* Pods-BarcodeScannerExample.debug.xcconfig */;
312313
buildSettings = {
313314
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
315+
CODE_SIGN_IDENTITY = "iPhone Developer";
316+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
314317
INFOPLIST_FILE = BarcodeScannerExample/Info.plist;
315318
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
316-
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.BarcodeScannerExample;
319+
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.BarcodeScannerExample2;
317320
PRODUCT_NAME = "$(TARGET_NAME)";
321+
PROVISIONING_PROFILE = "";
318322
};
319323
name = Debug;
320324
};
@@ -323,10 +327,13 @@
323327
baseConfigurationReference = B2BB8B30EF0245DC64F4025A /* Pods-BarcodeScannerExample.release.xcconfig */;
324328
buildSettings = {
325329
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
330+
CODE_SIGN_IDENTITY = "iPhone Developer";
331+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
326332
INFOPLIST_FILE = BarcodeScannerExample/Info.plist;
327333
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
328-
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.BarcodeScannerExample;
334+
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.BarcodeScannerExample2;
329335
PRODUCT_NAME = "$(TARGET_NAME)";
336+
PROVISIONING_PROFILE = "";
330337
};
331338
name = Release;
332339
};

Example/BarcodeScannerExample/BarcodeScannerExample/ViewController.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ class ViewController: UIViewController {
4040

4141
extension ViewController: BarcodeScannerCodeDelegate {
4242

43-
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String) {
43+
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String, type: String) {
4444
print(code)
45+
print(type)
4546

4647
let delayTime = dispatch_time(DISPATCH_TIME_NOW, Int64(6 * Double(NSEC_PER_SEC)))
4748
dispatch_after(delayTime, dispatch_get_main_queue()) {

Example/BarcodeScannerExample/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ SPEC CHECKSUMS:
1313

1414
PODFILE CHECKSUM: 5ef23317899e015b0a239f469648c11cbee75aaa
1515

16-
COCOAPODS: 1.0.0.beta.5
16+
COCOAPODS: 1.0.1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Use `BarcodeScannerCodeDelegate` when you want to get the captured code back.
7373
```swift
7474
extension ViewController: BarcodeScannerCodeDelegate {
7575

76-
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String) {
76+
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String, type: String) {
7777
print(code)
7878
controller.reset()
7979
}

Sources/BarcodeScannerController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import AVFoundation
55

66
/// Delegate to handle the captured code.
77
public protocol BarcodeScannerCodeDelegate: class {
8-
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String)
8+
func barcodeScanner(controller: BarcodeScannerController, didCapturedCode code: String, type: String)
99
}
1010

1111
/// Delegate to report errors.
@@ -430,7 +430,7 @@ extension BarcodeScannerController: AVCaptureMetadataOutputObjectsDelegate {
430430
}
431431

432432
animateFlash(oneTimeSearch)
433-
codeDelegate?.barcodeScanner(self, didCapturedCode: code)
433+
codeDelegate?.barcodeScanner(self, didCapturedCode: code, type: metadataObj.type)
434434
}
435435
}
436436

0 commit comments

Comments
 (0)