Skip to content

Commit 4c1c711

Browse files
committed
Merge branch 'release/2.0.1'
2 parents dae98fb + 7a9d900 commit 4c1c711

File tree

5 files changed

+31
-22
lines changed

5 files changed

+31
-22
lines changed

ExampleProject/ExampleProject.xcodeproj/project.pbxproj

+17-9
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
3EC5EF8523C447EE0063A687 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3EC5EF8423C447EE0063A687 /* Preview Assets.xcassets */; };
1616
3EC5EF8823C447EE0063A687 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3EC5EF8623C447EE0063A687 /* LaunchScreen.storyboard */; };
1717
3EC5EF9223C448A20063A687 /* ModalScannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC5EF9123C448A20063A687 /* ModalScannerView.swift */; };
18-
4FF401D4251BBE5200C3F227 /* CarBode in Frameworks */ = {isa = PBXBuildFile; productRef = 4FF401D3251BBE5200C3F227 /* CarBode */; };
18+
4F737D9E2521C39F002E36F3 /* CarBode in Frameworks */ = {isa = PBXBuildFile; productRef = 4F737D9D2521C39F002E36F3 /* CarBode */; };
1919
/* End PBXBuildFile section */
2020

2121
/* Begin PBXFileReference section */
@@ -36,7 +36,7 @@
3636
isa = PBXFrameworksBuildPhase;
3737
buildActionMask = 2147483647;
3838
files = (
39-
4FF401D4251BBE5200C3F227 /* CarBode in Frameworks */,
39+
4F737D9E2521C39F002E36F3 /* CarBode in Frameworks */,
4040
);
4141
runOnlyForDeploymentPostprocessing = 0;
4242
};
@@ -48,6 +48,7 @@
4848
children = (
4949
3EC5EF7A23C447EA0063A687 /* ExampleProject */,
5050
3EC5EF7923C447EA0063A687 /* Products */,
51+
4FE393DE2521C1FD007165D3 /* Frameworks */,
5152
);
5253
sourceTree = "<group>";
5354
};
@@ -83,6 +84,13 @@
8384
path = "Preview Content";
8485
sourceTree = "<group>";
8586
};
87+
4FE393DE2521C1FD007165D3 /* Frameworks */ = {
88+
isa = PBXGroup;
89+
children = (
90+
);
91+
name = Frameworks;
92+
sourceTree = "<group>";
93+
};
8694
/* End PBXGroup section */
8795

8896
/* Begin PBXNativeTarget section */
@@ -100,7 +108,7 @@
100108
);
101109
name = ExampleProject;
102110
packageProductDependencies = (
103-
4FF401D3251BBE5200C3F227 /* CarBode */,
111+
4F737D9D2521C39F002E36F3 /* CarBode */,
104112
);
105113
productName = ExampleProject;
106114
productReference = 3EC5EF7823C447EA0063A687 /* ExampleProject.app */;
@@ -131,7 +139,7 @@
131139
);
132140
mainGroup = 3EC5EF6F23C447EA0063A687;
133141
packageReferences = (
134-
4FF401D2251BBE5200C3F227 /* XCRemoteSwiftPackageReference "CarBode-Barcode-Scanner-For-SwiftUI" */,
142+
4F737D9C2521C39F002E36F3 /* XCRemoteSwiftPackageReference "CarBode-Barcode-Scanner-For-SwiftUI" */,
135143
);
136144
productRefGroup = 3EC5EF7923C447EA0063A687 /* Products */;
137145
projectDirPath = "";
@@ -360,20 +368,20 @@
360368
/* End XCConfigurationList section */
361369

362370
/* Begin XCRemoteSwiftPackageReference section */
363-
4FF401D2251BBE5200C3F227 /* XCRemoteSwiftPackageReference "CarBode-Barcode-Scanner-For-SwiftUI" */ = {
371+
4F737D9C2521C39F002E36F3 /* XCRemoteSwiftPackageReference "CarBode-Barcode-Scanner-For-SwiftUI" */ = {
364372
isa = XCRemoteSwiftPackageReference;
365-
repositoryURL = "https://github.com/heart/CarBode-Barcode-Scanner-For-SwiftUI";
373+
repositoryURL = "https://github.com/heart/CarBode-Barcode-Scanner-For-SwiftUI/";
366374
requirement = {
367-
branch = develop;
375+
branch = master;
368376
kind = branch;
369377
};
370378
};
371379
/* End XCRemoteSwiftPackageReference section */
372380

373381
/* Begin XCSwiftPackageProductDependency section */
374-
4FF401D3251BBE5200C3F227 /* CarBode */ = {
382+
4F737D9D2521C39F002E36F3 /* CarBode */ = {
375383
isa = XCSwiftPackageProductDependency;
376-
package = 4FF401D2251BBE5200C3F227 /* XCRemoteSwiftPackageReference "CarBode-Barcode-Scanner-For-SwiftUI" */;
384+
package = 4F737D9C2521C39F002E36F3 /* XCRemoteSwiftPackageReference "CarBode-Barcode-Scanner-For-SwiftUI" */;
377385
productName = CarBode;
378386
};
379387
/* End XCSwiftPackageProductDependency section */

ExampleProject/ExampleProject.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"pins": [
44
{
55
"package": "CarBode",
6-
"repositoryURL": "https://github.com/heart/CarBode-Barcode-Scanner-For-SwiftUI",
6+
"repositoryURL": "https://github.com/heart/CarBode-Barcode-Scanner-For-SwiftUI/",
77
"state": {
8-
"branch": "develop",
9-
"revision": "dd2a019124b27cdd56f248277a85e34bf598aa76",
8+
"branch": "master",
9+
"revision": "dae98fbf72430573e3c1818e9efbcf3eba4aac47",
1010
"version": null
1111
}
1212
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The preferred way of installing SwiftUIX is via the [Swift Package Manager](http
3535
3636
1. In Xcode, open your project and navigate to **File****Swift Packages****Add Package Dependency...**
3737
2. Paste the repository URL (`https://github.com/heart/CarBode-Barcode-Scanner-For-SwiftUI`) and click **Next**.
38-
3. For **Rules**, select **Branch** (with branch set to `1.5.0` ).
38+
3. For **Rules**, select **Branch** (with branch set to `2.0.1` ).
3939
4. Click **Finish**.
4040

4141
# Example project

Sources/CarBode/CBScanner.swift

+9-8
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,31 @@
99
import SwiftUI
1010
import AVFoundation
1111

12-
typealias OnFound = (BarcodeData)->Void
12+
1313

1414
public struct CBScanner: UIViewRepresentable {
1515

16+
public typealias OnFound = (BarcodeData)->Void
1617
public typealias UIViewType = CameraPreview
1718

1819
@Binding
19-
var supportBarcode: [AVMetadataObject.ObjectType]
20+
public var supportBarcode: [AVMetadataObject.ObjectType]
2021

2122
@Binding
22-
var torchLightIsOn:Bool
23+
public var torchLightIsOn:Bool
2324

2425
@Binding
25-
var scanInterval: Double
26+
public var scanInterval: Double
2627

2728
@Binding
28-
var cameraPosition:AVCaptureDevice.Position
29+
public var cameraPosition:AVCaptureDevice.Position
2930

3031
@Binding
31-
var mockBarCode: BarcodeData
32+
public var mockBarCode: BarcodeData
3233

33-
var onFound: OnFound?
34+
public var onFound: OnFound?
3435

35-
init(supportBarcode:Binding<[AVMetadataObject.ObjectType]> ,
36+
public init(supportBarcode:Binding<[AVMetadataObject.ObjectType]> ,
3637
torchLightIsOn: Binding<Bool> = .constant(false),
3738
scanInterval: Binding<Double> = .constant(3.0),
3839
cameraPosition: Binding<AVCaptureDevice.Position> = .constant(.back),

Sources/CarBode/CameraPreview.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class CameraPreview: UIView {
2222
var scanInterval: Double = 3.0
2323
var lastTime = Date(timeIntervalSince1970: 0)
2424

25-
var onFound: OnFound?
25+
var onFound: CBScanner.OnFound?
2626
var mockBarCode: BarcodeData?
2727
var selectedCamera: AVCaptureDevice?
2828

0 commit comments

Comments
 (0)