Skip to content

Commit 45face0

Browse files
Merge pull request #3 from SomeRandomiOSDev/SwiftPackages
Added support for Swift Packages
2 parents 7cb84cd + 22e49d3 commit 45face0

14 files changed

+47
-260
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
CBORCoding.xcodeproj/project.xcworkspace
22
CBORCoding.xcodeproj/xcuserdata
3+
.build

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ osx_image: xcode10.2
44
xcode_project: CBORCoding.xcodeproj
55

66
script:
7-
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding" -destination "platform=iOS Simulator,name=iPhone XS Max" -configuration Test ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
8-
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding tvOS" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Test ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
7+
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding" -destination "platform=iOS Simulator,name=iPhone XS Max" -configuration Debug ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
8+
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding tvOS" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Debug ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
99
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding watchOS" -destination "platform=watchOS Simulator,name=Apple Watch Series 4 - 44mm" -configuration Debug ONLY_ACTIVE_ARCH=YES
10-
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding macOS" -destination "platform=macOS" -configuration Test ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
10+
- set -o pipefail && travis_retry xcodebuild -scheme "CBORCoding macOS" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES test
1111

1212
after_success:
1313
- bash <(curl -s https://codecov.io/bash)

CBORCoding.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "CBORCoding"
4-
s.version = "1.0.1"
4+
s.version = "1.0.2"
55
s.summary = "A CBOR Encoder and Decoder"
66
s.description = <<-DESC
77
A lightweight framework containing a coder pair for encoding and decoding `Codable` conforming types to and from CBOR document format for iOS, macOS, tvOS, and watchOS.

CBORCoding.xcodeproj/project.pbxproj

+2-244
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
DD957E722296D514000127A3 /* CBORDecoderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CBORDecoderTests.swift; sourceTree = "<group>"; };
150150
DD957E9C2299CE1C000127A3 /* CBOR+Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CBOR+Codable.swift"; sourceTree = "<group>"; };
151151
DDF755AB22A80069002E11D4 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = SOURCE_ROOT; };
152+
DDF755AC22A8649F002E11D4 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = SOURCE_ROOT; };
152153
/* End PBXFileReference section */
153154

154155
/* Begin PBXFrameworksBuildPhase section */
@@ -239,6 +240,7 @@
239240
isa = PBXGroup;
240241
children = (
241242
DD12989122A487FB005CEB9A /* CBORCoding.podspec */,
243+
DDF755AC22A8649F002E11D4 /* Package.swift */,
242244
DD1298A122A546B4005CEB9A /* .swiftlint.yml */,
243245
DDF755AB22A80069002E11D4 /* .travis.yml */,
244246
DD12989322A487FB005CEB9A /* README.md */,
@@ -737,15 +739,6 @@
737739
};
738740
name = Debug;
739741
};
740-
DD12989A22A48C30005CEB9A /* Test */ = {
741-
isa = XCBuildConfiguration;
742-
buildSettings = {
743-
CODE_SIGN_STYLE = Automatic;
744-
PRODUCT_NAME = "$(TARGET_NAME)";
745-
SDKROOT = macosx;
746-
};
747-
name = Test;
748-
};
749742
DD12989B22A48C30005CEB9A /* Release */ = {
750743
isa = XCBuildConfiguration;
751744
buildSettings = {
@@ -781,32 +774,6 @@
781774
};
782775
name = Debug;
783776
};
784-
DD1298BB22A563BE005CEB9A /* Test */ = {
785-
isa = XCBuildConfiguration;
786-
buildSettings = {
787-
CODE_SIGN_IDENTITY = "-";
788-
CODE_SIGN_STYLE = Automatic;
789-
COMBINE_HIDPI_IMAGES = YES;
790-
DEFINES_MODULE = YES;
791-
DYLIB_COMPATIBILITY_VERSION = 1;
792-
DYLIB_CURRENT_VERSION = 1;
793-
DYLIB_INSTALL_NAME_BASE = "@rpath";
794-
FRAMEWORK_VERSION = A;
795-
INFOPLIST_FILE = CBORCoding/Info.plist;
796-
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
797-
LD_RUNPATH_SEARCH_PATHS = (
798-
"$(inherited)",
799-
"@executable_path/../Frameworks",
800-
"@loader_path/Frameworks",
801-
);
802-
PRODUCT_BUNDLE_IDENTIFIER = com.somerandomiosdev.cborcoding;
803-
PRODUCT_NAME = CBORCoding;
804-
SDKROOT = macosx;
805-
SKIP_INSTALL = YES;
806-
SUPPORTED_PLATFORMS = macosx;
807-
};
808-
name = Test;
809-
};
810777
DD1298BC22A563BE005CEB9A /* Release */ = {
811778
isa = XCBuildConfiguration;
812779
buildSettings = {
@@ -853,26 +820,6 @@
853820
};
854821
name = Debug;
855822
};
856-
DD1298BF22A563BE005CEB9A /* Test */ = {
857-
isa = XCBuildConfiguration;
858-
buildSettings = {
859-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
860-
CODE_SIGN_IDENTITY = "-";
861-
CODE_SIGN_STYLE = Automatic;
862-
COMBINE_HIDPI_IMAGES = YES;
863-
INFOPLIST_FILE = CBORCodingTests/Info.plist;
864-
LD_RUNPATH_SEARCH_PATHS = (
865-
"$(inherited)",
866-
"@executable_path/../Frameworks",
867-
"@loader_path/../Frameworks",
868-
);
869-
MACOSX_DEPLOYMENT_TARGET = 10.14;
870-
PRODUCT_BUNDLE_IDENTIFIER = com.somerandomiosdev.cborcodingtests;
871-
PRODUCT_NAME = "$(TARGET_NAME)";
872-
SDKROOT = macosx;
873-
};
874-
name = Test;
875-
};
876823
DD1298C022A563BE005CEB9A /* Release */ = {
877824
isa = XCBuildConfiguration;
878825
buildSettings = {
@@ -918,31 +865,6 @@
918865
};
919866
name = Debug;
920867
};
921-
DD1298F322A56431005CEB9A /* Test */ = {
922-
isa = XCBuildConfiguration;
923-
buildSettings = {
924-
CODE_SIGN_IDENTITY = "";
925-
CODE_SIGN_STYLE = Automatic;
926-
DEFINES_MODULE = YES;
927-
DYLIB_COMPATIBILITY_VERSION = 1;
928-
DYLIB_CURRENT_VERSION = 1;
929-
DYLIB_INSTALL_NAME_BASE = "@rpath";
930-
INFOPLIST_FILE = CBORCoding/Info.plist;
931-
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
932-
LD_RUNPATH_SEARCH_PATHS = (
933-
"$(inherited)",
934-
"@executable_path/Frameworks",
935-
"@loader_path/Frameworks",
936-
);
937-
PRODUCT_BUNDLE_IDENTIFIER = com.somerandomiosdev.cborcoding;
938-
PRODUCT_NAME = CBORCoding;
939-
SDKROOT = appletvos;
940-
SKIP_INSTALL = YES;
941-
SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
942-
TARGETED_DEVICE_FAMILY = 3;
943-
};
944-
name = Test;
945-
};
946868
DD1298F422A56431005CEB9A /* Release */ = {
947869
isa = XCBuildConfiguration;
948870
buildSettings = {
@@ -987,25 +909,6 @@
987909
};
988910
name = Debug;
989911
};
990-
DD1298F722A56431005CEB9A /* Test */ = {
991-
isa = XCBuildConfiguration;
992-
buildSettings = {
993-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
994-
CODE_SIGN_STYLE = Automatic;
995-
INFOPLIST_FILE = CBORCodingTests/Info.plist;
996-
LD_RUNPATH_SEARCH_PATHS = (
997-
"$(inherited)",
998-
"@executable_path/Frameworks",
999-
"@loader_path/Frameworks",
1000-
);
1001-
PRODUCT_BUNDLE_IDENTIFIER = com.somerandomiosdev.cborcodingtests;
1002-
PRODUCT_NAME = "$(TARGET_NAME)";
1003-
SDKROOT = appletvos;
1004-
TARGETED_DEVICE_FAMILY = 3;
1005-
TVOS_DEPLOYMENT_TARGET = 12.2;
1006-
};
1007-
name = Test;
1008-
};
1009912
DD1298F822A56431005CEB9A /* Release */ = {
1010913
isa = XCBuildConfiguration;
1011914
buildSettings = {
@@ -1051,32 +954,6 @@
1051954
};
1052955
name = Debug;
1053956
};
1054-
DD12990522A5644C005CEB9A /* Test */ = {
1055-
isa = XCBuildConfiguration;
1056-
buildSettings = {
1057-
APPLICATION_EXTENSION_API_ONLY = YES;
1058-
CODE_SIGN_IDENTITY = "";
1059-
CODE_SIGN_STYLE = Automatic;
1060-
DEFINES_MODULE = YES;
1061-
DYLIB_COMPATIBILITY_VERSION = 1;
1062-
DYLIB_CURRENT_VERSION = 1;
1063-
DYLIB_INSTALL_NAME_BASE = "@rpath";
1064-
INFOPLIST_FILE = CBORCoding/Info.plist;
1065-
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1066-
LD_RUNPATH_SEARCH_PATHS = (
1067-
"$(inherited)",
1068-
"@executable_path/Frameworks",
1069-
"@loader_path/Frameworks",
1070-
);
1071-
PRODUCT_BUNDLE_IDENTIFIER = com.somerandomiosdev.cborcoding;
1072-
PRODUCT_NAME = CBORCoding;
1073-
SDKROOT = watchos;
1074-
SKIP_INSTALL = YES;
1075-
SUPPORTED_PLATFORMS = "watchsimulator watchos";
1076-
TARGETED_DEVICE_FAMILY = 4;
1077-
};
1078-
name = Test;
1079-
};
1080957
DD12990622A5644C005CEB9A /* Release */ = {
1081958
isa = XCBuildConfiguration;
1082959
buildSettings = {
@@ -1316,124 +1193,13 @@
13161193
};
13171194
name = Release;
13181195
};
1319-
DD957E6F2296C1F5000127A3 /* Test */ = {
1320-
isa = XCBuildConfiguration;
1321-
buildSettings = {
1322-
ALWAYS_SEARCH_USER_PATHS = NO;
1323-
CLANG_ANALYZER_NONNULL = YES;
1324-
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
1325-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
1326-
CLANG_CXX_LIBRARY = "libc++";
1327-
CLANG_ENABLE_MODULES = YES;
1328-
CLANG_ENABLE_OBJC_ARC = YES;
1329-
CLANG_ENABLE_OBJC_WEAK = YES;
1330-
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
1331-
CLANG_WARN_BOOL_CONVERSION = YES;
1332-
CLANG_WARN_COMMA = YES;
1333-
CLANG_WARN_CONSTANT_CONVERSION = YES;
1334-
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
1335-
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
1336-
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1337-
CLANG_WARN_EMPTY_BODY = YES;
1338-
CLANG_WARN_ENUM_CONVERSION = YES;
1339-
CLANG_WARN_INFINITE_RECURSION = YES;
1340-
CLANG_WARN_INT_CONVERSION = YES;
1341-
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1342-
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
1343-
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
1344-
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1345-
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1346-
CLANG_WARN_STRICT_PROTOTYPES = YES;
1347-
CLANG_WARN_SUSPICIOUS_MOVE = YES;
1348-
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
1349-
CLANG_WARN_UNREACHABLE_CODE = YES;
1350-
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1351-
CODE_SIGN_IDENTITY = "iPhone Developer";
1352-
COPY_PHASE_STRIP = NO;
1353-
CURRENT_PROJECT_VERSION = 1;
1354-
DEBUG_INFORMATION_FORMAT = dwarf;
1355-
ENABLE_STRICT_OBJC_MSGSEND = YES;
1356-
ENABLE_TESTABILITY = YES;
1357-
GCC_C_LANGUAGE_STANDARD = gnu11;
1358-
GCC_DYNAMIC_NO_PIC = NO;
1359-
GCC_NO_COMMON_BLOCKS = YES;
1360-
GCC_OPTIMIZATION_LEVEL = 0;
1361-
GCC_PREPROCESSOR_DEFINITIONS = (
1362-
"DEBUG=1",
1363-
"$(inherited)",
1364-
);
1365-
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1366-
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
1367-
GCC_WARN_UNDECLARED_SELECTOR = YES;
1368-
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
1369-
GCC_WARN_UNUSED_FUNCTION = YES;
1370-
GCC_WARN_UNUSED_VARIABLE = YES;
1371-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1372-
MACOSX_DEPLOYMENT_TARGET = 10.10;
1373-
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
1374-
MTL_FAST_MATH = YES;
1375-
ONLY_ACTIVE_ARCH = NO;
1376-
SDKROOT = iphoneos;
1377-
SWIFT_ACTIVE_COMPILATION_CONDITIONS = UNIT_TEST;
1378-
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1379-
SWIFT_VERSION = 5.0;
1380-
TARGETED_DEVICE_FAMILY = "1,2";
1381-
TVOS_DEPLOYMENT_TARGET = 9.0;
1382-
VERSIONING_SYSTEM = "apple-generic";
1383-
VERSION_INFO_PREFIX = "";
1384-
WATCHOS_DEPLOYMENT_TARGET = 2.0;
1385-
};
1386-
name = Test;
1387-
};
1388-
DD957E702296C1F5000127A3 /* Test */ = {
1389-
isa = XCBuildConfiguration;
1390-
buildSettings = {
1391-
CLANG_ENABLE_MODULES = YES;
1392-
CODE_SIGN_IDENTITY = "";
1393-
CODE_SIGN_STYLE = Automatic;
1394-
DEFINES_MODULE = YES;
1395-
DYLIB_COMPATIBILITY_VERSION = 1;
1396-
DYLIB_CURRENT_VERSION = 1;
1397-
DYLIB_INSTALL_NAME_BASE = "@rpath";
1398-
INFOPLIST_FILE = CBORCoding/Info.plist;
1399-
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1400-
LD_RUNPATH_SEARCH_PATHS = (
1401-
"$(inherited)",
1402-
"@executable_path/Frameworks",
1403-
"@loader_path/Frameworks",
1404-
);
1405-
PRODUCT_BUNDLE_IDENTIFIER = com.somerandomiosdev.cborcoding;
1406-
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
1407-
SKIP_INSTALL = YES;
1408-
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
1409-
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1410-
};
1411-
name = Test;
1412-
};
1413-
DD957E712296C1F5000127A3 /* Test */ = {
1414-
isa = XCBuildConfiguration;
1415-
buildSettings = {
1416-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
1417-
CODE_SIGN_STYLE = Automatic;
1418-
INFOPLIST_FILE = CBORCodingTests/Info.plist;
1419-
LD_RUNPATH_SEARCH_PATHS = (
1420-
"$(inherited)",
1421-
"@executable_path/Frameworks",
1422-
"@loader_path/Frameworks",
1423-
);
1424-
PRODUCT_BUNDLE_IDENTIFIER = com.somerandomiosdev.cborcodingtests;
1425-
PRODUCT_NAME = "$(TARGET_NAME)";
1426-
};
1427-
name = Test;
1428-
};
14291196
/* End XCBuildConfiguration section */
14301197

14311198
/* Begin XCConfigurationList section */
14321199
DD12989822A48C30005CEB9A /* Build configuration list for PBXAggregateTarget "Run SwiftLint" */ = {
14331200
isa = XCConfigurationList;
14341201
buildConfigurations = (
14351202
DD12989922A48C30005CEB9A /* Debug */,
1436-
DD12989A22A48C30005CEB9A /* Test */,
14371203
DD12989B22A48C30005CEB9A /* Release */,
14381204
);
14391205
defaultConfigurationIsVisible = 0;
@@ -1443,7 +1209,6 @@
14431209
isa = XCConfigurationList;
14441210
buildConfigurations = (
14451211
DD1298BA22A563BE005CEB9A /* Debug */,
1446-
DD1298BB22A563BE005CEB9A /* Test */,
14471212
DD1298BC22A563BE005CEB9A /* Release */,
14481213
);
14491214
defaultConfigurationIsVisible = 0;
@@ -1453,7 +1218,6 @@
14531218
isa = XCConfigurationList;
14541219
buildConfigurations = (
14551220
DD1298BE22A563BE005CEB9A /* Debug */,
1456-
DD1298BF22A563BE005CEB9A /* Test */,
14571221
DD1298C022A563BE005CEB9A /* Release */,
14581222
);
14591223
defaultConfigurationIsVisible = 0;
@@ -1463,7 +1227,6 @@
14631227
isa = XCConfigurationList;
14641228
buildConfigurations = (
14651229
DD1298F222A56431005CEB9A /* Debug */,
1466-
DD1298F322A56431005CEB9A /* Test */,
14671230
DD1298F422A56431005CEB9A /* Release */,
14681231
);
14691232
defaultConfigurationIsVisible = 0;
@@ -1473,7 +1236,6 @@
14731236
isa = XCConfigurationList;
14741237
buildConfigurations = (
14751238
DD1298F622A56431005CEB9A /* Debug */,
1476-
DD1298F722A56431005CEB9A /* Test */,
14771239
DD1298F822A56431005CEB9A /* Release */,
14781240
);
14791241
defaultConfigurationIsVisible = 0;
@@ -1483,7 +1245,6 @@
14831245
isa = XCConfigurationList;
14841246
buildConfigurations = (
14851247
DD12990422A5644C005CEB9A /* Debug */,
1486-
DD12990522A5644C005CEB9A /* Test */,
14871248
DD12990622A5644C005CEB9A /* Release */,
14881249
);
14891250
defaultConfigurationIsVisible = 0;
@@ -1493,7 +1254,6 @@
14931254
isa = XCConfigurationList;
14941255
buildConfigurations = (
14951256
DD32E37B228DDCFB002D9067 /* Debug */,
1496-
DD957E6F2296C1F5000127A3 /* Test */,
14971257
DD32E37C228DDCFB002D9067 /* Release */,
14981258
);
14991259
defaultConfigurationIsVisible = 0;
@@ -1503,7 +1263,6 @@
15031263
isa = XCConfigurationList;
15041264
buildConfigurations = (
15051265
DD32E37E228DDCFB002D9067 /* Debug */,
1506-
DD957E702296C1F5000127A3 /* Test */,
15071266
DD32E37F228DDCFB002D9067 /* Release */,
15081267
);
15091268
defaultConfigurationIsVisible = 0;
@@ -1513,7 +1272,6 @@
15131272
isa = XCConfigurationList;
15141273
buildConfigurations = (
15151274
DD32E381228DDCFB002D9067 /* Debug */,
1516-
DD957E712296C1F5000127A3 /* Test */,
15171275
DD32E382228DDCFB002D9067 /* Release */,
15181276
);
15191277
defaultConfigurationIsVisible = 0;

0 commit comments

Comments
 (0)