Skip to content

Commit bc64abc

Browse files
authored
Merge pull request #13 from JGiola/swift4
Move the project to Swift 4
2 parents c3dadc0 + 8557744 commit bc64abc

5 files changed

Lines changed: 31 additions & 33 deletions

File tree

Keychains.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ Pod::Spec.new do |s|
1818
s.frameworks = 'Foundation'
1919
s.frameworks = 'Security'
2020

21-
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3.0' }
21+
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' }
2222
end

Keychains.xcodeproj/project.pbxproj

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
isa = PBXProject;
277277
attributes = {
278278
LastSwiftUpdateCheck = 0720;
279-
LastUpgradeCheck = 0800;
279+
LastUpgradeCheck = 0900;
280280
ORGANIZATIONNAME = "Hyper Interaktiv AS";
281281
TargetAttributes = {
282282
BDA447E11C294B45003FDEAD = {
@@ -415,7 +415,6 @@
415415
PRODUCT_NAME = Keychains;
416416
SDKROOT = macosx;
417417
SKIP_INSTALL = YES;
418-
SWIFT_VERSION = 3.0;
419418
};
420419
name = Debug;
421420
};
@@ -437,37 +436,32 @@
437436
PRODUCT_NAME = Keychains;
438437
SDKROOT = macosx;
439438
SKIP_INSTALL = YES;
440-
SWIFT_VERSION = 3.0;
441439
};
442440
name = Release;
443441
};
444442
BDA447F71C294B45003FDEAD /* Debug */ = {
445443
isa = XCBuildConfiguration;
446444
buildSettings = {
447-
CODE_SIGN_IDENTITY = "";
448445
COMBINE_HIDPI_IMAGES = YES;
449446
INFOPLIST_FILE = "$(SRCROOT)/Tests/Mac/Info.plist";
450447
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
451448
MACOSX_DEPLOYMENT_TARGET = 10.11;
452449
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Keychain-MacTests";
453450
PRODUCT_NAME = "$(TARGET_NAME)";
454451
SDKROOT = macosx;
455-
SWIFT_VERSION = 3.0;
456452
};
457453
name = Debug;
458454
};
459455
BDA447F81C294B45003FDEAD /* Release */ = {
460456
isa = XCBuildConfiguration;
461457
buildSettings = {
462-
CODE_SIGN_IDENTITY = "";
463458
COMBINE_HIDPI_IMAGES = YES;
464459
INFOPLIST_FILE = "$(SRCROOT)/Tests/Mac/Info.plist";
465460
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
466461
MACOSX_DEPLOYMENT_TARGET = 10.11;
467462
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Keychain-MacTests";
468463
PRODUCT_NAME = "$(TARGET_NAME)";
469464
SDKROOT = macosx;
470-
SWIFT_VERSION = 3.0;
471465
};
472466
name = Release;
473467
};
@@ -479,18 +473,23 @@
479473
CLANG_CXX_LIBRARY = "libc++";
480474
CLANG_ENABLE_MODULES = YES;
481475
CLANG_ENABLE_OBJC_ARC = YES;
476+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
482477
CLANG_WARN_BOOL_CONVERSION = YES;
478+
CLANG_WARN_COMMA = YES;
483479
CLANG_WARN_CONSTANT_CONVERSION = YES;
484480
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
485481
CLANG_WARN_EMPTY_BODY = YES;
486482
CLANG_WARN_ENUM_CONVERSION = YES;
487483
CLANG_WARN_INFINITE_RECURSION = YES;
488484
CLANG_WARN_INT_CONVERSION = YES;
485+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
486+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
489487
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
488+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
489+
CLANG_WARN_STRICT_PROTOTYPES = YES;
490490
CLANG_WARN_SUSPICIOUS_MOVE = YES;
491491
CLANG_WARN_UNREACHABLE_CODE = YES;
492492
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
493-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
494493
COPY_PHASE_STRIP = NO;
495494
CURRENT_PROJECT_VERSION = 1;
496495
DEBUG_INFORMATION_FORMAT = dwarf;
@@ -510,14 +509,12 @@
510509
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
511510
GCC_WARN_UNUSED_FUNCTION = YES;
512511
GCC_WARN_UNUSED_VARIABLE = YES;
513-
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
514-
MTL_ENABLE_DEBUG_INFO = YES;
515512
ONLY_ACTIVE_ARCH = YES;
516513
SDKROOT = iphoneos;
517514
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
515+
SWIFT_VERSION = 4.0;
518516
TARGETED_DEVICE_FAMILY = "1,2";
519517
VERSIONING_SYSTEM = "apple-generic";
520-
VERSION_INFO_PREFIX = "";
521518
};
522519
name = Debug;
523520
};
@@ -529,18 +526,23 @@
529526
CLANG_CXX_LIBRARY = "libc++";
530527
CLANG_ENABLE_MODULES = YES;
531528
CLANG_ENABLE_OBJC_ARC = YES;
529+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
532530
CLANG_WARN_BOOL_CONVERSION = YES;
531+
CLANG_WARN_COMMA = YES;
533532
CLANG_WARN_CONSTANT_CONVERSION = YES;
534533
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
535534
CLANG_WARN_EMPTY_BODY = YES;
536535
CLANG_WARN_ENUM_CONVERSION = YES;
537536
CLANG_WARN_INFINITE_RECURSION = YES;
538537
CLANG_WARN_INT_CONVERSION = YES;
538+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
539+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
539540
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
541+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
542+
CLANG_WARN_STRICT_PROTOTYPES = YES;
540543
CLANG_WARN_SUSPICIOUS_MOVE = YES;
541544
CLANG_WARN_UNREACHABLE_CODE = YES;
542545
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
543-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
544546
COPY_PHASE_STRIP = NO;
545547
CURRENT_PROJECT_VERSION = 1;
546548
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
@@ -554,21 +556,18 @@
554556
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
555557
GCC_WARN_UNUSED_FUNCTION = YES;
556558
GCC_WARN_UNUSED_VARIABLE = YES;
557-
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
558-
MTL_ENABLE_DEBUG_INFO = NO;
559559
SDKROOT = iphoneos;
560560
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
561+
SWIFT_VERSION = 4.0;
561562
TARGETED_DEVICE_FAMILY = "1,2";
562563
VALIDATE_PRODUCT = YES;
563564
VERSIONING_SYSTEM = "apple-generic";
564-
VERSION_INFO_PREFIX = "";
565565
};
566566
name = Release;
567567
};
568568
D56DA9F11C20608E003E7253 /* Debug */ = {
569569
isa = XCBuildConfiguration;
570570
buildSettings = {
571-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
572571
DEFINES_MODULE = YES;
573572
DYLIB_COMPATIBILITY_VERSION = 1;
574573
DYLIB_CURRENT_VERSION = 1;
@@ -580,14 +579,12 @@
580579
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.Keychains;
581580
PRODUCT_NAME = Keychains;
582581
SKIP_INSTALL = YES;
583-
SWIFT_VERSION = 3.0;
584582
};
585583
name = Debug;
586584
};
587585
D56DA9F21C20608E003E7253 /* Release */ = {
588586
isa = XCBuildConfiguration;
589587
buildSettings = {
590-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
591588
DEFINES_MODULE = YES;
592589
DYLIB_COMPATIBILITY_VERSION = 1;
593590
DYLIB_CURRENT_VERSION = 1;
@@ -599,7 +596,6 @@
599596
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.Keychains;
600597
PRODUCT_NAME = Keychains;
601598
SKIP_INSTALL = YES;
602-
SWIFT_VERSION = 3.0;
603599
};
604600
name = Release;
605601
};
@@ -610,7 +606,6 @@
610606
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
611607
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.KeychainTests;
612608
PRODUCT_NAME = "$(TARGET_NAME)";
613-
SWIFT_VERSION = 3.0;
614609
};
615610
name = Debug;
616611
};
@@ -621,7 +616,6 @@
621616
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
622617
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.KeychainTests;
623618
PRODUCT_NAME = "$(TARGET_NAME)";
624-
SWIFT_VERSION = 3.0;
625619
};
626620
name = Release;
627621
};

Keychains.xcodeproj/xcshareddata/xcschemes/Keychain-Mac.xcscheme

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -15,7 +15,7 @@
1515
<BuildableReference
1616
BuildableIdentifier = "primary"
1717
BlueprintIdentifier = "BDA447E11C294B45003FDEAD"
18-
BuildableName = "Keychain.framework"
18+
BuildableName = "Keychains.framework"
1919
BlueprintName = "Keychains-Mac"
2020
ReferencedContainer = "container:Keychains.xcodeproj">
2121
</BuildableReference>
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<Testables>
3132
<TestableReference
@@ -43,7 +44,7 @@
4344
<BuildableReference
4445
BuildableIdentifier = "primary"
4546
BlueprintIdentifier = "BDA447E11C294B45003FDEAD"
46-
BuildableName = "Keychain.framework"
47+
BuildableName = "Keychains.framework"
4748
BlueprintName = "Keychains-Mac"
4849
ReferencedContainer = "container:Keychains.xcodeproj">
4950
</BuildableReference>
@@ -55,6 +56,7 @@
5556
buildConfiguration = "Debug"
5657
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5758
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59+
language = ""
5860
launchStyle = "0"
5961
useCustomWorkingDirectory = "NO"
6062
ignoresPersistentStateOnLaunch = "NO"
@@ -65,7 +67,7 @@
6567
<BuildableReference
6668
BuildableIdentifier = "primary"
6769
BlueprintIdentifier = "BDA447E11C294B45003FDEAD"
68-
BuildableName = "Keychain.framework"
70+
BuildableName = "Keychains.framework"
6971
BlueprintName = "Keychains-Mac"
7072
ReferencedContainer = "container:Keychains.xcodeproj">
7173
</BuildableReference>
@@ -83,7 +85,7 @@
8385
<BuildableReference
8486
BuildableIdentifier = "primary"
8587
BlueprintIdentifier = "BDA447E11C294B45003FDEAD"
86-
BuildableName = "Keychain.framework"
88+
BuildableName = "Keychains.framework"
8789
BlueprintName = "Keychains-Mac"
8890
ReferencedContainer = "container:Keychains.xcodeproj">
8991
</BuildableReference>

Keychains.xcodeproj/xcshareddata/xcschemes/Keychain-iOS.xcscheme

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -15,7 +15,7 @@
1515
<BuildableReference
1616
BuildableIdentifier = "primary"
1717
BlueprintIdentifier = "D56DA9DB1C20608E003E7253"
18-
BuildableName = "Keychain.framework"
18+
BuildableName = "Keychains.framework"
1919
BlueprintName = "Keychains-iOS"
2020
ReferencedContainer = "container:Keychains.xcodeproj">
2121
</BuildableReference>
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<Testables>
3132
<TestableReference
@@ -43,7 +44,7 @@
4344
<BuildableReference
4445
BuildableIdentifier = "primary"
4546
BlueprintIdentifier = "D56DA9DB1C20608E003E7253"
46-
BuildableName = "Keychain.framework"
47+
BuildableName = "Keychains.framework"
4748
BlueprintName = "Keychains-iOS"
4849
ReferencedContainer = "container:Keychains.xcodeproj">
4950
</BuildableReference>
@@ -55,6 +56,7 @@
5556
buildConfiguration = "Debug"
5657
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5758
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59+
language = ""
5860
launchStyle = "0"
5961
useCustomWorkingDirectory = "NO"
6062
ignoresPersistentStateOnLaunch = "NO"
@@ -65,7 +67,7 @@
6567
<BuildableReference
6668
BuildableIdentifier = "primary"
6769
BlueprintIdentifier = "D56DA9DB1C20608E003E7253"
68-
BuildableName = "Keychain.framework"
70+
BuildableName = "Keychains.framework"
6971
BlueprintName = "Keychains-iOS"
7072
ReferencedContainer = "container:Keychains.xcodeproj">
7173
</BuildableReference>
@@ -83,7 +85,7 @@
8385
<BuildableReference
8486
BuildableIdentifier = "primary"
8587
BlueprintIdentifier = "D56DA9DB1C20608E003E7253"
86-
BuildableName = "Keychain.framework"
88+
BuildableName = "Keychains.framework"
8789
BlueprintName = "Keychains-iOS"
8890
ReferencedContainer = "container:Keychains.xcodeproj">
8991
</BuildableReference>

Source/Shared/Keychain.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Security
44
public struct Keychain {
55

66
/// This is used to identifier your service
7-
static let bundleIdentifier: String = {
7+
public static let bundleIdentifier: String = {
88
return Bundle.main.bundleIdentifier ?? ""
99
}()
1010

0 commit comments

Comments
 (0)