Manos Chorianopoulos

add barcode lib

Showing 44 changed files with 3288 additions and 53 deletions
No preview for this file type
......@@ -6,5 +6,6 @@ target 'WarplySDKFrameworkIOS' do
use_frameworks!
# Pods for WarplySDKFrameworkIOS
pod 'RSBarcodes_Swift', '~> 5.1.1'
end
......
PODFILE CHECKSUM: 469e9ad6db6643e917950516ae5b80abb382aab0
PODS:
- RSBarcodes_Swift (5.1.1)
DEPENDENCIES:
- RSBarcodes_Swift (~> 5.1.1)
SPEC REPOS:
trunk:
- RSBarcodes_Swift
SPEC CHECKSUMS:
RSBarcodes_Swift: 9be8dd1d00b9ac12e72f3d853cacb680c7722c9f
PODFILE CHECKSUM: be58eb83ead1cb6b1899b4f27c75472329a24d7f
COCOAPODS: 1.11.2
......
PODFILE CHECKSUM: 469e9ad6db6643e917950516ae5b80abb382aab0
PODS:
- RSBarcodes_Swift (5.1.1)
DEPENDENCIES:
- RSBarcodes_Swift (~> 5.1.1)
SPEC REPOS:
trunk:
- RSBarcodes_Swift
SPEC CHECKSUMS:
RSBarcodes_Swift: 9be8dd1d00b9ac12e72f3d853cacb680c7722c9f
PODFILE CHECKSUM: be58eb83ead1cb6b1899b4f27c75472329a24d7f
COCOAPODS: 1.11.2
......
......@@ -7,37 +7,134 @@
objects = {
/* Begin PBXBuildFile section */
3CB94267BAAACA600E34164D0EE6A83D /* Pods-WarplySDKFrameworkIOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F4852F41D1761CFBF0B901A88611A432 /* Pods-WarplySDKFrameworkIOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
94CF3909D90B545F11886D2920E02763 /* Pods-WarplySDKFrameworkIOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EE2A6FC0243126EF2A5265AA25C2861 /* Pods-WarplySDKFrameworkIOS-dummy.m */; };
D529907ED9CC201D0510CD14373C9186 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; };
05E9C825ED6CC6894EC0046E432B221C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A944E2A381FC1C22728EC807559C4C86 /* Foundation.framework */; };
12565F53551E3F99FF1563B2EAB7245E /* Pods-WarplySDKFrameworkIOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F4852F41D1761CFBF0B901A88611A432 /* Pods-WarplySDKFrameworkIOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
1332AF6141E5F1FF39B19754800F8A5C /* UIColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0568EC6DAF22B32CDD16856911FD4105 /* UIColorExtension.swift */; };
27EA55D886E55816FA37C6BFFAA1EA4F /* RSUnifiedCodeValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8F77A025F8AD377874E5F3E19AE7C79 /* RSUnifiedCodeValidator.swift */; };
2A144930A1E065A3AF77C76FD7011341 /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DA23F9D788EEFAE7C7662FDC4D42A5E /* CoreImage.framework */; };
302B4B469989DB72266490E8A1382417 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6C7186A58209BD865768FEEECE45879 /* QuartzCore.framework */; };
39A13850C2B4154BEB6B1748ADC04201 /* RSCodeDataMatrixGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3AB8A056DF50685033466069E237A14 /* RSCodeDataMatrixGenerator.swift */; };
3C7289263FEAA4191FCFE25988044EBD /* RSITFGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDDED3429B0E0BDC158E1EC36A226D29 /* RSITFGenerator.swift */; };
3F72F4E3E3131D47CE00F3A554669E87 /* StringExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BBA779B4FF00402FEC4985CF4A7B9BC /* StringExtension.swift */; };
41E2817A8EF001F43FB61CFCE1457B4E /* RSCode39Generator.swift in Sources */ = {isa = PBXBuildFile; fileRef = A70EA7F4B9944D0F81ADE63C29F6B74A /* RSCode39Generator.swift */; };
69FCE3D80F2014719DA1AB10BC26E730 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33B191A7CD5F1D4BA6167963BE6ECFE1 /* AVFoundation.framework */; };
6BD4D1A3C0962FFFE47B84FE981578A7 /* RSITF14Generator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDF9008817996E19632780D0A4BFB8B5 /* RSITF14Generator.swift */; };
711E684F2D76C938CB35E2730E53B9CC /* RSCode93Generator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 214258C0DC11D5A201F9293FF484DD2E /* RSCode93Generator.swift */; };
717423952F54594D6F8C8C1F1C1DF6DD /* RSUPCEGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4AEAC7C2D6CCA5D47E35AEDB153D83 /* RSUPCEGenerator.swift */; };
7DD2212D6D7B540985937C6930994BEA /* ContextMaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BA7ECA7DEC0464AB14CEC8FB73C16DA /* ContextMaker.swift */; };
85FAD53FB51819F05F3310CFABB2CCED /* RSEANGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3AA69B1B0D500239BE47CA68349021 /* RSEANGenerator.swift */; };
8C85310AC111885226FF0D25B41FAEF2 /* RSFocusMarkLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E107504D90AB42B9BC594C6722D0182A /* RSFocusMarkLayer.swift */; };
9DEA4BF4A7873C633E2FF158481CD4EB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A944E2A381FC1C22728EC807559C4C86 /* Foundation.framework */; };
9EB3F27C25339307654AB4B6F08CD966 /* RSUnifiedCodeGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 680FDAB9088C5319CE20751DE30DEBCE /* RSUnifiedCodeGenerator.swift */; };
B6234C50A73A62C42CDD5067C44663BA /* RSCodeGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B7BBDDEABCF9D24B31EA0ADE75DFF3 /* RSCodeGenerator.swift */; };
BC7E203C1F132BA3955B93BB02044830 /* RSCornersLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3455E17394A5AB2F88546F52599FE8C /* RSCornersLayer.swift */; };
D15FAF53AAD1789027D0E0EC27B46E82 /* RSBarcodes_Swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C280F49295B1757C26C05F383F8638 /* RSBarcodes_Swift-dummy.m */; };
D697AA0DB2FFFA2459ACC459F8CA8794 /* RSCodeReaderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 858327FB4B5D770F80A8D44B7F52FE05 /* RSCodeReaderViewController.swift */; };
DC7CE7EBB97FBDE958725B1371F43E26 /* RSCodeLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B01FBA694263430A4BDB814D5211E16 /* RSCodeLayer.swift */; };
E05B0B3D85AD8264D06DD3404AAE0556 /* RSCode128Generator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A7EAD43A1CD4D812852352204C3D1FD /* RSCode128Generator.swift */; };
E2B6B038C8F1164C8981406BCE79AD90 /* Pods-WarplySDKFrameworkIOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EE2A6FC0243126EF2A5265AA25C2861 /* Pods-WarplySDKFrameworkIOS-dummy.m */; };
E7FFBBC5AF2005FCA69393FACA0226D2 /* RSBarcodes_Swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D25478B57CA940F484DDFB8F5FF981A6 /* RSBarcodes_Swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
F278698D21257C92FE708357F26190D9 /* RSExtendedCode39Generator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BD0C3768A6D9F31A32D63DFF071C8BF /* RSExtendedCode39Generator.swift */; };
FD09BC74BDA6FCCA44092100E4D2CFF8 /* RSCode39Mod43Generator.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8B8044E2FEE81ADFF29C1084020BBEE /* RSCode39Mod43Generator.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
F14FCC47D788B5F25BEE8E788680E46E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 3C896FA0C00DEA19240C4BFD2C54E0D3;
remoteInfo = RSBarcodes_Swift;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
0568EC6DAF22B32CDD16856911FD4105 /* UIColorExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UIColorExtension.swift; path = Source/UIColorExtension.swift; sourceTree = "<group>"; };
070839992AB5311FCCD01EF9FA04CBDF /* Pods-WarplySDKFrameworkIOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-WarplySDKFrameworkIOS.modulemap"; sourceTree = "<group>"; };
1B01FBA694263430A4BDB814D5211E16 /* RSCodeLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSCodeLayer.swift; path = Source/RSCodeLayer.swift; sourceTree = "<group>"; };
214258C0DC11D5A201F9293FF484DD2E /* RSCode93Generator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSCode93Generator.swift; path = Source/RSCode93Generator.swift; sourceTree = "<group>"; };
2181B0326B7151E5D44851DC0B071D18 /* Pods-WarplySDKFrameworkIOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-WarplySDKFrameworkIOS-acknowledgements.plist"; sourceTree = "<group>"; };
2363AF68813770FC1693F17099D7B4E2 /* RSBarcodes_Swift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RSBarcodes_Swift-prefix.pch"; sourceTree = "<group>"; };
2A7EAD43A1CD4D812852352204C3D1FD /* RSCode128Generator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSCode128Generator.swift; path = Source/RSCode128Generator.swift; sourceTree = "<group>"; };
33350D89813FDC0792B0D0B114B76A33 /* RSBarcodes_Swift */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RSBarcodes_Swift; path = RSBarcodes_Swift.framework; sourceTree = BUILT_PRODUCTS_DIR; };
33B191A7CD5F1D4BA6167963BE6ECFE1 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; };
3BA7ECA7DEC0464AB14CEC8FB73C16DA /* ContextMaker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContextMaker.swift; path = Source/ContextMaker.swift; sourceTree = "<group>"; };
4C337411AA19624EC4CD26EC32EAD6EF /* Pods-WarplySDKFrameworkIOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WarplySDKFrameworkIOS.debug.xcconfig"; sourceTree = "<group>"; };
4EE2A6FC0243126EF2A5265AA25C2861 /* Pods-WarplySDKFrameworkIOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-WarplySDKFrameworkIOS-dummy.m"; sourceTree = "<group>"; };
73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
55B7BBDDEABCF9D24B31EA0ADE75DFF3 /* RSCodeGenerator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSCodeGenerator.swift; path = Source/RSCodeGenerator.swift; sourceTree = "<group>"; };
5DA23F9D788EEFAE7C7662FDC4D42A5E /* CoreImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreImage.framework; sourceTree = DEVELOPER_DIR; };
680FDAB9088C5319CE20751DE30DEBCE /* RSUnifiedCodeGenerator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSUnifiedCodeGenerator.swift; path = Source/RSUnifiedCodeGenerator.swift; sourceTree = "<group>"; };
81FE1BFBEE8B0039BAB28F45E7423BC5 /* Pods-WarplySDKFrameworkIOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-WarplySDKFrameworkIOS-acknowledgements.markdown"; sourceTree = "<group>"; };
858327FB4B5D770F80A8D44B7F52FE05 /* RSCodeReaderViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSCodeReaderViewController.swift; path = Source/RSCodeReaderViewController.swift; sourceTree = "<group>"; };
8BBA779B4FF00402FEC4985CF4A7B9BC /* StringExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StringExtension.swift; path = Source/StringExtension.swift; sourceTree = "<group>"; };
8BD0C3768A6D9F31A32D63DFF071C8BF /* RSExtendedCode39Generator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSExtendedCode39Generator.swift; path = Source/RSExtendedCode39Generator.swift; sourceTree = "<group>"; };
8D9A6E342653A94C21E0FA8167A49109 /* Pods-WarplySDKFrameworkIOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-WarplySDKFrameworkIOS-Info.plist"; sourceTree = "<group>"; };
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
A6C7186A58209BD865768FEEECE45879 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; };
A70EA7F4B9944D0F81ADE63C29F6B74A /* RSCode39Generator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSCode39Generator.swift; path = Source/RSCode39Generator.swift; sourceTree = "<group>"; };
A8F77A025F8AD377874E5F3E19AE7C79 /* RSUnifiedCodeValidator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSUnifiedCodeValidator.swift; path = Source/RSUnifiedCodeValidator.swift; sourceTree = "<group>"; };
A944E2A381FC1C22728EC807559C4C86 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
B898B8D01EB10CAD6EDFCEDAF24D96B0 /* RSBarcodes_Swift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RSBarcodes_Swift.release.xcconfig; sourceTree = "<group>"; };
C8BDB1FBE63E1D9091638224544830C3 /* RSBarcodes_Swift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RSBarcodes_Swift.debug.xcconfig; sourceTree = "<group>"; };
CCFA91CFAC9A2A8C13929A50AB27327D /* RSBarcodes_Swift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RSBarcodes_Swift.modulemap; sourceTree = "<group>"; };
CD3AA69B1B0D500239BE47CA68349021 /* RSEANGenerator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSEANGenerator.swift; path = Source/RSEANGenerator.swift; sourceTree = "<group>"; };
CDDED3429B0E0BDC158E1EC36A226D29 /* RSITFGenerator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSITFGenerator.swift; path = Source/RSITFGenerator.swift; sourceTree = "<group>"; };
CDF9008817996E19632780D0A4BFB8B5 /* RSITF14Generator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSITF14Generator.swift; path = Source/RSITF14Generator.swift; sourceTree = "<group>"; };
CE4AEAC7C2D6CCA5D47E35AEDB153D83 /* RSUPCEGenerator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSUPCEGenerator.swift; path = Source/RSUPCEGenerator.swift; sourceTree = "<group>"; };
D25478B57CA940F484DDFB8F5FF981A6 /* RSBarcodes_Swift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RSBarcodes_Swift-umbrella.h"; sourceTree = "<group>"; };
E107504D90AB42B9BC594C6722D0182A /* RSFocusMarkLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSFocusMarkLayer.swift; path = Source/RSFocusMarkLayer.swift; sourceTree = "<group>"; };
E3455E17394A5AB2F88546F52599FE8C /* RSCornersLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSCornersLayer.swift; path = Source/RSCornersLayer.swift; sourceTree = "<group>"; };
E8C280F49295B1757C26C05F383F8638 /* RSBarcodes_Swift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RSBarcodes_Swift-dummy.m"; sourceTree = "<group>"; };
F1E7484B07BAD976C8F38EC1B9D2783C /* Pods-WarplySDKFrameworkIOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WarplySDKFrameworkIOS.release.xcconfig"; sourceTree = "<group>"; };
F3AB8A056DF50685033466069E237A14 /* RSCodeDataMatrixGenerator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSCodeDataMatrixGenerator.swift; path = Source/RSCodeDataMatrixGenerator.swift; sourceTree = "<group>"; };
F4852F41D1761CFBF0B901A88611A432 /* Pods-WarplySDKFrameworkIOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-WarplySDKFrameworkIOS-umbrella.h"; sourceTree = "<group>"; };
F5F3410744C4FAFD32980AF57D615CBF /* RSBarcodes_Swift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "RSBarcodes_Swift-Info.plist"; sourceTree = "<group>"; };
F88D658AD0E099B29A131EF709CC6530 /* Pods-WarplySDKFrameworkIOS */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-WarplySDKFrameworkIOS"; path = Pods_WarplySDKFrameworkIOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F8B8044E2FEE81ADFF29C1084020BBEE /* RSCode39Mod43Generator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RSCode39Mod43Generator.swift; path = Source/RSCode39Mod43Generator.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7A4FE7AD3238E2ECE0F4F0627A5C84E2 /* Frameworks */ = {
87FCBCA369E651BD607E728CDCA04868 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
69FCE3D80F2014719DA1AB10BC26E730 /* AVFoundation.framework in Frameworks */,
2A144930A1E065A3AF77C76FD7011341 /* CoreImage.framework in Frameworks */,
9DEA4BF4A7873C633E2FF158481CD4EB /* Foundation.framework in Frameworks */,
302B4B469989DB72266490E8A1382417 /* QuartzCore.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F727AFF969F4390DC15E578713711206 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D529907ED9CC201D0510CD14373C9186 /* Foundation.framework in Frameworks */,
05E9C825ED6CC6894EC0046E432B221C /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
0EEA9E9906DE882E95DFF9F8E6FC0981 /* Pods */ = {
isa = PBXGroup;
children = (
291D453EAC07BC54E13A98D15C6D526E /* RSBarcodes_Swift */,
);
name = Pods;
sourceTree = "<group>";
};
1D46C8AAAC9E59E360CC2838D3227E95 /* iOS */ = {
isa = PBXGroup;
children = (
33B191A7CD5F1D4BA6167963BE6ECFE1 /* AVFoundation.framework */,
5DA23F9D788EEFAE7C7662FDC4D42A5E /* CoreImage.framework */,
A944E2A381FC1C22728EC807559C4C86 /* Foundation.framework */,
A6C7186A58209BD865768FEEECE45879 /* QuartzCore.framework */,
);
name = iOS;
sourceTree = "<group>";
};
24DA7987E049129D8347880A810DDBB1 /* Targets Support Files */ = {
isa = PBXGroup;
children = (
......@@ -46,6 +143,35 @@
name = "Targets Support Files";
sourceTree = "<group>";
};
291D453EAC07BC54E13A98D15C6D526E /* RSBarcodes_Swift */ = {
isa = PBXGroup;
children = (
3BA7ECA7DEC0464AB14CEC8FB73C16DA /* ContextMaker.swift */,
2A7EAD43A1CD4D812852352204C3D1FD /* RSCode128Generator.swift */,
A70EA7F4B9944D0F81ADE63C29F6B74A /* RSCode39Generator.swift */,
F8B8044E2FEE81ADFF29C1084020BBEE /* RSCode39Mod43Generator.swift */,
214258C0DC11D5A201F9293FF484DD2E /* RSCode93Generator.swift */,
F3AB8A056DF50685033466069E237A14 /* RSCodeDataMatrixGenerator.swift */,
55B7BBDDEABCF9D24B31EA0ADE75DFF3 /* RSCodeGenerator.swift */,
1B01FBA694263430A4BDB814D5211E16 /* RSCodeLayer.swift */,
858327FB4B5D770F80A8D44B7F52FE05 /* RSCodeReaderViewController.swift */,
E3455E17394A5AB2F88546F52599FE8C /* RSCornersLayer.swift */,
CD3AA69B1B0D500239BE47CA68349021 /* RSEANGenerator.swift */,
8BD0C3768A6D9F31A32D63DFF071C8BF /* RSExtendedCode39Generator.swift */,
E107504D90AB42B9BC594C6722D0182A /* RSFocusMarkLayer.swift */,
CDF9008817996E19632780D0A4BFB8B5 /* RSITF14Generator.swift */,
CDDED3429B0E0BDC158E1EC36A226D29 /* RSITFGenerator.swift */,
680FDAB9088C5319CE20751DE30DEBCE /* RSUnifiedCodeGenerator.swift */,
A8F77A025F8AD377874E5F3E19AE7C79 /* RSUnifiedCodeValidator.swift */,
CE4AEAC7C2D6CCA5D47E35AEDB153D83 /* RSUPCEGenerator.swift */,
8BBA779B4FF00402FEC4985CF4A7B9BC /* StringExtension.swift */,
0568EC6DAF22B32CDD16856911FD4105 /* UIColorExtension.swift */,
E61268093DAB9EBB123454DC1EE66301 /* Support Files */,
);
name = RSBarcodes_Swift;
path = RSBarcodes_Swift;
sourceTree = "<group>";
};
2F2FA44F045F7F6CEBF00B29980DD5B9 /* Pods-WarplySDKFrameworkIOS */ = {
isa = PBXGroup;
children = (
......@@ -62,66 +188,102 @@
path = "Target Support Files/Pods-WarplySDKFrameworkIOS";
sourceTree = "<group>";
};
578452D2E740E91742655AC8F1636D1F /* iOS */ = {
59048A30E99D9FEF92A013044A75BDA4 /* Products */ = {
isa = PBXGroup;
children = (
73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */,
F88D658AD0E099B29A131EF709CC6530 /* Pods-WarplySDKFrameworkIOS */,
33350D89813FDC0792B0D0B114B76A33 /* RSBarcodes_Swift */,
);
name = iOS;
name = Products;
sourceTree = "<group>";
};
8EB503099D7FD0818479753866675C2C /* Products */ = {
BA4F31F07263C99FC76E66D632A59F09 /* Frameworks */ = {
isa = PBXGroup;
children = (
F88D658AD0E099B29A131EF709CC6530 /* Pods-WarplySDKFrameworkIOS */,
1D46C8AAAC9E59E360CC2838D3227E95 /* iOS */,
);
name = Products;
name = Frameworks;
sourceTree = "<group>";
};
CF1408CF629C7361332E53B88F7BD30C = {
isa = PBXGroup;
children = (
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */,
D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */,
8EB503099D7FD0818479753866675C2C /* Products */,
BA4F31F07263C99FC76E66D632A59F09 /* Frameworks */,
0EEA9E9906DE882E95DFF9F8E6FC0981 /* Pods */,
59048A30E99D9FEF92A013044A75BDA4 /* Products */,
24DA7987E049129D8347880A810DDBB1 /* Targets Support Files */,
);
sourceTree = "<group>";
};
D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = {
E61268093DAB9EBB123454DC1EE66301 /* Support Files */ = {
isa = PBXGroup;
children = (
578452D2E740E91742655AC8F1636D1F /* iOS */,
CCFA91CFAC9A2A8C13929A50AB27327D /* RSBarcodes_Swift.modulemap */,
E8C280F49295B1757C26C05F383F8638 /* RSBarcodes_Swift-dummy.m */,
F5F3410744C4FAFD32980AF57D615CBF /* RSBarcodes_Swift-Info.plist */,
2363AF68813770FC1693F17099D7B4E2 /* RSBarcodes_Swift-prefix.pch */,
D25478B57CA940F484DDFB8F5FF981A6 /* RSBarcodes_Swift-umbrella.h */,
C8BDB1FBE63E1D9091638224544830C3 /* RSBarcodes_Swift.debug.xcconfig */,
B898B8D01EB10CAD6EDFCEDAF24D96B0 /* RSBarcodes_Swift.release.xcconfig */,
);
name = Frameworks;
name = "Support Files";
path = "../Target Support Files/RSBarcodes_Swift";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
77C57494E927AF72D6D92A4313DA848C /* Headers */ = {
8003D17E34B31501DA58E80BCDD3B735 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
3CB94267BAAACA600E34164D0EE6A83D /* Pods-WarplySDKFrameworkIOS-umbrella.h in Headers */,
12565F53551E3F99FF1563B2EAB7245E /* Pods-WarplySDKFrameworkIOS-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D8F9BC9CEEADC306F65DAEE0D51E97F6 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
E7FFBBC5AF2005FCA69393FACA0226D2 /* RSBarcodes_Swift-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
3C896FA0C00DEA19240C4BFD2C54E0D3 /* RSBarcodes_Swift */ = {
isa = PBXNativeTarget;
buildConfigurationList = DDC8597B5950815FDB21A31838A57A46 /* Build configuration list for PBXNativeTarget "RSBarcodes_Swift" */;
buildPhases = (
D8F9BC9CEEADC306F65DAEE0D51E97F6 /* Headers */,
03D1E9517320D9679EFBC218F816D98F /* Sources */,
87FCBCA369E651BD607E728CDCA04868 /* Frameworks */,
5FDE2AC8D134024ADBE75EC05AF21A39 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = RSBarcodes_Swift;
productName = RSBarcodes_Swift;
productReference = 33350D89813FDC0792B0D0B114B76A33 /* RSBarcodes_Swift */;
productType = "com.apple.product-type.framework";
};
C6C64B3B320397CC1D8287CA8BA24255 /* Pods-WarplySDKFrameworkIOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = B6D2C4D3878A30AAAE8B97D80603A15F /* Build configuration list for PBXNativeTarget "Pods-WarplySDKFrameworkIOS" */;
buildConfigurationList = 3BD3E3F547DE3AB21B87CE78CF4AF6FC /* Build configuration list for PBXNativeTarget "Pods-WarplySDKFrameworkIOS" */;
buildPhases = (
77C57494E927AF72D6D92A4313DA848C /* Headers */,
233E89DCFBC636797E64391823F82E66 /* Sources */,
7A4FE7AD3238E2ECE0F4F0627A5C84E2 /* Frameworks */,
013DA7ACA280D19C3B86FF5DE72162D7 /* Resources */,
8003D17E34B31501DA58E80BCDD3B735 /* Headers */,
DE273A3288B18F1173C023D63E05BD2A /* Sources */,
F727AFF969F4390DC15E578713711206 /* Frameworks */,
DA4EA784E871E40BF62F5CB4D788372E /* Resources */,
);
buildRules = (
);
dependencies = (
7CF08AFC43F49E84FF110CD229ADB4B6 /* PBXTargetDependency */,
);
name = "Pods-WarplySDKFrameworkIOS";
productName = Pods_WarplySDKFrameworkIOS;
......@@ -146,17 +308,25 @@
en,
);
mainGroup = CF1408CF629C7361332E53B88F7BD30C;
productRefGroup = 8EB503099D7FD0818479753866675C2C /* Products */;
productRefGroup = 59048A30E99D9FEF92A013044A75BDA4 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
C6C64B3B320397CC1D8287CA8BA24255 /* Pods-WarplySDKFrameworkIOS */,
3C896FA0C00DEA19240C4BFD2C54E0D3 /* RSBarcodes_Swift */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
013DA7ACA280D19C3B86FF5DE72162D7 /* Resources */ = {
5FDE2AC8D134024ADBE75EC05AF21A39 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
DA4EA784E871E40BF62F5CB4D788372E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
......@@ -166,23 +336,58 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
233E89DCFBC636797E64391823F82E66 /* Sources */ = {
03D1E9517320D9679EFBC218F816D98F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
94CF3909D90B545F11886D2920E02763 /* Pods-WarplySDKFrameworkIOS-dummy.m in Sources */,
7DD2212D6D7B540985937C6930994BEA /* ContextMaker.swift in Sources */,
D15FAF53AAD1789027D0E0EC27B46E82 /* RSBarcodes_Swift-dummy.m in Sources */,
E05B0B3D85AD8264D06DD3404AAE0556 /* RSCode128Generator.swift in Sources */,
41E2817A8EF001F43FB61CFCE1457B4E /* RSCode39Generator.swift in Sources */,
FD09BC74BDA6FCCA44092100E4D2CFF8 /* RSCode39Mod43Generator.swift in Sources */,
711E684F2D76C938CB35E2730E53B9CC /* RSCode93Generator.swift in Sources */,
39A13850C2B4154BEB6B1748ADC04201 /* RSCodeDataMatrixGenerator.swift in Sources */,
B6234C50A73A62C42CDD5067C44663BA /* RSCodeGenerator.swift in Sources */,
DC7CE7EBB97FBDE958725B1371F43E26 /* RSCodeLayer.swift in Sources */,
D697AA0DB2FFFA2459ACC459F8CA8794 /* RSCodeReaderViewController.swift in Sources */,
BC7E203C1F132BA3955B93BB02044830 /* RSCornersLayer.swift in Sources */,
85FAD53FB51819F05F3310CFABB2CCED /* RSEANGenerator.swift in Sources */,
F278698D21257C92FE708357F26190D9 /* RSExtendedCode39Generator.swift in Sources */,
8C85310AC111885226FF0D25B41FAEF2 /* RSFocusMarkLayer.swift in Sources */,
6BD4D1A3C0962FFFE47B84FE981578A7 /* RSITF14Generator.swift in Sources */,
3C7289263FEAA4191FCFE25988044EBD /* RSITFGenerator.swift in Sources */,
9EB3F27C25339307654AB4B6F08CD966 /* RSUnifiedCodeGenerator.swift in Sources */,
27EA55D886E55816FA37C6BFFAA1EA4F /* RSUnifiedCodeValidator.swift in Sources */,
717423952F54594D6F8C8C1F1C1DF6DD /* RSUPCEGenerator.swift in Sources */,
3F72F4E3E3131D47CE00F3A554669E87 /* StringExtension.swift in Sources */,
1332AF6141E5F1FF39B19754800F8A5C /* UIColorExtension.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
DE273A3288B18F1173C023D63E05BD2A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E2B6B038C8F1164C8981406BCE79AD90 /* Pods-WarplySDKFrameworkIOS-dummy.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
7CF08AFC43F49E84FF110CD229ADB4B6 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = RSBarcodes_Swift;
target = 3C896FA0C00DEA19240C4BFD2C54E0D3 /* RSBarcodes_Swift */;
targetProxy = F14FCC47D788B5F25BEE8E788680E46E /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
385DCA88EB99A0BE9CDE5E09CB37622E /* Debug */ = {
42AE877A2EDC444BEDBF3A38CAE86007 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4C337411AA19624EC4CD26EC32EAD6EF /* Pods-WarplySDKFrameworkIOS.debug.xcconfig */;
baseConfigurationReference = B898B8D01EB10CAD6EDFCEDAF24D96B0 /* RSBarcodes_Swift.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
......@@ -191,28 +396,28 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-WarplySDKFrameworkIOS/Pods-WarplySDKFrameworkIOS-Info.plist";
GCC_PREFIX_HEADER = "Target Support Files/RSBarcodes_Swift/RSBarcodes_Swift-prefix.pch";
INFOPLIST_FILE = "Target Support Files/RSBarcodes_Swift/RSBarcodes_Swift-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-WarplySDKFrameworkIOS/Pods-WarplySDKFrameworkIOS.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
MODULEMAP_FILE = "Target Support Files/RSBarcodes_Swift/RSBarcodes_Swift.modulemap";
PRODUCT_MODULE_NAME = RSBarcodes_Swift;
PRODUCT_NAME = RSBarcodes_Swift;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
name = Release;
};
8DE5143C03248BB6CD542DE3963D6F3A /* Debug */ = {
isa = XCBuildConfiguration;
......@@ -280,6 +485,78 @@
};
name = Debug;
};
8F5BA7EEE7D4789D6A8755AB3C3ACB5C /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F1E7484B07BAD976C8F38EC1B9D2783C /* Pods-WarplySDKFrameworkIOS.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-WarplySDKFrameworkIOS/Pods-WarplySDKFrameworkIOS-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-WarplySDKFrameworkIOS/Pods-WarplySDKFrameworkIOS.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
96F1B90FA88DCC7B176CEA6B4AE70A12 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C8BDB1FBE63E1D9091638224544830C3 /* RSBarcodes_Swift.debug.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/RSBarcodes_Swift/RSBarcodes_Swift-prefix.pch";
INFOPLIST_FILE = "Target Support Files/RSBarcodes_Swift/RSBarcodes_Swift-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MODULEMAP_FILE = "Target Support Files/RSBarcodes_Swift/RSBarcodes_Swift.modulemap";
PRODUCT_MODULE_NAME = RSBarcodes_Swift;
PRODUCT_NAME = RSBarcodes_Swift;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
9E406C6AAF85E580207CD97B0044DEAB /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
......@@ -342,9 +619,9 @@
};
name = Release;
};
D7DA3D63A4897FAAB799794E8BE3B283 /* Release */ = {
BEB120E9FCD27FC06CFBB5DEFB56A14B /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F1E7484B07BAD976C8F38EC1B9D2783C /* Pods-WarplySDKFrameworkIOS.release.xcconfig */;
baseConfigurationReference = 4C337411AA19624EC4CD26EC32EAD6EF /* Pods-WarplySDKFrameworkIOS.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
......@@ -374,15 +651,23 @@
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
name = Debug;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
3BD3E3F547DE3AB21B87CE78CF4AF6FC /* Build configuration list for PBXNativeTarget "Pods-WarplySDKFrameworkIOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BEB120E9FCD27FC06CFBB5DEFB56A14B /* Debug */,
8F5BA7EEE7D4789D6A8755AB3C3ACB5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = {
isa = XCConfigurationList;
buildConfigurations = (
......@@ -392,11 +677,11 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B6D2C4D3878A30AAAE8B97D80603A15F /* Build configuration list for PBXNativeTarget "Pods-WarplySDKFrameworkIOS" */ = {
DDC8597B5950815FDB21A31838A57A46 /* Build configuration list for PBXNativeTarget "RSBarcodes_Swift" */ = {
isa = XCConfigurationList;
buildConfigurations = (
385DCA88EB99A0BE9CDE5E09CB37622E /* Debug */,
D7DA3D63A4897FAAB799794E8BE3B283 /* Release */,
96F1B90FA88DCC7B176CEA6B4AE70A12 /* Debug */,
42AE877A2EDC444BEDBF3A38CAE86007 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C6C64B3B320397CC1D8287CA8BA24255"
BuildableName = "Pods_WarplySDKFrameworkIOS.framework"
BlueprintName = "Pods-WarplySDKFrameworkIOS"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</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">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3C896FA0C00DEA19240C4BFD2C54E0D3"
BuildableName = "RSBarcodes_Swift.framework"
BlueprintName = "RSBarcodes_Swift"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</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">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
......@@ -4,11 +4,22 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>Pods-WarplySDKFrameworkIOS.xcscheme_^#shared#^_</key>
<key>Pods-WarplySDKFrameworkIOS.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>RSBarcodes_Swift.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict/>
</dict>
</plist>
......
The MIT License (MIT)
Copyright (c) 2012-2014 P.D.Q.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<p align="center">
<img src="https://raw.githubusercontent.com/yeahdongcn/RSBarcodes_Swift/master/home-hero-swift-hero.png">
</p>
RSBarcodes, now in Swift.
[![Build Status](https://travis-ci.org/yeahdongcn/RSBarcodes_Swift.svg?branch=master)](https://travis-ci.org/yeahdongcn/RSBarcodes_Swift) [![codecov.io](https://codecov.io/gh/yeahdongcn/RSBarcodes_Swift/branch/master/graphs/badge.svg)](https://codecov.io/gh/yeahdongcn/RSBarcodes_Swift/branch/master) ![](https://img.shields.io/badge/Swift-5.0-blue.svg?style=flat) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ![](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)
---
RSBarcodes allows you to read 1D and 2D barcodes using the metadata scanning capabilities introduced with iOS 7 and generate the same set of barcode images for displaying and sharing. Now implemented in Swift.
- Objective-C version: [RSBarcodes](https://github.com/yeahdongcn/RSBarcodes)
## TODO
### Generators
- [x] Code39
- [x] Code39Mod43
- [x] ExtendedCode39
- [x] Code93
- [x] Code128
- [x] UPCE
- [x] EAN FAMILIY (EAN8 EAN13 ISBN13 ISSN13)
- [x] ITF14
- [x] Interleaved2of5
- [ ] DataMatrix
- [x] PDF417
- [x] QR
- [x] Aztec
- [x] Views
### Reader
- [x] Views
- [x] ReaderController
## Installation
### [Swift Package Manager](https://github.com/apple/swift-package-manager)
To add a package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and enter https://github.com/yeahdongcn/RSBarcodes_Swift to the text field.
### [CocoaPods](http://cocoapods.org)
Simply add the following lines to your `Podfile`:
```ruby
# required by Cocoapods 0.36.0.rc.1 for Swift Pods
use_frameworks!
pod 'RSBarcodes_Swift', '~> 5.1.1'
```
You will need to import RSBarcodes_Swift manually in the ViewController file after creating the file using wizard.
*(CocoaPods v0.36 or later required. See [this blog post](http://blog.cocoapods.org/Pod-Authors-Guide-to-CocoaPods-Frameworks/) for details.)*
### [Carthage](http://github.com/Carthage/Carthage)
Simply add the following line to your `Cartfile`:
```ruby
github "yeahdongcn/RSBarcodes_Swift" >= 5.1.1
```
You will need to import RSBarcodes_Swift manually in the ViewController file after creating the file using wizard.
### Swift Package Manager (required Xcode 11)
1. Select File > Swift Packages > Add Package Dependency. Enter `https://github.com/yeahdongcn/RSBarcodes_Swift` in the "Choose Package Repository" dialog.
2. In the next page, specify the version resolving rule as "Up to Next Major" with the latest version.
3. After Xcode checking out the source and resolving the version, you can choose the "RSBarcodes_Swift" library and add it to your app target.
### Manual
1. Add RSBarcodes_Swift as a [submodule](http://git-scm.com/docs/git-submodule) by opening the Terminal, `cd`-ing into your top-level project directory, and entering the command `git submodule add https://github.com/yeahdongcn/RSBarcodes_Swift.git`
2. Open the `RSBarcodes_Swift` folder, and drag `RSBarcodes.xcodeproj` into the file navigator of your app project.
3. In Xcode, navigate to the target configuration window by clicking on the blue project icon, and select the application target under the "Targets" heading in the sidebar.
4. Ensure that the deployment target of RSBarcodes.framework matches that of the application target.
5. In the tab bar at the top of that window, open the "Build Phases" panel.
6. Expand the "Target Dependencies" group, and add `RSBarcodes.framework`.
7. Click on the `+` button at the top left of the panel and select "New Copy Files Phase". Rename this new phase to "Copy Frameworks", set the "Destination" to "Frameworks", and add `RSBarcodes.framework`.
8. Need to import RSBarcodes manually in the ViewController file after creating the file using wizard.
## Usage
[How to Use Generator](#generator-1) and
[How to Use Reader](#reader-1)
### Generators
First, import the following frameworks:
``` swift
import RSBarcodes_Swift
import AVFoundation
```
Then, use the generator to generate a barcode. For example:
``` swift
RSUnifiedCodeGenerator.shared.generateCode("2166529V", machineReadableCodeObjectType: AVMetadataObjectTypeCode39Code)
```
It will generate a `UIImage` instance if the `2166529V` is a valid code39 string. For `AVMetadataObjectTypeCode128Code`, you can change `useBuiltInCode128Generator` to `false` to use my implementation (AutoTable for code128).
P.S. There are 4 tables for encoding a string to code128, `TableA`, `TableB`, `TableC` and `TableAuto`; the `TableAuto` is always the best choice, but if one has specific requirements, try this:
``` swift
RSCode128Generator(codeTable: .A).generateCode("123456", machineReadableCodeObjectType: AVMetadataObjectTypeCode128Code)
```
Example of these simple calls can be found in the test project.
### Reader
The following are steps to get the barcode reader working:
1. `File` -> `New` -> `File`
2. Under `iOS` click `source` and make sure `Cocoa Touch Class` is selected and hit `Next`.
3. Call the name of the class whatever you want but I will refer to it as `ScanViewController` from now on.
4. Make it a subclass of `RSCodeReaderViewController` and ensure the language is `Swift` and hit `Next` and then `Create`
5. Open your storyboard and drag a `UIViewController` onto it.
6. Show the identity inspect and under custom class select `ScanViewController`
7. The focus mark layer and corners layer are already there working for you. There are two handlers: one for the single tap on the screen along with the focus mark and one detected objects handler, which all detected will come to you. Now in the `ScanViewController.swift` file add the following code into the `viewDidLoad()` or some place more suitable for you:
``` swift
override func viewDidLoad() {
super.viewDidLoad()
self.focusMarkLayer.strokeColor = UIColor.red.cgColor
self.cornersLayer.strokeColor = UIColor.yellow.cgColor
self.tapHandler = { point in
print(point)
}
self.barcodesHandler = { barcodes in
for barcode in barcodes {
print("Barcode found: type=" + barcode.type + " value=" + barcode.stringValue)
}
}
}
```
If you want to ignore some code types (for example, `AVMetadataObjectTypeQRCode`), add the following lines:
``` swift
let types = NSMutableArray(array: self.output.availableMetadataObjectTypes)
types.remove(AVMetadataObjectTypeQRCode)
self.output.metadataObjectTypes = NSArray(array: types)
```
### Validator
To validate codes:
``` swift
let isValid = RSUnifiedCodeValidator.shared.isValid(code, machineReadableCodeObjectType: AVMetadataObjectTypeEAN13Code)
```
### Image helpers
Use `RSAbstractCodeGenerator.resizeImage(source: UIImage, scale: CGFloat)` to scale the generated image.
Use `RSAbstractCodeGenerator.resizeImage(source: UIImage, targetSize: CGSize, contentMode: UIViewContentMode)` to fill/fit the bounds of something to the best capability and don't necessarily know what scale is too much to fill/fit, or if the `UIImageView` itself is flexible.
## Miscellaneous
[The Swift Programming Language 中文版](https://github.com/numbbbbb/the-swift-programming-language-in-chinese/)
[Online version](http://numbbbbb.github.io/the-swift-programming-language-in-chinese/) generated using [GitBook](https://www.gitbook.io/)
## License
The MIT License (MIT)
Copyright (c) 2012-2014 P.D.Q.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// ContextMaker.swift
// RSBarcodes
//
// Created by Alexey Korolev on 11.10.2019.
// Copyright © 2019 P.D.Q. All rights reserved.
//
import UIKit
final class ContextMaker {
static func make() -> CIContext {
return CIContext(options: nil)
}
}
//
// RSCode128Generator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/11/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
public enum RSCode128GeneratorCodeTable: Int {
case auto = 0
case a, b, c
}
// http://www.barcodeisland.com/code128.phtml
// http://courses.cs.washington.edu/courses/cse370/01au/minirproject/BarcodeBattlers/barcodes.html
open class RSCode128Generator: RSAbstractCodeGenerator, RSCheckDigitGenerator {
class RSCode128GeneratorAutoCodeTable {
var startCodeTable = RSCode128GeneratorCodeTable.auto
var sequence:Array<Int> = []
}
var codeTable: RSCode128GeneratorCodeTable
var codeTableSize: Int
var autoCodeTable: RSCode128GeneratorAutoCodeTable
public init(codeTable:RSCode128GeneratorCodeTable) {
self.codeTable = codeTable
self.codeTableSize = CODE128_CHARACTER_ENCODINGS.count
self.autoCodeTable = RSCode128GeneratorAutoCodeTable()
}
public convenience override init() {
self.init(codeTable: .auto)
}
func startCodeTableValue(_ startCodeTable: RSCode128GeneratorCodeTable) -> Int {
switch self.autoCodeTable.startCodeTable {
case .a:
return self.codeTableSize - 4
case .b:
return self.codeTableSize - 3
case .c:
return self.codeTableSize - 2
default:
switch startCodeTable {
case .a:
return self.codeTableSize - 4
case .b:
return self.codeTableSize - 3
case .c:
return self.codeTableSize - 2
default:
return 0
}
}
}
func middleCodeTableValue(_ codeTable:RSCode128GeneratorCodeTable) -> Int {
switch codeTable {
case .a:
return self.codeTableSize - 6
case .b:
return self.codeTableSize - 7
case .c:
return self.codeTableSize - 8
default:
return 0
}
}
func calculateContinousDigits(_ contents:String, defaultCodeTable:RSCode128GeneratorCodeTable, range:Range<Int>) {
var isFinished = false
if range.upperBound == contents.length() {
isFinished = true
}
let length = range.upperBound - range.lowerBound
if (range.lowerBound == 0 && length >= 4)
|| (range.lowerBound > 0 && length >= 6) {
var isOrphanDigitUsed = false
// Use START C when continous digits are found from range.location == 0
if range.lowerBound == 0 {
self.autoCodeTable.startCodeTable = .c
} else {
if length % 2 == 1 {
let digitValue = CODE128_ALPHABET_STRING.location(contents[range.lowerBound])
self.autoCodeTable.sequence.append(digitValue)
isOrphanDigitUsed = true
}
self.autoCodeTable.sequence.append(self.middleCodeTableValue(.c))
}
// Insert all xx combinations
for i in 0..<length / 2 {
let startIndex = range.lowerBound + i * 2
let digitValue = Int(contents.substring(isOrphanDigitUsed ? startIndex + 1 : startIndex, length: 2))!
self.autoCodeTable.sequence.append(digitValue)
}
if (length % 2 == 1 && !isOrphanDigitUsed) || !isFinished {
self.autoCodeTable.sequence.append(self.middleCodeTableValue(defaultCodeTable))
}
if length % 2 == 1 && !isOrphanDigitUsed {
let digitValue = CODE128_ALPHABET_STRING.location(contents[range.upperBound - 1])
self.autoCodeTable.sequence.append(digitValue)
}
if !isFinished {
let characterValue = CODE128_ALPHABET_STRING.location(contents[range.upperBound])
self.autoCodeTable.sequence.append(characterValue)
}
} else {
for i in range.lowerBound...(isFinished ? range.upperBound - 1 : range.upperBound) {
let characterValue = CODE128_ALPHABET_STRING.location(contents[i])
self.autoCodeTable.sequence.append(characterValue)
}
}
}
func calculateAutoCodeTable(_ contents:String) {
if self.codeTable == .auto {
// Select the short code table A as default code table
var defaultCodeTable: RSCode128GeneratorCodeTable = .a
// Determine whether to use code table B
if let CODE128_ALPHABET_STRING_A = CODE128_ALPHABET_STRING.substring(0, length: 64) {
for i in 0..<contents.length() {
if CODE128_ALPHABET_STRING_A.location(contents[i]) == NSNotFound
&& defaultCodeTable == .a {
defaultCodeTable = .b
break
}
}
}
var continousDigitsStartIndex:Int = NSNotFound
for i in 0..<contents.length() {
var continousDigitsRange:Range<Int> = 0..<0
if let character = contents[i] {
if DIGITS_STRING.location(character) == NSNotFound {
// Non digit found
if continousDigitsStartIndex != NSNotFound {
continousDigitsRange = continousDigitsStartIndex..<i
} else {
let characterValue = CODE128_ALPHABET_STRING.location(character)
self.autoCodeTable.sequence.append(characterValue)
}
} else {
// Digit found
if continousDigitsStartIndex == NSNotFound {
continousDigitsStartIndex = i
}
if continousDigitsStartIndex != NSNotFound && i == contents.length() - 1 {
continousDigitsRange = continousDigitsStartIndex..<(i + 1)
}
}
if continousDigitsRange.upperBound - continousDigitsRange.lowerBound != 0 {
self.calculateContinousDigits(contents, defaultCodeTable: defaultCodeTable, range: continousDigitsRange)
continousDigitsStartIndex = NSNotFound
}
}
}
if self.autoCodeTable.startCodeTable == .auto {
self.autoCodeTable.startCodeTable = defaultCodeTable
}
}
}
func encodeCharacterString(_ characterString:String) -> String {
return CODE128_CHARACTER_ENCODINGS[CODE128_ALPHABET_STRING.location(characterString)]
}
override open func initiator() -> String {
switch self.codeTable {
case .auto:
return CODE128_CHARACTER_ENCODINGS[self.startCodeTableValue(self.autoCodeTable.startCodeTable)]
default:
return CODE128_CHARACTER_ENCODINGS[self.startCodeTableValue(self.codeTable)]
}
}
override open func terminator() -> String {
return CODE128_CHARACTER_ENCODINGS[self.codeTableSize - 1] + "11"
}
override open func isValid(_ contents: String) -> Bool {
if contents.length() > 0 {
for i in 0..<contents.length() {
if CODE128_ALPHABET_STRING.location(contents[i]) == NSNotFound {
return false
}
}
switch self.codeTable {
case .auto:
self.calculateAutoCodeTable(contents)
fallthrough
case .b:
return true
case .a:
if let CODE128_ALPHABET_STRING_A = CODE128_ALPHABET_STRING.substring(0, length: 64) {
for i in 0..<contents.length() {
if CODE128_ALPHABET_STRING_A.location(contents[i]) == NSNotFound {
return false
}
}
}
return true
case .c:
if contents.length() % 2 == 0 && contents.isNumeric() {
return true
}
return false
}
}
return false
}
override open func barcode(_ contents: String) -> String {
var barcode = ""
switch self.codeTable {
case .auto:
for i in 0..<self.autoCodeTable.sequence.count {
barcode += CODE128_CHARACTER_ENCODINGS[self.autoCodeTable.sequence[i]]
}
case .a, .b:
for i in 0..<contents.length() {
barcode += self.encodeCharacterString(contents[i])
}
case .c:
for i in 0..<contents.length() {
if i % 2 == 1 {
continue
} else {
let value = Int(contents.substring(i, length: 2))!
barcode += CODE128_CHARACTER_ENCODINGS[value]
}
}
}
barcode += self.checkDigit(contents)
return barcode
}
// MARK: RSCheckDigitGenerator
open func checkDigit(_ contents: String) -> String {
var sum = 0
switch self.codeTable {
case .auto:
sum += self.startCodeTableValue(self.autoCodeTable.startCodeTable)
for i in 0..<self.autoCodeTable.sequence.count {
sum += self.autoCodeTable.sequence[i] * (i + 1)
}
case .a:
sum = -1 // START A = self.codeTableSize - 4 = START B - 1
fallthrough
case .b:
sum += self.codeTableSize - 3 // START B
for i in 0..<contents.length() {
let characterValue = CODE128_ALPHABET_STRING.location(contents[i])
sum += characterValue * (i + 1)
}
case .c:
sum += self.codeTableSize - 2 // START C
for i in 0..<contents.length() {
if i % 2 == 1 {
continue
} else {
let value = Int(contents.substring(i, length: 2))!
sum += value * (i / 2 + 1)
}
}
}
return CODE128_CHARACTER_ENCODINGS[sum % 103]
}
let CODE128_ALPHABET_STRING = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_'abcdefghijklmnopqrstuvwxyz{|}~"
let CODE128_CHARACTER_ENCODINGS = [
"11011001100",
"11001101100",
"11001100110",
"10010011000",
"10010001100",
"10001001100",
"10011001000",
"10011000100",
"10001100100",
"11001001000",
"11001000100",
"11000100100",
"10110011100",
"10011011100",
"10011001110",
"10111001100",
"10011101100",
"10011100110",
"11001110010",
"11001011100",
"11001001110",
"11011100100",
"11001110100",
"11101101110",
"11101001100",
"11100101100",
"11100100110",
"11101100100",
"11100110100",
"11100110010",
"11011011000",
"11011000110",
"11000110110",
"10100011000",
"10001011000",
"10001000110",
"10110001000",
"10001101000",
"10001100010",
"11010001000",
"11000101000",
"11000100010",
"10110111000",
"10110001110",
"10001101110",
"10111011000",
"10111000110",
"10001110110",
"11101110110",
"11010001110",
"11000101110",
"11011101000",
"11011100010",
"11011101110",
"11101011000",
"11101000110",
"11100010110",
"11101101000",
"11101100010",
"11100011010",
"11101111010",
"11001000010",
"11110001010",
"10100110000", // 64
// Visible character encoding for code table A ended.
"10100001100",
"10010110000",
"10010000110",
"10000101100",
"10000100110",
"10110010000",
"10110000100",
"10011010000",
"10011000010",
"10000110100",
"10000110010",
"11000010010",
"11001010000",
"11110111010",
"11000010100",
"10001111010",
"10100111100",
"10010111100",
"10010011110",
"10111100100",
"10011110100",
"10011110010",
"11110100100",
"11110010100",
"11110010010",
"11011011110",
"11011110110",
"11110110110",
"10101111000",
"10100011110",
"10001011110",
// Visible character encoding for code table B ended.
"10111101000",
"10111100010",
"11110101000",
"11110100010",
"10111011110", // to C from A, B (size - 8)
"10111101110", // to B from A, C (size - 7)
"11101011110", // to A from B, C (size - 6)
"11110101110",
"11010000100", // START A (size - 4)
"11010010000", // START B (size - 3)
"11010011100", // START C (size - 2)
"11000111010" // STOP (size - 1)
]
}
//
// RSCode39Generator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/10/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import Foundation
let CODE39_ALPHABET_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*"
// http://www.barcodesymbols.com/code39.htm
// http://www.barcodeisland.com/code39.phtml
open class RSCode39Generator: RSAbstractCodeGenerator {
let CODE39_CHARACTER_ENCODINGS = [
"1010011011010",
"1101001010110",
"1011001010110",
"1101100101010",
"1010011010110",
"1101001101010",
"1011001101010",
"1010010110110",
"1101001011010",
"1011001011010",
"1101010010110",
"1011010010110",
"1101101001010",
"1010110010110",
"1101011001010",
"1011011001010",
"1010100110110",
"1101010011010",
"1011010011010",
"1010110011010",
"1101010100110",
"1011010100110",
"1101101010010",
"1010110100110",
"1101011010010",
"1011011010010",
"1010101100110",
"1101010110010",
"1011010110010",
"1010110110010",
"1100101010110",
"1001101010110",
"1100110101010",
"1001011010110",
"1100101101010",
"1001101101010",
"1001010110110",
"1100101011010",
"1001101011010",
"1001001001010",
"1001001010010",
"1001010010010",
"1010010010010",
"1001011011010"
]
func encodeCharacterString(_ characterString:String) -> String {
let location = CODE39_ALPHABET_STRING.location(characterString)
return CODE39_CHARACTER_ENCODINGS[location]
}
// MAKR: RSAbstractCodeGenerator
override open func isValid(_ contents: String) -> Bool {
if contents.length() > 0
&& contents.range(of: "*") == nil
&& contents == contents.uppercased() {
for character in contents {
let location = CODE39_ALPHABET_STRING.location(String(character))
if location == NSNotFound {
return false
}
}
return true
}
return false
}
override open func initiator() -> String {
return self.encodeCharacterString("*")
}
override open func terminator() -> String {
return self.encodeCharacterString("*")
}
override open func barcode(_ contents: String) -> String {
var barcode = ""
for character in contents {
barcode += self.encodeCharacterString(String(character))
}
return barcode
}
}
//
// RSCode39Mod43Generator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/10/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
// http://www.barcodesymbols.com/code39.htm
// http://www.barcodeisland.com/code39.phtml
open class RSCode39Mod43Generator: RSCode39Generator, RSCheckDigitGenerator {
// MARK: RSAbstractCodeGenerator
override open func barcode(_ contents: String) -> String {
return super.barcode(contents + self.checkDigit(contents.uppercased()))
}
// MARK: RSCheckDigitGenerator
open func checkDigit(_ contents: String) -> String {
/**
Step 1: From the table below, find the values of each character.
C O D E 3 9 <--Message characters
12 24 13 14 38 3 9 <--Character values
Step 2: Sum the character values.
12 + 24 + 13 + 14 + 38 + 3 + 9 = 113
Step 3: Divide the result by 43.
113 / 43 = 11 with remainder of 27.
Step 4: From the table, find the character with this value.
27 = R = Check Character
*/
var sum = 0
for character in contents {
sum += CODE39_ALPHABET_STRING.location(String(character))
}
// 43 = CODE39_ALPHABET_STRING's length - 1 -- excludes asterisk
return CODE39_ALPHABET_STRING[sum % (CODE39_ALPHABET_STRING.length() - 1)]
}
}
//
// RSCode93Generator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/11/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
// http://www.barcodeisland.com/code93.phtml
open class RSCode93Generator: RSAbstractCodeGenerator, RSCheckDigitGenerator {
let CODE93_ALPHABET_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*"
let CODE93_PLACEHOLDER_STRING = "abcd";
let CODE93_CHARACTER_ENCODINGS = [
"100010100",
"101001000",
"101000100",
"101000010",
"100101000",
"100100100",
"100100010",
"101010000",
"100010010",
"100001010",
"110101000",
"110100100",
"110100010",
"110010100",
"110010010",
"110001010",
"101101000",
"101100100",
"101100010",
"100110100",
"100011010",
"101011000",
"101001100",
"101000110",
"100101100",
"100010110",
"110110100",
"110110010",
"110101100",
"110100110",
"110010110",
"110011010",
"101101100",
"101100110",
"100110110",
"100111010",
"100101110",
"111010100",
"111010010",
"111001010",
"101101110",
"101110110",
"110101110",
"100100110",
"111011010",
"111010110",
"100110010",
"101011110"
]
func encodeCharacterString(_ characterString:String) -> String {
return CODE93_CHARACTER_ENCODINGS[CODE93_ALPHABET_STRING.location(characterString)]
}
override open func isValid(_ contents: String) -> Bool {
if contents.length() > 0 && contents == contents.uppercased() {
for i in 0..<contents.length() {
if CODE93_ALPHABET_STRING.location(contents[i]) == NSNotFound {
return false
}
if CODE93_PLACEHOLDER_STRING.location(contents[i]) != NSNotFound {
return false
}
}
return true
}
return false
}
override open func initiator() -> String {
return self.encodeCharacterString("*")
}
override open func terminator() -> String {
// With the termination bar: 1
return self.encodeCharacterString("*") + "1"
}
override open func barcode(_ contents: String) -> String {
var barcode = ""
for character in contents {
barcode += self.encodeCharacterString(String(character))
}
let checkDigits = self.checkDigit(contents)
for character in checkDigits {
barcode += self.encodeCharacterString(String(character))
}
return barcode
}
// MARK: RSCheckDigitGenerator
open func checkDigit(_ contents: String) -> String {
// Weighted sum += value * weight
// The first character
var sum = 0
for i in 0..<contents.length() {
if let character = contents[contents.length() - i - 1] {
let characterValue = CODE93_ALPHABET_STRING.location(character)
sum += characterValue * (i % 20 + 1)
}
}
var checkDigits = ""
checkDigits += CODE93_ALPHABET_STRING[sum % 47]
// The second character
sum = 0
let newContents = contents + checkDigits
for i in 0..<newContents.length() {
if let character = newContents[newContents.length() - i - 1] {
let characterValue = CODE93_ALPHABET_STRING.location(character)
sum += characterValue * (i % 15 + 1)
}
}
checkDigits += CODE93_ALPHABET_STRING[sum % 47]
return checkDigits
}
}
//
// RSCodeDataMatrixGenerator.swift
// RSBarcodes
//
// Created by R0CKSTAR on 15/10/26.
// Copyright (c) 2015 P.D.Q. All rights reserved.
//
import UIKit
class RSCodeDataMatrixGenerator: RSAbstractCodeGenerator {
}
//
// RSCodeGenerator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/10/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import Foundation
import UIKit
import AVFoundation
import CoreImage
let DIGITS_STRING = "0123456789"
let BARCODE_DEFAULT_HEIGHT = 28
// Controls the amount of additional data encoded in the output image to provide error correction.
// Higher levels of error correction result in larger output images but allow larger areas of the code to be damaged or obscured without.
public enum InputCorrectionLevel: String {
case Low = "L" // 7%
case Medium = "M" // 15% default
case Quarter = "Q" // 25%
case High = "H" // 30%
}
// Code generators are required to provide these two functions.
public protocol RSCodeGenerator {
/** The fill (background) color of the generated barcode. */
var fillColor: UIColor {get set}
/** The stroke color of the generated barcode. */
var strokeColor: UIColor {get set}
/** Check whether the given contents are valid. */
func isValid(_ contents:String) -> Bool
/** Generate code image using the given machine readable code object and correction level. */
func generateCode(_ machineReadableCodeObject:AVMetadataMachineReadableCodeObject, inputCorrectionLevel:InputCorrectionLevel, targetSize: CGSize?) -> UIImage?
/** Generate code image using the given machine readable code object. */
func generateCode(_ machineReadableCodeObject:AVMetadataMachineReadableCodeObject, targetSize: CGSize?) -> UIImage?
/** Generate code image using the given machine readable code object type, contents and correction level. */
func generateCode(_ contents:String, inputCorrectionLevel:InputCorrectionLevel, machineReadableCodeObjectType:String, targetSize: CGSize?) -> UIImage?
/** Generate code image using the given machine readable code object type and contents. */
func generateCode(_ contents:String, machineReadableCodeObjectType:String, targetSize: CGSize?) -> UIImage?
}
// Check digit are not required for all code generators.
// UPC-E is using check digit to valid the contents to be encoded.
// Code39Mod43, Code93 and Code128 is using check digit to encode barcode.
public protocol RSCheckDigitGenerator {
func checkDigit(_ contents:String) -> String
}
// Abstract code generator, provides default functions for validations and generations.
open class RSAbstractCodeGenerator : RSCodeGenerator {
open var fillColor: UIColor = UIColor.white
open var strokeColor: UIColor = UIColor.black
// Check whether the given contents are valid.
open func isValid(_ contents:String) -> Bool {
let length = contents.length()
if length > 0 {
for i in 0..<length {
if !DIGITS_STRING.contains(contents[i]) {
return false
}
}
return true
}
return false
}
// Barcode initiator, subclass should return its own value.
open func initiator() -> String {
return ""
}
// Barcode terminator, subclass should return its own value.
open func terminator() -> String {
return ""
}
// Barcode content, subclass should return its own value.
open func barcode(_ contents:String) -> String {
return ""
}
// Composer for combining barcode initiator, contents, terminator together.
func completeBarcode(_ barcode:String) -> String {
return self.initiator() + barcode + self.terminator()
}
// Drawer for completed barcode.
func drawCompleteBarcode(_ completeBarcode:String, targetSize: CGSize? = nil) -> UIImage? {
let length:Int = completeBarcode.length()
if length <= 0 {
return nil
}
// Values taken from CIImage generated AVMetadataObjectTypePDF417Code type image
// Top spacing = 1.5
// Bottom spacing = 2
// Left & right spacing = 2
let width = length + 4
// Calculate the correct aspect ratio, so that the resulting image can be resized to the target size
var height = BARCODE_DEFAULT_HEIGHT
if let targetSize = targetSize {
height = Int(targetSize.height / targetSize.width * CGFloat(width))
}
let size = CGSize(width: CGFloat(width), height: CGFloat(height))
UIGraphicsBeginImageContextWithOptions(size, false, 0)
if let context = UIGraphicsGetCurrentContext() {
context.setShouldAntialias(false)
self.fillColor.setFill()
self.strokeColor.setStroke()
context.fill(CGRect(x: 0, y: 0, width: size.width, height: size.height))
context.setLineWidth(1)
for i in 0..<length {
if completeBarcode[i] == "1" {
let x = i + (2 + 1)
context.move(to: CGPoint(x: CGFloat(x), y: 1.5))
context.addLine(to: CGPoint(x: CGFloat(x), y: size.height - 2))
}
}
context.drawPath(using: CGPathDrawingMode.fillStroke)
let barcode = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
if let targetSize = targetSize, let barcode = barcode {
return RSAbstractCodeGenerator.resizeImage(barcode, targetSize: targetSize, contentMode: UIView.ContentMode.bottomRight)
}
return barcode
} else {
return nil
}
}
// RSCodeGenerator
open func generateCode(_ machineReadableCodeObject:AVMetadataMachineReadableCodeObject, inputCorrectionLevel: InputCorrectionLevel, targetSize: CGSize? = nil) -> UIImage? {
return self.generateCode(machineReadableCodeObject.stringValue!, inputCorrectionLevel: inputCorrectionLevel, machineReadableCodeObjectType: machineReadableCodeObject.type.rawValue, targetSize: targetSize)
}
open func generateCode(_ machineReadableCodeObject:AVMetadataMachineReadableCodeObject, targetSize: CGSize? = nil) -> UIImage? {
return self.generateCode(machineReadableCodeObject, inputCorrectionLevel: .Medium, targetSize: targetSize)
}
open func generateCode(_ contents:String, inputCorrectionLevel:InputCorrectionLevel, machineReadableCodeObjectType:String, targetSize: CGSize? = nil) -> UIImage? {
if self.isValid(contents) {
return self.drawCompleteBarcode(self.completeBarcode(self.barcode(contents)), targetSize: targetSize)
}
return nil
}
open func generateCode(_ contents:String, machineReadableCodeObjectType:String, targetSize: CGSize? = nil) -> UIImage? {
return self.generateCode(contents, inputCorrectionLevel: .Medium, machineReadableCodeObjectType: machineReadableCodeObjectType, targetSize: targetSize)
}
// Class funcs
// Get CIFilter name by machine readable code object type
open class func filterName(_ machineReadableCodeObjectType:String) -> String {
if machineReadableCodeObjectType == AVMetadataObject.ObjectType.qr.rawValue {
return "CIQRCodeGenerator"
} else if machineReadableCodeObjectType == AVMetadataObject.ObjectType.pdf417.rawValue {
return "CIPDF417BarcodeGenerator"
} else if machineReadableCodeObjectType == AVMetadataObject.ObjectType.aztec.rawValue {
return "CIAztecCodeGenerator"
} else if machineReadableCodeObjectType == AVMetadataObject.ObjectType.code128.rawValue {
return "CICode128BarcodeGenerator"
} else {
return ""
}
}
// Generate CI related code image
open class func generateCode(_ contents:String, inputCorrectionLevel: InputCorrectionLevel, filterName:String, targetSize: CGSize? = nil, fillColor: UIColor = .white, strokeColor: UIColor = .black) -> UIImage? {
if filterName.length() > 0 {
if let filter = CIFilter(name: filterName) {
filter.setDefaults()
let inputMessage = contents.data(using: String.Encoding.utf8, allowLossyConversion: false)
filter.setValue(inputMessage, forKey: "inputMessage")
if filterName == "CIQRCodeGenerator" {
filter.setValue(inputCorrectionLevel.rawValue, forKey: "inputCorrectionLevel")
}
let outputImage = colorizeImage(filter.outputImage, fillColor, strokeColor)
let transform = createImageTransform(targetSize, outputImage)
if let outputImage = outputImage?.transformed(by: transform) {
if let cgImage = ContextMaker.make().createCGImage(outputImage, from: outputImage.extent) {
return UIImage(cgImage: cgImage, scale: UIScreen.main.scale, orientation: .up)
}
}
}
}
return nil
}
open class func generateCode(_ contents:String, filterName:String, targetSize: CGSize? = nil, fillColor: UIColor = .white, strokeColor: UIColor = .black) -> UIImage? {
return self.generateCode(contents, inputCorrectionLevel: .Medium, filterName: filterName, targetSize: targetSize, fillColor: fillColor, strokeColor: strokeColor)
}
fileprivate static func colorizeImage(_ outputImage: CIImage?, _ fillColor: UIColor, _ strokeColor: UIColor) -> CIImage? {
if let colorFilter = CIFilter(name: "CIFalseColor") {
colorFilter.setValue(outputImage, forKey: "inputImage")
let ciFillColor = CIColor(cgColor: fillColor.cgColor)
let ciStrokeColor = CIColor(cgColor: strokeColor.cgColor)
colorFilter.setValue(ciFillColor, forKey: "inputColor1")
colorFilter.setValue(ciStrokeColor, forKey: "inputColor0")
return colorFilter.outputImage
}
return outputImage
}
fileprivate static func createImageTransform(_ targetSize: CGSize?, _ image: CIImage?) -> CGAffineTransform {
if let targetSize = targetSize, let image = image {
let scaleX: CGFloat = targetSize.width / image.extent.size.width
let scaleY: CGFloat = targetSize.height / image.extent.size.height
let scale = min(scaleX, scaleY)
return CGAffineTransform(scaleX: scale, y: scale)
}
return CGAffineTransform(scaleX: 1, y: 1)
}
// Resize image
open class func resizeImage(_ source:UIImage, scale:CGFloat) -> UIImage? {
let width = source.size.width * scale
let height = source.size.height * scale
UIGraphicsBeginImageContextWithOptions(CGSize(width: width, height: height), false, 0)
guard let context = UIGraphicsGetCurrentContext() else { return nil }
context.interpolationQuality = .none
source.draw(in: CGRect(x: 0, y: 0, width: width, height: height))
let target = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return target
}
open class func resizeImage(_ source:UIImage, targetSize:CGSize, contentMode:UIView.ContentMode) -> UIImage? {
var x: CGFloat = 0
var y: CGFloat = 0
var width = targetSize.width
var height = targetSize.height
if contentMode == .scaleToFill { // contents scaled to fill
// Nothing to do
} else if contentMode == .scaleAspectFill { // contents scaled to fill with fixed aspect. some portion of content may be clipped.
let targtLength = (targetSize.height > targetSize.width) ? targetSize.height : targetSize.width
let sourceLength = (source.size.height < source.size.width) ? source.size.height : source.size.width
let fillScale = targtLength / sourceLength
width = source.size.width * fillScale
height = source.size.height * fillScale
x = (targetSize.width - width) / 2.0
y = (targetSize.height - height) / 2.0
} else { // contents scaled to fit with fixed aspect. remainder is transparent
let scaledRect = AVMakeRect(aspectRatio: source.size, insideRect: CGRect(x: 0.0, y: 0.0, width: targetSize.width, height: targetSize.height))
width = scaledRect.width
height = scaledRect.height
if contentMode == .scaleAspectFit
|| contentMode == .redraw
|| contentMode == .center {
x = (targetSize.width - width) / 2.0
y = (targetSize.height - height) / 2.0
} else if contentMode == .top {
x = (targetSize.width - width) / 2.0
y = 0
} else if contentMode == .bottom {
x = (targetSize.width - width) / 2.0
y = targetSize.height - height
} else if contentMode == .left {
x = 0
y = (targetSize.height - height) / 2.0
} else if contentMode == .right {
x = targetSize.width - width
y = (targetSize.height - height) / 2.0
} else if contentMode == .topLeft {
x = 0
y = 0
} else if contentMode == .topRight {
x = targetSize.width - width
y = 0
} else if contentMode == .bottomLeft {
x = 0
y = targetSize.height - height
} else if contentMode == .bottomRight {
x = targetSize.width - width
y = targetSize.height - height
}
}
UIGraphicsBeginImageContextWithOptions(targetSize, false, 0)
guard let context = UIGraphicsGetCurrentContext() else { return nil }
context.interpolationQuality = CGInterpolationQuality.none
source.draw(in: CGRect(x: x, y: y, width: width, height: height))
let target = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return target
}
}
//
// RSCodeLayer.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/13/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
import QuartzCore
open class RSCodeLayer: CALayer {
@objc var code: UIImage?
override open func draw(in ctx: CGContext) {
if let code = self.code {
ctx.saveGState()
ctx.draw(code.cgImage!, in: self.bounds)
ctx.restoreGState()
}
}
}
//
// RSCodeReaderViewController.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/12/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import AVFoundation
import UIKit
open class RSCodeReaderViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate {
@objc open var device = AVCaptureDevice.default(for: AVMediaType.video)
@objc open var output = AVCaptureMetadataOutput()
@objc open var session = AVCaptureSession()
@objc var videoPreviewLayer: AVCaptureVideoPreviewLayer?
@objc open var focusMarkLayer = RSFocusMarkLayer()
@objc open var cornersLayer = RSCornersLayer()
@objc open var tapHandler: ((CGPoint) -> Void)?
@objc open var barcodesHandler: (([AVMetadataMachineReadableCodeObject]) -> Void)?
@objc var ticker: Timer?
@objc open var isCrazyMode = false
@objc var isCrazyModeStarted = false
@objc var lensPosition: Float = 0
fileprivate enum Platform {
static let isSimulator: Bool = {
var isSim = false
#if arch(i386) || arch(x86_64)
isSim = true
#endif
return isSim
}()
}
// MARK: Public methods
@objc open func hasFlash() -> Bool {
if let device = self.device {
return device.hasFlash
}
return false
}
@objc open func hasTorch() -> Bool {
if let device = self.device {
return device.hasTorch
}
return false
}
@objc open func switchCamera() -> AVCaptureDevice.Position {
if !Platform.isSimulator {
self.session.stopRunning()
let captureDevice = self.captureDevice()
if let device = captureDevice {
self.device = device
}
self.setupCamera()
self.view.setNeedsLayout()
self.session.startRunning()
if let device = self.device {
return device.position
} else {
return .unspecified
}
} else {
return .unspecified
}
}
@discardableResult
@objc open func toggleTorch() -> Bool {
if self.hasTorch() {
self.session.beginConfiguration()
if let device = self.device {
do {
try device.lockForConfiguration()
} catch _ {}
if device.torchMode == .off {
device.torchMode = .on
} else if device.torchMode == .on {
device.torchMode = .off
}
device.unlockForConfiguration()
self.session.commitConfiguration()
return device.torchMode == .on
}
}
return false
}
// MARK: Private methods
@objc func captureDevice() -> AVCaptureDevice? {
if let device = self.device {
guard device.position == .back || device.position == .front else {
return nil
}
let position = device.position == .back ? AVCaptureDevice.Position.front : AVCaptureDevice.Position.back
if #available(iOS 10.0, *) {
let devices = AVCaptureDevice.DiscoverySession(deviceTypes: [AVCaptureDevice.DeviceType.builtInWideAngleCamera], mediaType: AVMediaType.video, position: position).devices
return devices.first
} else {
for device: AVCaptureDevice in AVCaptureDevice.devices(for: AVMediaType.video) {
if device.position == position {
return device
}
}
}
}
return nil
}
@objc func setupCamera() {
var error: NSError?
let input: AVCaptureDeviceInput!
do {
guard let device = self.device else { return }
input = try AVCaptureDeviceInput(device: device)
} catch let error1 as NSError {
error = error1
input = nil
}
if let error = error {
print(error.description)
return
}
if let device = self.device {
do {
try device.lockForConfiguration()
if device.isFocusModeSupported(.continuousAutoFocus) {
device.focusMode = .continuousAutoFocus
}
if device.isAutoFocusRangeRestrictionSupported {
device.autoFocusRangeRestriction = .near
}
device.unlockForConfiguration()
} catch _ {}
}
// Remove previous added inputs from session
for input in self.session.inputs {
self.session.removeInput(input)
}
if self.session.canAddInput(input) {
self.session.addInput(input)
}
if let videoPreviewLayer = self.videoPreviewLayer {
videoPreviewLayer.removeFromSuperlayer()
}
self.videoPreviewLayer = AVCaptureVideoPreviewLayer(session: self.session)
if let videoPreviewLayer = self.videoPreviewLayer {
videoPreviewLayer.videoGravity = AVLayerVideoGravity.resizeAspectFill
videoPreviewLayer.frame = self.view.bounds
self.view.layer.insertSublayer(videoPreviewLayer, at: 0)
}
if self.output.metadataObjectsDelegate == nil
|| self.output.metadataObjectsCallbackQueue == nil
{
let queue = DispatchQueue(label: "com.pdq.rsbarcodes.metadata", attributes: DispatchQueue.Attributes.concurrent)
self.output.setMetadataObjectsDelegate(self, queue: queue)
}
// Remove previous added outputs from session
var metadataObjectTypes: [AVMetadataObject.ObjectType]?
for output in self.session.outputs {
if let output = output as? AVCaptureMetadataOutput {
metadataObjectTypes = output.metadataObjectTypes
}
self.session.removeOutput(output)
}
if self.session.canAddOutput(self.output) {
self.session.addOutput(self.output)
if let metadataObjectTypes = metadataObjectTypes {
self.output.metadataObjectTypes = metadataObjectTypes
} else {
self.output.metadataObjectTypes = self.output.availableMetadataObjectTypes
}
}
self.reloadVideoOrientation()
}
@objc class func interfaceOrientationToVideoOrientation(_ orientation: UIInterfaceOrientation) -> AVCaptureVideoOrientation {
switch orientation {
case .unknown:
fallthrough
case .portrait:
return AVCaptureVideoOrientation.portrait
case .portraitUpsideDown:
return AVCaptureVideoOrientation.portraitUpsideDown
case .landscapeLeft:
return AVCaptureVideoOrientation.landscapeLeft
case .landscapeRight:
return AVCaptureVideoOrientation.landscapeRight
@unknown default:
return AVCaptureVideoOrientation.portrait
}
}
@objc func reloadVideoOrientation() {
guard let videoPreviewLayer = self.videoPreviewLayer else {
return
}
guard (videoPreviewLayer.connection?.isVideoOrientationSupported)! else {
print("isVideoOrientationSupported is false")
return
}
let statusBarOrientation = UIApplication.shared.statusBarOrientation
let videoOrientation = RSCodeReaderViewController.interfaceOrientationToVideoOrientation(statusBarOrientation)
if videoPreviewLayer.connection?.videoOrientation == videoOrientation {
print("no change to videoOrientation")
return
}
videoPreviewLayer.connection?.videoOrientation = videoOrientation
videoPreviewLayer.removeAllAnimations()
}
@objc func autoUpdateLensPosition() {
self.lensPosition += 0.01
if self.lensPosition > 1 {
self.lensPosition = 0
}
if let device = self.device {
do {
try device.lockForConfiguration()
device.setFocusModeLocked(lensPosition: self.lensPosition, completionHandler: nil)
device.unlockForConfiguration()
} catch _ {}
}
if self.session.isRunning {
let when = DispatchTime.now() + Double(Int64(10 * Double(USEC_PER_SEC))) / Double(NSEC_PER_SEC)
DispatchQueue.main.asyncAfter(deadline: when) {
self.autoUpdateLensPosition()
}
}
}
@objc func onTick() {
if let ticker = self.ticker {
ticker.invalidate()
}
self.cornersLayer.cornersArray = []
}
@objc func onTap(_ gesture: UITapGestureRecognizer) {
let tapPoint = gesture.location(in: self.view)
let focusPoint = CGPoint(
x: tapPoint.x / self.view.bounds.size.width,
y: tapPoint.y / self.view.bounds.size.height)
if let device = self.device {
do {
try device.lockForConfiguration()
if device.isFocusPointOfInterestSupported {
device.focusPointOfInterest = focusPoint
} else {
print("Focus point of interest not supported.")
}
if self.isCrazyMode {
if device.isFocusModeSupported(.locked) {
device.focusMode = .locked
} else {
print("Locked focus not supported.")
}
if !self.isCrazyModeStarted {
self.isCrazyModeStarted = true
DispatchQueue.main.async { () -> Void in
self.autoUpdateLensPosition()
}
}
} else {
if device.isFocusModeSupported(.continuousAutoFocus) {
device.focusMode = .continuousAutoFocus
} else if device.isFocusModeSupported(.autoFocus) {
device.focusMode = .autoFocus
} else {
print("Auto focus not supported.")
}
}
if device.isAutoFocusRangeRestrictionSupported {
device.autoFocusRangeRestriction = .none
} else {
print("Auto focus range restriction not supported.")
}
device.unlockForConfiguration()
self.focusMarkLayer.point = tapPoint
} catch _ {}
}
if let tapHandler = self.tapHandler {
tapHandler(tapPoint)
}
}
@objc func onApplicationWillEnterForeground() {
if !Platform.isSimulator {
self.session.startRunning()
}
}
@objc func onApplicationDidEnterBackground() {
if !Platform.isSimulator {
self.session.stopRunning()
}
}
// MARK: Deinitialization
deinit {
print("RSCodeReaderViewController deinit")
}
// MARK: View lifecycle
override open func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
let frame = self.view.bounds
self.videoPreviewLayer?.frame = frame
self.focusMarkLayer.frame = frame
self.cornersLayer.frame = frame
}
override open func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
coordinator.animate(alongsideTransition: nil, completion: { [weak self] _ in
DispatchQueue.main.async {
self?.reloadVideoOrientation()
}
})
}
override open func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor.clear
self.setupCamera()
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(RSCodeReaderViewController.onTap(_:)))
self.view.addGestureRecognizer(tapGestureRecognizer)
self.focusMarkLayer.frame = self.view.bounds
self.view.layer.insertSublayer(self.focusMarkLayer, above: self.videoPreviewLayer)
self.cornersLayer.frame = self.view.bounds
self.view.layer.insertSublayer(self.cornersLayer, above: self.videoPreviewLayer)
}
override open func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
NotificationCenter.default.addObserver(self, selector: #selector(RSCodeReaderViewController.onApplicationWillEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(RSCodeReaderViewController.onApplicationDidEnterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
if !Platform.isSimulator {
self.session.startRunning()
}
}
override open func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
NotificationCenter.default.removeObserver(self, name: UIApplication.willEnterForegroundNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: UIApplication.didEnterBackgroundNotification, object: nil)
if !Platform.isSimulator {
self.session.stopRunning()
}
}
// MARK: AVCaptureMetadataOutputObjectsDelegate
public func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) {
var barcodeObjects: [AVMetadataMachineReadableCodeObject] = []
var cornersArray: [[Any]] = []
for metadataObject in metadataObjects {
if let videoPreviewLayer = self.videoPreviewLayer {
if let transformedMetadataObject = videoPreviewLayer.transformedMetadataObject(for: metadataObject) {
if transformedMetadataObject.isKind(of: AVMetadataMachineReadableCodeObject.self) {
let barcodeObject = transformedMetadataObject as! AVMetadataMachineReadableCodeObject
barcodeObjects.append(barcodeObject)
#if !targetEnvironment(simulator)
cornersArray.append(barcodeObject.corners)
#endif
}
}
}
}
self.cornersLayer.cornersArray = cornersArray
if barcodeObjects.count > 0 {
if let barcodesHandler = self.barcodesHandler {
barcodesHandler(barcodeObjects)
}
}
DispatchQueue.main.async { () -> Void in
if let ticker = self.ticker {
ticker.invalidate()
}
self.ticker = Timer.scheduledTimer(timeInterval: 0.4, target: self, selector: #selector(RSCodeReaderViewController.onTick), userInfo: nil, repeats: true)
}
}
}
//
// RSCornersLayer.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/13/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
import QuartzCore
open class RSCornersLayer: CALayer {
@objc open var strokeColor = UIColor.green.cgColor
@objc open var strokeWidth: CGFloat = 2
@objc open var drawingCornersArray: Array<Array<CGPoint>> = []
@objc open var cornersArray: Array<[Any]> = [] {
willSet {
DispatchQueue.main.async(execute: {
self.setNeedsDisplay()
})
}
}
override open func draw(in ctx: CGContext) {
guard let cornerPointsArray = cornersArray as? [[CGPoint]] else { return }
objc_sync_enter(self)
ctx.saveGState()
ctx.setShouldAntialias(true)
ctx.setAllowsAntialiasing(true)
ctx.setFillColor(UIColor.clear.cgColor)
ctx.setStrokeColor(self.strokeColor)
ctx.setLineWidth(self.strokeWidth)
for corners in cornerPointsArray {
for (idx, point) in corners.enumerated() {
if idx == 0 {
ctx.move(to: point)
} else {
ctx.addLine(to: point)
}
}
ctx.closePath()
}
ctx.drawPath(using: CGPathDrawingMode.fillStroke)
ctx.restoreGState()
objc_sync_exit(self)
}
}
//
// RSEANGenerator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/11/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
public let RSBarcodesTypeISBN13Code = "com.pdq.rsbarcodes.isbn13"
public let RSBarcodesTypeISSN13Code = "com.pdq.rsbarcodes.issn13"
// http://blog.sina.com.cn/s/blog_4015406e0100bsqk.html
open class RSEANGenerator: RSAbstractCodeGenerator {
var length = 0
// 'O' for odd and 'E' for even
let lefthandParities = [
"OOOOOO",
"OOEOEE",
"OOEEOE",
"OOEEEO",
"OEOOEE",
"OEEOOE",
"OEEEOO",
"OEOEOE",
"OEOEEO",
"OEEOEO"
]
// 'R' for right-hand
let parityEncodingTable = [
["O" : "0001101", "E" : "0100111", "R" : "1110010"],
["O" : "0011001", "E" : "0110011", "R" : "1100110"],
["O" : "0010011", "E" : "0011011", "R" : "1101100"],
["O" : "0111101", "E" : "0100001", "R" : "1000010"],
["O" : "0100011", "E" : "0011101", "R" : "1011100"],
["O" : "0110001", "E" : "0111001", "R" : "1001110"],
["O" : "0101111", "E" : "0000101", "R" : "1010000"],
["O" : "0111011", "E" : "0010001", "R" : "1000100"],
["O" : "0110111", "E" : "0001001", "R" : "1001000"],
["O" : "0001011", "E" : "0010111", "R" : "1110100"]
]
init(length:Int) {
self.length = length
}
override open func isValid(_ contents: String) -> Bool {
if super.isValid(contents) && self.length == contents.length() {
var sum_odd = 0
var sum_even = 0
for i in 0..<(self.length - 1) {
let digit = Int(contents[i])!
if i % 2 == (self.length == 13 ? 0 : 1) {
sum_even += digit
} else {
sum_odd += digit
}
}
let checkDigit = (10 - (sum_even + sum_odd * 3) % 10) % 10
return Int(contents[contents.length() - 1]) == checkDigit
}
return false
}
override open func initiator() -> String {
return "101"
}
override open func terminator() -> String {
return "101"
}
func centerGuardPattern() -> String {
return "01010"
}
override open func barcode(_ contents: String) -> String {
var lefthandParity = "OOOO"
var newContents = contents
if self.length == 13 {
lefthandParity = self.lefthandParities[Int(contents[0])!]
newContents = contents.substring(1, length: contents.length() - 1)
}
var barcode = ""
for i in 0..<newContents.length() {
let digit = Int(newContents[i])!
if i < lefthandParity.length() {
barcode += self.parityEncodingTable[digit][lefthandParity[i]]!
if i == lefthandParity.length() - 1 {
barcode += self.centerGuardPattern()
}
} else {
barcode += self.parityEncodingTable[digit]["R"]!
}
}
return barcode
}
}
class RSEAN8Generator: RSEANGenerator {
init() {
super.init(length: 8)
}
}
class RSEAN13Generator: RSEANGenerator {
init() {
super.init(length: 13)
}
}
class RSISBN13Generator: RSEAN13Generator {
override func isValid(_ contents: String) -> Bool {
// http://www.appsbarcode.com/ISBN.php
return super.isValid(contents) && contents.substring(0, length: 3) == "978"
}
}
class RSISSN13Generator: RSEAN13Generator {
override func isValid(_ contents: String) -> Bool {
// http://www.appsbarcode.com/ISSN.php
return super.isValid(contents) && contents.substring(0, length: 3) == "977"
}
}
//
// RSExtendedCode39Generator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/11/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
public let RSBarcodesTypeExtendedCode39Code = "com.pdq.rsbarcodes.code39.ext"
// http://www.barcodesymbols.com/code39.htm
// http://www.barcodeisland.com/code39.phtml
open class RSExtendedCode39Generator: RSCode39Generator {
func encodeContents(_ contents: String) -> String {
var encodedContents = ""
for character in contents {
let characterString = String(character)
switch characterString {
case "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z":
encodedContents += "+" + characterString.uppercased()
case "!":
encodedContents += "/A"
case "\"":
encodedContents += "/B"
case "#":
encodedContents += "/C"
case "$":
encodedContents += "/D"
case "%":
encodedContents += "/E"
case "&":
encodedContents += "/F"
case "'":
encodedContents += "/G"
case "(":
encodedContents += "/H"
case ")":
encodedContents += "/I"
case "*":
encodedContents += "/J"
case "+":
encodedContents += "/K"
case ",":
encodedContents += "/L"
// - -> /M better to use -
// . -> /N better to use .
case "/":
encodedContents += "/O"
// 0 -> /P better to use 0
// 1 -> /Q better to use 1
// 2 -> /R better to use 2
// 3 -> /S better to use 3
// 4 -> /T better to use 4
// 5 -> /U better to use 5
// 6 -> /V better to use 6
// 7 -> /W better to use 7
// 8 -> /X better to use 8
// 9 -> /Y better to use 9
case ":":
encodedContents += "/Z"
// ESC -> %A
// FS -> %B
// GS -> %C
// RS -> %D
// US -> %E
case ";":
encodedContents += "%F"
case "<":
encodedContents += "%G"
case "=":
encodedContents += "%H"
case ">":
encodedContents += "%I"
case "?":
encodedContents += "%J"
case "[":
encodedContents += "%K"
case "\\":
encodedContents += "%L"
case "]":
encodedContents += "%M"
case "^":
encodedContents += "%N"
case "_":
encodedContents += "%O"
case "{":
encodedContents += "%P"
case "|":
encodedContents += "%Q"
case "}":
encodedContents += "%R"
case "~":
encodedContents += "%S"
// DEL -> %T
// NUL -> %U
case "@":
encodedContents += "%V"
case "`":
encodedContents += "%W"
// SOH -> $A
// STX -> $B
// ETX -> $C
// EOT -> $D
// ENQ -> $E
// ACK -> $F
// BEL -> $G
// BS -> $H
case "\t":
encodedContents += "$I"
// LF -> $J
// VT -> $K
// FF -> $L
case "\n":
encodedContents += "$M"
// SO -> $N
// SI -> $O
// DLE -> $P
// DC1 -> $Q
// DC2 -> $R
// DC3 -> $S
// DC4 -> $T
// NAK -> $U
// SYN -> $V
// ETB -> $W
// CAN -> $X
// EM -> $Y
// SUB -> $Z
default:
encodedContents += characterString
}
}
return encodedContents
}
override open func isValid(_ contents: String) -> Bool {
if contents.length() > 0 {
let encContents = self.encodeContents(contents)
for character in encContents {
let location = CODE39_ALPHABET_STRING.location(String(character))
if location == NSNotFound {
return false
}
}
return true
}
return false
}
override open func barcode(_ contents: String) -> String {
return super.barcode(self.encodeContents(contents))
}
}
//
// RSFocusMarkLayer.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/13/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
import QuartzCore
open class RSFocusMarkLayer: CALayer {
// Use camera.app's focus mark size as default
@objc open var size = CGSize(width: 76, height: 76)
// Use camera.app's focus mark sight as default
@objc open var sight: CGFloat = 6
// Use camera.app's focus mark color as default
@objc open var strokeColor = UIColor("#ffcc00").cgColor
@objc open var strokeWidth: CGFloat = 1
@objc open var delay: CFTimeInterval = 1
@objc open var canDraw = false
@objc open var point : CGPoint = CGPoint(x: 0, y: 0) {
didSet {
DispatchQueue.main.async(execute: {
self.canDraw = true
self.setNeedsDisplay()
})
let when = DispatchTime.now() + Double(Int64(self.delay * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC)
DispatchQueue.main.asyncAfter(deadline: when, execute: {
self.canDraw = false
self.setNeedsDisplay()
})
}
}
override open func draw(in ctx: CGContext) {
if !self.canDraw {
return
}
ctx.saveGState()
ctx.setShouldAntialias(true)
ctx.setAllowsAntialiasing(true)
ctx.setFillColor(UIColor.clear.cgColor)
ctx.setStrokeColor(self.strokeColor)
ctx.setLineWidth(self.strokeWidth)
// Rect
ctx.stroke(CGRect(x: self.point.x - self.size.width / 2.0, y: self.point.y - self.size.height / 2.0, width: self.size.width, height: self.size.height))
// Focus
for i in 0..<4 {
var endPoint: CGPoint
switch i {
case 0:
ctx.move(to: CGPoint(x: self.point.x, y: self.point.y - self.size.height / 2.0))
endPoint = CGPoint(x: self.point.x, y: self.point.y - self.size.height / 2.0 + self.sight)
case 1:
ctx.move(to: CGPoint(x: self.point.x, y: self.point.y + self.size.height / 2.0))
endPoint = CGPoint(x: self.point.x, y: self.point.y + self.size.height / 2.0 - self.sight)
case 2:
ctx.move(to: CGPoint(x: self.point.x - self.size.width / 2.0, y: self.point.y))
endPoint = CGPoint(x: self.point.x - self.size.width / 2.0 + self.sight, y: self.point.y)
case 3:
ctx.move(to: CGPoint(x: self.point.x + self.size.width / 2.0, y: self.point.y))
endPoint = CGPoint(x: self.point.x + self.size.width / 2.0 - self.sight, y: self.point.y)
default:
endPoint = CGPoint(x: 0, y: 0)
}
ctx.addLine(to: CGPoint(x: endPoint.x, y: endPoint.y))
}
ctx.drawPath(using: CGPathDrawingMode.fillStroke)
ctx.restoreGState()
}
}
//
// RSITF14Generator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/13/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
// http://www.gs1au.org/assets/documents/info/user_manuals/barcode_technical_details/ITF_14_Barcode_Structure.pdf
// http://www.barcodeisland.com/int2of5.phtml
open class RSITF14Generator: RSITFGenerator {
override open func isValid(_ contents: String) -> Bool {
return super.isValid(contents) && contents.length() == 14
}
}
//
// RSITFGenerator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/11/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
// http://www.barcodeisland.com/int2of5.phtml
open class RSITFGenerator: RSAbstractCodeGenerator {
let ITF_CHARACTER_ENCODINGS = [
"00110",
"10001",
"01001",
"11000",
"00101",
"10100",
"01100",
"00011",
"10010",
"01010",
]
override open func isValid(_ contents: String) -> Bool {
return super.isValid(contents) && contents.length() % 2 == 0
}
override open func initiator() -> String {
return "1010"
}
override open func terminator() -> String {
return "1101"
}
override open func barcode(_ contents: String) -> String {
var barcode = ""
for i in 0..<contents.length() / 2 {
if let pair = contents.substring(i * 2, length: 2) {
let bars = ITF_CHARACTER_ENCODINGS[Int(pair[0])!]
let spaces = ITF_CHARACTER_ENCODINGS[Int(pair[1])!]
for j in 0..<10 {
if j % 2 == 0 {
let bar = Int(bars[j / 2])
if bar == 1 {
barcode += "11"
} else {
barcode += "1"
}
} else {
let space = Int(spaces[j / 2])
if space == 1 {
barcode += "00"
} else {
barcode += "0"
}
}
}
}
}
return barcode
}
}
//
// RSUPCEGenerator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/11/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
// http://www.sly.com.tw/skill/know/new_page_6.htm
// http://mdn.morovia.com/kb/UPCE-Specification-10634.html
// http://mdn.morovia.com/kb/UPCA-Specification-10632.html
// http://www.barcodeisland.com/upce.phtml
open class RSUPCEGenerator: RSAbstractCodeGenerator, RSCheckDigitGenerator {
let UPCE_ODD_ENCODINGS = [
"0001101",
"0011001",
"0010011",
"0111101",
"0100011",
"0110001",
"0101111",
"0111011",
"0110111",
"0001011"
]
let UPCE_EVEN_ENCODINGS = [
"0100111",
"0110011",
"0011011",
"0100001",
"0011101",
"0111001",
"0000101",
"0010001",
"0001001",
"0010111"
]
let UPCE_SEQUENCES = [
"000111",
"001011",
"001101",
"001110",
"010011",
"011001",
"011100",
"010101",
"010110",
"011010"
]
func convert2UPC_A(_ contents:String) -> String {
var upc_a = ""
if let code = contents.substring(1, length: contents.length() - 2) {
let lastDigit = Int(code[code.length() - 1])!
var insertDigits = "0000"
switch lastDigit {
case 0...2:
upc_a += code.substring(0, length: 2) + String(lastDigit) + insertDigits + code.substring(2, length: 3)
case 3:
insertDigits = "00000"
upc_a += code.substring(0, length: 3) + insertDigits + code.substring(3, length: 2)
case 4:
insertDigits = "00000"
upc_a += code.substring(0, length: 4) + insertDigits + code.substring(4, length: 1)
default:
upc_a += code.substring(0, length: 5) + insertDigits + String(lastDigit)
}
}
return "00" + upc_a
}
override open func isValid(_ contents: String) -> Bool {
return super.isValid(contents)
&& contents.length() == 8
&& Int(contents[0])! == 0
&& contents[contents.length() - 1] == self.checkDigit(contents)
}
override open func initiator() -> String {
return "101"
}
override open func terminator() -> String {
return "010101"
}
override open func barcode(_ contents: String) -> String {
let checkValue = Int(contents[contents.length() - 1])!
let sequence = UPCE_SEQUENCES[checkValue]
var barcode = ""
for i in 1..<contents.length() - 1 {
let digit = Int(contents[i])!
if Int(sequence[i - 1])! % 2 == 0 {
barcode += UPCE_EVEN_ENCODINGS[digit]
} else {
barcode += UPCE_ODD_ENCODINGS[digit]
}
}
return barcode
}
// MARK: RSCheckDigitGenerator
open func checkDigit(_ contents: String) -> String {
/*
UPC-A check digit is calculated using standard Mod10 method. Here outlines the steps to calculate UPC-A check digit:
From the right to left, start with odd position, assign the odd/even position to each digit.
Sum all digits in odd position and multiply the result by 3.
Sum all digits in even position.
Sum the results of step 3 and step 4.
divide the result of step 4 by 10. The check digit is the number which adds the remainder to 10.
If there is no remainder then the check digit equals zero.
*/
let upc_a = self.convert2UPC_A(contents)
var sum_odd = 0
var sum_even = 0
for i in 0..<upc_a.length() {
let digit = Int(upc_a[i])!
if i % 2 == 0 {
sum_even += digit
} else {
sum_odd += digit
}
}
let remainder = (sum_even + sum_odd * 3) % 10
return String(remainder == 0 ? remainder : 10 - remainder)
}
}
//
// RSUnifiedCodeGenerator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/10/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import Foundation
import UIKit
import AVFoundation
open class RSUnifiedCodeGenerator: RSCodeGenerator {
open var isBuiltInCode128GeneratorSelected = false
open var fillColor: UIColor = UIColor.white
open var strokeColor: UIColor = UIColor.black
open class var shared: RSUnifiedCodeGenerator {
return UnifiedCodeGeneratorSharedInstance
}
// MARK: RSCodeGenerator
open func isValid(_ contents: String) -> Bool {
print("Use RSUnifiedCodeValidator.shared.isValid(contents:String, machineReadableCodeObjectType: String) instead")
return false
}
open func generateCode(_ contents: String, inputCorrectionLevel: InputCorrectionLevel, machineReadableCodeObjectType: String, targetSize: CGSize? = nil) -> UIImage? {
var codeGenerator: RSCodeGenerator?
switch machineReadableCodeObjectType {
case AVMetadataObject.ObjectType.qr.rawValue, AVMetadataObject.ObjectType.pdf417.rawValue, AVMetadataObject.ObjectType.aztec.rawValue:
return RSAbstractCodeGenerator.generateCode(contents, inputCorrectionLevel: inputCorrectionLevel, filterName: RSAbstractCodeGenerator.filterName(machineReadableCodeObjectType), targetSize: targetSize, fillColor: fillColor, strokeColor: strokeColor)
case AVMetadataObject.ObjectType.code39.rawValue:
codeGenerator = RSCode39Generator()
case AVMetadataObject.ObjectType.code39Mod43.rawValue:
codeGenerator = RSCode39Mod43Generator()
case AVMetadataObject.ObjectType.ean8.rawValue:
codeGenerator = RSEAN8Generator()
case AVMetadataObject.ObjectType.ean13.rawValue:
codeGenerator = RSEAN13Generator()
case AVMetadataObject.ObjectType.interleaved2of5.rawValue:
codeGenerator = RSITFGenerator()
case AVMetadataObject.ObjectType.itf14.rawValue:
codeGenerator = RSITF14Generator()
case AVMetadataObject.ObjectType.upce.rawValue:
codeGenerator = RSUPCEGenerator()
case AVMetadataObject.ObjectType.code93.rawValue:
codeGenerator = RSCode93Generator()
// iOS 8 included, but my implementation's performance is better :)
case AVMetadataObject.ObjectType.code128.rawValue:
if self.isBuiltInCode128GeneratorSelected {
return RSAbstractCodeGenerator.generateCode(contents, inputCorrectionLevel: inputCorrectionLevel, filterName: RSAbstractCodeGenerator.filterName(machineReadableCodeObjectType), targetSize: targetSize, fillColor: fillColor, strokeColor: strokeColor)
} else {
codeGenerator = RSCode128Generator()
}
case AVMetadataObject.ObjectType.dataMatrix.rawValue:
codeGenerator = RSCodeDataMatrixGenerator()
case RSBarcodesTypeISBN13Code:
codeGenerator = RSISBN13Generator()
case RSBarcodesTypeISSN13Code:
codeGenerator = RSISSN13Generator()
case RSBarcodesTypeExtendedCode39Code:
codeGenerator = RSExtendedCode39Generator()
default:
print("No code generator selected.")
}
if codeGenerator != nil {
codeGenerator!.fillColor = self.fillColor
codeGenerator!.strokeColor = self.strokeColor
return codeGenerator!.generateCode(contents, inputCorrectionLevel: inputCorrectionLevel, machineReadableCodeObjectType: machineReadableCodeObjectType, targetSize: targetSize)
} else {
return nil
}
}
open func generateCode(_ contents: String, machineReadableCodeObjectType: String, targetSize: CGSize? = nil) -> UIImage? {
return self.generateCode(contents, inputCorrectionLevel: .Medium, machineReadableCodeObjectType: machineReadableCodeObjectType, targetSize: targetSize)
}
open func generateCode(_ machineReadableCodeObject: AVMetadataMachineReadableCodeObject, inputCorrectionLevel: InputCorrectionLevel, targetSize: CGSize? = nil) -> UIImage? {
return self.generateCode(machineReadableCodeObject.stringValue!, inputCorrectionLevel: inputCorrectionLevel, machineReadableCodeObjectType: machineReadableCodeObject.type.rawValue, targetSize: targetSize)
}
open func generateCode(_ machineReadableCodeObject: AVMetadataMachineReadableCodeObject, targetSize: CGSize? = nil) -> UIImage? {
return self.generateCode(machineReadableCodeObject, inputCorrectionLevel: .Medium, targetSize: targetSize)
}
}
let UnifiedCodeGeneratorSharedInstance = RSUnifiedCodeGenerator()
//
// RSUnifiedCodeValidator.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 10/3/16.
// Copyright (c) 2016 P.D.Q. All rights reserved.
//
import Foundation
import AVFoundation
open class RSUnifiedCodeValidator {
open class var shared: RSUnifiedCodeValidator {
return UnifiedCodeValidatorSharedInstance
}
open func isValid(_ contents:String, machineReadableCodeObjectType: String) -> Bool {
var codeGenerator: RSCodeGenerator?
switch machineReadableCodeObjectType {
case AVMetadataObject.ObjectType.qr.rawValue, AVMetadataObject.ObjectType.pdf417.rawValue, AVMetadataObject.ObjectType.aztec.rawValue:
return false
case AVMetadataObject.ObjectType.code39.rawValue:
codeGenerator = RSCode39Generator()
case AVMetadataObject.ObjectType.code39Mod43.rawValue:
codeGenerator = RSCode39Mod43Generator()
case AVMetadataObject.ObjectType.ean8.rawValue:
codeGenerator = RSEAN8Generator()
case AVMetadataObject.ObjectType.ean13.rawValue:
codeGenerator = RSEAN13Generator()
case AVMetadataObject.ObjectType.interleaved2of5.rawValue:
codeGenerator = RSITFGenerator()
case AVMetadataObject.ObjectType.itf14.rawValue:
codeGenerator = RSITF14Generator()
case AVMetadataObject.ObjectType.upce.rawValue:
codeGenerator = RSUPCEGenerator()
case AVMetadataObject.ObjectType.code93.rawValue:
codeGenerator = RSCode93Generator()
case AVMetadataObject.ObjectType.code128.rawValue:
codeGenerator = RSCode128Generator()
case AVMetadataObject.ObjectType.dataMatrix.rawValue:
codeGenerator = RSCodeDataMatrixGenerator()
case RSBarcodesTypeISBN13Code:
codeGenerator = RSISBN13Generator()
case RSBarcodesTypeISSN13Code:
codeGenerator = RSISSN13Generator()
case RSBarcodesTypeExtendedCode39Code:
codeGenerator = RSExtendedCode39Generator()
default:
print("No code generator selected.")
return false
}
return codeGenerator!.isValid(contents)
}
}
let UnifiedCodeValidatorSharedInstance = RSUnifiedCodeValidator()
//
// Ext.swift
// RSBarcodesSample
//
// Created by R0CKSTAR on 6/10/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
extension String {
func length() -> Int {
return self.count
}
func trim() -> String {
return self.trimmingCharacters(in: .whitespacesAndNewlines)
}
func substring(_ location:Int, length:Int) -> String! {
return (self as NSString).substring(with: NSMakeRange(location, length))
}
subscript(index: Int) -> String! {
get {
return self.substring(index, length: 1)
}
}
func location(_ other: String) -> Int {
return (self as NSString).range(of: other).location
}
func contains(_ other: String) -> Bool {
return (self as NSString).contains(other)
}
// http://stackoverflow.com/questions/6644004/how-to-check-if-nsstring-is-contains-a-numeric-value
func isNumeric() -> Bool {
return (self as NSString).rangeOfCharacter(from: CharacterSet.decimalDigits.inverted).location == NSNotFound
}
}
//
// UIColorExtension.swift
// HEXColor
//
// Created by R0CKSTAR on 6/13/14.
// Copyright (c) 2014 P.D.Q. All rights reserved.
//
import UIKit
/**
MissingHashMarkAsPrefix: "Invalid RGB string, missing '#' as prefix"
UnableToScanHexValue: "Scan hex error"
MismatchedHexStringLength: "Invalid RGB string, number of characters after '#' should be either 3, 4, 6 or 8"
*/
public enum UIColorInputError : Error {
case missingHashMarkAsPrefix,
unableToScanHexValue,
mismatchedHexStringLength
}
extension UIColor {
/**
The shorthand three-digit hexadecimal representation of color.
#RGB defines to the color #RRGGBB.
- parameter hex3: Three-digit hexadecimal value.
- parameter alpha: 0.0 - 1.0. The default is 1.0.
*/
@objc public convenience init(hex3: UInt16, alpha: CGFloat = 1) {
let divisor = CGFloat(15)
let red = CGFloat((hex3 & 0xF00) >> 8) / divisor
let green = CGFloat((hex3 & 0x0F0) >> 4) / divisor
let blue = CGFloat( hex3 & 0x00F ) / divisor
self.init(red: red, green: green, blue: blue, alpha: alpha)
}
/**
The shorthand four-digit hexadecimal representation of color with alpha.
#RGBA defines to the color #RRGGBBAA.
- parameter hex4: Four-digit hexadecimal value.
*/
@objc public convenience init(hex4: UInt16) {
let divisor = CGFloat(15)
let red = CGFloat((hex4 & 0xF000) >> 12) / divisor
let green = CGFloat((hex4 & 0x0F00) >> 8) / divisor
let blue = CGFloat((hex4 & 0x00F0) >> 4) / divisor
let alpha = CGFloat( hex4 & 0x000F ) / divisor
self.init(red: red, green: green, blue: blue, alpha: alpha)
}
/**
The six-digit hexadecimal representation of color of the form #RRGGBB.
- parameter hex6: Six-digit hexadecimal value.
*/
@objc public convenience init(hex6: UInt32, alpha: CGFloat = 1) {
let divisor = CGFloat(255)
let red = CGFloat((hex6 & 0xFF0000) >> 16) / divisor
let green = CGFloat((hex6 & 0x00FF00) >> 8) / divisor
let blue = CGFloat( hex6 & 0x0000FF ) / divisor
self.init(red: red, green: green, blue: blue, alpha: alpha)
}
/**
The six-digit hexadecimal representation of color with alpha of the form #RRGGBBAA.
- parameter hex8: Eight-digit hexadecimal value.
*/
@objc public convenience init(hex8: UInt32) {
let divisor = CGFloat(255)
let red = CGFloat((hex8 & 0xFF000000) >> 24) / divisor
let green = CGFloat((hex8 & 0x00FF0000) >> 16) / divisor
let blue = CGFloat((hex8 & 0x0000FF00) >> 8) / divisor
let alpha = CGFloat( hex8 & 0x000000FF ) / divisor
self.init(red: red, green: green, blue: blue, alpha: alpha)
}
/**
The rgba string representation of color with alpha of the form #RRGGBBAA/#RRGGBB, throws error.
- parameter rgba: String value.
*/
@objc public convenience init(rgba_throws rgba: String) throws {
guard rgba.hasPrefix("#") else {
throw UIColorInputError.missingHashMarkAsPrefix
}
let index = rgba.index(rgba.startIndex, offsetBy: 1)
let hexString = String(rgba[index...])
var hexValue: UInt32 = 0
guard Scanner(string: hexString).scanHexInt32(&hexValue) else {
throw UIColorInputError.unableToScanHexValue
}
switch (hexString.count) {
case 3:
self.init(hex3: UInt16(hexValue))
case 4:
self.init(hex4: UInt16(hexValue))
case 6:
self.init(hex6: hexValue)
case 8:
self.init(hex8: hexValue)
default:
throw UIColorInputError.mismatchedHexStringLength
}
}
/**
The rgba string representation of color with alpha of the form #RRGGBBAA/#RRGGBB, fails to default color.
- parameter rgba: String value.
*/
@objc public convenience init(_ rgba: String, defaultColor: UIColor = UIColor.clear) {
guard let color = try? UIColor(rgba_throws: rgba) else {
self.init(cgColor: defaultColor.cgColor)
return
}
self.init(cgColor: color.cgColor)
}
/**
Hex string of a UIColor instance.
- parameter includeAlpha: Whether the alpha should be included.
*/
@objc public func hexString(_ includeAlpha: Bool = true) -> String {
var r: CGFloat = 0
var g: CGFloat = 0
var b: CGFloat = 0
var a: CGFloat = 0
self.getRed(&r, green: &g, blue: &b, alpha: &a)
if includeAlpha {
return String(format: "#%02X%02X%02X%02X", Int(r * 255), Int(g * 255), Int(b * 255), Int(a * 255))
} else {
return String(format: "#%02X%02X%02X", Int(r * 255), Int(g * 255), Int(b * 255))
}
}
}
# Acknowledgements
This application makes use of the following third party libraries:
## RSBarcodes_Swift
The MIT License (MIT)
Copyright (c) 2012-2014 P.D.Q.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Generated by CocoaPods - https://cocoapods.org
......
......@@ -14,6 +14,36 @@
</dict>
<dict>
<key>FooterText</key>
<string>The MIT License (MIT)
Copyright (c) 2012-2014 P.D.Q.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</string>
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>RSBarcodes_Swift</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - https://cocoapods.org</string>
<key>Title</key>
<string></string>
......
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RSBarcodes_Swift"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RSBarcodes_Swift/RSBarcodes_Swift.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "AVFoundation" -framework "CoreImage" -framework "QuartzCore" -framework "RSBarcodes_Swift"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RSBarcodes_Swift"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RSBarcodes_Swift/RSBarcodes_Swift.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "AVFoundation" -framework "CoreImage" -framework "QuartzCore" -framework "RSBarcodes_Swift"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
#import <Foundation/Foundation.h>
@interface PodsDummy_RSBarcodes_Swift : NSObject
@end
@implementation PodsDummy_RSBarcodes_Swift
@end
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double RSBarcodes_SwiftVersionNumber;
FOUNDATION_EXPORT const unsigned char RSBarcodes_SwiftVersionString[];
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RSBarcodes_Swift
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "AVFoundation" -framework "CoreImage" -framework "QuartzCore"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/RSBarcodes_Swift
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
framework module RSBarcodes_Swift {
umbrella header "RSBarcodes_Swift-umbrella.h"
export *
module * { export * }
}
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RSBarcodes_Swift
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "AVFoundation" -framework "CoreImage" -framework "QuartzCore"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/RSBarcodes_Swift
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
......@@ -7,7 +7,7 @@
<key>WarplySDKFrameworkIOS.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>2</integer>
</dict>
</dict>
</dict>
......