Skip to content

Commit 2c7f449

Browse files
committed
update to Swift 4.2 and remove Pod extension in projects
1 parent 75f8557 commit 2c7f449

File tree

59 files changed

+488
-394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+488
-394
lines changed

abtesting/ABTestingExample.xcodeproj/project.pbxproj

+7-36
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,18 @@
193193
TargetAttributes = {
194194
10B92C9B202E3603008DBD68 = {
195195
CreatedOnToolsVersion = 9.2;
196+
LastSwiftMigration = 1010;
196197
ProvisioningStyle = Automatic;
197198
TestTargetID = 8DFFBF991F9E6C5200C3483E;
198199
};
199200
8DFFBF991F9E6C5200C3483E = {
200201
CreatedOnToolsVersion = 8.3.3;
201-
LastSwiftMigration = 0930;
202+
LastSwiftMigration = 1010;
202203
ProvisioningStyle = Automatic;
203204
};
204205
8DFFBFAD1F9E6C5200C3483E = {
205206
CreatedOnToolsVersion = 8.3.3;
206-
LastSwiftMigration = 0930;
207+
LastSwiftMigration = 1010;
207208
ProvisioningStyle = Automatic;
208209
TestTargetID = 8DFFBF991F9E6C5200C3483E;
209210
};
@@ -336,7 +337,7 @@
336337
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
337338
PRODUCT_BUNDLE_IDENTIFIER = com.firebase.ABTestingExample.ABTestingExampleUITests;
338339
PRODUCT_NAME = "$(TARGET_NAME)";
339-
SWIFT_VERSION = 4.0;
340+
SWIFT_VERSION = 4.2;
340341
TARGETED_DEVICE_FAMILY = "1,2";
341342
TEST_TARGET_NAME = ABTestingExample;
342343
};
@@ -361,7 +362,7 @@
361362
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
362363
PRODUCT_BUNDLE_IDENTIFIER = com.firebase.ABTestingExample.ABTestingExampleUITests;
363364
PRODUCT_NAME = "$(TARGET_NAME)";
364-
SWIFT_VERSION = 4.0;
365+
SWIFT_VERSION = 4.2;
365366
TARGETED_DEVICE_FAMILY = "1,2";
366367
TEST_TARGET_NAME = ABTestingExample;
367368
};
@@ -478,34 +479,6 @@
478479
};
479480
name = Release;
480481
};
481-
8DFFBFB81F9E6C5200C3483E /* Debug */ = {
482-
isa = XCBuildConfiguration;
483-
buildSettings = {
484-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
485-
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
486-
INFOPLIST_FILE = ABTestingExample/Info.plist;
487-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(PODS_CONFIGURATION_BUILD_DIR)/GoogleToolboxForMac $(PODS_CONFIGURATION_BUILD_DIR)/nanopb $(PODS_CONFIGURATION_BUILD_DIR)/Protobuf";
488-
PRODUCT_BUNDLE_IDENTIFIER = com.firebase.ABTestingExample;
489-
PRODUCT_NAME = "$(TARGET_NAME)";
490-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
491-
SWIFT_VERSION = 4.0;
492-
};
493-
name = Debug;
494-
};
495-
8DFFBFB91F9E6C5200C3483E /* Release */ = {
496-
isa = XCBuildConfiguration;
497-
buildSettings = {
498-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
499-
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
500-
INFOPLIST_FILE = ABTestingExample/Info.plist;
501-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(PODS_CONFIGURATION_BUILD_DIR)/GoogleToolboxForMac $(PODS_CONFIGURATION_BUILD_DIR)/nanopb $(PODS_CONFIGURATION_BUILD_DIR)/Protobuf";
502-
PRODUCT_BUNDLE_IDENTIFIER = com.firebase.ABTestingExample;
503-
PRODUCT_NAME = "$(TARGET_NAME)";
504-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
505-
SWIFT_VERSION = 4.0;
506-
};
507-
name = Release;
508-
};
509482
8DFFBFBB1F9E6C5200C3483E /* Debug */ = {
510483
isa = XCBuildConfiguration;
511484
buildSettings = {
@@ -515,8 +488,7 @@
515488
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
516489
PRODUCT_BUNDLE_IDENTIFIER = com.firebase.ABTestingExampleTests;
517490
PRODUCT_NAME = "$(TARGET_NAME)";
518-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
519-
SWIFT_VERSION = 4.0;
491+
SWIFT_VERSION = 4.2;
520492
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ABTestingExample.app/ABTestingExample";
521493
};
522494
name = Debug;
@@ -530,8 +502,7 @@
530502
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
531503
PRODUCT_BUNDLE_IDENTIFIER = com.firebase.ABTestingExampleTests;
532504
PRODUCT_NAME = "$(TARGET_NAME)";
533-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
534-
SWIFT_VERSION = 4.0;
505+
SWIFT_VERSION = 4.2;
535506
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ABTestingExample.app/ABTestingExample";
536507
};
537508
name = Release;

abtesting/ABTestingExample/AppDelegate.swift

+1-17
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2222

2323
var window: UIWindow?
2424

25-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
25+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
2626
FirebaseApp.configure()
2727
return true
2828
}
29-
30-
func applicationWillResignActive(_ application: UIApplication) {
31-
}
32-
33-
func applicationDidEnterBackground(_ application: UIApplication) {
34-
}
35-
36-
func applicationWillEnterForeground(_ application: UIApplication) {
37-
}
38-
39-
func applicationDidBecomeActive(_ application: UIApplication) {
40-
}
41-
42-
func applicationWillTerminate(_ application: UIApplication) {
43-
}
44-
4529
}

abtesting/ABTestingExample/ViewController.swift

+9-4
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,13 @@ class ViewController: UIViewController, UITableViewDataSource {
8787
}
8888

8989
@objc func printInstanceIDToken() {
90-
let instanceID = InstanceID.instanceID().token() ?? "null"
91-
print("InstanceID token: \(instanceID)")
90+
InstanceID.instanceID().instanceID { (result, error) in
91+
if let error = error {
92+
print("Error fetching remote instange ID: \(error)")
93+
} else if let result = result {
94+
print("Remote instance ID token: \(result.token)")
95+
}
96+
}
9297
}
9398

9499
deinit {
@@ -104,7 +109,7 @@ class ViewController: UIViewController, UITableViewDataSource {
104109
navigationController?.navigationBar.barTintColor = ViewController.lightColors.primary
105110
navigationController?.navigationBar.barStyle = .`default`
106111
navigationController?.navigationBar.titleTextAttributes = [
107-
NSAttributedStringKey.foregroundColor: UIColor.black
112+
NSAttributedString.Key.foregroundColor: UIColor.black
108113
]
109114
tableView.separatorColor = .gray
110115
tableView.backgroundColor = UIColor(red: 0.94, green: 0.94, blue: 0.94, alpha: 1)
@@ -113,7 +118,7 @@ class ViewController: UIViewController, UITableViewDataSource {
113118
navigationController?.navigationBar.barTintColor = ViewController.darkColors.primary
114119
navigationController?.navigationBar.barStyle = .black
115120
navigationController?.navigationBar.titleTextAttributes = [
116-
NSAttributedStringKey.foregroundColor: UIColor.white
121+
NSAttributedString.Key.foregroundColor: UIColor.white
117122
]
118123
tableView.separatorColor = .lightGray
119124
tableView.backgroundColor = ViewController.darkColors.secondary

admob/AdMobExample.xcodeproj/project.pbxproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@
641641
SWIFT_OBJC_BRIDGING_HEADER = "";
642642
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
643643
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
644-
SWIFT_VERSION = 4.0;
644+
SWIFT_VERSION = 4.2;
645645
};
646646
name = Debug;
647647
};
@@ -665,7 +665,7 @@
665665
PROVISIONING_PROFILE_SPECIFIER = "";
666666
SWIFT_OBJC_BRIDGING_HEADER = "";
667667
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
668-
SWIFT_VERSION = 4.0;
668+
SWIFT_VERSION = 4.2;
669669
};
670670
name = Release;
671671
};
@@ -689,7 +689,7 @@
689689
PROVISIONING_PROFILE_SPECIFIER = "";
690690
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
691691
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
692-
SWIFT_VERSION = 4.0;
692+
SWIFT_VERSION = 4.2;
693693
};
694694
name = Debug;
695695
};
@@ -709,7 +709,7 @@
709709
PRODUCT_NAME = "$(TARGET_NAME)";
710710
PROVISIONING_PROFILE_SPECIFIER = "";
711711
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
712-
SWIFT_VERSION = 4.0;
712+
SWIFT_VERSION = 4.2;
713713
};
714714
name = Release;
715715
};
@@ -731,7 +731,7 @@
731731
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.AdMobExampleSwiftUITests;
732732
PRODUCT_NAME = "$(TARGET_NAME)";
733733
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
734-
SWIFT_VERSION = 4.0;
734+
SWIFT_VERSION = 4.2;
735735
TARGETED_DEVICE_FAMILY = "1,2";
736736
TEST_TARGET_NAME = AdMobExampleSwift;
737737
};
@@ -755,7 +755,7 @@
755755
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
756756
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.AdMobExampleSwiftUITests;
757757
PRODUCT_NAME = "$(TARGET_NAME)";
758-
SWIFT_VERSION = 4.0;
758+
SWIFT_VERSION = 4.2;
759759
TARGETED_DEVICE_FAMILY = "1,2";
760760
TEST_TARGET_NAME = AdMobExampleSwift;
761761
};

admob/AdMobExampleSwift/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2626

2727
var window: UIWindow?
2828

29-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
29+
private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
3030
// Use Firebase library to configure APIs
3131
FirebaseApp.configure()
3232
return true

admob/Podfile

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ target 'AdMobExample' do
99
target 'AdMobExampleTests' do
1010
inherit! :search_paths
1111
end
12+
13+
target 'AdMobExampleUITests' do
14+
inherit! :search_paths
15+
end
1216
end
1317

1418
target 'AdMobExampleSwift' do
@@ -19,4 +23,8 @@ target 'AdMobExampleSwift' do
1923
target 'AdMobExampleSwiftTests' do
2024
inherit! :search_paths
2125
end
26+
27+
target 'AdMobExampleSwiftUITests' do
28+
inherit! :search_paths
29+
end
2230
end

admob/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ SPEC CHECKSUMS:
7979
GoogleUtilities: 6481e6318c5fcabaaa8513ef8120f329055d7c10
8080
nanopb: 2901f78ea1b7b4015c860c2fdd1ea2fee1a18d48
8181

82-
PODFILE CHECKSUM: a8dec54ea8590e76563e1dfab78df5fbbbb0ac4a
82+
PODFILE CHECKSUM: 7064ae1858d22b31ba5b36a78ceb862578446bc9
8383

8484
COCOAPODS: 1.6.1

analytics/AnalyticsExample.xcodeproj/project.pbxproj

+8-23
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@
344344
TargetAttributes = {
345345
107346D520315877004A66D1 = {
346346
CreatedOnToolsVersion = 9.2;
347+
LastSwiftMigration = 1010;
347348
ProvisioningStyle = Automatic;
348349
TestTargetID = 5F5A53781ADE67D500F81DF0;
349350
};
@@ -359,7 +360,7 @@
359360
};
360361
5F5A53781ADE67D500F81DF0 = {
361362
CreatedOnToolsVersion = 6.3;
362-
LastSwiftMigration = 0930;
363+
LastSwiftMigration = 1010;
363364
ProvisioningStyle = Automatic;
364365
};
365366
5FC7AD811B0D4106004E3100 = {
@@ -539,7 +540,7 @@
539540
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.AnalyticsExampleSwiftUITests;
540541
PRODUCT_NAME = "$(TARGET_NAME)";
541542
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
542-
SWIFT_VERSION = 4.0;
543+
SWIFT_VERSION = 4.2;
543544
TARGETED_DEVICE_FAMILY = "1,2";
544545
TEST_TARGET_NAME = AnalyticsExampleSwift;
545546
};
@@ -563,7 +564,7 @@
563564
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
564565
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.AnalyticsExampleSwiftUITests;
565566
PRODUCT_NAME = "$(TARGET_NAME)";
566-
SWIFT_VERSION = 4.0;
567+
SWIFT_VERSION = 4.2;
567568
TARGETED_DEVICE_FAMILY = "1,2";
568569
TEST_TARGET_NAME = AnalyticsExampleSwift;
569570
};
@@ -630,8 +631,7 @@
630631
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.AnalyticsExample;
631632
PRODUCT_NAME = AnalyticsExampleSwift;
632633
PROVISIONING_PROFILE_SPECIFIER = "";
633-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
634-
SWIFT_VERSION = 4.0;
634+
SWIFT_VERSION = 4.2;
635635
};
636636
name = Debug;
637637
};
@@ -787,8 +787,7 @@
787787
PROVISIONING_PROFILE_SPECIFIER = "";
788788
SWIFT_OBJC_BRIDGING_HEADER = "";
789789
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
790-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
791-
SWIFT_VERSION = 4.0;
790+
SWIFT_VERSION = 4.2;
792791
};
793792
name = Release;
794793
};
@@ -809,14 +808,7 @@
809808
);
810809
HEADER_SEARCH_PATHS = (
811810
"$(inherited)",
812-
"\"${PODS_ROOT}/Headers/Public\"",
813-
"\"${PODS_ROOT}/Headers/Public/Google\"",
814-
"\"${PODS_ROOT}/Headers/Public/Google/Google\"",
815-
"\"${PODS_ROOT}/Headers/Public/GoogleAnalytics\"",
816-
"\"${PODS_ROOT}/Headers/Public/GoogleNetworkingUtilities\"",
817-
"\"${PODS_ROOT}/Headers/Public/GoogleSymbolUtilities\"",
818-
"\"${PODS_ROOT}/Headers/Public/GoogleUtilities\"",
819-
AnalayticsExample,
811+
AnalyticsExample,
820812
);
821813
INFOPLIST_FILE = AnalyticsExample/Info.plist;
822814
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
@@ -841,14 +833,7 @@
841833
);
842834
HEADER_SEARCH_PATHS = (
843835
"$(inherited)",
844-
"\"${PODS_ROOT}/Headers/Public\"",
845-
"\"${PODS_ROOT}/Headers/Public/Google\"",
846-
"\"${PODS_ROOT}/Headers/Public/Google/Google\"",
847-
"\"${PODS_ROOT}/Headers/Public/GoogleAnalytics\"",
848-
"\"${PODS_ROOT}/Headers/Public/GoogleNetworkingUtilities\"",
849-
"\"${PODS_ROOT}/Headers/Public/GoogleSymbolUtilities\"",
850-
"\"${PODS_ROOT}/Headers/Public/GoogleUtilities\"",
851-
AnalayticsExample,
836+
AnalyticsExample,
852837
);
853838
INFOPLIST_FILE = AnalyticsExample/Info.plist;
854839
IPHONEOS_DEPLOYMENT_TARGET = 8.3;

analytics/AnalyticsExample/Base.lproj/Main.storyboard

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.13.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="6zM-Ho-vol">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="6zM-Ho-vol">
33
<device id="retina4_7" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
66
<dependencies>
77
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.9"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
99
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1010
</dependencies>
1111
<scenes>
@@ -53,8 +53,8 @@
5353
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
5454
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
5555
<subviews>
56-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Pick Your Favorite Food!" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mef-P0-8Mc">
57-
<rect key="frame" x="166" y="20" width="267" height="30"/>
56+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pick Your Favorite Food!" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mef-P0-8Mc">
57+
<rect key="frame" x="58.5" y="64" width="258" height="30"/>
5858
<fontDescription key="fontDescription" type="system" pointSize="25"/>
5959
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
6060
<nil key="highlightedColor"/>
@@ -149,7 +149,7 @@
149149
<objects>
150150
<tabBarController title="Patterns" id="eeg-iu-cjG" customClass="PatternTabBarController" sceneMemberID="viewController">
151151
<navigationItem key="navigationItem" title="Analytics Quickstart" id="tic-du-7VP">
152-
<barButtonItem key="leftBarButtonItem" style="plain" systemItem="rewind" id="018-X5-Kyw">
152+
<barButtonItem key="leftBarButtonItem" systemItem="rewind" id="018-X5-Kyw">
153153
<connections>
154154
<action selector="unwindToHome:" destination="eeg-iu-cjG" id="5ju-RZ-eQc"/>
155155
</connections>

analytics/AnalyticsExampleSwift/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2222

2323
var window: UIWindow?
2424

25-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
25+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.UIApplication.LaunchOptionsKey: Any]?) -> Bool {
2626

2727
// [START tracker_swift]
2828
FirebaseApp.configure()

analytics/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ SPEC CHECKSUMS:
7676

7777
PODFILE CHECKSUM: 91c90931e2de8c1848e0cf3557ba1350378ca935
7878

79-
COCOAPODS: 1.6.1
79+
COCOAPODS: 1.7.0.beta.2

0 commit comments

Comments
 (0)