diff --git a/Cartfile.resolved b/Cartfile.resolved
index 957d062..084b18a 100644
--- a/Cartfile.resolved
+++ b/Cartfile.resolved
@@ -1 +1 @@
-github "realm/realm-cocoa" "v0.99.0"
+github "realm/realm-cocoa" "v1.1.0"
diff --git a/Example/.gitignore b/Example/.gitignore
deleted file mode 100644
index 863516f..0000000
--- a/Example/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Carthage/Build
-Carthage/Checkouts
diff --git a/Example/Cartfile b/Example/Cartfile
deleted file mode 100644
index d056ead..0000000
--- a/Example/Cartfile
+++ /dev/null
@@ -1 +0,0 @@
-github "SnapKit/SnapKit"
diff --git a/Example/Cartfile.resolved b/Example/Cartfile.resolved
deleted file mode 100644
index 4638240..0000000
--- a/Example/Cartfile.resolved
+++ /dev/null
@@ -1 +0,0 @@
-github "SnapKit/SnapKit" "0.20.0"
diff --git a/Example/Example.xcodeproj/Example.xcworkspace/contents.xcworkspacedata b/Example/Example.xcodeproj/Example.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 376f1e8..0000000
--- a/Example/Example.xcodeproj/Example.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj
deleted file mode 100644
index 17f0dcb..0000000
--- a/Example/Example.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,396 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- BF5FF3061CCC939E000361CC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5FF3051CCC939E000361CC /* AppDelegate.swift */; };
- BF5FF3081CCC939E000361CC /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5FF3071CCC939E000361CC /* ViewController.swift */; };
- BF5FF30D1CCC939E000361CC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BF5FF30C1CCC939E000361CC /* Assets.xcassets */; };
- BF5FF3101CCC939E000361CC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BF5FF30E1CCC939E000361CC /* LaunchScreen.storyboard */; };
- BF5FF3301CCC96D4000361CC /* TreasureDataSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF5FF32B1CCC96C5000361CC /* TreasureDataSDK.framework */; };
- BF6832E01CCCEF4C00809904 /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF6832DF1CCCEF4C00809904 /* SnapKit.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- BF5FF32A1CCC96C5000361CC /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = BF5FF3251CCC96C5000361CC /* TreasureDataSDK.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = BF6538331CABC4C5002CFF55;
- remoteInfo = TreasureDataSDK;
- };
- BF5FF32C1CCC96C5000361CC /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = BF5FF3251CCC96C5000361CC /* TreasureDataSDK.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = BF65383D1CABC4C6002CFF55;
- remoteInfo = TreasureDataSDKTests;
- };
- BF5FF32E1CCC96CF000361CC /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = BF5FF3251CCC96C5000361CC /* TreasureDataSDK.xcodeproj */;
- proxyType = 1;
- remoteGlobalIDString = BF6538321CABC4C5002CFF55;
- remoteInfo = TreasureDataSDK;
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXFileReference section */
- BF5FF3021CCC939E000361CC /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
- BF5FF3051CCC939E000361CC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
- BF5FF3071CCC939E000361CC /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
- BF5FF30C1CCC939E000361CC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
- BF5FF30F1CCC939E000361CC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
- BF5FF3111CCC939E000361CC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- BF5FF3251CCC96C5000361CC /* TreasureDataSDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TreasureDataSDK.xcodeproj; path = ../TreasureDataSDK.xcodeproj; sourceTree = ""; };
- BF5FF3311CCC975D000361CC /* Realm.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Realm.framework; path = ../Carthage/Build/iOS/Realm.framework; sourceTree = ""; };
- BF5FF3321CCC975D000361CC /* RealmSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RealmSwift.framework; path = ../Carthage/Build/iOS/RealmSwift.framework; sourceTree = ""; };
- BF6832DF1CCCEF4C00809904 /* SnapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SnapKit.framework; path = Carthage/Build/iOS/SnapKit.framework; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- BF5FF2FF1CCC939E000361CC /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BF5FF3301CCC96D4000361CC /* TreasureDataSDK.framework in Frameworks */,
- BF6832E01CCCEF4C00809904 /* SnapKit.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- BF5FF2F91CCC939E000361CC = {
- isa = PBXGroup;
- children = (
- BF5FF3351CCC9763000361CC /* Frameworks */,
- BF5FF3251CCC96C5000361CC /* TreasureDataSDK.xcodeproj */,
- BF5FF3041CCC939E000361CC /* Example */,
- BF5FF3031CCC939E000361CC /* Products */,
- );
- sourceTree = "";
- };
- BF5FF3031CCC939E000361CC /* Products */ = {
- isa = PBXGroup;
- children = (
- BF5FF3021CCC939E000361CC /* Example.app */,
- );
- name = Products;
- sourceTree = "";
- };
- BF5FF3041CCC939E000361CC /* Example */ = {
- isa = PBXGroup;
- children = (
- BF5FF3051CCC939E000361CC /* AppDelegate.swift */,
- BF5FF3071CCC939E000361CC /* ViewController.swift */,
- BF5FF30C1CCC939E000361CC /* Assets.xcassets */,
- BF5FF30E1CCC939E000361CC /* LaunchScreen.storyboard */,
- BF5FF3111CCC939E000361CC /* Info.plist */,
- );
- path = Example;
- sourceTree = "";
- };
- BF5FF3261CCC96C5000361CC /* Products */ = {
- isa = PBXGroup;
- children = (
- BF5FF32B1CCC96C5000361CC /* TreasureDataSDK.framework */,
- BF5FF32D1CCC96C5000361CC /* TreasureDataSDKTests.xctest */,
- );
- name = Products;
- sourceTree = "";
- };
- BF5FF3351CCC9763000361CC /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- BF6832DF1CCCEF4C00809904 /* SnapKit.framework */,
- BF5FF3311CCC975D000361CC /* Realm.framework */,
- BF5FF3321CCC975D000361CC /* RealmSwift.framework */,
- );
- name = Frameworks;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- BF5FF3011CCC939E000361CC /* Example */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = BF5FF3141CCC939E000361CC /* Build configuration list for PBXNativeTarget "Example" */;
- buildPhases = (
- BF5FF2FE1CCC939E000361CC /* Sources */,
- BF5FF2FF1CCC939E000361CC /* Frameworks */,
- BF5FF3001CCC939E000361CC /* Resources */,
- BF6832E21CCCEF6800809904 /* Run Carthage Script */,
- );
- buildRules = (
- );
- dependencies = (
- BF5FF32F1CCC96CF000361CC /* PBXTargetDependency */,
- );
- name = Example;
- productName = Example;
- productReference = BF5FF3021CCC939E000361CC /* Example.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- BF5FF2FA1CCC939E000361CC /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastSwiftUpdateCheck = 0730;
- LastUpgradeCheck = 0730;
- ORGANIZATIONNAME = "Recruit Lifestyle Co., Ltd.";
- TargetAttributes = {
- BF5FF3011CCC939E000361CC = {
- CreatedOnToolsVersion = 7.3;
- };
- };
- };
- buildConfigurationList = BF5FF2FD1CCC939E000361CC /* Build configuration list for PBXProject "Example" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = BF5FF2F91CCC939E000361CC;
- productRefGroup = BF5FF3031CCC939E000361CC /* Products */;
- projectDirPath = "";
- projectReferences = (
- {
- ProductGroup = BF5FF3261CCC96C5000361CC /* Products */;
- ProjectRef = BF5FF3251CCC96C5000361CC /* TreasureDataSDK.xcodeproj */;
- },
- );
- projectRoot = "";
- targets = (
- BF5FF3011CCC939E000361CC /* Example */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXReferenceProxy section */
- BF5FF32B1CCC96C5000361CC /* TreasureDataSDK.framework */ = {
- isa = PBXReferenceProxy;
- fileType = wrapper.framework;
- path = TreasureDataSDK.framework;
- remoteRef = BF5FF32A1CCC96C5000361CC /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- BF5FF32D1CCC96C5000361CC /* TreasureDataSDKTests.xctest */ = {
- isa = PBXReferenceProxy;
- fileType = wrapper.cfbundle;
- path = TreasureDataSDKTests.xctest;
- remoteRef = BF5FF32C1CCC96C5000361CC /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
-/* End PBXReferenceProxy section */
-
-/* Begin PBXResourcesBuildPhase section */
- BF5FF3001CCC939E000361CC /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BF5FF3101CCC939E000361CC /* LaunchScreen.storyboard in Resources */,
- BF5FF30D1CCC939E000361CC /* Assets.xcassets in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- BF6832E21CCCEF6800809904 /* Run Carthage Script */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- "$(SRCROOT)/Carthage/Build/iOS/SnapKit.framework",
- );
- name = "Run Carthage Script";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/bash;
- shellScript = "/usr/local/bin/carthage copy-frameworks";
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- BF5FF2FE1CCC939E000361CC /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BF5FF3081CCC939E000361CC /* ViewController.swift in Sources */,
- BF5FF3061CCC939E000361CC /* AppDelegate.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- BF5FF32F1CCC96CF000361CC /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- name = TreasureDataSDK;
- targetProxy = BF5FF32E1CCC96CF000361CC /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin PBXVariantGroup section */
- BF5FF30E1CCC939E000361CC /* LaunchScreen.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- BF5FF30F1CCC939E000361CC /* Base */,
- );
- name = LaunchScreen.storyboard;
- sourceTree = "";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- BF5FF3121CCC939E000361CC /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- BF5FF3131CCC939E000361CC /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- BF5FF3151CCC939E000361CC /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- FRAMEWORK_SEARCH_PATHS = (
- "$(PROJECT_DIR)/../Carthage/Build/iOS/",
- "$(PROJECT_DIR)/Carthage/Build/iOS",
- );
- INFOPLIST_FILE = Example/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-lifestyle.Example";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- };
- BF5FF3161CCC939E000361CC /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- FRAMEWORK_SEARCH_PATHS = (
- "$(PROJECT_DIR)/../Carthage/Build/iOS/",
- "$(PROJECT_DIR)/Carthage/Build/iOS",
- );
- INFOPLIST_FILE = Example/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-lifestyle.Example";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- BF5FF2FD1CCC939E000361CC /* Build configuration list for PBXProject "Example" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- BF5FF3121CCC939E000361CC /* Debug */,
- BF5FF3131CCC939E000361CC /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- BF5FF3141CCC939E000361CC /* Build configuration list for PBXNativeTarget "Example" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- BF5FF3151CCC939E000361CC /* Debug */,
- BF5FF3161CCC939E000361CC /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = BF5FF2FA1CCC939E000361CC /* Project object */;
-}
diff --git a/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 6d2a51b..0000000
--- a/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/Example/Example/AppDelegate.swift b/Example/Example/AppDelegate.swift
deleted file mode 100644
index b989c59..0000000
--- a/Example/Example/AppDelegate.swift
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// AppDelegate.swift
-// Example
-//
-// Created by Yuki Nagai on 4/24/16.
-// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved.
-//
-
-import UIKit
-import TreasureDataSDK
-
-@UIApplicationMain
-final class AppDelegate: UIResponder, UIApplicationDelegate {
- var window: UIWindow?
-
- func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
- let window = UIWindow(frame: UIScreen.mainScreen().bounds)
- window.rootViewController = ViewController()
- window.makeKeyAndVisible()
- self.window = window
- return true
- }
-}
-
diff --git a/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index 36d2c80..0000000
--- a/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "iphone",
- "size" : "29x29",
- "scale" : "2x"
- },
- {
- "idiom" : "iphone",
- "size" : "29x29",
- "scale" : "3x"
- },
- {
- "idiom" : "iphone",
- "size" : "40x40",
- "scale" : "2x"
- },
- {
- "idiom" : "iphone",
- "size" : "40x40",
- "scale" : "3x"
- },
- {
- "idiom" : "iphone",
- "size" : "60x60",
- "scale" : "2x"
- },
- {
- "idiom" : "iphone",
- "size" : "60x60",
- "scale" : "3x"
- },
- {
- "idiom" : "ipad",
- "size" : "29x29",
- "scale" : "1x"
- },
- {
- "idiom" : "ipad",
- "size" : "29x29",
- "scale" : "2x"
- },
- {
- "idiom" : "ipad",
- "size" : "40x40",
- "scale" : "1x"
- },
- {
- "idiom" : "ipad",
- "size" : "40x40",
- "scale" : "2x"
- },
- {
- "idiom" : "ipad",
- "size" : "76x76",
- "scale" : "1x"
- },
- {
- "idiom" : "ipad",
- "size" : "76x76",
- "scale" : "2x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/Example/Example/Base.lproj/LaunchScreen.storyboard b/Example/Example/Base.lproj/LaunchScreen.storyboard
deleted file mode 100644
index 2e721e1..0000000
--- a/Example/Example/Base.lproj/LaunchScreen.storyboard
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Example/Example/Info.plist b/Example/Example/Info.plist
deleted file mode 100644
index eabb3ae..0000000
--- a/Example/Example/Info.plist
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- 1
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- LaunchScreen
- UIRequiredDeviceCapabilities
-
- armv7
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
-
-
diff --git a/Example/Example/ViewController.swift b/Example/Example/ViewController.swift
deleted file mode 100644
index 358a904..0000000
--- a/Example/Example/ViewController.swift
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// ViewController.swift
-// Example
-//
-// Created by Yuki Nagai on 4/24/16.
-// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved.
-//
-
-import UIKit
-import TreasureDataSDK
-import SnapKit
-
-final class ViewController: UIViewController {
- private let addEventButton = UIButton(type: .System)
- private let startSessionButton = UIButton(type: .System)
- private let endSessionButton = UIButton(type: .System)
-
- init() {
- super.init(nibName: nil, bundle: nil)
- let configuration = Configuration(
- debug: true,
- key: "your_api_key",
- database: "testdb",
- table: "demotbl",
- shouldAppendDeviceIdentifier: true,
- shouldAppendModelInformation: true,
- shouldAppendSeverSideTimestamp: true)
- TreasureData.configure(configuration)
- }
-
- required init?(coder aDecoder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- override func viewDidLoad() {
- super.viewDidLoad()
-
- self.view.backgroundColor = UIColor.whiteColor()
-
- self.view.addSubview(self.addEventButton)
- self.view.addSubview(self.startSessionButton)
- self.view.addSubview(self.endSessionButton)
-
- self.addEventButton.snp_makeConstraints { make in
- make.top.equalTo(self.view)
- make.leading.equalTo(self.view)
- make.height.equalTo(self.view).multipliedBy(0.5)
- make.width.equalTo(self.view).multipliedBy(0.5)
- }
-
- self.startSessionButton.snp_makeConstraints { make in
- make.bottom.equalTo(self.view)
- make.leading.equalTo(self.view)
- make.height.equalTo(self.view).multipliedBy(0.5)
- make.width.equalTo(self.view).multipliedBy(0.5)
- }
- self.endSessionButton.snp_makeConstraints { make in
- make.bottom.equalTo(self.view)
- make.trailing.equalTo(self.view)
- make.height.equalTo(self.view).multipliedBy(0.5)
- make.width.equalTo(self.view).multipliedBy(0.5)
- }
-
- self.addEventButton.setTitle("Add Event", forState: .Normal)
- self.startSessionButton.setTitle("Start Session", forState: .Normal)
- self.endSessionButton.setTitle("End Session", forState: .Normal)
-
- self.addEventButton.addTarget(self, action: #selector(addEvent(_:)), forControlEvents: .TouchUpInside)
- self.startSessionButton.addTarget(self, action: #selector(startSession(_:)), forControlEvents: .TouchUpInside)
- self.endSessionButton.addTarget(self, action: #selector(endSession(_:)), forControlEvents: .TouchUpInside)
- }
-
- func addEvent(_: UIButton) {
- let userInfo: [String: String] = [
- "name": "uny",
- "age": "27",
- ]
- TreasureData.addEvent(userInfo: userInfo)
- }
-
- func startSession(_: UIButton) {
- TreasureData.startSession()
- }
-
- func endSession(_: UIButton) {
- TreasureData.endSession()
- }
-}
-
diff --git a/TreasureDataSDK/Configuration.swift b/Source/Configuration.swift
similarity index 83%
rename from TreasureDataSDK/Configuration.swift
rename to Source/Configuration.swift
index b877dcd..9102e62 100644
--- a/TreasureDataSDK/Configuration.swift
+++ b/Source/Configuration.swift
@@ -14,9 +14,9 @@ public struct Configuration {
public let key: String
public let database: String
public let table: String
- public let fileURL: NSURL?
+ public let fileURL: URL?
public let inMemoryIdentifier: String?
- public let encriptionKey: NSData?
+ public let encriptionKey: Data?
public let schemaVersion: UInt64
public let shouldAppendDeviceIdentifier: Bool
public let shouldAppendModelInformation: Bool
@@ -46,9 +46,9 @@ public struct Configuration {
key: String,
database: String,
table: String,
- fileURL: NSURL? = nil,
+ fileURL: URL? = nil,
inMemoryIdentifier: String? = nil,
- encriptionKey: NSData? = nil,
+ encriptionKey: Data? = nil,
schemaVersion: UInt64 = 1,
shouldAppendDeviceIdentifier: Bool = false,
shouldAppendModelInformation: Bool = false,
@@ -70,7 +70,7 @@ public struct Configuration {
self.fileURL = nil
self.inMemoryIdentifier = inMemoryIdentifier
default:
- self.fileURL = self.dynamicType.defaultFileURL()
+ self.fileURL = type(of: self).defaultFileURL()
self.inMemoryIdentifier = nil
}
self.encriptionKey = encriptionKey
@@ -82,14 +82,14 @@ public struct Configuration {
self.numberOfEventsEachRetryUploading = numberOfEventsEachRetryUploading
}
- internal static func defaultFileURL() -> NSURL {
- let applicationSupportDirectoryURL = NSFileManager.defaultManager().URLsForDirectory(.ApplicationSupportDirectory, inDomains: .UserDomainMask).first!
- let bundleIdentifier = NSBundle.mainBundle().bundleIdentifier ?? "."
- let directoryURL = applicationSupportDirectoryURL.URLByAppendingPathComponent(bundleIdentifier)
+ internal static func defaultFileURL() -> URL {
+ let applicationSupportDirectoryURL = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first!
+ let bundleIdentifier = Bundle.main.bundleIdentifier ?? "."
+ let directoryURL = applicationSupportDirectoryURL.appendingPathComponent(bundleIdentifier)
do {
- try NSFileManager.defaultManager().createDirectoryAtURL(directoryURL, withIntermediateDirectories: true, attributes: nil)
+ try FileManager.default.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil)
} catch {}
- return directoryURL.URLByAppendingPathComponent("TreasureDataSDK.realm")
+ return directoryURL.appendingPathComponent("TreasureDataSDK.realm")
}
internal var realm: RealmSwift.Realm? {
@@ -104,7 +104,7 @@ public struct Configuration {
return
}
for objectSchema in migration.oldSchema.objectSchema {
- migration.deleteData(objectSchema.className)
+ _ = migration.deleteData(forType: objectSchema.className)
}
})
do {
diff --git a/TreasureDataSDK/Device.swift b/Source/Device.swift
similarity index 72%
rename from TreasureDataSDK/Device.swift
rename to Source/Device.swift
index 9a71de3..2c52f5e 100644
--- a/TreasureDataSDK/Device.swift
+++ b/Source/Device.swift
@@ -8,35 +8,35 @@
import Foundation
-private let currentDevice = UIDevice.currentDevice()
+private let currentDevice = UIDevice.current
internal struct Device {
internal static var device = currentDevice
var deviceIdentifier: String {
if Cached.deviceIdentifier.isEmpty {
- Cached.deviceIdentifier = self.dynamicType.device.identifierForVendor?.UUIDString ?? ""
+ Cached.deviceIdentifier = type(of: self).device.identifierForVendor?.uuidString ?? ""
}
return Cached.deviceIdentifier
}
var systemName: String {
if Cached.systemName.isEmpty {
- Cached.systemName = self.dynamicType.device.systemName
+ Cached.systemName = type(of: self).device.systemName
}
return Cached.systemName
}
var systemVersion: String {
if Cached.systemVersion.isEmpty {
- Cached.systemVersion = self.dynamicType.device.systemVersion
+ Cached.systemVersion = type(of: self).device.systemVersion
}
return Cached.systemVersion
}
var deviceModel: String {
if Cached.deviceModel.isEmpty {
- Cached.deviceModel = self.dynamicType.device.deviceModel
+ Cached.deviceModel = type(of: self).device.deviceModel
}
return Cached.deviceModel
}
diff --git a/TreasureDataSDK/Enumerations/Result.swift b/Source/Enumerations/Result.swift
similarity index 55%
rename from TreasureDataSDK/Enumerations/Result.swift
rename to Source/Enumerations/Result.swift
index 09765f9..8975170 100644
--- a/TreasureDataSDK/Enumerations/Result.swift
+++ b/Source/Enumerations/Result.swift
@@ -9,11 +9,11 @@
import Foundation
public enum Result {
- case Success
- case NoEventToUpload
- case NetworkError
- case SystemError
- case DatabaseUnavailable
- case BuildingRequestError
- case Unknown
+ case success
+ case noEventToUpload
+ case networkError
+ case systemError
+ case databaseUnavailable
+ case buildingRequestError
+ case unknown
}
diff --git a/TreasureDataSDK/Event.swift b/Source/Event.swift
similarity index 75%
rename from TreasureDataSDK/Event.swift
rename to Source/Event.swift
index 90e7530..9ab65b8 100644
--- a/TreasureDataSDK/Event.swift
+++ b/Source/Event.swift
@@ -9,16 +9,16 @@
import RealmSwift
internal final class Event: RealmSwift.Object {
- private(set) dynamic var id = ""
- private(set) dynamic var timestamp = NSTimeInterval(0)
- private(set) dynamic var database = ""
- private(set) dynamic var table = ""
+ fileprivate(set) dynamic var id = ""
+ fileprivate(set) dynamic var timestamp = TimeInterval(0)
+ fileprivate(set) dynamic var database = ""
+ fileprivate(set) dynamic var table = ""
// appended according to configuration
- private(set) dynamic var deviceIdentifier = ""
- private(set) dynamic var systemName = ""
- private(set) dynamic var systemVersion = ""
- private(set) dynamic var deviceModel = ""
- private(set) dynamic var sessionIdentifier = ""
+ fileprivate(set) dynamic var deviceIdentifier = ""
+ fileprivate(set) dynamic var systemName = ""
+ fileprivate(set) dynamic var systemVersion = ""
+ fileprivate(set) dynamic var deviceModel = ""
+ fileprivate(set) dynamic var sessionIdentifier = ""
// user extra information
let userInfo = List()
@@ -27,7 +27,7 @@ internal final class Event: RealmSwift.Object {
This property exists to investigate how many events are stored in local storage.
After checking, it will be deleted.
*/
- private(set) dynamic var numberOfStoredEvents = -1
+ fileprivate(set) dynamic var numberOfStoredEvents = -1
override static func primaryKey() -> String? {
return "id"
@@ -36,10 +36,10 @@ internal final class Event: RealmSwift.Object {
return ["database", "table"]
}
- func appendInformation(instance: TreasureData) -> Event {
+ func appendInformation(_ instance: TreasureData) -> Event {
let event = Event(value: self)
- event.id = NSUUID().UUIDString
- event.timestamp = NSDate().timeIntervalSince1970
+ event.id = UUID().uuidString
+ event.timestamp = Date().timeIntervalSince1970
event.database = instance.configuration.database
event.table = instance.configuration.table
let device = Device()
@@ -62,7 +62,7 @@ internal final class Event: RealmSwift.Object {
return event
}
- func appendUserInfo(userInfo: TreasureData.UserInfo) -> Event {
+ func appendUserInfo(_ userInfo: TreasureData.UserInfo) -> Event {
let event = Event(value: self)
userInfo.forEach { key, value in
guard !key.isEmpty else { return }
@@ -74,7 +74,7 @@ internal final class Event: RealmSwift.Object {
return event
}
- func save(configuration: Configuration) {
+ func save(_ configuration: Configuration) {
var shouldDeleteRealmFiles = false
autoreleasepool {
let realm = configuration.realm
@@ -82,7 +82,7 @@ internal final class Event: RealmSwift.Object {
try realm?.write{
realm?.add(self)
}
- } catch RealmSwift.Error.AddressSpaceExhausted {
+ } catch RealmSwift.Error.addressSpaceExhausted {
shouldDeleteRealmFiles = true
} catch let error {
if configuration.debug {
@@ -103,9 +103,9 @@ internal final class Event: RealmSwift.Object {
}
}
- static func events(configuration configuration: Configuration) -> RealmSwift.Results? {
+ static func events(configuration: Configuration) -> RealmSwift.Results? {
let predicate = NSPredicate(format: "database = %@ AND table = %@", configuration.database, configuration.table)
- return configuration.realm?.objects(Event).filter(predicate)
+ return configuration.realm?.objects(Event.self).filter(predicate)
}
}
diff --git a/TreasureDataSDK/Extensions/String+PathComponent.swift b/Source/Extensions/String+PathComponent.swift
similarity index 60%
rename from TreasureDataSDK/Extensions/String+PathComponent.swift
rename to Source/Extensions/String+PathComponent.swift
index 1d4eef7..4800049 100644
--- a/TreasureDataSDK/Extensions/String+PathComponent.swift
+++ b/Source/Extensions/String+PathComponent.swift
@@ -9,7 +9,7 @@
import Foundation
internal extension String {
- func stringByAppendingPathComponent(component: String) -> String {
- return (self as NSString).stringByAppendingPathComponent(component)
+ func stringByAppendingPathComponent(_ component: String) -> String {
+ return (self as NSString).appendingPathComponent(component)
}
}
diff --git a/TreasureDataSDK/Extensions/UIDevice+DeviceModel.swift b/Source/Extensions/UIDevice+DeviceModel.swift
similarity index 80%
rename from TreasureDataSDK/Extensions/UIDevice+DeviceModel.swift
rename to Source/Extensions/UIDevice+DeviceModel.swift
index a252fe6..9fcbaf5 100644
--- a/TreasureDataSDK/Extensions/UIDevice+DeviceModel.swift
+++ b/Source/Extensions/UIDevice+DeviceModel.swift
@@ -15,9 +15,9 @@ internal extension UIDevice {
let machine = systemInfo.machine
let mirror = Mirror(reflecting: machine)
let children: [String] = mirror.children.flatMap { child in
- guard let value = child.value as? Int8 where value != 0 else { return nil }
+ guard let value = child.value as? Int8 , value != 0 else { return nil }
return String(UnicodeScalar(UInt8(value)))
}
- return children.joinWithSeparator("")
+ return children.joined(separator: "")
}
}
diff --git a/Source/Helpers/RealmFileHandler.swift b/Source/Helpers/RealmFileHandler.swift
new file mode 100644
index 0000000..4ede5e3
--- /dev/null
+++ b/Source/Helpers/RealmFileHandler.swift
@@ -0,0 +1,46 @@
+//
+// RealmFileHandler.swift
+// TreasureDataSDK
+//
+// Created by YasudaHayato on 2016/09/07.
+// Copyright © 2016年 Recruit Lifestyle Co., Ltd. All rights reserved.
+//
+
+import Foundation
+
+internal struct RealmFileHandler {
+ func deleteAllRealmFiles(_ configuration: Configuration) {
+
+ let realmFileURLs = self.retrieveRealmFileURLs(configuration)
+
+ let manager = FileManager.default
+ for fileURL in realmFileURLs {
+ do {
+ try manager.removeItem(at: fileURL)
+ } catch let error {
+ if configuration.debug {
+ print(error)
+ }
+ }
+ }
+ }
+
+ fileprivate func retrieveRealmFileURLs(_ configuration: Configuration) -> [URL] {
+ guard let mainFileURL = configuration.fileURL else { return [] }
+ let mainFileName = mainFileURL.lastPathComponent
+ let directoryURL = mainFileURL.deletingLastPathComponent()
+ let directoryURLString = directoryURL.path
+
+ do {
+ return try FileManager.default
+ .contentsOfDirectory(atPath: directoryURLString)
+ .filter { $0.contains(mainFileName) }
+ .map { directoryURL.appendingPathComponent($0) }
+ } catch {
+ if configuration.debug {
+ print(error)
+ }
+ return []
+ }
+ }
+}
diff --git a/TreasureDataSDK/TreasureData.swift b/Source/TreasureData.swift
similarity index 66%
rename from TreasureDataSDK/TreasureData.swift
rename to Source/TreasureData.swift
index 4708e61..7278ac5 100644
--- a/TreasureDataSDK/TreasureData.swift
+++ b/Source/TreasureData.swift
@@ -12,19 +12,19 @@ internal let bundleIdentifier = "jp.co.recruit-lifestyle.TreasureDataSDK"
public final class TreasureData {
public typealias UserInfo = [String: String]
- public typealias UploadingCompletion = Result -> Void
+ public typealias UploadingCompletion = (Result) -> Void
internal static var defaultInstance: TreasureData?
internal var sessionIdentifier = ""
- private var uploadingDiscriminator = UploadingDiscriminator()
+ fileprivate var uploadingDiscriminator = UploadingDiscriminator()
public let configuration: Configuration
- private let queue = dispatch_queue_create("jp.co.recruit-lifestyle.TreasureDataSDK.UploadingEventQueue", DISPATCH_QUEUE_SERIAL)
+ fileprivate let queue = DispatchQueue(label: "jp.co.recruit-lifestyle.TreasureDataSDK.UploadingEventQueue", attributes: [])
/// Configure default instance.
- public static func configure(configuration: Configuration) {
+ public static func configure(_ configuration: Configuration) {
self.defaultInstance = TreasureData(configuration: configuration)
}
@@ -34,6 +34,9 @@ public final class TreasureData {
/**
+ Upload or save event and try to upload saved events in local strage.
+ Event will be saved into local strage(Realm) when it fails to upload event.
+
This method is asynchronously executed, considering the influence onto the Application at the Realm I/O.
Queueing not `uploadEventAndStoreIfFailed` and `uploadStoredEventsWith` methods (both including Realm I/O),
@@ -44,8 +47,8 @@ public final class TreasureData {
2. uploading decision (regarding uploadingDiscriminator) -> queueing -> uploading execution
procedure 1 is preferable to make the uploading decision just before the uploading execution.
*/
- public func addEvent(userInfo userInfo: UserInfo = [:]) {
- dispatch_async(queue) {
+ public func addEvent(userInfo: UserInfo = [:]) {
+ queue.async {
let event = Event().appendInformation(self).appendUserInfo(userInfo)
self.uploadingDiscriminator.incrementNumberOfEventsSinceLastSuccess()
@@ -57,7 +60,7 @@ public final class TreasureData {
let uploader = Uploader(configuration: self.configuration)
uploader.uploadEventOrStoreIfFailed(event: event) { result in
- if result == .Success {
+ if result == .success {
self.uploadingDiscriminator.reset()
} else {
self.uploadingDiscriminator.startRestriction()
@@ -76,22 +79,35 @@ public final class TreasureData {
}
}
- public static func addEvent(userInfo userInfo: UserInfo = [:]) {
+ public static func addEvent(userInfo: UserInfo = [:]) {
self.defaultInstance?.addEvent(userInfo: userInfo)
}
- @available(*, deprecated, message="This method will be removed, besauce it is not necessary any more.")
- public func uploadAllStoredEvents(completion: UploadingCompletion? = nil) {
+ /**
+ Just save event into local strage. (Not try to upload.)
+ This method is synchronously executed.
+ */
+ public func saveEvent(userInfo: UserInfo = [:]) {
+ let event = Event().appendInformation(self).appendUserInfo(userInfo)
+ event.save(self.configuration)
+ }
+
+ public static func saveEvent(userInfo: UserInfo = [:]) {
+ self.defaultInstance?.saveEvent(userInfo: userInfo)
+ }
+
+ @available(*, deprecated, message: "This method will be removed, besauce it is not necessary any more.")
+ public func uploadAllStoredEvents(_ completion: UploadingCompletion? = nil) {
Uploader(configuration: self.configuration).uploadAllStoredEvents(completion: completion)
}
- @available(*, deprecated, message="This method will be removed, besauce it is not necessary any more.")
- public static func uploadAllStoredEvents(completion: UploadingCompletion? = nil) {
+ @available(*, deprecated, message: "This method will be removed, besauce it is not necessary any more.")
+ public static func uploadAllStoredEvents(_ completion: UploadingCompletion? = nil) {
self.defaultInstance?.uploadAllStoredEvents(completion)
}
public func startSession() {
- self.sessionIdentifier = NSUUID().UUIDString
+ self.sessionIdentifier = UUID().uuidString
}
public static func startSession() {
self.defaultInstance?.startSession()
diff --git a/Source/TreasureDataSDK.h b/Source/TreasureDataSDK.h
new file mode 100644
index 0000000..104c281
--- /dev/null
+++ b/Source/TreasureDataSDK.h
@@ -0,0 +1,19 @@
+//
+// TreasureDataSDK.h
+// TreasureDataSDK
+//
+// Created by Yuki Nagai on 3/30/16.
+// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved.
+//
+
+#import
+
+//! Project version number for TreasureDataSDK.
+FOUNDATION_EXPORT double TreasureDataSDKVersionNumber;
+
+//! Project version string for TreasureDataSDK.
+FOUNDATION_EXPORT const unsigned char TreasureDataSDKVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import
+
+
diff --git a/TreasureDataSDK/UploadRequest.swift b/Source/UploadRequest.swift
similarity index 66%
rename from TreasureDataSDK/UploadRequest.swift
rename to Source/UploadRequest.swift
index d4825af..4379d0a 100644
--- a/TreasureDataSDK/UploadRequest.swift
+++ b/Source/UploadRequest.swift
@@ -9,23 +9,23 @@
import Foundation
internal struct UploadRequest {
- private let configuration: Configuration
- private let events: [Event]
+ fileprivate let configuration: Configuration
+ fileprivate let events: [Event]
init(configuration: Configuration, events: [Event]) {
self.configuration = configuration
self.events = events
}
- private var URL: NSURL? {
- guard let endPoint = NSURL(string: configuration.endpoint) else {
+ fileprivate var URL: Foundation.URL? {
+ guard let endPoint = Foundation.URL(string: configuration.endpoint) else {
return nil
}
- return endPoint.URLByAppendingPathComponent("ios/v3/event")
+ return endPoint.appendingPathComponent("ios/v3/event")
}
- private var headers:[String: String] {
+ fileprivate var headers:[String: String] {
return [
"Content-Type": "application/json",
"X-TD-Data-Type": "k",
@@ -33,25 +33,25 @@ internal struct UploadRequest {
]
}
- private var HTTPMethod: String {
+ fileprivate var HTTPMethod: String {
return "POST"
}
- private var timeoutInterval: NSTimeInterval {
+ fileprivate var timeoutInterval: TimeInterval {
return 15
}
- var request: NSURLRequest? {
+ var request: URLRequest? {
guard let URL = URL else {
return nil
}
- let request = NSMutableURLRequest(URL: URL)
+ let request = NSMutableURLRequest(url: URL)
do {
- let options = NSJSONWritingOptions()
- let data = try NSJSONSerialization.dataWithJSONObject(bodyParamesers, options: options)
- request.HTTPBody = data
+ let options = JSONSerialization.WritingOptions()
+ let data = try JSONSerialization.data(withJSONObject: bodyParamesers, options: options)
+ request.httpBody = data
} catch let error {
if configuration.debug {
print(error)
@@ -63,16 +63,16 @@ internal struct UploadRequest {
request.addValue(value, forHTTPHeaderField: field)
}
- request.HTTPMethod = HTTPMethod
+ request.httpMethod = HTTPMethod
request.timeoutInterval = timeoutInterval
- return request
+ return request as URLRequest
}
- private var bodyParamesers: JSONType {
+ fileprivate var bodyParamesers: [String: Any] {
return [
- configuration.schemaName: events.map { event -> JSONType in
- var parameters: JSONType = [
+ configuration.schemaName: events.map { event -> [String: Any] in
+ var parameters: [String: Any] = [
"#UUID": event.id,
"#SSUT": configuration.shouldAppendSeverSideTimestamp,
"timestamp": event.timestamp,
diff --git a/TreasureDataSDK/Uploader.swift b/Source/Uploader.swift
similarity index 63%
rename from TreasureDataSDK/Uploader.swift
rename to Source/Uploader.swift
index 712bab9..f83bd25 100644
--- a/TreasureDataSDK/Uploader.swift
+++ b/Source/Uploader.swift
@@ -8,22 +8,20 @@
import Foundation
-internal typealias JSONType = [String: AnyObject]
-
-private let defaultSession = NSURLSession.sharedSession()
+private let defaultSession = URLSession.shared
internal struct Uploader {
- private let configuration: Configuration
- private let session: NSURLSession
+ fileprivate let configuration: Configuration
+ fileprivate let session: URLSession
- init(configuration: Configuration, session: NSURLSession = defaultSession) {
+ init(configuration: Configuration, session: URLSession = defaultSession) {
self.configuration = configuration
self.session = session
}
- func uploadEventOrStoreIfFailed(event event: Event, completion: TreasureData.UploadingCompletion? = nil) {
+ func uploadEventOrStoreIfFailed(event: Event, completion: TreasureData.UploadingCompletion? = nil) {
self.uploadEvents(events: [event]) { result, _ in
- if result != .Success {
+ if result != .success {
// Store events to realm that failed to be uploaded.
event.save(self.configuration)
}
@@ -32,28 +30,28 @@ internal struct Uploader {
}
}
- func uploadStoredEventsWith(limit limit: Int, completion: TreasureData.UploadingCompletion? = nil) {
+ func uploadStoredEventsWith(limit: Int, completion: TreasureData.UploadingCompletion? = nil) {
guard let events = Event.events(configuration: self.configuration) else {
- completion?(.DatabaseUnavailable)
+ completion?(.databaseUnavailable)
return
}
guard events.count > 0 else {
- completion?(.NoEventToUpload)
+ completion?(.noEventToUpload)
return
}
let numberOfUploadingEvents = min(events.count, limit)
- let targetEvents = Array(events.sorted("timestamp").prefix(numberOfUploadingEvents))
+ let targetEvents = Array(events.sorted(byProperty: "timestamp").prefix(numberOfUploadingEvents))
self.uploadEvents(events: targetEvents) { result, responseJson in
- guard let sortedEvents = Event.events(configuration: self.configuration)?.sorted("timestamp") else {
- completion?(.DatabaseUnavailable)
+ guard let sortedEvents = Event.events(configuration: self.configuration)?.sorted(byProperty: "timestamp") else {
+ completion?(.databaseUnavailable)
return
}
- let uploadedEvents = responseJson.map { $0["success"] ?? false }.enumerate().flatMap { index, value in
+ let uploadedEvents = responseJson.map { $0["success"] ?? false }.enumerated().flatMap { index, value in
return value && index < numberOfUploadingEvents ? sortedEvents[index] : nil
}
@@ -77,20 +75,20 @@ internal struct Uploader {
}
}
- @available(*, deprecated, message="This method will be removed, besauce it is not necessary any more.")
- func uploadAllStoredEvents(completion completion: TreasureData.UploadingCompletion? = nil) {
+ @available(*, deprecated, message: "This method will be removed, besauce it is not necessary any more.")
+ func uploadAllStoredEvents(completion: TreasureData.UploadingCompletion? = nil) {
guard let events = Event.events(configuration: self.configuration)?.array else {
- completion?(.DatabaseUnavailable)
+ completion?(.databaseUnavailable)
return
}
self.uploadEvents(events: events) { result, responseJson in
guard let events = Event.events(configuration: self.configuration) else {
- completion?(.DatabaseUnavailable)
+ completion?(.databaseUnavailable)
return
}
- let uploadedEvents = responseJson.map { $0["success"] ?? false }.enumerate().flatMap { index, value in
+ let uploadedEvents = responseJson.map { $0["success"] ?? false }.enumerated().flatMap { index, value in
return value && index < events.count ? events[index] : nil
}
@@ -114,50 +112,50 @@ internal struct Uploader {
}
}
- private func uploadEvents(events events: [Event], completion: (result: Result, responseJson: [[String: Bool]]) -> Void) {
+ fileprivate func uploadEvents(events: [Event], completion: @escaping (_ result: Result, _ responseJson: [[String: Bool]]) -> Void) {
guard events.count > 0 else {
- completion(result: .NoEventToUpload, responseJson: [])
+ completion(.noEventToUpload, [])
return
}
guard let request = UploadRequest(configuration: configuration, events: events).request else {
- completion(result: .BuildingRequestError, responseJson: [])
+ completion(.buildingRequestError, [])
return
}
- let task = self.session.dataTaskWithRequest(request) { data, response, error in
- let response = response as? NSHTTPURLResponse
+ let task = self.session.dataTask(with: request) { data, response, error in
+ let response = response as? HTTPURLResponse
if let _ = error {
- let error: Result = (response?.statusCode == 0) ? .NetworkError : .SystemError
- completion(result: error, responseJson: [])
+ let error: Result = (response?.statusCode == 0) ? .networkError : .systemError
+ completion(error, [])
return
}
guard let data = data else {
- completion(result: .Unknown, responseJson: [])
+ completion(.unknown, [])
return
}
- let json: JSONType
+ let json: [String: Any]
do {
- let options = NSJSONReadingOptions()
- guard let serialized = try NSJSONSerialization.JSONObjectWithData(data, options: options) as? JSONType else {
- completion(result: .Unknown, responseJson: [])
+ let options = JSONSerialization.ReadingOptions()
+ guard let serialized = try JSONSerialization.jsonObject(with: data, options: options) as? [String: Any] else {
+ completion(.unknown, [])
return
}
json = serialized
} catch {
- completion(result: .Unknown, responseJson: [])
+ completion(.unknown, [])
return
}
guard let parameters = json[self.configuration.schemaName] as? [[String: Bool]] else {
- completion(result: .Unknown, responseJson: [])
+ completion(.unknown, [])
return
}
- completion(result: .Success, responseJson: parameters)
+ completion(.success, parameters)
}
task.resume()
}
diff --git a/TreasureDataSDK/UploadingDiscriminator.swift b/Source/UploadingDiscriminator.swift
similarity index 84%
rename from TreasureDataSDK/UploadingDiscriminator.swift
rename to Source/UploadingDiscriminator.swift
index e27d7ea..650a0e8 100644
--- a/TreasureDataSDK/UploadingDiscriminator.swift
+++ b/Source/UploadingDiscriminator.swift
@@ -9,11 +9,11 @@
import Foundation
internal struct UploadingDiscriminator {
- private var isRestricted = false
- private(set) var isRetrying = false
+ fileprivate var isRestricted = false
+ fileprivate(set) var isRetrying = false
- private var nextRetryThreshold = 1
- private var numberOfEventsSinceLastSuccess = 0
+ fileprivate var nextRetryThreshold = 1
+ fileprivate var numberOfEventsSinceLastSuccess = 0
func shouldUpload() -> Bool {
guard isRestricted else {
@@ -50,7 +50,7 @@ internal struct UploadingDiscriminator {
}
private struct FibonacciNumberCalculator {
- func nextLargerFibonacciNumber(number: Int) -> Int {
+ func nextLargerFibonacciNumber(_ number: Int) -> Int {
var index = 0
var fibonacciNumber = calculate(index).0
while (fibonacciNumber <= number) {
@@ -60,7 +60,7 @@ private struct FibonacciNumberCalculator {
return fibonacciNumber
}
- private func calculate(index: Int) -> (Int, Int) {
+ fileprivate func calculate(_ index: Int) -> (Int, Int) {
if index == 0 {
return (0, 0)
} else if index == 1 {
diff --git a/TreasureDataSDKTests/Helpers/Stubs/UIDeviceStub.swift b/TestHelpers/Stubs/UIDeviceStub.swift
similarity index 79%
rename from TreasureDataSDKTests/Helpers/Stubs/UIDeviceStub.swift
rename to TestHelpers/Stubs/UIDeviceStub.swift
index 5002a14..3a89c20 100644
--- a/TreasureDataSDKTests/Helpers/Stubs/UIDeviceStub.swift
+++ b/TestHelpers/Stubs/UIDeviceStub.swift
@@ -10,8 +10,8 @@ import Foundation
@testable import TreasureDataSDK
final class UIDeviceStub: UIDevice {
- override var identifierForVendor: NSUUID? {
- return NSUUID(UUIDString: "E621E1F8-C36C-495A-93FC-0C247A3E6E5F")
+ override var identifierForVendor: UUID? {
+ return UUID(uuidString: "E621E1F8-C36C-495A-93FC-0C247A3E6E5F")
}
override var systemName: String {
return "systemName"
diff --git a/TreasureDataSDKTests/Helpers/Stubs/NSURLSessionStub.swift b/TestHelpers/Stubs/URLSessionStub.swift
similarity index 61%
rename from TreasureDataSDKTests/Helpers/Stubs/NSURLSessionStub.swift
rename to TestHelpers/Stubs/URLSessionStub.swift
index e748815..41abd47 100644
--- a/TreasureDataSDKTests/Helpers/Stubs/NSURLSessionStub.swift
+++ b/TestHelpers/Stubs/URLSessionStub.swift
@@ -1,5 +1,5 @@
//
-// NSURLSessionStub.swift
+// URLSessionStub.swift
// TreasureDataSDK
//
// Created by Yuki Nagai on 4/24/16.
@@ -8,22 +8,22 @@
import Foundation
-final class NSURLSessionStub: NSURLSession {
- typealias CompletionResponse = (NSData?, NSURLResponse?, NSError?)
+final class URLSessionStub: URLSession {
+ typealias CompletionResponse = (Data?, URLResponse?, NSError?)
var completionResponse: CompletionResponse?
- typealias RequestValidation = (NSURLRequest) -> Void
+ typealias RequestValidation = (URLRequest) -> Void
var requestValidation: RequestValidation?
- private let dataTask = NSURLSessionDataTaskStub()
+ fileprivate let dataTask = URLSessionDataTaskStub()
- override func dataTaskWithRequest(request: NSURLRequest, completionHandler: (NSData?, NSURLResponse?, NSError?) -> Void) -> NSURLSessionDataTask {
+ override func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask {
self.requestValidation?(request)
self.dataTask.completionResponse = self.completionResponse
self.dataTask.completionHanlder = completionHandler
return self.dataTask
}
- final class NSURLSessionDataTaskStub: NSURLSessionDataTask {
- typealias CompletionHandler = CompletionResponse -> Void
+ final class URLSessionDataTaskStub: URLSessionDataTask {
+ typealias CompletionHandler = (CompletionResponse) -> Void
var completionHanlder: CompletionHandler?
var completionResponse: CompletionResponse?
diff --git a/TreasureDataSDKTests/ConfigurationTests.swift b/Tests/ConfigurationTests.swift
similarity index 95%
rename from TreasureDataSDKTests/ConfigurationTests.swift
rename to Tests/ConfigurationTests.swift
index e0dc44b..253e55f 100644
--- a/TreasureDataSDKTests/ConfigurationTests.swift
+++ b/Tests/ConfigurationTests.swift
@@ -29,7 +29,7 @@ final class ConfigurationTests: XCTestCase {
func testThatItConfiguresRealmFileURL() {
let defaultFileURL = Configuration.defaultFileURL()
- let renamedURL = defaultFileURL.URLByDeletingLastPathComponent?.URLByAppendingPathComponent("Renamed.realm")
+ let renamedURL = defaultFileURL.deletingLastPathComponent().appendingPathComponent("Renamed.realm")
let configuration = Configuration(key: "KEY", database: "DATABASE", table: "TABLE", fileURL: renamedURL)
XCTAssertEqual(configuration.fileURL, renamedURL)
XCTAssertNil(configuration.inMemoryIdentifier)
diff --git a/TreasureDataSDKTests/DeviceTests.swift b/Tests/DeviceTests.swift
similarity index 97%
rename from TreasureDataSDKTests/DeviceTests.swift
rename to Tests/DeviceTests.swift
index 24162a3..2f0aa4d 100644
--- a/TreasureDataSDKTests/DeviceTests.swift
+++ b/Tests/DeviceTests.swift
@@ -26,7 +26,7 @@ final class DeviceTests: XCTestCase {
let stub = UIDeviceStub()
Device.device = stub
let identifier = Device().deviceIdentifier
- let expected = stub.identifierForVendor!.UUIDString
+ let expected = stub.identifierForVendor!.uuidString
XCTAssertEqual(identifier, expected)
}
func testCachedDeviceIdentifier() {
diff --git a/TreasureDataSDKTests/EventTests.swift b/Tests/EventTests.swift
similarity index 100%
rename from TreasureDataSDKTests/EventTests.swift
rename to Tests/EventTests.swift
diff --git a/TreasureDataSDKTests/TreasureDataTests.swift b/Tests/TreasureDataTests.swift
similarity index 100%
rename from TreasureDataSDKTests/TreasureDataTests.swift
rename to Tests/TreasureDataTests.swift
diff --git a/TreasureDataSDKTests/UIDevice+DeviceModelTests.swift b/Tests/UIDevice+DeviceModelTests.swift
similarity index 57%
rename from TreasureDataSDKTests/UIDevice+DeviceModelTests.swift
rename to Tests/UIDevice+DeviceModelTests.swift
index 0d12691..ea679ec 100644
--- a/TreasureDataSDKTests/UIDevice+DeviceModelTests.swift
+++ b/Tests/UIDevice+DeviceModelTests.swift
@@ -10,17 +10,6 @@ import XCTest
@testable import TreasureDataSDK
final class UIDevice_DeviceModelTests: XCTestCase {
-
- override func setUp() {
- super.setUp()
- // Put setup code here. This method is called before the invocation of each test method in the class.
- }
-
- override func tearDown() {
- // Put teardown code here. This method is called after the invocation of each test method in the class.
- super.tearDown()
- }
-
func testThatItReturnsActualDeviceModel() {
let device = UIDevice()
let isSimulator = ["i386", "x86_64"].contains(device.deviceModel)
diff --git a/TreasureDataSDKTests/UploadRequestTests.swift b/Tests/UploadRequestTests.swift
similarity index 89%
rename from TreasureDataSDKTests/UploadRequestTests.swift
rename to Tests/UploadRequestTests.swift
index b1ee332..a203863 100644
--- a/TreasureDataSDKTests/UploadRequestTests.swift
+++ b/Tests/UploadRequestTests.swift
@@ -49,19 +49,19 @@ final class UploadRequestTests: XCTestCase {
return
}
- let expectedURL = NSURL(string: configuration.endpoint)!.URLByAppendingPathComponent("ios/v3/event")
- XCTAssertEqual(request.URL!, expectedURL)
+ let expectedURL = URL(string: configuration.endpoint)!.appendingPathComponent("ios/v3/event")
+ XCTAssertEqual(request.url, expectedURL)
let headers = request.allHTTPHeaderFields!
XCTAssertEqual(headers["Content-Type"], "application/json")
XCTAssertEqual(headers["X-TD-Data-Type"], "k")
XCTAssertEqual(headers["X-TD-Write-Key"], configuration.key)
- XCTAssertEqual(request.HTTPMethod, "POST")
+ XCTAssertEqual(request.httpMethod, "POST")
XCTAssertEqual(request.timeoutInterval, 15)
do {
- let parameters = try NSJSONSerialization.JSONObjectWithData(request.HTTPBody!, options: NSJSONReadingOptions()) as! [String: AnyObject]
+ let parameters = try JSONSerialization.jsonObject(with: request.httpBody!) as! [String: Any]
let schemeName = parameters.keys.first!
XCTAssertEqual(schemeName, configuration.schemaName)
@@ -78,7 +78,7 @@ final class UploadRequestTests: XCTestCase {
XCTAssertEqual(event["td_model"] as? String, deviceStub.deviceModel)
XCTAssertEqual(event["td_os_type"] as? String, deviceStub.systemName)
XCTAssertEqual(event["td_os_ver"] as? String, deviceStub.systemVersion)
- XCTAssertEqual(event["td_uuid"] as? String, deviceStub.identifierForVendor?.UUIDString)
+ XCTAssertEqual(event["td_uuid"] as? String, deviceStub.identifierForVendor?.uuidString)
XCTAssertFalse((event["td_session_id"] as? String)!.isEmpty)
XCTAssertEqual(event["name"] as? String, "user2")
diff --git a/TreasureDataSDKTests/UploaderTests.swift b/Tests/UploaderTests.swift
similarity index 58%
rename from TreasureDataSDKTests/UploaderTests.swift
rename to Tests/UploaderTests.swift
index 6f47731..e0d7dd5 100644
--- a/TreasureDataSDKTests/UploaderTests.swift
+++ b/Tests/UploaderTests.swift
@@ -29,12 +29,12 @@ final class UploaderTests: XCTestCase {
inMemoryIdentifier: "inMemoryIdentifier")
let instance = TreasureData(configuration: configuration)
let event = Event().appendInformation(instance)
- let stub = NSURLSessionStub()
- let data = self.dataResponse(configuration: configuration, events: [event]) { _ in return true }
+ let stub = URLSessionStub()
+ let data = self.dataResponse(configuration, events: [event]) { _ in return true }
stub.completionResponse = (data, nil, nil)
Uploader(configuration: configuration, session: stub).uploadEventOrStoreIfFailed(event: event) { result in
- XCTAssertEqual(result.hashValue, Result.Success.hashValue)
+ XCTAssertEqual(result.hashValue, Result.success.hashValue)
let storedEvents = Event.events(configuration: configuration)!.array
storedEvents.forEach { XCTAssertNotEqual($0.id, event.id) }
}
@@ -49,12 +49,12 @@ final class UploaderTests: XCTestCase {
let instance = TreasureData(configuration: configuration)
let event = Event().appendInformation(instance)
- let stub = NSURLSessionStub()
+ let stub = URLSessionStub()
let dummyError = NSError(domain: "", code: 0, userInfo: nil)
stub.completionResponse = (nil, nil, dummyError)
Uploader(configuration: configuration, session: stub).uploadEventOrStoreIfFailed(event: event) { result in
- XCTAssertNotEqual(result.hashValue, Result.Success.hashValue)
+ XCTAssertNotEqual(result.hashValue, Result.success.hashValue)
let storedEvent = Event.events(configuration: configuration)!.array.first
XCTAssertEqual(storedEvent?.id, event.id)
}
@@ -75,9 +75,9 @@ final class UploaderTests: XCTestCase {
events.forEach { $0.save(configuration) }
- let stub = NSURLSessionStub()
+ let stub = URLSessionStub()
let uploaded = [event1, event2]
- let data = self.dataResponse(configuration: configuration, events: uploaded) { _ in return true }
+ let data = self.dataResponse(configuration, events: uploaded) { _ in return true }
stub.completionResponse = (data, nil, nil)
Uploader(configuration: configuration, session: stub).uploadStoredEventsWith(limit: configuration.numberOfEventsEachRetryUploading) { _ in
@@ -87,58 +87,23 @@ final class UploaderTests: XCTestCase {
}
}
- func testUploadAllStoredEvents() {
- let configuration = Configuration(
- key: "KEY",
- database: "DATABASE",
- table: "TABLE",
- inMemoryIdentifier: "inMemoryIdentifier")
- let instance = TreasureData(configuration: configuration)
- let event1 = Event().appendInformation(instance)
- let event2 = Event().appendInformation(instance)
- let events = [event1, event2]
-
- events.forEach { $0.save(configuration) }
-
- let stub = NSURLSessionStub()
- let data = self.dataResponse(configuration: configuration, events: events) { _ in return true }
- stub.completionResponse = (data, nil, nil)
- Uploader(configuration: configuration, session: stub).uploadAllStoredEvents { result in
- XCTAssertEqual(result.hashValue, Result.Success.hashValue)
- let storedEvents = Event.events(configuration: configuration)!.array
- XCTAssertTrue(storedEvents.isEmpty)
- }
- }
-
- func testNoEventToUpload() {
- let configuration = Configuration(
- key: "KEY",
- database: "DATABASE",
- table: "TABLE",
- inMemoryIdentifier: "inMemoryIdentifier")
- let stub = NSURLSessionStub()
- Uploader(configuration: configuration, session: stub).uploadAllStoredEvents() { result in
- XCTAssertEqual(result.hashValue, Result.NoEventToUpload.hashValue)
- }
- }
-
- private func dataResponse(configuration configuration: Configuration, events: [Event], condition: Int -> Bool) -> NSData {
- let results: [[String: Bool]] = events.enumerate().map { index, _ in
+ fileprivate func dataResponse(_ configuration: Configuration, events: [Event], condition: @escaping (Int) -> Bool) -> Data {
+ let results: [[String: Bool]] = events.enumerated().map { index, _ in
return ["success": condition(index)]
}
let response: [String: AnyObject] = [
- "\(configuration.database).\(configuration.table)": results
+ "\(configuration.database).\(configuration.table)": results as AnyObject
]
- let options = NSJSONWritingOptions()
- let data = try! NSJSONSerialization.dataWithJSONObject(response, options: options)
+ let options = JSONSerialization.WritingOptions()
+ let data = try! JSONSerialization.data(withJSONObject: response, options: options)
return data
}
- private func requestParameters(request: NSURLRequest) -> [String: AnyObject] {
- guard let HTTPBody = request.HTTPBody else { return [:] }
+ fileprivate func requestParameters(_ request: URLRequest) -> [String: AnyObject] {
+ guard let HTTPBody = request.httpBody else { return [:] }
do {
- let options = NSJSONReadingOptions()
- if let serialized = try NSJSONSerialization.JSONObjectWithData(HTTPBody, options: options) as? [String: AnyObject] {
+ let options = JSONSerialization.ReadingOptions()
+ if let serialized = try JSONSerialization.jsonObject(with: HTTPBody, options: options) as? [String: AnyObject] {
return serialized
} else { return [:] }
diff --git a/TreasureDataSDKTests/UploadingDiscriminatorTests.swift b/Tests/UploadingDiscriminatorTests.swift
similarity index 100%
rename from TreasureDataSDKTests/UploadingDiscriminatorTests.swift
rename to Tests/UploadingDiscriminatorTests.swift
diff --git a/TreasureDataSDK.xcodeproj/project.pbxproj b/TreasureDataSDK.xcodeproj/project.pbxproj
index 5036a22..837101b 100644
--- a/TreasureDataSDK.xcodeproj/project.pbxproj
+++ b/TreasureDataSDK.xcodeproj/project.pbxproj
@@ -7,55 +7,55 @@
objects = {
/* Begin PBXBuildFile section */
- 6A470B3E1D7E742300E91EFF /* UploadRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A470B3D1D7E742300E91EFF /* UploadRequest.swift */; };
- 6A470B401D7E80A900E91EFF /* UploadRequestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A470B3F1D7E80A900E91EFF /* UploadRequestTests.swift */; };
- 6A5D01901D7FA199007B3F64 /* RealmFileHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5D018F1D7FA199007B3F64 /* RealmFileHandler.swift */; };
- 6A5D019A1D7FDCAF007B3F64 /* UploadingDiscriminator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5D01991D7FDCAF007B3F64 /* UploadingDiscriminator.swift */; };
- 6A5D019D1D7FF7EA007B3F64 /* UploadingDiscriminatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5D019C1D7FF7EA007B3F64 /* UploadingDiscriminatorTests.swift */; };
- BF0ACC7C1CCB85A700C70F4E /* UIDeviceStub.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF0ACC7B1CCB85A700C70F4E /* UIDeviceStub.swift */; };
- BF0ACC801CCB8E4700C70F4E /* EventTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF0ACC7F1CCB8E4700C70F4E /* EventTests.swift */; };
- BF0ACC821CCB930100C70F4E /* TreasureDataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF0ACC811CCB930100C70F4E /* TreasureDataTests.swift */; };
- BF29CE601CB224A6003DE779 /* ConfigurationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF29CE5F1CB224A6003DE779 /* ConfigurationTests.swift */; };
- BF29CE681CB243C5003DE779 /* String+PathComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF29CE671CB243C5003DE779 /* String+PathComponent.swift */; };
- BF2ED47A1CCBC455009DD294 /* Realm.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = BF6538531CABD24E002CFF55 /* Realm.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- BF2ED47B1CCBC455009DD294 /* RealmSwift.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = BF6538541CABD24E002CFF55 /* RealmSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- BF5729E11CCB6B480086F9B4 /* DeviceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5729E01CCB6B480086F9B4 /* DeviceTests.swift */; };
- BF5729E31CCB6F250086F9B4 /* UIDevice+DeviceModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5729E21CCB6F250086F9B4 /* UIDevice+DeviceModel.swift */; };
- BF5729EC1CCB72E20086F9B4 /* UIDevice+DeviceModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5729EB1CCB72E20086F9B4 /* UIDevice+DeviceModelTests.swift */; };
- BF5FF2F61CCC8821000361CC /* Uploader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5FF2F51CCC8821000361CC /* Uploader.swift */; };
- BF5FF3381CCCA005000361CC /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5FF3371CCCA005000361CC /* Result.swift */; };
- BF6538371CABC4C5002CFF55 /* TreasureDataSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = BF6538361CABC4C5002CFF55 /* TreasureDataSDK.h */; settings = {ATTRIBUTES = (Public, ); }; };
- BF65383E1CABC4C6002CFF55 /* TreasureDataSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF6538331CABC4C5002CFF55 /* TreasureDataSDK.framework */; };
- BF6538431CABC4C6002CFF55 /* TreasureDataSDKTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF6538421CABC4C6002CFF55 /* TreasureDataSDKTests.swift */; };
- BF65384E1CABD185002CFF55 /* TreasureData.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF65384D1CABD185002CFF55 /* TreasureData.swift */; };
- BF6538501CABD1B6002CFF55 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF65384F1CABD1B6002CFF55 /* Configuration.swift */; };
- BF6538521CABD1C1002CFF55 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF6538511CABD1C1002CFF55 /* Event.swift */; };
- BF6538551CABD24E002CFF55 /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF6538531CABD24E002CFF55 /* Realm.framework */; };
- BF6538561CABD24E002CFF55 /* RealmSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF6538541CABD24E002CFF55 /* RealmSwift.framework */; };
- BF9AD0981CBB8DF600E38434 /* Device.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF9AD0971CBB8DF600E38434 /* Device.swift */; };
- BFE4C40E1CCCCE7500FA6BE2 /* NSURLSessionStub.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFE4C40D1CCCCE7500FA6BE2 /* NSURLSessionStub.swift */; };
- BFE4C4151CCCD2AE00FA6BE2 /* UploaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFE4C4141CCCD2AE00FA6BE2 /* UploaderTests.swift */; };
+ BF2AF2261D8EC58B0046AF20 /* TreasureDataSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF2AF21C1D8EC58B0046AF20 /* TreasureDataSDK.framework */; };
+ BF2AF22D1D8EC58B0046AF20 /* TreasureDataSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = BF2AF21F1D8EC58B0046AF20 /* TreasureDataSDK.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ BF2AF2681D8EC7100046AF20 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2591D8EC7100046AF20 /* Configuration.swift */; };
+ BF2AF2691D8EC7100046AF20 /* Device.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF25A1D8EC7100046AF20 /* Device.swift */; };
+ BF2AF26A1D8EC7100046AF20 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF25C1D8EC7100046AF20 /* Result.swift */; };
+ BF2AF26B1D8EC7100046AF20 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF25D1D8EC7100046AF20 /* Event.swift */; };
+ BF2AF26C1D8EC7100046AF20 /* String+PathComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF25F1D8EC7100046AF20 /* String+PathComponent.swift */; };
+ BF2AF26D1D8EC7100046AF20 /* UIDevice+DeviceModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2601D8EC7100046AF20 /* UIDevice+DeviceModel.swift */; };
+ BF2AF26E1D8EC7100046AF20 /* RealmFileHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2621D8EC7100046AF20 /* RealmFileHandler.swift */; };
+ BF2AF26F1D8EC7100046AF20 /* TreasureData.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2631D8EC7100046AF20 /* TreasureData.swift */; };
+ BF2AF2701D8EC7100046AF20 /* TreasureDataSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = BF2AF2641D8EC7100046AF20 /* TreasureDataSDK.h */; };
+ BF2AF2711D8EC7100046AF20 /* Uploader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2651D8EC7100046AF20 /* Uploader.swift */; };
+ BF2AF2721D8EC7100046AF20 /* UploadingDiscriminator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2661D8EC7100046AF20 /* UploadingDiscriminator.swift */; };
+ BF2AF2731D8EC7100046AF20 /* UploadRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2671D8EC7100046AF20 /* UploadRequest.swift */; };
+ BF2AF2771D8EC9270046AF20 /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF2AF2751D8EC9270046AF20 /* Realm.framework */; };
+ BF2AF2781D8EC9270046AF20 /* RealmSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF2AF2761D8EC9270046AF20 /* RealmSwift.framework */; };
+ BF2AF27A1D8F59630046AF20 /* Realm.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = BF2AF2751D8EC9270046AF20 /* Realm.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ BF2AF27B1D8F59630046AF20 /* RealmSwift.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = BF2AF2761D8EC9270046AF20 /* RealmSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ BF2AF28A1D8F59840046AF20 /* ConfigurationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF27D1D8F59840046AF20 /* ConfigurationTests.swift */; };
+ BF2AF28B1D8F59840046AF20 /* DeviceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF27E1D8F59840046AF20 /* DeviceTests.swift */; };
+ BF2AF28C1D8F59840046AF20 /* EventTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF27F1D8F59840046AF20 /* EventTests.swift */; };
+ BF2AF2901D8F59840046AF20 /* TreasureDataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2851D8F59840046AF20 /* TreasureDataTests.swift */; };
+ BF2AF2911D8F59840046AF20 /* UIDevice+DeviceModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2861D8F59840046AF20 /* UIDevice+DeviceModelTests.swift */; };
+ BF2AF2921D8F59840046AF20 /* UploaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2871D8F59840046AF20 /* UploaderTests.swift */; };
+ BF2AF2931D8F59840046AF20 /* UploadingDiscriminatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2881D8F59840046AF20 /* UploadingDiscriminatorTests.swift */; };
+ BF2AF2941D8F59840046AF20 /* UploadRequestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2891D8F59840046AF20 /* UploadRequestTests.swift */; };
+ BF2AF2991D8F59A40046AF20 /* URLSessionStub.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2971D8F59A40046AF20 /* URLSessionStub.swift */; };
+ BF2AF29A1D8F59A40046AF20 /* UIDeviceStub.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2AF2981D8F59A40046AF20 /* UIDeviceStub.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
- BF65383F1CABC4C6002CFF55 /* PBXContainerItemProxy */ = {
+ BF2AF2271D8EC58B0046AF20 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = BF65382A1CABC4C5002CFF55 /* Project object */;
+ containerPortal = BF2AF2131D8EC58B0046AF20 /* Project object */;
proxyType = 1;
- remoteGlobalIDString = BF6538321CABC4C5002CFF55;
+ remoteGlobalIDString = BF2AF21B1D8EC58B0046AF20;
remoteInfo = TreasureDataSDK;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
- BF2ED4791CCBC3FB009DD294 /* Copy Frameworks */ = {
+ BF2AF2791D8F59570046AF20 /* Copy Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
- BF2ED47A1CCBC455009DD294 /* Realm.framework in Copy Frameworks */,
- BF2ED47B1CCBC455009DD294 /* RealmSwift.framework in Copy Frameworks */,
+ BF2AF27A1D8F59630046AF20 /* Realm.framework in Copy Frameworks */,
+ BF2AF27B1D8F59630046AF20 /* RealmSwift.framework in Copy Frameworks */,
);
name = "Copy Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -63,204 +63,204 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 6A470B3D1D7E742300E91EFF /* UploadRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadRequest.swift; sourceTree = ""; };
- 6A470B3F1D7E80A900E91EFF /* UploadRequestTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadRequestTests.swift; sourceTree = ""; };
- 6A5D018F1D7FA199007B3F64 /* RealmFileHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RealmFileHandler.swift; path = Helpers/RealmFileHandler.swift; sourceTree = ""; };
- 6A5D01991D7FDCAF007B3F64 /* UploadingDiscriminator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadingDiscriminator.swift; sourceTree = ""; };
- 6A5D019C1D7FF7EA007B3F64 /* UploadingDiscriminatorTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadingDiscriminatorTests.swift; sourceTree = ""; };
- BF0ACC7B1CCB85A700C70F4E /* UIDeviceStub.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIDeviceStub.swift; sourceTree = ""; };
- BF0ACC7F1CCB8E4700C70F4E /* EventTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventTests.swift; sourceTree = ""; };
- BF0ACC811CCB930100C70F4E /* TreasureDataTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TreasureDataTests.swift; sourceTree = ""; };
- BF29CE5F1CB224A6003DE779 /* ConfigurationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfigurationTests.swift; sourceTree = ""; };
- BF29CE671CB243C5003DE779 /* String+PathComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+PathComponent.swift"; sourceTree = ""; };
- BF5729E01CCB6B480086F9B4 /* DeviceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeviceTests.swift; sourceTree = ""; };
- BF5729E21CCB6F250086F9B4 /* UIDevice+DeviceModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIDevice+DeviceModel.swift"; sourceTree = ""; };
- BF5729EB1CCB72E20086F9B4 /* UIDevice+DeviceModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIDevice+DeviceModelTests.swift"; sourceTree = ""; };
- BF5FF2F51CCC8821000361CC /* Uploader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Uploader.swift; sourceTree = ""; };
- BF5FF3371CCCA005000361CC /* Result.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result.swift; sourceTree = ""; };
- BF6538331CABC4C5002CFF55 /* TreasureDataSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TreasureDataSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- BF6538361CABC4C5002CFF55 /* TreasureDataSDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TreasureDataSDK.h; sourceTree = ""; };
- BF6538381CABC4C5002CFF55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- BF65383D1CABC4C6002CFF55 /* TreasureDataSDKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TreasureDataSDKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
- BF6538421CABC4C6002CFF55 /* TreasureDataSDKTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TreasureDataSDKTests.swift; sourceTree = ""; };
- BF6538441CABC4C6002CFF55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- BF65384D1CABD185002CFF55 /* TreasureData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TreasureData.swift; sourceTree = ""; };
- BF65384F1CABD1B6002CFF55 /* Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; };
- BF6538511CABD1C1002CFF55 /* Event.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Event.swift; sourceTree = ""; };
- BF6538531CABD24E002CFF55 /* Realm.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Realm.framework; path = Carthage/Build/iOS/Realm.framework; sourceTree = ""; };
- BF6538541CABD24E002CFF55 /* RealmSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RealmSwift.framework; path = Carthage/Build/iOS/RealmSwift.framework; sourceTree = ""; };
- BF9AD0971CBB8DF600E38434 /* Device.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Device.swift; sourceTree = ""; };
- BFE4C40D1CCCCE7500FA6BE2 /* NSURLSessionStub.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSURLSessionStub.swift; sourceTree = ""; };
- BFE4C4141CCCD2AE00FA6BE2 /* UploaderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploaderTests.swift; sourceTree = ""; };
+ BF2AF21C1D8EC58B0046AF20 /* TreasureDataSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TreasureDataSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ BF2AF21F1D8EC58B0046AF20 /* TreasureDataSDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TreasureDataSDK.h; sourceTree = ""; };
+ BF2AF2201D8EC58B0046AF20 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ BF2AF2251D8EC58B0046AF20 /* TreasureDataSDKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TreasureDataSDKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ BF2AF22C1D8EC58B0046AF20 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ BF2AF2591D8EC7100046AF20 /* Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; };
+ BF2AF25A1D8EC7100046AF20 /* Device.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Device.swift; sourceTree = ""; };
+ BF2AF25C1D8EC7100046AF20 /* Result.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result.swift; sourceTree = ""; };
+ BF2AF25D1D8EC7100046AF20 /* Event.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Event.swift; sourceTree = ""; };
+ BF2AF25F1D8EC7100046AF20 /* String+PathComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+PathComponent.swift"; sourceTree = ""; };
+ BF2AF2601D8EC7100046AF20 /* UIDevice+DeviceModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIDevice+DeviceModel.swift"; sourceTree = ""; };
+ BF2AF2621D8EC7100046AF20 /* RealmFileHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RealmFileHandler.swift; sourceTree = ""; };
+ BF2AF2631D8EC7100046AF20 /* TreasureData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TreasureData.swift; sourceTree = ""; };
+ BF2AF2641D8EC7100046AF20 /* TreasureDataSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TreasureDataSDK.h; sourceTree = ""; };
+ BF2AF2651D8EC7100046AF20 /* Uploader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Uploader.swift; sourceTree = ""; };
+ BF2AF2661D8EC7100046AF20 /* UploadingDiscriminator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadingDiscriminator.swift; sourceTree = ""; };
+ BF2AF2671D8EC7100046AF20 /* UploadRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadRequest.swift; sourceTree = ""; };
+ BF2AF2751D8EC9270046AF20 /* Realm.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Realm.framework; path = Carthage/Build/iOS/Realm.framework; sourceTree = ""; };
+ BF2AF2761D8EC9270046AF20 /* RealmSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RealmSwift.framework; path = Carthage/Build/iOS/RealmSwift.framework; sourceTree = ""; };
+ BF2AF27D1D8F59840046AF20 /* ConfigurationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfigurationTests.swift; sourceTree = ""; };
+ BF2AF27E1D8F59840046AF20 /* DeviceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeviceTests.swift; sourceTree = ""; };
+ BF2AF27F1D8F59840046AF20 /* EventTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventTests.swift; sourceTree = ""; };
+ BF2AF2851D8F59840046AF20 /* TreasureDataTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TreasureDataTests.swift; sourceTree = ""; };
+ BF2AF2861D8F59840046AF20 /* UIDevice+DeviceModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIDevice+DeviceModelTests.swift"; sourceTree = ""; };
+ BF2AF2871D8F59840046AF20 /* UploaderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploaderTests.swift; sourceTree = ""; };
+ BF2AF2881D8F59840046AF20 /* UploadingDiscriminatorTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadingDiscriminatorTests.swift; sourceTree = ""; };
+ BF2AF2891D8F59840046AF20 /* UploadRequestTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadRequestTests.swift; sourceTree = ""; };
+ BF2AF2971D8F59A40046AF20 /* URLSessionStub.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = URLSessionStub.swift; sourceTree = ""; };
+ BF2AF2981D8F59A40046AF20 /* UIDeviceStub.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIDeviceStub.swift; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
- BF65382F1CABC4C5002CFF55 /* Frameworks */ = {
+ BF2AF2181D8EC58B0046AF20 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- BF6538551CABD24E002CFF55 /* Realm.framework in Frameworks */,
- BF6538561CABD24E002CFF55 /* RealmSwift.framework in Frameworks */,
+ BF2AF2771D8EC9270046AF20 /* Realm.framework in Frameworks */,
+ BF2AF2781D8EC9270046AF20 /* RealmSwift.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
- BF65383A1CABC4C6002CFF55 /* Frameworks */ = {
+ BF2AF2221D8EC58B0046AF20 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- BF65383E1CABC4C6002CFF55 /* TreasureDataSDK.framework in Frameworks */,
+ BF2AF2261D8EC58B0046AF20 /* TreasureDataSDK.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
- 6A5D018E1D7FA12C007B3F64 /* Helpers */ = {
+ BF2AF2121D8EC58B0046AF20 = {
isa = PBXGroup;
children = (
- 6A5D018F1D7FA199007B3F64 /* RealmFileHandler.swift */,
+ BF2AF21E1D8EC58B0046AF20 /* TreasureDataSDK */,
+ BF2AF2291D8EC58B0046AF20 /* TreasureDataSDKTests */,
+ BF2AF21D1D8EC58B0046AF20 /* Products */,
+ BF2AF2741D8EC9270046AF20 /* Frameworks */,
);
- name = Helpers;
sourceTree = "";
};
- BF0ACC731CCB809B00C70F4E /* Helpers */ = {
+ BF2AF21D1D8EC58B0046AF20 /* Products */ = {
isa = PBXGroup;
children = (
- BF0ACC751CCB841D00C70F4E /* Extensions */,
- BF0ACC741CCB841200C70F4E /* Stubs */,
+ BF2AF21C1D8EC58B0046AF20 /* TreasureDataSDK.framework */,
+ BF2AF2251D8EC58B0046AF20 /* TreasureDataSDKTests.xctest */,
);
- path = Helpers;
+ name = Products;
sourceTree = "";
};
- BF0ACC741CCB841200C70F4E /* Stubs */ = {
+ BF2AF21E1D8EC58B0046AF20 /* TreasureDataSDK */ = {
isa = PBXGroup;
children = (
- BF0ACC7B1CCB85A700C70F4E /* UIDeviceStub.swift */,
- BFE4C40D1CCCCE7500FA6BE2 /* NSURLSessionStub.swift */,
+ BF2AF21F1D8EC58B0046AF20 /* TreasureDataSDK.h */,
+ BF2AF2581D8EC7100046AF20 /* Source */,
+ BF2AF2201D8EC58B0046AF20 /* Info.plist */,
);
- path = Stubs;
+ path = TreasureDataSDK;
sourceTree = "";
};
- BF0ACC751CCB841D00C70F4E /* Extensions */ = {
+ BF2AF2291D8EC58B0046AF20 /* TreasureDataSDKTests */ = {
isa = PBXGroup;
children = (
+ BF2AF2951D8F59A40046AF20 /* TestHelpers */,
+ BF2AF27C1D8F59840046AF20 /* Tests */,
+ BF2AF22C1D8EC58B0046AF20 /* Info.plist */,
);
- path = Extensions;
+ path = TreasureDataSDKTests;
sourceTree = "";
};
- BF29CE661CB24377003DE779 /* Extensions */ = {
+ BF2AF2581D8EC7100046AF20 /* Source */ = {
isa = PBXGroup;
children = (
- BF29CE671CB243C5003DE779 /* String+PathComponent.swift */,
- BF5729E21CCB6F250086F9B4 /* UIDevice+DeviceModel.swift */,
+ BF2AF2591D8EC7100046AF20 /* Configuration.swift */,
+ BF2AF25A1D8EC7100046AF20 /* Device.swift */,
+ BF2AF25B1D8EC7100046AF20 /* Enumerations */,
+ BF2AF25D1D8EC7100046AF20 /* Event.swift */,
+ BF2AF25E1D8EC7100046AF20 /* Extensions */,
+ BF2AF2611D8EC7100046AF20 /* Helpers */,
+ BF2AF2631D8EC7100046AF20 /* TreasureData.swift */,
+ BF2AF2641D8EC7100046AF20 /* TreasureDataSDK.h */,
+ BF2AF2651D8EC7100046AF20 /* Uploader.swift */,
+ BF2AF2661D8EC7100046AF20 /* UploadingDiscriminator.swift */,
+ BF2AF2671D8EC7100046AF20 /* UploadRequest.swift */,
);
- path = Extensions;
- sourceTree = "";
+ path = Source;
+ sourceTree = SOURCE_ROOT;
};
- BF5729DD1CCB5FBE0086F9B4 /* Enumerations */ = {
+ BF2AF25B1D8EC7100046AF20 /* Enumerations */ = {
isa = PBXGroup;
children = (
- BF5FF3371CCCA005000361CC /* Result.swift */,
+ BF2AF25C1D8EC7100046AF20 /* Result.swift */,
);
path = Enumerations;
sourceTree = "";
};
- BF5729EA1CCB72D20086F9B4 /* Extensions */ = {
+ BF2AF25E1D8EC7100046AF20 /* Extensions */ = {
isa = PBXGroup;
children = (
- BF5729EB1CCB72E20086F9B4 /* UIDevice+DeviceModelTests.swift */,
+ BF2AF25F1D8EC7100046AF20 /* String+PathComponent.swift */,
+ BF2AF2601D8EC7100046AF20 /* UIDevice+DeviceModel.swift */,
);
- name = Extensions;
+ path = Extensions;
sourceTree = "";
};
- BF6538291CABC4C5002CFF55 = {
+ BF2AF2611D8EC7100046AF20 /* Helpers */ = {
isa = PBXGroup;
children = (
- BF6538571CABD253002CFF55 /* Frameworks */,
- BF6538351CABC4C5002CFF55 /* TreasureDataSDK */,
- BF6538411CABC4C6002CFF55 /* TreasureDataSDKTests */,
- BF6538341CABC4C5002CFF55 /* Products */,
+ BF2AF2621D8EC7100046AF20 /* RealmFileHandler.swift */,
);
+ path = Helpers;
sourceTree = "";
};
- BF6538341CABC4C5002CFF55 /* Products */ = {
+ BF2AF2741D8EC9270046AF20 /* Frameworks */ = {
isa = PBXGroup;
children = (
- BF6538331CABC4C5002CFF55 /* TreasureDataSDK.framework */,
- BF65383D1CABC4C6002CFF55 /* TreasureDataSDKTests.xctest */,
+ BF2AF2751D8EC9270046AF20 /* Realm.framework */,
+ BF2AF2761D8EC9270046AF20 /* RealmSwift.framework */,
);
- name = Products;
+ name = Frameworks;
sourceTree = "";
};
- BF6538351CABC4C5002CFF55 /* TreasureDataSDK */ = {
+ BF2AF27C1D8F59840046AF20 /* Tests */ = {
isa = PBXGroup;
children = (
- 6A5D018E1D7FA12C007B3F64 /* Helpers */,
- BF5729DD1CCB5FBE0086F9B4 /* Enumerations */,
- BF29CE661CB24377003DE779 /* Extensions */,
- BF6538361CABC4C5002CFF55 /* TreasureDataSDK.h */,
- BF6538381CABC4C5002CFF55 /* Info.plist */,
- BF65384D1CABD185002CFF55 /* TreasureData.swift */,
- BF65384F1CABD1B6002CFF55 /* Configuration.swift */,
- BF6538511CABD1C1002CFF55 /* Event.swift */,
- BF9AD0971CBB8DF600E38434 /* Device.swift */,
- BF5FF2F51CCC8821000361CC /* Uploader.swift */,
- 6A5D01991D7FDCAF007B3F64 /* UploadingDiscriminator.swift */,
- 6A470B3D1D7E742300E91EFF /* UploadRequest.swift */,
+ BF2AF27D1D8F59840046AF20 /* ConfigurationTests.swift */,
+ BF2AF27E1D8F59840046AF20 /* DeviceTests.swift */,
+ BF2AF27F1D8F59840046AF20 /* EventTests.swift */,
+ BF2AF2851D8F59840046AF20 /* TreasureDataTests.swift */,
+ BF2AF2861D8F59840046AF20 /* UIDevice+DeviceModelTests.swift */,
+ BF2AF2871D8F59840046AF20 /* UploaderTests.swift */,
+ BF2AF2881D8F59840046AF20 /* UploadingDiscriminatorTests.swift */,
+ BF2AF2891D8F59840046AF20 /* UploadRequestTests.swift */,
);
- path = TreasureDataSDK;
- sourceTree = "";
+ path = Tests;
+ sourceTree = SOURCE_ROOT;
};
- BF6538411CABC4C6002CFF55 /* TreasureDataSDKTests */ = {
+ BF2AF2951D8F59A40046AF20 /* TestHelpers */ = {
isa = PBXGroup;
children = (
- BF0ACC731CCB809B00C70F4E /* Helpers */,
- BF5729EA1CCB72D20086F9B4 /* Extensions */,
- BF6538421CABC4C6002CFF55 /* TreasureDataSDKTests.swift */,
- BF6538441CABC4C6002CFF55 /* Info.plist */,
- BF29CE5F1CB224A6003DE779 /* ConfigurationTests.swift */,
- BF5729E01CCB6B480086F9B4 /* DeviceTests.swift */,
- BF0ACC7F1CCB8E4700C70F4E /* EventTests.swift */,
- BF0ACC811CCB930100C70F4E /* TreasureDataTests.swift */,
- BFE4C4141CCCD2AE00FA6BE2 /* UploaderTests.swift */,
- 6A470B3F1D7E80A900E91EFF /* UploadRequestTests.swift */,
- 6A5D019C1D7FF7EA007B3F64 /* UploadingDiscriminatorTests.swift */,
+ BF2AF2961D8F59A40046AF20 /* Stubs */,
);
- path = TreasureDataSDKTests;
- sourceTree = "";
+ path = TestHelpers;
+ sourceTree = SOURCE_ROOT;
};
- BF6538571CABD253002CFF55 /* Frameworks */ = {
+ BF2AF2961D8F59A40046AF20 /* Stubs */ = {
isa = PBXGroup;
children = (
- BF6538531CABD24E002CFF55 /* Realm.framework */,
- BF6538541CABD24E002CFF55 /* RealmSwift.framework */,
+ BF2AF2971D8F59A40046AF20 /* URLSessionStub.swift */,
+ BF2AF2981D8F59A40046AF20 /* UIDeviceStub.swift */,
);
- name = Frameworks;
+ path = Stubs;
sourceTree = "";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
- BF6538301CABC4C5002CFF55 /* Headers */ = {
+ BF2AF2191D8EC58B0046AF20 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
- BF6538371CABC4C5002CFF55 /* TreasureDataSDK.h in Headers */,
+ BF2AF2701D8EC7100046AF20 /* TreasureDataSDK.h in Headers */,
+ BF2AF22D1D8EC58B0046AF20 /* TreasureDataSDK.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
- BF6538321CABC4C5002CFF55 /* TreasureDataSDK */ = {
+ BF2AF21B1D8EC58B0046AF20 /* TreasureDataSDK */ = {
isa = PBXNativeTarget;
- buildConfigurationList = BF6538471CABC4C6002CFF55 /* Build configuration list for PBXNativeTarget "TreasureDataSDK" */;
+ buildConfigurationList = BF2AF2301D8EC58B0046AF20 /* Build configuration list for PBXNativeTarget "TreasureDataSDK" */;
buildPhases = (
- BF65382E1CABC4C5002CFF55 /* Sources */,
- BF65382F1CABC4C5002CFF55 /* Frameworks */,
- BF6538301CABC4C5002CFF55 /* Headers */,
- BF6538311CABC4C5002CFF55 /* Resources */,
- BF2ED4791CCBC3FB009DD294 /* Copy Frameworks */,
+ BF2AF2171D8EC58B0046AF20 /* Sources */,
+ BF2AF2181D8EC58B0046AF20 /* Frameworks */,
+ BF2AF2191D8EC58B0046AF20 /* Headers */,
+ BF2AF21A1D8EC58B0046AF20 /* Resources */,
);
buildRules = (
);
@@ -268,72 +268,78 @@
);
name = TreasureDataSDK;
productName = TreasureDataSDK;
- productReference = BF6538331CABC4C5002CFF55 /* TreasureDataSDK.framework */;
+ productReference = BF2AF21C1D8EC58B0046AF20 /* TreasureDataSDK.framework */;
productType = "com.apple.product-type.framework";
};
- BF65383C1CABC4C6002CFF55 /* TreasureDataSDKTests */ = {
+ BF2AF2241D8EC58B0046AF20 /* TreasureDataSDKTests */ = {
isa = PBXNativeTarget;
- buildConfigurationList = BF65384A1CABC4C6002CFF55 /* Build configuration list for PBXNativeTarget "TreasureDataSDKTests" */;
+ buildConfigurationList = BF2AF2331D8EC58B0046AF20 /* Build configuration list for PBXNativeTarget "TreasureDataSDKTests" */;
buildPhases = (
- BF6538391CABC4C6002CFF55 /* Sources */,
- BF65383A1CABC4C6002CFF55 /* Frameworks */,
- BF65383B1CABC4C6002CFF55 /* Resources */,
+ BF2AF2211D8EC58B0046AF20 /* Sources */,
+ BF2AF2221D8EC58B0046AF20 /* Frameworks */,
+ BF2AF2231D8EC58B0046AF20 /* Resources */,
+ BF2AF2791D8F59570046AF20 /* Copy Frameworks */,
);
buildRules = (
);
dependencies = (
- BF6538401CABC4C6002CFF55 /* PBXTargetDependency */,
+ BF2AF2281D8EC58B0046AF20 /* PBXTargetDependency */,
);
name = TreasureDataSDKTests;
productName = TreasureDataSDKTests;
- productReference = BF65383D1CABC4C6002CFF55 /* TreasureDataSDKTests.xctest */;
+ productReference = BF2AF2251D8EC58B0046AF20 /* TreasureDataSDKTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
- BF65382A1CABC4C5002CFF55 /* Project object */ = {
+ BF2AF2131D8EC58B0046AF20 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastSwiftUpdateCheck = 0730;
- LastUpgradeCheck = 0730;
+ LastSwiftUpdateCheck = 0800;
+ LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Recruit Lifestyle Co., Ltd.";
TargetAttributes = {
- BF6538321CABC4C5002CFF55 = {
- CreatedOnToolsVersion = 7.3;
+ BF2AF21B1D8EC58B0046AF20 = {
+ CreatedOnToolsVersion = 8.0;
+ DevelopmentTeam = 4HG2762R5U;
+ ProvisioningStyle = Automatic;
};
- BF65383C1CABC4C6002CFF55 = {
- CreatedOnToolsVersion = 7.3;
+ BF2AF2241D8EC58B0046AF20 = {
+ CreatedOnToolsVersion = 8.0;
+ DevelopmentTeam = 4HG2762R5U;
+ LastSwiftMigration = 0800;
+ ProvisioningStyle = Automatic;
};
};
};
- buildConfigurationList = BF65382D1CABC4C5002CFF55 /* Build configuration list for PBXProject "TreasureDataSDK" */;
+ buildConfigurationList = BF2AF2161D8EC58B0046AF20 /* Build configuration list for PBXProject "TreasureDataSDK" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
- mainGroup = BF6538291CABC4C5002CFF55;
- productRefGroup = BF6538341CABC4C5002CFF55 /* Products */;
+ mainGroup = BF2AF2121D8EC58B0046AF20;
+ productRefGroup = BF2AF21D1D8EC58B0046AF20 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
- BF6538321CABC4C5002CFF55 /* TreasureDataSDK */,
- BF65383C1CABC4C6002CFF55 /* TreasureDataSDKTests */,
+ BF2AF21B1D8EC58B0046AF20 /* TreasureDataSDK */,
+ BF2AF2241D8EC58B0046AF20 /* TreasureDataSDKTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
- BF6538311CABC4C5002CFF55 /* Resources */ = {
+ BF2AF21A1D8EC58B0046AF20 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
- BF65383B1CABC4C6002CFF55 /* Resources */ = {
+ BF2AF2231D8EC58B0046AF20 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -343,54 +349,53 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
- BF65382E1CABC4C5002CFF55 /* Sources */ = {
+ BF2AF2171D8EC58B0046AF20 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 6A5D01901D7FA199007B3F64 /* RealmFileHandler.swift in Sources */,
- BF6538501CABD1B6002CFF55 /* Configuration.swift in Sources */,
- BF5FF3381CCCA005000361CC /* Result.swift in Sources */,
- BF5FF2F61CCC8821000361CC /* Uploader.swift in Sources */,
- 6A5D019A1D7FDCAF007B3F64 /* UploadingDiscriminator.swift in Sources */,
- BF6538521CABD1C1002CFF55 /* Event.swift in Sources */,
- BF65384E1CABD185002CFF55 /* TreasureData.swift in Sources */,
- BF5729E31CCB6F250086F9B4 /* UIDevice+DeviceModel.swift in Sources */,
- BF29CE681CB243C5003DE779 /* String+PathComponent.swift in Sources */,
- BF9AD0981CBB8DF600E38434 /* Device.swift in Sources */,
- 6A470B3E1D7E742300E91EFF /* UploadRequest.swift in Sources */,
+ BF2AF26B1D8EC7100046AF20 /* Event.swift in Sources */,
+ BF2AF26E1D8EC7100046AF20 /* RealmFileHandler.swift in Sources */,
+ BF2AF26F1D8EC7100046AF20 /* TreasureData.swift in Sources */,
+ BF2AF2711D8EC7100046AF20 /* Uploader.swift in Sources */,
+ BF2AF2721D8EC7100046AF20 /* UploadingDiscriminator.swift in Sources */,
+ BF2AF2731D8EC7100046AF20 /* UploadRequest.swift in Sources */,
+ BF2AF26A1D8EC7100046AF20 /* Result.swift in Sources */,
+ BF2AF26C1D8EC7100046AF20 /* String+PathComponent.swift in Sources */,
+ BF2AF26D1D8EC7100046AF20 /* UIDevice+DeviceModel.swift in Sources */,
+ BF2AF2681D8EC7100046AF20 /* Configuration.swift in Sources */,
+ BF2AF2691D8EC7100046AF20 /* Device.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
- BF6538391CABC4C6002CFF55 /* Sources */ = {
+ BF2AF2211D8EC58B0046AF20 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- BF0ACC7C1CCB85A700C70F4E /* UIDeviceStub.swift in Sources */,
- BF29CE601CB224A6003DE779 /* ConfigurationTests.swift in Sources */,
- BF0ACC821CCB930100C70F4E /* TreasureDataTests.swift in Sources */,
- BF5729EC1CCB72E20086F9B4 /* UIDevice+DeviceModelTests.swift in Sources */,
- BFE4C4151CCCD2AE00FA6BE2 /* UploaderTests.swift in Sources */,
- 6A5D019D1D7FF7EA007B3F64 /* UploadingDiscriminatorTests.swift in Sources */,
- BF6538431CABC4C6002CFF55 /* TreasureDataSDKTests.swift in Sources */,
- BF0ACC801CCB8E4700C70F4E /* EventTests.swift in Sources */,
- BF5729E11CCB6B480086F9B4 /* DeviceTests.swift in Sources */,
- 6A470B401D7E80A900E91EFF /* UploadRequestTests.swift in Sources */,
- BFE4C40E1CCCCE7500FA6BE2 /* NSURLSessionStub.swift in Sources */,
+ BF2AF2931D8F59840046AF20 /* UploadingDiscriminatorTests.swift in Sources */,
+ BF2AF29A1D8F59A40046AF20 /* UIDeviceStub.swift in Sources */,
+ BF2AF2901D8F59840046AF20 /* TreasureDataTests.swift in Sources */,
+ BF2AF2991D8F59A40046AF20 /* URLSessionStub.swift in Sources */,
+ BF2AF28A1D8F59840046AF20 /* ConfigurationTests.swift in Sources */,
+ BF2AF2921D8F59840046AF20 /* UploaderTests.swift in Sources */,
+ BF2AF28C1D8F59840046AF20 /* EventTests.swift in Sources */,
+ BF2AF28B1D8F59840046AF20 /* DeviceTests.swift in Sources */,
+ BF2AF2941D8F59840046AF20 /* UploadRequestTests.swift in Sources */,
+ BF2AF2911D8F59840046AF20 /* UIDevice+DeviceModelTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
- BF6538401CABC4C6002CFF55 /* PBXTargetDependency */ = {
+ BF2AF2281D8EC58B0046AF20 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- target = BF6538321CABC4C5002CFF55 /* TreasureDataSDK */;
- targetProxy = BF65383F1CABC4C6002CFF55 /* PBXContainerItemProxy */;
+ target = BF2AF21B1D8EC58B0046AF20 /* TreasureDataSDK */;
+ targetProxy = BF2AF2271D8EC58B0046AF20 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
- BF6538451CABC4C6002CFF55 /* Debug */ = {
+ BF2AF22E1D8EC58B0046AF20 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -402,10 +407,13 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -432,6 +440,7 @@
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
@@ -439,7 +448,7 @@
};
name = Debug;
};
- BF6538461CABC4C6002CFF55 /* Release */ = {
+ BF2AF22F1D8EC58B0046AF20 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -451,10 +460,13 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -474,6 +486,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
+ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
@@ -481,11 +494,12 @@
};
name = Release;
};
- BF6538481CABC4C6002CFF55 /* Debug */ = {
+ BF2AF2311D8EC58B0046AF20 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
+ DEVELOPMENT_TEAM = 4HG2762R5U;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -499,15 +513,16 @@
PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-lifestyle.TreasureDataSDK";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 3.0;
};
name = Debug;
};
- BF6538491CABC4C6002CFF55 /* Release */ = {
+ BF2AF2321D8EC58B0046AF20 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
+ DEVELOPMENT_TEAM = 4HG2762R5U;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -521,12 +536,15 @@
PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-lifestyle.TreasureDataSDK";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
+ SWIFT_VERSION = 3.0;
};
name = Release;
};
- BF65384B1CABC4C6002CFF55 /* Debug */ = {
+ BF2AF2341D8EC58B0046AF20 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+ DEVELOPMENT_TEAM = 4HG2762R5U;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
@@ -535,12 +553,15 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-lifestyle.TreasureDataSDKTests";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 3.0;
};
name = Debug;
};
- BF65384C1CABC4C6002CFF55 /* Release */ = {
+ BF2AF2351D8EC58B0046AF20 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+ DEVELOPMENT_TEAM = 4HG2762R5U;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
@@ -549,40 +570,41 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-lifestyle.TreasureDataSDKTests";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 3.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- BF65382D1CABC4C5002CFF55 /* Build configuration list for PBXProject "TreasureDataSDK" */ = {
+ BF2AF2161D8EC58B0046AF20 /* Build configuration list for PBXProject "TreasureDataSDK" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- BF6538451CABC4C6002CFF55 /* Debug */,
- BF6538461CABC4C6002CFF55 /* Release */,
+ BF2AF22E1D8EC58B0046AF20 /* Debug */,
+ BF2AF22F1D8EC58B0046AF20 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- BF6538471CABC4C6002CFF55 /* Build configuration list for PBXNativeTarget "TreasureDataSDK" */ = {
+ BF2AF2301D8EC58B0046AF20 /* Build configuration list for PBXNativeTarget "TreasureDataSDK" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- BF6538481CABC4C6002CFF55 /* Debug */,
- BF6538491CABC4C6002CFF55 /* Release */,
+ BF2AF2311D8EC58B0046AF20 /* Debug */,
+ BF2AF2321D8EC58B0046AF20 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- BF65384A1CABC4C6002CFF55 /* Build configuration list for PBXNativeTarget "TreasureDataSDKTests" */ = {
+ BF2AF2331D8EC58B0046AF20 /* Build configuration list for PBXNativeTarget "TreasureDataSDKTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- BF65384B1CABC4C6002CFF55 /* Debug */,
- BF65384C1CABC4C6002CFF55 /* Release */,
+ BF2AF2341D8EC58B0046AF20 /* Debug */,
+ BF2AF2351D8EC58B0046AF20 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
- rootObject = BF65382A1CABC4C5002CFF55 /* Project object */;
+ rootObject = BF2AF2131D8EC58B0046AF20 /* Project object */;
}
diff --git a/TreasureDataSDK.xcodeproj/xcshareddata/xcschemes/TreasureDataSDK.xcscheme b/TreasureDataSDK.xcodeproj/xcshareddata/xcschemes/TreasureDataSDK.xcscheme
index 5bf5024..7cb8878 100644
--- a/TreasureDataSDK.xcodeproj/xcshareddata/xcschemes/TreasureDataSDK.xcscheme
+++ b/TreasureDataSDK.xcodeproj/xcshareddata/xcschemes/TreasureDataSDK.xcscheme
@@ -1,6 +1,6 @@
@@ -26,13 +26,14 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES">
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ codeCoverageEnabled = "YES">
@@ -42,7 +43,7 @@
@@ -64,7 +65,7 @@
@@ -82,7 +83,7 @@
diff --git a/TreasureDataSDK/Helpers/RealmFileHandler.swift b/TreasureDataSDK/Helpers/RealmFileHandler.swift
deleted file mode 100644
index 0d5ba0c..0000000
--- a/TreasureDataSDK/Helpers/RealmFileHandler.swift
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// RealmFileHandler.swift
-// TreasureDataSDK
-//
-// Created by YasudaHayato on 2016/09/07.
-// Copyright © 2016年 Recruit Lifestyle Co., Ltd. All rights reserved.
-//
-
-import Foundation
-
-internal struct RealmFileHandler {
- func deleteAllRealmFiles(configuration: Configuration) {
-
- let realmFileURLs = self.retrieveRealmFileURLs(configuration)
-
- let manager = NSFileManager.defaultManager()
- for fileURL in realmFileURLs {
- do {
- try manager.removeItemAtURL(fileURL)
- } catch let error {
- if configuration.debug {
- print(error)
- }
- }
- }
- }
-
- private func retrieveRealmFileURLs(configuration: Configuration) -> [NSURL] {
- guard let mainFileURL = configuration.fileURL,
- let mainFileName = mainFileURL.lastPathComponent,
- let directoryURL = mainFileURL.URLByDeletingLastPathComponent,
- let directoryURLString = directoryURL.path else {
- return []
- }
-
- do {
- return try NSFileManager.defaultManager()
- .contentsOfDirectoryAtPath(directoryURLString)
- .filter { $0.containsString(mainFileName) }
- .map { directoryURL.URLByAppendingPathComponent($0) }
- } catch {
- if configuration.debug {
- print(error)
- }
- return []
- }
- }
-}
diff --git a/TreasureDataSDK/Info.plist b/TreasureDataSDK/Info.plist
index d3de8ee..fbe1e6b 100644
--- a/TreasureDataSDK/Info.plist
+++ b/TreasureDataSDK/Info.plist
@@ -16,8 +16,6 @@
FMWK
CFBundleShortVersionString
1.0
- CFBundleSignature
- ????
CFBundleVersion
$(CURRENT_PROJECT_VERSION)
NSPrincipalClass
diff --git a/TreasureDataSDK/TreasureDataSDK.h b/TreasureDataSDK/TreasureDataSDK.h
index 104c281..0c525ee 100644
--- a/TreasureDataSDK/TreasureDataSDK.h
+++ b/TreasureDataSDK/TreasureDataSDK.h
@@ -2,7 +2,7 @@
// TreasureDataSDK.h
// TreasureDataSDK
//
-// Created by Yuki Nagai on 3/30/16.
+// Created by Yuki Nagai on 9/18/16.
// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved.
//
diff --git a/TreasureDataSDKTests/Info.plist b/TreasureDataSDKTests/Info.plist
index ba72822..6c6c23c 100644
--- a/TreasureDataSDKTests/Info.plist
+++ b/TreasureDataSDKTests/Info.plist
@@ -16,8 +16,6 @@
BNDL
CFBundleShortVersionString
1.0
- CFBundleSignature
- ????
CFBundleVersion
1
diff --git a/TreasureDataSDKTests/TreasureDataSDKTests.swift b/TreasureDataSDKTests/TreasureDataSDKTests.swift
deleted file mode 100644
index 07227bf..0000000
--- a/TreasureDataSDKTests/TreasureDataSDKTests.swift
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// TreasureDataSDKTests.swift
-// TreasureDataSDKTests
-//
-// Created by Yuki Nagai on 3/30/16.
-// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved.
-//
-
-import XCTest
-@testable import TreasureDataSDK
-
-class TreasureDataSDKTests: XCTestCase {
-
- override func setUp() {
- super.setUp()
- // Put setup code here. This method is called before the invocation of each test method in the class.
- }
-
- override func tearDown() {
- // Put teardown code here. This method is called after the invocation of each test method in the class.
- super.tearDown()
- }
-
- func testExample() {
- // This is an example of a functional test case.
- // Use XCTAssert and related functions to verify your tests produce the correct results.
- }
-
- func testPerformanceExample() {
- // This is an example of a performance test case.
- self.measureBlock {
- // Put the code you want to measure the time of here.
- }
- }
-
-}