Skip to content

Commit 7b23291

Browse files
authored
Merge pull request #5 from cft-dev/fix-xcode-warnings-and-demo-and-tests
Fix xcode warnings and demo and tests
2 parents 140ac98 + d719834 commit 7b23291

File tree

5 files changed

+29
-14
lines changed

5 files changed

+29
-14
lines changed

FTCTextEntryFormatting.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Pod::Spec.new do |spec|
22

33
spec.name = 'FTCTextEntryFormatting'
4-
spec.version = '1.0.4'
4+
spec.version = '1.0.5'
55
spec.license = { :type => 'FTC' }
6-
spec.homepage = 'https://stash.ftc.ru/projects/UPCMC/repos/ftctextentryformatting/browse'
6+
spec.homepage = 'https://github.com/cft-dev/FTCTextEntryFormatting'
77
spec.authors = { 'Denis Morozov' => 'd.morozov@ftc.ru' }
88
spec.summary = 'Text Entry Formatting.'
9-
spec.source = { :git => 'https://stash.ftc.ru/scm/upcmc/ftctextentryformatting.git', :tag => '1.0.4' }
9+
spec.source = { :git => 'https://github.com/cft-dev/FTCTextEntryFormatting.git', :tag => '1.0.5' }
1010

1111
spec.prefix_header_contents = '@import Foundation;'
1212
spec.source_files = 'Src/**/*.{h,m}'

FTCTextEntryFormatting.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
21591A1641163D3E4D1A1F34 /* FTCDigitsInputFilterTestCaseWithZeroMaxLength.m in Sources */ = {isa = PBXBuildFile; fileRef = F515E4501F5D58CD00AEEC8C /* FTCDigitsInputFilterTestCaseWithZeroMaxLength.m */; };
1111
B10523501F84C4B6002B3F61 /* FTCDigitsInputFilterTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = B105234E1F84C497002B3F61 /* FTCDigitsInputFilterTestCase.m */; };
12-
B10523531F84C655002B3F61 /* FTCTextEntryFormattingConfigFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = B10523511F84C655002B3F61 /* FTCTextEntryFormattingConfigFactory.h */; };
12+
B10523531F84C655002B3F61 /* FTCTextEntryFormattingConfigFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = B10523511F84C655002B3F61 /* FTCTextEntryFormattingConfigFactory.h */; settings = {ATTRIBUTES = (Public, ); }; };
1313
B10523541F84C655002B3F61 /* FTCTextEntryFormattingConfigFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = B10523521F84C655002B3F61 /* FTCTextEntryFormattingConfigFactory.m */; };
1414
B1EBF8E71F2315F90014F4CB /* FTCTextEntryFormatting.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1EBF8DD1F2315F90014F4CB /* FTCTextEntryFormatting.framework */; };
1515
B1EBF9441F2316410014F4CB /* FTCNoFormattingFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = B1EBF9001F2316410014F4CB /* FTCNoFormattingFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; };

FTCTextEntryFormattingDemo/FTCTextEntryFormattingDemo.xcodeproj/project.pbxproj

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,12 @@
338338
isa = PBXProject;
339339
attributes = {
340340
LastSwiftUpdateCheck = 0830;
341-
LastUpgradeCheck = 0830;
341+
LastUpgradeCheck = 0920;
342342
ORGANIZATIONNAME = FTC;
343343
TargetAttributes = {
344344
B18726C51F63CC1C003FAF88 = {
345345
CreatedOnToolsVersion = 8.3.3;
346+
LastSwiftMigration = 0920;
346347
ProvisioningStyle = Automatic;
347348
};
348349
};
@@ -446,15 +447,21 @@
446447
CLANG_CXX_LIBRARY = "libc++";
447448
CLANG_ENABLE_MODULES = YES;
448449
CLANG_ENABLE_OBJC_ARC = YES;
450+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
449451
CLANG_WARN_BOOL_CONVERSION = YES;
452+
CLANG_WARN_COMMA = YES;
450453
CLANG_WARN_CONSTANT_CONVERSION = YES;
451454
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
452455
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
453456
CLANG_WARN_EMPTY_BODY = YES;
454457
CLANG_WARN_ENUM_CONVERSION = YES;
455458
CLANG_WARN_INFINITE_RECURSION = YES;
456459
CLANG_WARN_INT_CONVERSION = YES;
460+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
461+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
457462
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
463+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
464+
CLANG_WARN_STRICT_PROTOTYPES = YES;
458465
CLANG_WARN_SUSPICIOUS_MOVE = YES;
459466
CLANG_WARN_UNREACHABLE_CODE = YES;
460467
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -477,7 +484,7 @@
477484
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
478485
GCC_WARN_UNUSED_FUNCTION = YES;
479486
GCC_WARN_UNUSED_VARIABLE = YES;
480-
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
487+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
481488
MTL_ENABLE_DEBUG_INFO = YES;
482489
ONLY_ACTIVE_ARCH = YES;
483490
SDKROOT = iphoneos;
@@ -496,15 +503,21 @@
496503
CLANG_CXX_LIBRARY = "libc++";
497504
CLANG_ENABLE_MODULES = YES;
498505
CLANG_ENABLE_OBJC_ARC = YES;
506+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
499507
CLANG_WARN_BOOL_CONVERSION = YES;
508+
CLANG_WARN_COMMA = YES;
500509
CLANG_WARN_CONSTANT_CONVERSION = YES;
501510
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
502511
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
503512
CLANG_WARN_EMPTY_BODY = YES;
504513
CLANG_WARN_ENUM_CONVERSION = YES;
505514
CLANG_WARN_INFINITE_RECURSION = YES;
506515
CLANG_WARN_INT_CONVERSION = YES;
516+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
517+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
507518
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
519+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
520+
CLANG_WARN_STRICT_PROTOTYPES = YES;
508521
CLANG_WARN_SUSPICIOUS_MOVE = YES;
509522
CLANG_WARN_UNREACHABLE_CODE = YES;
510523
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -521,7 +534,7 @@
521534
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
522535
GCC_WARN_UNUSED_FUNCTION = YES;
523536
GCC_WARN_UNUSED_VARIABLE = YES;
524-
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
537+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
525538
MTL_ENABLE_DEBUG_INFO = NO;
526539
SDKROOT = iphoneos;
527540
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -539,7 +552,8 @@
539552
PRODUCT_BUNDLE_IDENTIFIER = FTC.FTCTextEntryFormattingDemo;
540553
PRODUCT_NAME = "$(TARGET_NAME)";
541554
SWIFT_OBJC_BRIDGING_HEADER = "FTCTextEntryFormattingDemo/Bridging-Header.h";
542-
SWIFT_VERSION = 3.0;
555+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
556+
SWIFT_VERSION = 4.0;
543557
};
544558
name = Debug;
545559
};
@@ -553,7 +567,8 @@
553567
PRODUCT_BUNDLE_IDENTIFIER = FTC.FTCTextEntryFormattingDemo;
554568
PRODUCT_NAME = "$(TARGET_NAME)";
555569
SWIFT_OBJC_BRIDGING_HEADER = "FTCTextEntryFormattingDemo/Bridging-Header.h";
556-
SWIFT_VERSION = 3.0;
570+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
571+
SWIFT_VERSION = 4.0;
557572
};
558573
name = Release;
559574
};

FTCTextEntryFormattingDemo/FTCTextEntryFormattingDemo/Data/FormattingExampleItem.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ extension FormattingExampleItem
6363
static func makeCreditCardPANItem() -> FormattingExampleItem
6464
{
6565
let maskConfig = FTCMaskFormatterGenericConfig(mask: "XXXX XXXX XXXX XXXX XXX", maskCharacter: "X")
66-
maskConfig.cutTail = true
66+
maskConfig.tailMode = .cut
6767

6868
let maskFormatter = FTCMaskFormatter(config: maskConfig)
6969
let inputFilter = FTCDigitsValueFilter(maxLength: maskConfig.countMaskCharacters)
@@ -79,7 +79,7 @@ extension FormattingExampleItem
7979
static func makeDriverLicenseModernItem() -> FormattingExampleItem
8080
{
8181
let maskConfig = FTCMaskFormatterGenericConfig(mask: "__ __ ______", maskCharacter: "_")
82-
maskConfig.cutTail = false
82+
maskConfig.tailMode = .none
8383

8484
let maskFormatter = FTCMaskFormatter(config: maskConfig)
8585
let inputFilter = FTCDigitsValueFilter(maxLength: maskConfig.countMaskCharacters)
@@ -95,7 +95,7 @@ extension FormattingExampleItem
9595
static func makeDriverLicenseOutdatedItem() -> FormattingExampleItem
9696
{
9797
let maskConfig = FTCMaskFormatterGenericConfig(mask: "__ __ № ______", maskCharacter: "_")
98-
maskConfig.cutTail = false
98+
maskConfig.tailMode = .none
9999

100100
let maskFormatter = FTCMaskFormatter(config: maskConfig)
101101
let inputFilter = FTCToUpperCaseInputFilter()

UnitTests/Formatters/FTCMaskFormatter/FTCMaskFormatterTestCase.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ - (void)setUp
3636
[super setUp];
3737

3838
FTCMaskFormatterGenericConfig *configWithCutTail = [[FTCMaskFormatterGenericConfig alloc] initWithMask:@"_ _ _ _ _" maskCharacter:@"_"];
39-
configWithCutTail.cutTail = YES;
39+
configWithCutTail.tailMode = FTCMaskFormatterConfigTailModeCut;
4040

4141
formatterWithCutTail = [[FTCMaskFormatter alloc] initWithConfig:configWithCutTail];
4242

4343
FTCMaskFormatterGenericConfig *configWithoutCutTail = [[FTCMaskFormatterGenericConfig alloc] initWithMask:@"_ _ _ _ _" maskCharacter:@"_"];
44-
configWithoutCutTail.cutTail = NO;
44+
configWithoutCutTail.tailMode = FTCMaskFormatterConfigTailModeNone;
4545

4646
formatterWithoutCutTail = [[FTCMaskFormatter alloc] initWithConfig:configWithoutCutTail];
4747
}

0 commit comments

Comments
 (0)