diff --git a/.swiftlint.yml b/.swiftlint.yml index 1f7b2c456..bf4fdb8c9 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -4,6 +4,8 @@ disabled_rules: - empty_count - todo - implicit_getter +- private_over_fileprivate +- inclusive_language opt_in_rules: - empty_string excluded: @@ -21,17 +23,17 @@ function_body_length: warning: 300 error: 500 function_parameter_count: - warning: 6 - error: 8 + warning: 10 + error: 10 type_body_length: - warning: 300 + warning: 500 error: 500 file_length: warning: 1000 error: 1500 ignore_comment_only_lines: true cyclomatic_complexity: - warning: 15 + warning: 20 error: 25 type_name: min_length: 1 @@ -46,4 +48,4 @@ identifier_name: large_tuple: warning: 4 error: 5 -reporter: "xcode" \ No newline at end of file +reporter: "xcode" diff --git a/DemoObjCApp/AppDelegate.h b/DemoObjCApp/AppDelegate.h index fcb19abc2..aea65635e 100644 --- a/DemoObjCApp/AppDelegate.h +++ b/DemoObjCApp/AppDelegate.h @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import diff --git a/DemoObjCApp/AppDelegate.m b/DemoObjCApp/AppDelegate.m index c509de00b..67e4d0cdb 100644 --- a/DemoObjCApp/AppDelegate.m +++ b/DemoObjCApp/AppDelegate.m @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import "AppDelegate.h" #import "VariationViewController.h" diff --git a/DemoObjCApp/Customization/CustomLogger.h b/DemoObjCApp/Customization/CustomLogger.h index 9265831ec..33ee15c97 100644 --- a/DemoObjCApp/Customization/CustomLogger.h +++ b/DemoObjCApp/Customization/CustomLogger.h @@ -1,20 +1,21 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import +@import Optimizely; NS_ASSUME_NONNULL_BEGIN diff --git a/DemoObjCApp/Customization/CustomLogger.m b/DemoObjCApp/Customization/CustomLogger.m index 7d695e7bb..8f99b4de0 100644 --- a/DemoObjCApp/Customization/CustomLogger.m +++ b/DemoObjCApp/Customization/CustomLogger.m @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import "CustomLogger.h" @import Optimizely; diff --git a/DemoObjCApp/DemoObjcApp.xcodeproj/project.pbxproj b/DemoObjCApp/DemoObjcApp.xcodeproj/project.pbxproj index ac71754fc..1cf4c980b 100644 --- a/DemoObjCApp/DemoObjcApp.xcodeproj/project.pbxproj +++ b/DemoObjCApp/DemoObjcApp.xcodeproj/project.pbxproj @@ -134,6 +134,13 @@ remoteGlobalIDString = 6E614DCC21E3F389005982A1; remoteInfo = "OptimizelySwiftSDK-tvOS"; }; + 6EAAB6D42602892A00294B8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6E4D2FE722C5457F00062EB3 /* OptimizelySwiftSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 75C719BB25E4519B0084187E; + remoteInfo = "OptimizelySwiftSDK-watchOS"; + }; 6EF41A992523D23E00EAADF1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 6E4D2FE722C5457F00062EB3 /* OptimizelySwiftSDK.xcodeproj */; @@ -233,6 +240,7 @@ 6E4D2FF722C5457F00062EB3 /* Optimizely.framework */, 6E4D2FF922C5457F00062EB3 /* Optimizely.framework */, 6EF41A9A2523D23E00EAADF1 /* Optimizely.framework */, + 6EAAB6D52602892A00294B8A /* Optimizely.framework */, 6E4D2FFB22C5457F00062EB3 /* OptimizelyTests-iOS.xctest */, 6E4D2FFD22C5457F00062EB3 /* OptimizelyTests-Common-iOS.xctest */, 6EF41A9C2523D23E00EAADF1 /* OptimizelyTests-Batch-iOS.xctest */, @@ -419,7 +427,7 @@ 6EF7496721E40467008B22A0 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1200; + LastUpgradeCheck = 1230; ORGANIZATIONNAME = Optimizely; TargetAttributes = { 6EF7498D21E404BB008B22A0 = { @@ -545,6 +553,13 @@ remoteRef = 6E4D300C22C5457F00062EB3 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 6EAAB6D52602892A00294B8A /* Optimizely.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Optimizely.framework; + remoteRef = 6EAAB6D42602892A00294B8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 6EF41A9A2523D23E00EAADF1 /* Optimizely.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; @@ -722,6 +737,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -783,6 +799,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -817,7 +834,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = ../DemoSwiftApp/DemoSwiftiOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -836,7 +853,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = ../DemoSwiftApp/DemoSwiftiOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -855,7 +872,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = ../DemoSwiftApp/DemoSwifttvOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -875,7 +892,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = ../DemoSwiftApp/DemoSwifttvOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/DemoObjCApp/DemoObjcApp.xcodeproj/xcshareddata/xcschemes/DemoObjciOS.xcscheme b/DemoObjCApp/DemoObjcApp.xcodeproj/xcshareddata/xcschemes/DemoObjciOS.xcscheme index f50f01236..ad67caf89 100644 --- a/DemoObjCApp/DemoObjcApp.xcodeproj/xcshareddata/xcschemes/DemoObjciOS.xcscheme +++ b/DemoObjCApp/DemoObjcApp.xcodeproj/xcshareddata/xcschemes/DemoObjciOS.xcscheme @@ -1,6 +1,6 @@ diff --git a/DemoObjCApp/Samples/SamplesForAPI.m b/DemoObjCApp/Samples/SamplesForAPI.m index 91f267896..64cac161c 100644 --- a/DemoObjCApp/Samples/SamplesForAPI.m +++ b/DemoObjCApp/Samples/SamplesForAPI.m @@ -1,20 +1,18 @@ // -/**************************************************************************** - * Copyright 2019,2021, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ - +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import "SamplesForAPI.h" @import Optimizely; diff --git a/DemoObjCApp/VariationViewController.h b/DemoObjCApp/VariationViewController.h index 1dd564973..2494fa8e6 100644 --- a/DemoObjCApp/VariationViewController.h +++ b/DemoObjCApp/VariationViewController.h @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import diff --git a/DemoObjCApp/VariationViewController.m b/DemoObjCApp/VariationViewController.m index fbd09b16f..2afe5669f 100644 --- a/DemoObjCApp/VariationViewController.m +++ b/DemoObjCApp/VariationViewController.m @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import "VariationViewController.h" @import Optimizely; diff --git a/DemoObjCApp/main.m b/DemoObjCApp/main.m index ff2144ffa..c3492605d 100644 --- a/DemoObjCApp/main.m +++ b/DemoObjCApp/main.m @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import #import "AppDelegate.h" diff --git a/DemoSwiftApp/AppDelegate.swift b/DemoSwiftApp/AppDelegate.swift index 74872830a..3e0184c3c 100644 --- a/DemoSwiftApp/AppDelegate.swift +++ b/DemoSwiftApp/AppDelegate.swift @@ -1,34 +1,22 @@ -/**************************************************************************** -* Copyright 2019-2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import UIKit import Optimizely -private final class CustomLogger: OPTLogger { - public static var logLevel: OptimizelyLogLevel = .info - - required init() { - } - - public func log(level: OptimizelyLogLevel, message: String) { - if level.rawValue <= CustomLogger.logLevel.rawValue { - print("🐱 - [\(level.name)] Kitty - \(message)") - } - } -} @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { let logLevel = OptimizelyLogLevel.debug @@ -82,6 +70,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { print("Optimizely SDK initiliazation failed: \(error)") case .success: print("Optimizely SDK initialized successfully!") + #if !os(iOS) + @unknown default: + print("Optimizely SDK initiliazation failed with unknown result") + #endif } self.startWithRootViewController() @@ -137,6 +129,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { print("Optimizely SDK initiliazation failed: \(error)") case .success: print("Optimizely SDK initialized successfully!") + #if !os(iOS) + @unknown default: + print("Optimizely SDK initiliazation failed with unknown result") + #endif } self.startWithRootViewController() diff --git a/DemoSwiftApp/Customization/CustomLogger.swift b/DemoSwiftApp/Customization/CustomLogger.swift index a9a6f1c0e..d72fa8ea5 100644 --- a/DemoSwiftApp/Customization/CustomLogger.swift +++ b/DemoSwiftApp/Customization/CustomLogger.swift @@ -9,7 +9,7 @@ import Foundation import Optimizely -private final class CustomLogger: OPTLogger { +class CustomLogger: OPTLogger { public static var logLevel: OptimizelyLogLevel = .info required init() { diff --git a/DemoSwiftApp/DemoSwiftApp.xcodeproj/project.pbxproj b/DemoSwiftApp/DemoSwiftApp.xcodeproj/project.pbxproj index aa17c5b46..f687a59d3 100644 --- a/DemoSwiftApp/DemoSwiftApp.xcodeproj/project.pbxproj +++ b/DemoSwiftApp/DemoSwiftApp.xcodeproj/project.pbxproj @@ -30,7 +30,6 @@ 6EF2CF1D21E4158A00A5D78D /* tvOSMain.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6EF2CF1B21E4158A00A5D78D /* tvOSMain.storyboard */; }; 6EFA31F5227BB60E006FA572 /* SamplesForAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EFA31F4227BB60E006FA572 /* SamplesForAPI.swift */; }; 6EFA3212227CD571006FA572 /* SamplesForAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EFA31F4227BB60E006FA572 /* SamplesForAPI.swift */; }; - 75C71C4F25E45A960084187E /* DemoSwiftwatchOS WatchKit App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 75C71C4E25E45A960084187E /* DemoSwiftwatchOS WatchKit App.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 75C71C5525E45A960084187E /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 75C71C5325E45A960084187E /* Interface.storyboard */; }; 75C71C5725E45A980084187E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 75C71C5625E45A980084187E /* Assets.xcassets */; }; 75C71C5E25E45A980084187E /* DemoSwiftwatchOS WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 75C71C5D25E45A980084187E /* DemoSwiftwatchOS WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -155,13 +154,6 @@ remoteGlobalIDString = 6E14CD632423F80B00010234; remoteInfo = "OptimizelyTests-Batch-iOS"; }; - 75C71C5025E45A960084187E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = EA5246B51DC7186800AF6685 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 75C71C4D25E45A960084187E; - remoteInfo = "DemoSwiftwatchOS WatchKit App"; - }; 75C71C5F25E45A980084187E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = EA5246B51DC7186800AF6685 /* Project object */; @@ -208,17 +200,6 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; - 75C71C6D25E45A980084187E /* Embed Watch Content */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; - dstSubfolderSpec = 16; - files = ( - 75C71C4F25E45A960084187E /* DemoSwiftwatchOS WatchKit App.app in Embed Watch Content */, - ); - name = "Embed Watch Content"; - runOnlyForDeploymentPostprocessing = 0; - }; 75C71C7025E45A980084187E /* Embed App Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -256,7 +237,6 @@ 6EDBCDF522710E87009DF724 /* CustomLogger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomLogger.swift; sourceTree = ""; }; 6EF2CF1C21E4158A00A5D78D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/tvOSMain.storyboard; sourceTree = ""; }; 6EFA31F4227BB60E006FA572 /* SamplesForAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplesForAPI.swift; sourceTree = ""; }; - 75C71C4B25E45A960084187E /* DemoSwiftwatchOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoSwiftwatchOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; 75C71C4E25E45A960084187E /* DemoSwiftwatchOS WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DemoSwiftwatchOS WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 75C71C5425E45A960084187E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; 75C71C5625E45A980084187E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -312,13 +292,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - B1AA88D022E3CDE16DB004F3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -460,7 +433,6 @@ children = ( 252D7DED21C8800800134A7A /* DemoSwiftiOS.app */, 252D7E1121C8804E00134A7A /* DemoSwifttvOS.app */, - 75C71C4B25E45A960084187E /* DemoSwiftwatchOS.app */, 75C71C4E25E45A960084187E /* DemoSwiftwatchOS WatchKit App.app */, 75C71C5D25E45A980084187E /* DemoSwiftwatchOS WatchKit Extension.appex */, ); @@ -531,24 +503,6 @@ productReference = 252D7E1121C8804E00134A7A /* DemoSwifttvOS.app */; productType = "com.apple.product-type.application"; }; - 75C71C4A25E45A960084187E /* DemoSwiftwatchOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 75C71C8425E45A980084187E /* Build configuration list for PBXNativeTarget "DemoSwiftwatchOS" */; - buildPhases = ( - 75C71C4925E45A960084187E /* Resources */, - 75C71C6D25E45A980084187E /* Embed Watch Content */, - B1AA88D022E3CDE16DB004F3 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 75C71C5125E45A960084187E /* PBXTargetDependency */, - ); - name = DemoSwiftwatchOS; - productName = DemoSwiftwatchOS; - productReference = 75C71C4B25E45A960084187E /* DemoSwiftwatchOS.app */; - productType = "com.apple.product-type.application.watchapp2-container"; - }; 75C71C4D25E45A960084187E /* DemoSwiftwatchOS WatchKit App */ = { isa = PBXNativeTarget; buildConfigurationList = 75C71C8325E45A980084187E /* Build configuration list for PBXNativeTarget "DemoSwiftwatchOS WatchKit App" */; @@ -593,7 +547,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1230; - LastUpgradeCheck = 1200; + LastUpgradeCheck = 1230; ORGANIZATIONNAME = Optimizely; TargetAttributes = { 252D7DEC21C8800800134A7A = { @@ -614,11 +568,6 @@ }; }; }; - 75C71C4A25E45A960084187E = { - CreatedOnToolsVersion = 12.4; - DevelopmentTeam = ELT5AES94A; - ProvisioningStyle = Automatic; - }; 75C71C4D25E45A960084187E = { CreatedOnToolsVersion = 12.4; DevelopmentTeam = ELT5AES94A; @@ -652,7 +601,6 @@ targets = ( 252D7DEC21C8800800134A7A /* DemoSwiftiOS */, 252D7E1021C8804E00134A7A /* DemoSwifttvOS */, - 75C71C4A25E45A960084187E /* DemoSwiftwatchOS */, 75C71C4D25E45A960084187E /* DemoSwiftwatchOS WatchKit App */, 75C71C5C25E45A980084187E /* DemoSwiftwatchOS WatchKit Extension */, ); @@ -792,13 +740,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 75C71C4925E45A960084187E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 75C71C4C25E45A960084187E /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -944,11 +885,6 @@ name = "OptimizelySwiftSDK-tvOS"; targetProxy = 6E4D2FE522C5456700062EB3 /* PBXContainerItemProxy */; }; - 75C71C5125E45A960084187E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 75C71C4D25E45A960084187E /* DemoSwiftwatchOS WatchKit App */; - targetProxy = 75C71C5025E45A960084187E /* PBXContainerItemProxy */; - }; 75C71C6025E45A980084187E /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 75C71C5C25E45A980084187E /* DemoSwiftwatchOS WatchKit Extension */; @@ -995,7 +931,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; @@ -1025,7 +961,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; @@ -1050,7 +986,6 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; @@ -1079,7 +1014,6 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; @@ -1097,53 +1031,6 @@ }; name = Release; }; - 75C71C6B25E45A980084187E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ELT5AES94A; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.optimizely.DemoSwiftwatchOS; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - WATCHOS_DEPLOYMENT_TARGET = 6.0; - }; - name = Debug; - }; - 75C71C6C25E45A980084187E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ELT5AES94A; - GCC_C_LANGUAGE_STANDARD = gnu11; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.optimizely.DemoSwiftwatchOS; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - WATCHOS_DEPLOYMENT_TARGET = 6.0; - }; - name = Release; - }; 75C71C6E25E45A980084187E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1206,7 +1093,7 @@ 75C71C7125E45A980084187E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + ASSETCATALOG_COMPILER_COMPLICATION_NAME = ""; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; @@ -1236,7 +1123,7 @@ 75C71C7225E45A980084187E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + ASSETCATALOG_COMPILER_COMPLICATION_NAME = ""; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; @@ -1285,6 +1172,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -1354,6 +1242,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -1425,15 +1314,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 75C71C8425E45A980084187E /* Build configuration list for PBXNativeTarget "DemoSwiftwatchOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 75C71C6B25E45A980084187E /* Debug */, - 75C71C6C25E45A980084187E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; EA5246B81DC7186800AF6685 /* Build configuration list for PBXProject "DemoSwiftApp" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/DemoSwiftApp/DemoSwiftApp.xcodeproj/xcshareddata/xcschemes/DemoSwiftiOS.xcscheme b/DemoSwiftApp/DemoSwiftApp.xcodeproj/xcshareddata/xcschemes/DemoSwiftiOS.xcscheme index c59bd36fb..a8007f063 100644 --- a/DemoSwiftApp/DemoSwiftApp.xcodeproj/xcshareddata/xcschemes/DemoSwiftiOS.xcscheme +++ b/DemoSwiftApp/DemoSwiftApp.xcodeproj/xcshareddata/xcschemes/DemoSwiftiOS.xcscheme @@ -1,6 +1,6 @@ - - - - - - - - fetch - UILaunchStoryboardName - iOSMain UIMainStoryboardFile iOSMain UIRequiredDeviceCapabilities diff --git a/DemoSwiftApp/DemoSwiftwatchOS WatchKit Extension/ExtensionDelegate.swift b/DemoSwiftApp/DemoSwiftwatchOS WatchKit Extension/ExtensionDelegate.swift index 9c89acdd2..fd9b53c10 100644 --- a/DemoSwiftApp/DemoSwiftwatchOS WatchKit Extension/ExtensionDelegate.swift +++ b/DemoSwiftApp/DemoSwiftwatchOS WatchKit Extension/ExtensionDelegate.swift @@ -1,35 +1,50 @@ -/**************************************************************************** -* Copyright 2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import Optimizely import WatchKit class ExtensionDelegate: NSObject, WKExtensionDelegate { let logLevel = OptimizelyLogLevel.debug - let sdkKey = "FCnSegiEkRry9rhVMroit4" var optimizely: OptimizelyClient! + let sdkKey = "FCnSegiEkRry9rhVMroit4" + let featureKey = "decide_demo" + let eventKey = "sample_conversion" + let userId = String(Int.random(in: 0..<100000)) + let attributes: [String: Any] = ["location": "NY", + "bool_attr": false, + "semanticVersioning": "1.2"] + func applicationDidFinishLaunching() { optimizely = OptimizelyClient(sdkKey: sdkKey, defaultLogLevel: logLevel) + optimizely.start { result in switch result { case .failure(let error): print("Optimizely SDK initiliazation failed: \(error)") case .success: print("Optimizely SDK initialized successfully!") + + let user = self.optimizely.createUserContext(userId: self.userId, attributes: self.attributes) + let decision = user.decide(key: self.featureKey, options: [.includeReasons]) + print("[DECISION] \(decision)") + try? user.trackEvent(eventKey: self.eventKey) + @unknown default: + print("Optimizely SDK initiliazation failed with unknown result") } } } diff --git a/DemoSwiftApp/DemoSwiftwatchOS WatchKit Extension/InterfaceController.swift b/DemoSwiftApp/DemoSwiftwatchOS WatchKit Extension/InterfaceController.swift index 3a79e705b..0ab0de9bc 100644 --- a/DemoSwiftApp/DemoSwiftwatchOS WatchKit Extension/InterfaceController.swift +++ b/DemoSwiftApp/DemoSwiftwatchOS WatchKit Extension/InterfaceController.swift @@ -1,19 +1,18 @@ -/**************************************************************************** -* Copyright 2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import WatchKit import Foundation diff --git a/DemoSwiftApp/Samples/SamplesForAPI.swift b/DemoSwiftApp/Samples/SamplesForAPI.swift index c0fb8c2d0..747f89a9b 100644 --- a/DemoSwiftApp/Samples/SamplesForAPI.swift +++ b/DemoSwiftApp/Samples/SamplesForAPI.swift @@ -1,19 +1,18 @@ // -/**************************************************************************** - * Copyright 2019-2021, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation import Optimizely diff --git a/DemoSwiftApp/VariationViewController.swift b/DemoSwiftApp/VariationViewController.swift index 544bfa859..8d1e65c19 100644 --- a/DemoSwiftApp/VariationViewController.swift +++ b/DemoSwiftApp/VariationViewController.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import UIKit import Optimizely diff --git a/OptimizelySwiftSDK.xcodeproj/project.pbxproj b/OptimizelySwiftSDK.xcodeproj/project.pbxproj index f8232b77b..c0411cfd1 100644 --- a/OptimizelySwiftSDK.xcodeproj/project.pbxproj +++ b/OptimizelySwiftSDK.xcodeproj/project.pbxproj @@ -25,7 +25,6 @@ 0B97DDA5249D4A28003DE606 /* SemanticVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B97DD93249D327F003DE606 /* SemanticVersion.swift */; }; 0BAB9B0122567E34000DC388 /* (null) in Sources */ = {isa = PBXBuildFile; }; 3D8E460B7007B5B46630E046 /* libPods-OptimizelyTests-Common-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1BBBAD25A1207AF13647873E /* libPods-OptimizelyTests-Common-tvOS.a */; }; - 42C9F57F462DE308D5AAABA4 /* libPods-OptimizelyTests-Common-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1BBBAD25A1207AF13647873E /* libPods-OptimizelyTests-Common-tvOS.a */; }; 6E12B1CA22C55A250005E9E6 /* optimizely_6372300739_v4.json in Resources */ = {isa = PBXBuildFile; fileRef = 6E75196222C5211100B2B157 /* optimizely_6372300739_v4.json */; }; 6E12B1CB22C55A250005E9E6 /* feature_rollout_toggle_on.json in Resources */ = {isa = PBXBuildFile; fileRef = 6E75196722C5211100B2B157 /* feature_rollout_toggle_on.json */; }; 6E12B1CC22C55A250005E9E6 /* feature_rollout_toggle_off.json in Resources */ = {isa = PBXBuildFile; fileRef = 6E75196822C5211100B2B157 /* feature_rollout_toggle_off.json */; }; @@ -1947,7 +1946,6 @@ files = ( 6EA4250D2218E41600B074B5 /* Optimizely.framework in Frameworks */, 3D8E460B7007B5B46630E046 /* libPods-OptimizelyTests-Common-tvOS.a in Frameworks */, - 42C9F57F462DE308D5AAABA4 /* libPods-OptimizelyTests-Common-tvOS.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2815,7 +2813,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1230; - LastUpgradeCheck = 1200; + LastUpgradeCheck = 1230; ORGANIZATIONNAME = Optimizely; TargetAttributes = { 6E14CD622423F80B00010234 = { @@ -4815,6 +4813,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -4882,6 +4881,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; diff --git a/OptimizelySwiftSDK.xcodeproj/xcshareddata/xcschemes/OptimizelySwiftSDK-iOS.xcscheme b/OptimizelySwiftSDK.xcodeproj/xcshareddata/xcschemes/OptimizelySwiftSDK-iOS.xcscheme index bcf0c9e25..9ef2d3da7 100644 --- a/OptimizelySwiftSDK.xcodeproj/xcshareddata/xcschemes/OptimizelySwiftSDK-iOS.xcscheme +++ b/OptimizelySwiftSDK.xcodeproj/xcshareddata/xcschemes/OptimizelySwiftSDK-iOS.xcscheme @@ -1,6 +1,6 @@ FILEHEADER -/**************************************************************************** -* Copyright 2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// diff --git a/OptimizelyTests/OptimizelyTests.swift b/OptimizelyTests/OptimizelyTests.swift index c0dcb0e5a..bece3b62a 100644 --- a/OptimizelyTests/OptimizelyTests.swift +++ b/OptimizelyTests/OptimizelyTests.swift @@ -1,20 +1,18 @@ // -/**************************************************************************** -* Copyright 2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// Copyright 2020-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Podfile b/Podfile index f2ce14f9e..39e208729 100644 --- a/Podfile +++ b/Podfile @@ -66,6 +66,8 @@ post_install do |installer_representation| installer_representation.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['CLANG_ENABLE_CODE_COVERAGE'] = 'NO' + # fix OCMock old iOS8 target warning + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' end end end diff --git a/Podfile.lock b/Podfile.lock index b9b024704..c632a8b56 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,6 +1,6 @@ PODS: - OCMock (3.7.1) - - SwiftLint (0.42.0) + - SwiftLint (0.43.1) DEPENDENCIES: - OCMock (= 3.7.1) @@ -13,8 +13,8 @@ SPEC REPOS: SPEC CHECKSUMS: OCMock: 75fbeaa46a9b11f8c182bbb1d1f7e9a35ccc9955 - SwiftLint: 4fa9579c63416865179bc416f0a92d55f009600d + SwiftLint: 99f82d07b837b942dd563c668de129a03fc3fb52 -PODFILE CHECKSUM: 0195918f4c7b47425ae284153b642617e2ef6781 +PODFILE CHECKSUM: 8efc37b7d97fa9de16532d755b40b003d888b834 COCOAPODS: 1.9.3 diff --git a/Sources/Customization/DefaultDatafileHandler.swift b/Sources/Customization/DefaultDatafileHandler.swift index f47259e12..1477b6578 100644 --- a/Sources/Customization/DefaultDatafileHandler.swift +++ b/Sources/Customization/DefaultDatafileHandler.swift @@ -1,18 +1,19 @@ -/**************************************************************************** - * Copyright 2019-2021, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import Foundation open class DefaultDatafileHandler: OPTDatafileHandler { diff --git a/Sources/Customization/DefaultEventDispatcher.swift b/Sources/Customization/DefaultEventDispatcher.swift index ab7979c70..6b4d64199 100644 --- a/Sources/Customization/DefaultEventDispatcher.swift +++ b/Sources/Customization/DefaultEventDispatcher.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Customization/DefaultLogger.swift b/Sources/Customization/DefaultLogger.swift index cec179adc..f47835dc7 100644 --- a/Sources/Customization/DefaultLogger.swift +++ b/Sources/Customization/DefaultLogger.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation import os.log diff --git a/Sources/Customization/DefaultUserProfileService.swift b/Sources/Customization/DefaultUserProfileService.swift index 439dd7a79..dd1b38af8 100644 --- a/Sources/Customization/DefaultUserProfileService.swift +++ b/Sources/Customization/DefaultUserProfileService.swift @@ -1,21 +1,22 @@ -/**************************************************************************** -* Copyright 2019,2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 1991, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import Foundation -//{ +// { // 124170 = { // "experiment_bucket_map" = { // 11174010269 = { @@ -68,7 +69,7 @@ import Foundation // }; // "user_id" = 89086; // }; -//} +// } open class DefaultUserProfileService: OPTUserProfileService { public typealias UserProfileData = [String: UPProfile] diff --git a/Sources/Customization/Protocols/OPTDatafileHandler.swift b/Sources/Customization/Protocols/OPTDatafileHandler.swift index 72357fc19..92b4147a0 100644 --- a/Sources/Customization/Protocols/OPTDatafileHandler.swift +++ b/Sources/Customization/Protocols/OPTDatafileHandler.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Customization/Protocols/OPTEventDispatcher.swift b/Sources/Customization/Protocols/OPTEventDispatcher.swift index 93dd42259..7f20db596 100644 --- a/Sources/Customization/Protocols/OPTEventDispatcher.swift +++ b/Sources/Customization/Protocols/OPTEventDispatcher.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Customization/Protocols/OPTLogger.swift b/Sources/Customization/Protocols/OPTLogger.swift index cac8f2cf5..1e3282b48 100644 --- a/Sources/Customization/Protocols/OPTLogger.swift +++ b/Sources/Customization/Protocols/OPTLogger.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Customization/Protocols/OPTUserProfileService.swift b/Sources/Customization/Protocols/OPTUserProfileService.swift index 7ca623d75..158aed8a3 100644 --- a/Sources/Customization/Protocols/OPTUserProfileService.swift +++ b/Sources/Customization/Protocols/OPTUserProfileService.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Attribute.swift b/Sources/Data Model/Attribute.swift index c7b2d23cd..2ff6d1127 100644 --- a/Sources/Data Model/Attribute.swift +++ b/Sources/Data Model/Attribute.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Audience/AttributeValue.swift b/Sources/Data Model/Audience/AttributeValue.swift index 96b72be69..83f5aa5b7 100644 --- a/Sources/Data Model/Audience/AttributeValue.swift +++ b/Sources/Data Model/Audience/AttributeValue.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Audience/Audience.swift b/Sources/Data Model/Audience/Audience.swift index 521392891..6e4b3dcf0 100644 --- a/Sources/Data Model/Audience/Audience.swift +++ b/Sources/Data Model/Audience/Audience.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Audience/ConditionHolder.swift b/Sources/Data Model/Audience/ConditionHolder.swift index dbd04c60a..1d219b768 100644 --- a/Sources/Data Model/Audience/ConditionHolder.swift +++ b/Sources/Data Model/Audience/ConditionHolder.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Audience/ConditionLeaf.swift b/Sources/Data Model/Audience/ConditionLeaf.swift index abf16cfab..b51c57877 100644 --- a/Sources/Data Model/Audience/ConditionLeaf.swift +++ b/Sources/Data Model/Audience/ConditionLeaf.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Audience/SemanticVersion.swift b/Sources/Data Model/Audience/SemanticVersion.swift index bb12ca4d6..5459f3952 100644 --- a/Sources/Data Model/Audience/SemanticVersion.swift +++ b/Sources/Data Model/Audience/SemanticVersion.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2020-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation @@ -37,7 +37,7 @@ extension SemanticVersion { // even if they are equal at this point. if the target is a prerelease then it must be greater than the pre release. return targetedVersion.isPreRelease ? 1 : -1 } else if !versionParts[idx].isNumber { - //Compare strings + // Compare strings if versionParts[idx] < targetedVersionParts[idx] { return targetedVersion.isPreRelease && !self.isPreRelease ? 1 : -1 } else if versionParts[idx] > targetedVersionParts[idx] { diff --git a/Sources/Data Model/Audience/UserAttribute.swift b/Sources/Data Model/Audience/UserAttribute.swift index 7f0406613..bcf4c6427 100644 --- a/Sources/Data Model/Audience/UserAttribute.swift +++ b/Sources/Data Model/Audience/UserAttribute.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/DispatchEvents/BatchEvent.swift b/Sources/Data Model/DispatchEvents/BatchEvent.swift index ae7d91510..86a8a9fcd 100644 --- a/Sources/Data Model/DispatchEvents/BatchEvent.swift +++ b/Sources/Data Model/DispatchEvents/BatchEvent.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2019-2020, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation @@ -86,7 +86,6 @@ struct DecisionMetadata: Codable, Equatable { let variationKey: String let enabled: Bool - enum CodingKeys: String, CodingKey { case ruleType = "rule_type" case ruleKey = "rule_key" diff --git a/Sources/Data Model/DispatchEvents/EventForDispatch.swift b/Sources/Data Model/DispatchEvents/EventForDispatch.swift index 332ac67f5..1bb0e53eb 100644 --- a/Sources/Data Model/DispatchEvents/EventForDispatch.swift +++ b/Sources/Data Model/DispatchEvents/EventForDispatch.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Event.swift b/Sources/Data Model/Event.swift index 1185cda2d..5a566a655 100644 --- a/Sources/Data Model/Event.swift +++ b/Sources/Data Model/Event.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Experiment.swift b/Sources/Data Model/Experiment.swift index 6f7839ec5..99f1999c7 100644 --- a/Sources/Data Model/Experiment.swift +++ b/Sources/Data Model/Experiment.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/FeatureFlag.swift b/Sources/Data Model/FeatureFlag.swift index 1a0e82d9c..e3d02fd76 100644 --- a/Sources/Data Model/FeatureFlag.swift +++ b/Sources/Data Model/FeatureFlag.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/FeatureVariable.swift b/Sources/Data Model/FeatureVariable.swift index 0178d668b..dd4dcdb95 100644 --- a/Sources/Data Model/FeatureVariable.swift +++ b/Sources/Data Model/FeatureVariable.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Group.swift b/Sources/Data Model/Group.swift index e674304b1..d94e6b584 100644 --- a/Sources/Data Model/Group.swift +++ b/Sources/Data Model/Group.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Project.swift b/Sources/Data Model/Project.swift index c52a033e4..99a6efe21 100644 --- a/Sources/Data Model/Project.swift +++ b/Sources/Data Model/Project.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2019-2021, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation @@ -20,8 +20,8 @@ protocol ProjectProtocol { func evaluateAudience(audienceId: String, attributes: OptimizelyAttributes?) throws -> Bool } -//[REF]: datafile schema -// https://github.com/optimizely/optimizely/blob/43454b726a2a8aab7dcd953999cf8e1902b09d4d/src/www/services/datafile_generator/schema.json +// [REF]: datafile schema +// https://github.com/optimizely/optimizely/blob/43454b726a2a8aab7dcd953999cf8e1902b09d4d/src/www/services/datafile_generator/schema.json struct Project: Codable, Equatable { diff --git a/Sources/Data Model/ProjectConfig.swift b/Sources/Data Model/ProjectConfig.swift index f0fdf7e5e..ea3564f2d 100644 --- a/Sources/Data Model/ProjectConfig.swift +++ b/Sources/Data Model/ProjectConfig.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2019-2021, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Rollout.swift b/Sources/Data Model/Rollout.swift index 660f81eb8..089c67c72 100644 --- a/Sources/Data Model/Rollout.swift +++ b/Sources/Data Model/Rollout.swift @@ -1,19 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation struct Rollout: Codable, Equatable { diff --git a/Sources/Data Model/TrafficAllocation.swift b/Sources/Data Model/TrafficAllocation.swift index e352cec17..0e0c4333f 100644 --- a/Sources/Data Model/TrafficAllocation.swift +++ b/Sources/Data Model/TrafficAllocation.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Variable.swift b/Sources/Data Model/Variable.swift index 856137aca..7d6bcb749 100644 --- a/Sources/Data Model/Variable.swift +++ b/Sources/Data Model/Variable.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Data Model/Variation.swift b/Sources/Data Model/Variation.swift index e734fb0a7..a2d8c8281 100644 --- a/Sources/Data Model/Variation.swift +++ b/Sources/Data Model/Variation.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Extensions/Array+Extension.swift b/Sources/Extensions/Array+Extension.swift index 3662d794e..21e1ba905 100644 --- a/Sources/Extensions/Array+Extension.swift +++ b/Sources/Extensions/Array+Extension.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Extensions/ArrayEventForDispatch+Extension.swift b/Sources/Extensions/ArrayEventForDispatch+Extension.swift index e0eae70b3..5d8e5d28f 100644 --- a/Sources/Extensions/ArrayEventForDispatch+Extension.swift +++ b/Sources/Extensions/ArrayEventForDispatch+Extension.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Extensions/DataStoreQueueStackImpl+Extension.swift b/Sources/Extensions/DataStoreQueueStackImpl+Extension.swift index 2faa14af3..ed2b0d613 100644 --- a/Sources/Extensions/DataStoreQueueStackImpl+Extension.swift +++ b/Sources/Extensions/DataStoreQueueStackImpl+Extension.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Extensions/OptimizelyClient+Extension.swift b/Sources/Extensions/OptimizelyClient+Extension.swift index d861ad778..2541937c0 100644 --- a/Sources/Extensions/OptimizelyClient+Extension.swift +++ b/Sources/Extensions/OptimizelyClient+Extension.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation @@ -25,15 +25,15 @@ extension OptimizelyClient { notificationCenter: OPTNotificationCenter) { // bind it as a non-singleton. so, we will create an instance anytime injected. // we don't associate the logger with a sdkKey at this time because not all components are sdkKey specific. - var binder: Binder = Binder(service: OPTLogger.self, factory: type(of: logger).init) + let binder: Binder = Binder(service: OPTLogger.self, factory: type(of: logger).init) - //Register my logger service. + // Register my logger service. HandlerRegistryService.shared.registerBinding(binder: binder) // this is bound a reusable singleton. so, if we re-initalize, we will keep this. HandlerRegistryService.shared.registerBinding(binder: Binder(sdkKey: sdkKey, service: OPTNotificationCenter.self, strategy: .reUse, isSingleton: true, inst: notificationCenter)) // the decision service is also a singleton that will reCreate on re-initalize - HandlerRegistryService.shared.registerBinding(binder: Binder(sdkKey: sdkKey, service: OPTDecisionService.self, strategy: .reUse, isSingleton: true, inst: decisionService)) + HandlerRegistryService.shared.registerBinding(binder: Binder(sdkKey: sdkKey, service: OPTDecisionService.self, strategy: .reUse, isSingleton: true, inst: decisionService)) // An event dispatcher. We use a singleton and use the same Event dispatcher for all // projects. If you change the event dispatcher, you can potentially lose data if you diff --git a/Sources/Implementation/Datastore/DataStoreFile.swift b/Sources/Implementation/Datastore/DataStoreFile.swift index 0f55f9362..ca4a4c9b8 100644 --- a/Sources/Implementation/Datastore/DataStoreFile.swift +++ b/Sources/Implementation/Datastore/DataStoreFile.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Implementation/Datastore/DataStoreMemory.swift b/Sources/Implementation/Datastore/DataStoreMemory.swift index 1d3fcfe64..e8e995a08 100644 --- a/Sources/Implementation/Datastore/DataStoreMemory.swift +++ b/Sources/Implementation/Datastore/DataStoreMemory.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Implementation/Datastore/DataStoreQueueStackImpl.swift b/Sources/Implementation/Datastore/DataStoreQueueStackImpl.swift index 909fda4c0..54e0ee0e1 100644 --- a/Sources/Implementation/Datastore/DataStoreQueueStackImpl.swift +++ b/Sources/Implementation/Datastore/DataStoreQueueStackImpl.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Implementation/Datastore/DataStoreUserDefaults.swift b/Sources/Implementation/Datastore/DataStoreUserDefaults.swift index 7ae47ad2f..f7d054c46 100644 --- a/Sources/Implementation/Datastore/DataStoreUserDefaults.swift +++ b/Sources/Implementation/Datastore/DataStoreUserDefaults.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Implementation/DecisionInfo.swift b/Sources/Implementation/DecisionInfo.swift index 29eb2d2b5..72c38c307 100644 --- a/Sources/Implementation/DecisionInfo.swift +++ b/Sources/Implementation/DecisionInfo.swift @@ -1,20 +1,19 @@ // -/**************************************************************************** -* Copyright 2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import Foundation struct DecisionInfo { diff --git a/Sources/Implementation/DecisionReasons.swift b/Sources/Implementation/DecisionReasons.swift index ddafd418f..03a3c6750 100644 --- a/Sources/Implementation/DecisionReasons.swift +++ b/Sources/Implementation/DecisionReasons.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Implementation/DecisionResponse.swift b/Sources/Implementation/DecisionResponse.swift index 8cc03863a..71fa7dc83 100644 --- a/Sources/Implementation/DecisionResponse.swift +++ b/Sources/Implementation/DecisionResponse.swift @@ -1,18 +1,18 @@ -/*************************************************************************** -* Copyright 2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Implementation/DefaultBucketer.swift b/Sources/Implementation/DefaultBucketer.swift index 2b17332d7..2f36bde87 100644 --- a/Sources/Implementation/DefaultBucketer.swift +++ b/Sources/Implementation/DefaultBucketer.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2019-2021, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Implementation/DefaultDecisionService.swift b/Sources/Implementation/DefaultDecisionService.swift index 0e595672c..39b7c047b 100644 --- a/Sources/Implementation/DefaultDecisionService.swift +++ b/Sources/Implementation/DefaultDecisionService.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2019-2021, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation @@ -190,9 +190,9 @@ class DefaultDecisionService: OPTDecisionService { options: [OptimizelyDecideOption]? = nil) -> DecisionResponse { let reasons = DecisionReasons(options: options) - //Evaluate in this order: + // Evaluate in this order: - //1. Attempt to bucket user into experiment using feature flag. + // 1. Attempt to bucket user into experiment using feature flag. // Check if the feature flag is under an experiment and the the user is bucketed into one of these experiments var decisionResponse = getVariationForFeatureExperiment(config: config, featureFlag: featureFlag, @@ -204,7 +204,7 @@ class DefaultDecisionService: OPTDecisionService { return DecisionResponse(result: decision, reasons: reasons) } - //2. Attempt to bucket user into rollout using the feature flag. + // 2. Attempt to bucket user into rollout using the feature flag. // Check if the feature flag has rollout and the user is bucketed into one of it's rules decisionResponse = getVariationForFeatureRollout(config: config, featureFlag: featureFlag, diff --git a/Sources/Implementation/DefaultNotificationCenter.swift b/Sources/Implementation/DefaultNotificationCenter.swift index f6952c7dd..9ec0292e5 100644 --- a/Sources/Implementation/DefaultNotificationCenter.swift +++ b/Sources/Implementation/DefaultNotificationCenter.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Implementation/Events/BatchEventBuilder.swift b/Sources/Implementation/Events/BatchEventBuilder.swift index 2c49fae13..6a95d39af 100644 --- a/Sources/Implementation/Events/BatchEventBuilder.swift +++ b/Sources/Implementation/Events/BatchEventBuilder.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2019-2021, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Optimizely+Decide/OptimizelyClient+Decide.swift b/Sources/Optimizely+Decide/OptimizelyClient+Decide.swift index e24aea222..6baed8567 100644 --- a/Sources/Optimizely+Decide/OptimizelyClient+Decide.swift +++ b/Sources/Optimizely+Decide/OptimizelyClient+Decide.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2021, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Optimizely+Decide/OptimizelyDecideOption.swift b/Sources/Optimizely+Decide/OptimizelyDecideOption.swift index 6bc9af1c9..763460a3e 100644 --- a/Sources/Optimizely+Decide/OptimizelyDecideOption.swift +++ b/Sources/Optimizely+Decide/OptimizelyDecideOption.swift @@ -1,19 +1,19 @@ -/**************************************************************************** -* Copyright 2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import Foundation /// Options controlling flag decisions. diff --git a/Sources/Optimizely+Decide/OptimizelyDecision.swift b/Sources/Optimizely+Decide/OptimizelyDecision.swift index 3474ec0e4..f848dd719 100644 --- a/Sources/Optimizely+Decide/OptimizelyDecision.swift +++ b/Sources/Optimizely+Decide/OptimizelyDecision.swift @@ -1,19 +1,19 @@ -/**************************************************************************** -* Copyright 2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import Foundation /// A decision struct that the SDK makes for a flag key and a user context. diff --git a/Sources/Optimizely+Decide/OptimizelyUserContext+ObjC.swift b/Sources/Optimizely+Decide/OptimizelyUserContext+ObjC.swift index 3165e2b0a..fa2a79b58 100644 --- a/Sources/Optimizely+Decide/OptimizelyUserContext+ObjC.swift +++ b/Sources/Optimizely+Decide/OptimizelyUserContext+ObjC.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation @@ -25,7 +25,7 @@ import Foundation } public var attributes: [String: Any] { - return userContext.attributes as [String : Any] + return userContext.attributes as [String: Any] } public var optimizely: OptimizelyClient? { diff --git a/Sources/Optimizely+Decide/OptimizelyUserContext.swift b/Sources/Optimizely+Decide/OptimizelyUserContext.swift index f74f11090..fe12b21cf 100644 --- a/Sources/Optimizely+Decide/OptimizelyUserContext.swift +++ b/Sources/Optimizely+Decide/OptimizelyUserContext.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Optimizely/OptimizelyClient+ObjC.swift b/Sources/Optimizely/OptimizelyClient+ObjC.swift index b8c83f817..54161ad5b 100644 --- a/Sources/Optimizely/OptimizelyClient+ObjC.swift +++ b/Sources/Optimizely/OptimizelyClient+ObjC.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2019-2020, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Optimizely/OptimizelyClient.swift b/Sources/Optimizely/OptimizelyClient.swift index 76c589684..eb6431e54 100644 --- a/Sources/Optimizely/OptimizelyClient.swift +++ b/Sources/Optimizely/OptimizelyClient.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2019-2021, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Optimizely/OptimizelyConfig+ObjC.swift b/Sources/Optimizely/OptimizelyConfig+ObjC.swift index 4e2b34bae..3fef9119c 100644 --- a/Sources/Optimizely/OptimizelyConfig+ObjC.swift +++ b/Sources/Optimizely/OptimizelyConfig+ObjC.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2020, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2020-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Optimizely/OptimizelyConfig.swift b/Sources/Optimizely/OptimizelyConfig.swift index c594c931c..d58ad103c 100644 --- a/Sources/Optimizely/OptimizelyConfig.swift +++ b/Sources/Optimizely/OptimizelyConfig.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2020, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2020-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Optimizely/OptimizelyError.swift b/Sources/Optimizely/OptimizelyError.swift index e335567e5..0972d5203 100644 --- a/Sources/Optimizely/OptimizelyError.swift +++ b/Sources/Optimizely/OptimizelyError.swift @@ -1,18 +1,19 @@ -/**************************************************************************** -* Copyright 2019-2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import Foundation public enum OptimizelyError: Error { diff --git a/Sources/Optimizely/OptimizelyJSON+ObjC.swift b/Sources/Optimizely/OptimizelyJSON+ObjC.swift index b2d93cebf..6a6954bef 100644 --- a/Sources/Optimizely/OptimizelyJSON+ObjC.swift +++ b/Sources/Optimizely/OptimizelyJSON+ObjC.swift @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * * limitations under the License. * ***************************************************************************/ - import Foundation extension OptimizelyJSON { @@ -30,9 +29,9 @@ extension OptimizelyJSON { self.init(map: m) } + /// - Returns: true when one or more variables are included. @available(swift, obsoleted: 1.0) @objc(isEmpty) - /// - Returns: true when one or more variables are included. public func objcIsEmpty() -> Bool { return self.isEmpty } diff --git a/Sources/Optimizely/OptimizelyLogLevel.swift b/Sources/Optimizely/OptimizelyLogLevel.swift index 43716ccf8..e5d5f7562 100644 --- a/Sources/Optimizely/OptimizelyLogLevel.swift +++ b/Sources/Optimizely/OptimizelyLogLevel.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Optimizely/OptimizelyResult.swift b/Sources/Optimizely/OptimizelyResult.swift index d4da9031a..399ce0625 100644 --- a/Sources/Optimizely/OptimizelyResult.swift +++ b/Sources/Optimizely/OptimizelyResult.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Protocols/BackgroundingCallbacks.swift b/Sources/Protocols/BackgroundingCallbacks.swift index bf6110e25..fdfbb4550 100644 --- a/Sources/Protocols/BackgroundingCallbacks.swift +++ b/Sources/Protocols/BackgroundingCallbacks.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation #if os(macOS) diff --git a/Sources/Protocols/DataStoreQueueStack.swift b/Sources/Protocols/DataStoreQueueStack.swift index e22e77dab..e0ad04f48 100644 --- a/Sources/Protocols/DataStoreQueueStack.swift +++ b/Sources/Protocols/DataStoreQueueStack.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Protocols/OPTBucketer.swift b/Sources/Protocols/OPTBucketer.swift index 73707982d..0f9440ec8 100644 --- a/Sources/Protocols/OPTBucketer.swift +++ b/Sources/Protocols/OPTBucketer.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Protocols/OPTDataStore.swift b/Sources/Protocols/OPTDataStore.swift index 7b6b0f1f8..eb502bb64 100644 --- a/Sources/Protocols/OPTDataStore.swift +++ b/Sources/Protocols/OPTDataStore.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019,2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Protocols/OPTDecisionService.swift b/Sources/Protocols/OPTDecisionService.swift index dc2273be3..5219ccd85 100644 --- a/Sources/Protocols/OPTDecisionService.swift +++ b/Sources/Protocols/OPTDecisionService.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Protocols/OPTNotificationCenter.swift b/Sources/Protocols/OPTNotificationCenter.swift index 0fb5e3ad5..c5639eafa 100644 --- a/Sources/Protocols/OPTNotificationCenter.swift +++ b/Sources/Protocols/OPTNotificationCenter.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2019, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Supporting Files/Optimizely.h b/Sources/Supporting Files/Optimizely.h index 5ea687b51..82add6de4 100644 --- a/Sources/Supporting Files/Optimizely.h +++ b/Sources/Supporting Files/Optimizely.h @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// @import Foundation; diff --git a/Sources/Utils/AtomicProperty.swift b/Sources/Utils/AtomicProperty.swift index d5a6a981a..3cdc93c0e 100644 --- a/Sources/Utils/AtomicProperty.swift +++ b/Sources/Utils/AtomicProperty.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Utils/Constants.swift b/Sources/Utils/Constants.swift index fd3ec8ba0..04ccb1fad 100644 --- a/Sources/Utils/Constants.swift +++ b/Sources/Utils/Constants.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Utils/HandlerRegistryService.swift b/Sources/Utils/HandlerRegistryService.swift index f16aabe70..6356f8ddf 100644 --- a/Sources/Utils/HandlerRegistryService.swift +++ b/Sources/Utils/HandlerRegistryService.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation @@ -52,7 +52,7 @@ class HandlerRegistryService { let binderToUse = binders.property?[skLocal] ?? binders.property?[skGlobal] - func updateBinder(b : BinderProtocol) { + func updateBinder(b: BinderProtocol) { if binders.property?[skLocal] != nil { binders.property?[skLocal] = b } else { @@ -106,7 +106,7 @@ protocol BinderProtocol { var service: Any { get } var isSingleton: Bool { get } var factory:()->Any? { get } - //var configure:(_ inst:Any?)->Any? { get } + // var configure:(_ inst:Any?)->Any? { get } var instance: Any? { get set } } @@ -115,7 +115,7 @@ struct Binder: BinderProtocol { var service: Any var strategy: ReInitializeStrategy = .reCreate var factory: (() -> Any?) = { ()->Any? in { return nil as Any? }} - //var configure: ((Any?) -> Any?) = { (_)->Any? in { return nil as Any? }} + // var configure: ((Any?) -> Any?) = { (_)->Any? in { return nil as Any? }} var isSingleton = false var inst: T? diff --git a/Sources/Utils/LogMessage.swift b/Sources/Utils/LogMessage.swift index e88e8dc84..b6611580f 100644 --- a/Sources/Utils/LogMessage.swift +++ b/Sources/Utils/LogMessage.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2019-2021, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Utils/MurmurHash3.swift b/Sources/Utils/MurmurHash3.swift index 6bbd22b93..0434d18d8 100644 --- a/Sources/Utils/MurmurHash3.swift +++ b/Sources/Utils/MurmurHash3.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation // Modified version of this github implementation: diff --git a/Sources/Utils/Notifications.swift b/Sources/Utils/Notifications.swift index c788ed013..899cde9b2 100644 --- a/Sources/Utils/Notifications.swift +++ b/Sources/Utils/Notifications.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/Utils/SDKVersion.swift b/Sources/Utils/SDKVersion.swift index 4a5e22e94..7a095ecf2 100644 --- a/Sources/Utils/SDKVersion.swift +++ b/Sources/Utils/SDKVersion.swift @@ -1,20 +1,19 @@ // -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + /// Do not edit this field. /// - It is auto updated (Scripts/updated_version.sh) to reflect the current version /// - Do not put underscores in the name (Swiftlint can modify unexpectedly) diff --git a/Sources/Utils/Utils.swift b/Sources/Utils/Utils.swift index 1165ff2ac..fc2854290 100644 --- a/Sources/Utils/Utils.swift +++ b/Sources/Utils/Utils.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Sources/watchOS/WatchBackgroundNotifier.swift b/Sources/watchOS/WatchBackgroundNotifier.swift index 2ce3e2033..2e4e38d0e 100644 --- a/Sources/watchOS/WatchBackgroundNotifier.swift +++ b/Sources/watchOS/WatchBackgroundNotifier.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #if os(watchOS) import Foundation diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests.swift b/Tests/OptimizelyTests-APIs/OptimizelyClientTests.swift index 758bab947..de58250be 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests.swift +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_DatafileHandler.swift b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_DatafileHandler.swift index 934e1a817..ea88f796e 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_DatafileHandler.swift +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_DatafileHandler.swift @@ -1,20 +1,18 @@ // -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Decide.swift b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Decide.swift index 26d607040..c29a6c0d7 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Decide.swift +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Decide.swift @@ -1,19 +1,19 @@ -/**************************************************************************** -* Copyright 2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// +// Copyright 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import XCTest class OptimizelyClientTests_Decide: XCTestCase { diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Evaluation.swift b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Evaluation.swift index 6f30a52e8..8a934ba6b 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Evaluation.swift +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Evaluation.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ForcedVariation.swift b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ForcedVariation.swift index 9065f40dc..8bcd0cd4b 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ForcedVariation.swift +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ForcedVariation.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Group.swift b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Group.swift index 7f6b0a86c..f0b5ce12d 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Group.swift +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Group.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation import XCTest diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Invalid.swift b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Invalid.swift index 9984211db..c123dbecd 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Invalid.swift +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Invalid.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ObjcAPIs.m b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ObjcAPIs.m index 231a43051..050a1de34 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ObjcAPIs.m +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ObjcAPIs.m @@ -1,19 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import @import Optimizely; diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ObjcOthers.m b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ObjcOthers.m index a9561753b..74aa5453e 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ObjcOthers.m +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_ObjcOthers.m @@ -1,19 +1,18 @@ -/**************************************************************************** - * Copyright 2019, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ - +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import @import Optimizely; diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyConfig.swift b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyConfig.swift index 68140cf86..88bd8b166 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyConfig.swift +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyConfig.swift @@ -1,19 +1,18 @@ -/**************************************************************************** -* Copyright 2019,2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyConfig_Objc.m b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyConfig_Objc.m index 480e48a99..66d6b4088 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyConfig_Objc.m +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyConfig_Objc.m @@ -1,20 +1,18 @@ // -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import @import Optimizely; diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyJSON_Objc.m b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyJSON_Objc.m index 6b32043ac..cc1ce189c 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyJSON_Objc.m +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_OptimizelyJSON_Objc.m @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2020-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #import @import Optimizely; diff --git a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Others.swift b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Others.swift index 45f6b4ff2..40951a934 100644 --- a/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Others.swift +++ b/Tests/OptimizelyTests-APIs/OptimizelyClientTests_Others.swift @@ -1,19 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest @@ -400,18 +399,20 @@ class OptimizelyClientTests_Others: XCTestCase { func testGettingLoggerAfterMultiInit() { let exp = expectation(description: "a") - - var optimizely = OptimizelyClient(sdkKey: "a") - for i in 0..<1000 { - DispatchQueue.global().async { - if i == 10 { - optimizely = OptimizelyClient(sdkKey: "b") - } - for k in 0..<10 { - let logger = OPTLoggerFactory.getLogger() - logger.log(level: .info, message: "[LOGGER] [\(i)] \(k)") - } - if i == 999 { + + _ = OptimizelyClient(sdkKey: "a") + + let maxNum = 100 + for i in 0.. #import diff --git a/Tests/OptimizelyTests-DataModel/AttributeTests.swift b/Tests/OptimizelyTests-DataModel/AttributeTests.swift index edbb22cb2..cca07a960 100644 --- a/Tests/OptimizelyTests-DataModel/AttributeTests.swift +++ b/Tests/OptimizelyTests-DataModel/AttributeTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/AttributeValueTests.swift b/Tests/OptimizelyTests-DataModel/AttributeValueTests.swift index bbf1cdc5c..0df8c4ce3 100644 --- a/Tests/OptimizelyTests-DataModel/AttributeValueTests.swift +++ b/Tests/OptimizelyTests-DataModel/AttributeValueTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/AttributeValueTests_Evaluate.swift b/Tests/OptimizelyTests-DataModel/AttributeValueTests_Evaluate.swift index 0973d04ce..b3c242513 100644 --- a/Tests/OptimizelyTests-DataModel/AttributeValueTests_Evaluate.swift +++ b/Tests/OptimizelyTests-DataModel/AttributeValueTests_Evaluate.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/AudienceTests.swift b/Tests/OptimizelyTests-DataModel/AudienceTests.swift index bee22b839..cb8e13659 100644 --- a/Tests/OptimizelyTests-DataModel/AudienceTests.swift +++ b/Tests/OptimizelyTests-DataModel/AudienceTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/AudienceTests_Evaluate.swift b/Tests/OptimizelyTests-DataModel/AudienceTests_Evaluate.swift index ec9f8ecb4..53223f33e 100644 --- a/Tests/OptimizelyTests-DataModel/AudienceTests_Evaluate.swift +++ b/Tests/OptimizelyTests-DataModel/AudienceTests_Evaluate.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/ConditionHolderTests.swift b/Tests/OptimizelyTests-DataModel/ConditionHolderTests.swift index 67d6be8f3..a0a6c9889 100644 --- a/Tests/OptimizelyTests-DataModel/ConditionHolderTests.swift +++ b/Tests/OptimizelyTests-DataModel/ConditionHolderTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/ConditionHolderTests_Evaluate.swift b/Tests/OptimizelyTests-DataModel/ConditionHolderTests_Evaluate.swift index 5dfa547c1..5d3a495c0 100644 --- a/Tests/OptimizelyTests-DataModel/ConditionHolderTests_Evaluate.swift +++ b/Tests/OptimizelyTests-DataModel/ConditionHolderTests_Evaluate.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/ConditionLeafTests.swift b/Tests/OptimizelyTests-DataModel/ConditionLeafTests.swift index 677881d5b..8d67b63f5 100644 --- a/Tests/OptimizelyTests-DataModel/ConditionLeafTests.swift +++ b/Tests/OptimizelyTests-DataModel/ConditionLeafTests.swift @@ -1,19 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/EventForDispatchTests.swift b/Tests/OptimizelyTests-DataModel/EventForDispatchTests.swift index 610151213..4f1ba3edd 100644 --- a/Tests/OptimizelyTests-DataModel/EventForDispatchTests.swift +++ b/Tests/OptimizelyTests-DataModel/EventForDispatchTests.swift @@ -1,20 +1,18 @@ // -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/EventTests.swift b/Tests/OptimizelyTests-DataModel/EventTests.swift index 32a4e7bf2..362834fce 100644 --- a/Tests/OptimizelyTests-DataModel/EventTests.swift +++ b/Tests/OptimizelyTests-DataModel/EventTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/ExperimentTests.swift b/Tests/OptimizelyTests-DataModel/ExperimentTests.swift index 40208df41..09ca91439 100644 --- a/Tests/OptimizelyTests-DataModel/ExperimentTests.swift +++ b/Tests/OptimizelyTests-DataModel/ExperimentTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/FeatureFlagTests.swift b/Tests/OptimizelyTests-DataModel/FeatureFlagTests.swift index 9d7677dfe..c5ba51eac 100644 --- a/Tests/OptimizelyTests-DataModel/FeatureFlagTests.swift +++ b/Tests/OptimizelyTests-DataModel/FeatureFlagTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/FeatureVariableTests.swift b/Tests/OptimizelyTests-DataModel/FeatureVariableTests.swift index ab2ae19cb..4614f8d4b 100644 --- a/Tests/OptimizelyTests-DataModel/FeatureVariableTests.swift +++ b/Tests/OptimizelyTests-DataModel/FeatureVariableTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/GroupTests.swift b/Tests/OptimizelyTests-DataModel/GroupTests.swift index cd9fc4504..3015a68f3 100644 --- a/Tests/OptimizelyTests-DataModel/GroupTests.swift +++ b/Tests/OptimizelyTests-DataModel/GroupTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/ProjectConfigTests.swift b/Tests/OptimizelyTests-DataModel/ProjectConfigTests.swift index 3aff4aa89..974baa4c3 100644 --- a/Tests/OptimizelyTests-DataModel/ProjectConfigTests.swift +++ b/Tests/OptimizelyTests-DataModel/ProjectConfigTests.swift @@ -1,20 +1,18 @@ // -/**************************************************************************** -* Copyright 2019,2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/ProjectTests.swift b/Tests/OptimizelyTests-DataModel/ProjectTests.swift index 849606537..540f9f6ee 100644 --- a/Tests/OptimizelyTests-DataModel/ProjectTests.swift +++ b/Tests/OptimizelyTests-DataModel/ProjectTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** - * Copyright 2019-2020, Optimizely, Inc. and contributors * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/RolloutTests.swift b/Tests/OptimizelyTests-DataModel/RolloutTests.swift index 6efb12e83..0953b96ed 100644 --- a/Tests/OptimizelyTests-DataModel/RolloutTests.swift +++ b/Tests/OptimizelyTests-DataModel/RolloutTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/SemanticVersionTests.swift b/Tests/OptimizelyTests-DataModel/SemanticVersionTests.swift index 190143fa7..b8a74108f 100644 --- a/Tests/OptimizelyTests-DataModel/SemanticVersionTests.swift +++ b/Tests/OptimizelyTests-DataModel/SemanticVersionTests.swift @@ -1,20 +1,18 @@ // -/**************************************************************************** -* Copyright 2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// Copyright 2020-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/TrafficAllocationTests.swift b/Tests/OptimizelyTests-DataModel/TrafficAllocationTests.swift index d286ac09e..2d862ce7d 100644 --- a/Tests/OptimizelyTests-DataModel/TrafficAllocationTests.swift +++ b/Tests/OptimizelyTests-DataModel/TrafficAllocationTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/UserAttributeTests.swift b/Tests/OptimizelyTests-DataModel/UserAttributeTests.swift index 1d7063806..a7cd8e873 100644 --- a/Tests/OptimizelyTests-DataModel/UserAttributeTests.swift +++ b/Tests/OptimizelyTests-DataModel/UserAttributeTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/UserAttributeTests_Evaluate.swift b/Tests/OptimizelyTests-DataModel/UserAttributeTests_Evaluate.swift index 589578193..98c01713b 100644 --- a/Tests/OptimizelyTests-DataModel/UserAttributeTests_Evaluate.swift +++ b/Tests/OptimizelyTests-DataModel/UserAttributeTests_Evaluate.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019-2020, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019-2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/VariableTests.swift b/Tests/OptimizelyTests-DataModel/VariableTests.swift index aaad06d9b..e879ed172 100644 --- a/Tests/OptimizelyTests-DataModel/VariableTests.swift +++ b/Tests/OptimizelyTests-DataModel/VariableTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-DataModel/VariationTests.swift b/Tests/OptimizelyTests-DataModel/VariationTests.swift index 8137be1fc..349ba0b9d 100644 --- a/Tests/OptimizelyTests-DataModel/VariationTests.swift +++ b/Tests/OptimizelyTests-DataModel/VariationTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-Others/OtherTests.swift b/Tests/OptimizelyTests-Others/OtherTests.swift index 23f5fbde0..87756cfe1 100644 --- a/Tests/OptimizelyTests-Others/OtherTests.swift +++ b/Tests/OptimizelyTests-Others/OtherTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-Others/ThrowableConditionListTest.swift b/Tests/OptimizelyTests-Others/ThrowableConditionListTest.swift index 9522e6a15..b5dea2287 100644 --- a/Tests/OptimizelyTests-Others/ThrowableConditionListTest.swift +++ b/Tests/OptimizelyTests-Others/ThrowableConditionListTest.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-iOS/iOSOnlyTests.swift b/Tests/OptimizelyTests-iOS/iOSOnlyTests.swift index 6ee96bfd0..3f2cad86b 100644 --- a/Tests/OptimizelyTests-iOS/iOSOnlyTests.swift +++ b/Tests/OptimizelyTests-iOS/iOSOnlyTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/OptimizelyTests-tvOS/tvOSOnlyTests.swift b/Tests/OptimizelyTests-tvOS/tvOSOnlyTests.swift index 51421b0fb..499621a60 100644 --- a/Tests/OptimizelyTests-tvOS/tvOSOnlyTests.swift +++ b/Tests/OptimizelyTests-tvOS/tvOSOnlyTests.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import XCTest diff --git a/Tests/TestUtils/MockUrlSession.swift b/Tests/TestUtils/MockUrlSession.swift index 2fce35388..7cf6be178 100644 --- a/Tests/TestUtils/MockUrlSession.swift +++ b/Tests/TestUtils/MockUrlSession.swift @@ -1,20 +1,18 @@ // -/**************************************************************************** -* Copyright 2019, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ - +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation diff --git a/Tests/TestUtils/OTUtils.swift b/Tests/TestUtils/OTUtils.swift index 1ad958bb8..0ac029feb 100644 --- a/Tests/TestUtils/OTUtils.swift +++ b/Tests/TestUtils/OTUtils.swift @@ -1,18 +1,18 @@ -/**************************************************************************** -* Copyright 2019,2021, Optimizely, Inc. and contributors * -* * -* Licensed under the Apache License, Version 2.0 (the "License"); * -* you may not use this file except in compliance with the License. * -* You may obtain a copy of the License at * -* * -* http://www.apache.org/licenses/LICENSE-2.0 * -* * -* Unless required by applicable law or agreed to in writing, software * -* distributed under the License is distributed on an "AS IS" BASIS, * -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * -* See the License for the specific language governing permissions and * -* limitations under the License. * -***************************************************************************/ +// +// Copyright 2019, 2021, Optimizely, Inc. and contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// import Foundation import XCTest