diff --git a/.gitignore b/.gitignore index 2c22487..b904e64 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ xcuserdata/ ## Other *.moved-aside *.xcuserstate +*.DS_STORE ## Obj-C/Swift specific *.hmap diff --git a/README.md b/README.md index dd6f3be..6e8bc23 100644 --- a/README.md +++ b/README.md @@ -6,35 +6,44 @@ ## Table of Contents -1. [Overview](#1-overview) -2. [Setup](#2-setup) - - 2.1 [Run the Demo](#21-run-the-demo) - - 2.2 [Set up Xcode Project](#22-set-up-xcode-project) - - 2.3 [Import ViSearch Swift SDK](##23-import-visearch-swift-sdk) - - 2.4 [Add Privacy Usage Description](#24-add-privacy-usage-description) -3. [Initialization](#3-initialization) - - 3.1 [ViSearch](#31-visearch) - - 3.2 [ProductSearch](#32-viproductsearch) -4. [Solution APIs](#4-solution-apis) - - 4.1 [ViSearch](#41-visearch) - - 4.1.1 [Visually Similar Recommendations](#411-visually-similar-recommendations) - - 4.1.2 [Search by Image](#412-search-by-image) - - 4.1.2.1 [Selection Box](#4121-selection-box) - - 4.1.2.2 [Resizing Settings](#4122-resizing-settings) - - 4.1.3 [Search by Color](#413-search-by-color) - - 4.1.4 [Multiple Products Search](#414-multiple-products-search) - - 4.2 [ProductSearch](#42-productsearch) -5. [Search Results](#5-search-results) - - 5.1 [ViSearch](#51-visearch) - - 5.2 [ProductSearch](#52-productsearch) -6. [Advanced Search Parameters](#6-advanced-search-parameters) - - 6.1 [Retrieving Metadata](#61-retrieving-metadata) - - 6.2 [Filtering Results](#62-filtering-results) - - 6.3 [Result Score](#63-result-score) - - 6.4 [Automatic Object Recognition Beta](#64-automatic-object-recognition-beta) - - 6.5 [Facets Filtering](#65-facets-filtering) -7. [Event Tracking](#7-event-tracking) -8. [Developer Notes](#8-developer-notes) +- [ViSearch Swift SDK and Demo Source Code](#visearch-swift-sdk-and-demo-source-code) + - [Table of Contents](#table-of-contents) + - [1. Overview](#1-overview) + - [2. Setup](#2-setup) + - [2.1 Run the Demo](#21-run-the-demo) + - [2.2 Set up Xcode project](#22-set-up-xcode-project) + - [2.3 Import ViSearch Swift SDK](#23-import-visearch-swift-sdk) + - [2.3.1 Using CocoaPods](#231-using-cocoapods) + - [2.3.2 Using Carthage](#232-using-carthage) + - [2.3.3 Using Manual Approach](#233-using-manual-approach) + - [2.4 Add Privacy Usage Description](#24-add-privacy-usage-description) + - [3. Initialization](#3-initialization) + - [3.1 ViSearch](#31-visearch) + - [3.2 ProductSearch](#32-productsearch) + - [4. Solution APIs](#4-solution-apis) + - [4.1 ViSearch](#41-visearch) + - [4.1.1 Visually Similar Recommendations](#411-visually-similar-recommendations) + - [4.1.2 Search by Image](#412-search-by-image) + - [4.1.2.1 Selection Box](#4121-selection-box) + - [4.1.2.2 Resizing Settings](#4122-resizing-settings) + - [4.1.3 Search by Color](#413-search-by-color) + - [4.1.4 Multiple Products Search](#414-multiple-products-search) + - [4.2 ProductSearch](#42-productsearch) + - [4.2.1 Search By Image](#421-search-by-image) + - [4.2.2 Recommendations](#422-recommendations) + - [5. Search Results](#5-search-results) + - [5.1 ViSearch](#51-visearch) + - [5.2 ProductSearch](#52-productsearch) + - [6. Advanced Search Parameters](#6-advanced-search-parameters) + - [6.1 Retrieving Metadata](#61-retrieving-metadata) + - [6.2 Filtering Results](#62-filtering-results) + - [6.3 Result Score](#63-result-score) + - [6.4 Automatic Object Recognition Beta](#64-automatic-object-recognition-beta) + - [6.5 Facets Filtering](#65-facets-filtering) + - [7. Event Tracking](#7-event-tracking) + - [7.1 Setup Tracking](#71-setup-tracking) + - [7.2 Send Events](#72--send-events) + - [8. Developer Notes](#8-developer-notes) --- @@ -108,11 +117,11 @@ Edit the Podfile as follow. Please update the version to the latest. This is just a reference. ``` -platform :ios, '9.0' +platform :ios, '12.0' use_frameworks! target '' do - pod 'ViSearchSDK', '~>1.9.2' + pod 'ViSearchSDK', '~>1.10.0' end ... ``` @@ -127,7 +136,7 @@ The Demo.xcworkspace project should be created. #### 2.3.2 Using Carthage 1. Create a Cartfile in the same directory where your `.xcodeproj` or `.xcworkspace` is. -2. List the dependency as follow: `github "visenze/visearch-sdk-swift" ~> 1.8.7` . Please change the version to latest available version. +2. List the dependency as follow: `github "visenze/visearch-sdk-swift" ~> 1.10.0` . Please change the version to latest available version. 3. Run `carthage update --use-xcframeworks` or `carthage bootstrap --platform iOS --cache-builds --no-use-binaries --use-xcframeworks` . The command will fail as `ViSenzeAnalytics.xcframework` is not pulled as it is a dependency. We will resolve it in the next step. 4. A Cartfile.resolved file and a Carthage directory will appear in the same directory where your .xcodeproj or .xcworkspace is 5. Navigate to ViSearchSDK folder: `cd Carthage/Checkouts/visearch-sdk-swift/ViSearchSDK` which contains the source code for ViSearchSDK. diff --git a/ViSearchSDK.podspec b/ViSearchSDK.podspec index 1b393fd..ed5a891 100644 --- a/ViSearchSDK.podspec +++ b/ViSearchSDK.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.name = "ViSearchSDK" - s.version = "1.9.2" + s.version = "1.10.0" s.summary = "A Visual Search API solution (Swift SDK)" s.description = <<-DESC @@ -30,10 +30,10 @@ Pod::Spec.new do |s| # s.social_media_url = "http://twitter.com/Ngo Hung" s.source = { :git => 'https://github.com/visenze/visearch-sdk-swift.git', :tag => s.version } - s.ios.deployment_target = '8.0' + s.ios.deployment_target = '12.0' # s.platform = :ios - s.platform = :ios, "8.0" + s.platform = :ios, "12.0" # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # @@ -86,7 +86,7 @@ Pod::Spec.new do |s| s.requires_arc = true # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } - s.dependency "ViSenzeAnalytics", "~> 0.1" + s.dependency "ViSenzeAnalytics", "~> 0.2.0" s.swift_versions = ['5'] end diff --git a/ViSearchSDK/Cartfile b/ViSearchSDK/Cartfile index 475991a..7f16f11 100644 --- a/ViSearchSDK/Cartfile +++ b/ViSearchSDK/Cartfile @@ -1 +1 @@ -github "visenze/visenze-tracking-swift" ~> 0.1.3 +github "visenze/visenze-tracking-swift" ~> 0.2.0 \ No newline at end of file diff --git a/ViSearchSDK/Cartfile.resolved b/ViSearchSDK/Cartfile.resolved index 9380751..b466d5b 100644 --- a/ViSearchSDK/Cartfile.resolved +++ b/ViSearchSDK/Cartfile.resolved @@ -1 +1 @@ -github "visenze/visenze-tracking-swift" "0.1.4" +github "visenze/visenze-tracking-swift" "0.2.0" diff --git a/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/.gitignore b/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/.gitignore index 2c22487..b904e64 100644 --- a/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/.gitignore +++ b/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/.gitignore @@ -20,6 +20,7 @@ xcuserdata/ ## Other *.moved-aside *.xcuserstate +*.DS_STORE ## Obj-C/Swift specific *.hmap diff --git a/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/README.md b/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/README.md index c9d9208..82a11b1 100644 --- a/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/README.md +++ b/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/README.md @@ -11,11 +11,11 @@ Visenze Tracking library allows you to analyse visual search solutions' performa You can use CocoaPods to install the SDK. Edit the Podfile as follows: ``` -platform :ios, '8.0' +platform :ios, '12.0' use_frameworks! target '' do - pod 'ViSenzeAnalytics', '~>0.1.4' + pod 'ViSenzeAnalytics', '~>0.2.0' end ... ``` diff --git a/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics.podspec b/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics.podspec index 69d230c..4469c7c 100644 --- a/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics.podspec +++ b/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.name = "ViSenzeAnalytics" - s.version = "0.1.4" + s.version = "0.2.0" s.summary = "ViSenze Tracking SDK" s.description = <<-DESC @@ -24,10 +24,10 @@ Pod::Spec.new do |s| s.author = { "Ngo Hung" => "hung@visenze.com" } s.source = { :git => 'https://github.com/visenze/visenze-tracking-swift.git', :tag => s.version } - s.ios.deployment_target = '8.0' + s.ios.deployment_target = '12.0' # s.platform = :ios - s.platform = :ios, "8.0" + s.platform = :ios, "12.0" # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # diff --git a/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics/ViSenzeAnalytics.xcodeproj/project.pbxproj b/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics/ViSenzeAnalytics.xcodeproj/project.pbxproj index 81383ba..c81ea56 100644 --- a/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics/ViSenzeAnalytics.xcodeproj/project.pbxproj +++ b/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics/ViSenzeAnalytics.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 53; objects = { /* Begin PBXBuildFile section */ @@ -210,8 +210,9 @@ BD9AD0AC2507CC520012918F /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1130; - LastUpgradeCheck = 1130; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ViSenze; TargetAttributes = { BD9AD0B42507CC520012918F = { @@ -324,6 +325,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -387,6 +389,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -422,22 +425,26 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = NKN6QECX9M; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; INFOPLIST_FILE = ViSenzeAnalytics/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 0.1.4; + MARKETING_VERSION = 0.2.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; PRODUCT_BUNDLE_IDENTIFIER = com.visenze.ViSenzeAnalytics; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -452,22 +459,26 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = NKN6QECX9M; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; INFOPLIST_FILE = ViSenzeAnalytics/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 0.1.4; + MARKETING_VERSION = 0.2.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; PRODUCT_BUNDLE_IDENTIFIER = com.visenze.ViSenzeAnalytics; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; diff --git a/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics/ViSenzeAnalytics.xcodeproj/xcshareddata/xcschemes/ViSenzeAnalytics.xcscheme b/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics/ViSenzeAnalytics.xcodeproj/xcshareddata/xcschemes/ViSenzeAnalytics.xcscheme index 189c352..178aea0 100644 --- a/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics/ViSenzeAnalytics.xcodeproj/xcshareddata/xcschemes/ViSenzeAnalytics.xcscheme +++ b/ViSearchSDK/Carthage/Checkouts/visenze-tracking-swift/ViSenzeAnalytics/ViSenzeAnalytics.xcodeproj/xcshareddata/xcschemes/ViSenzeAnalytics.xcscheme @@ -1,6 +1,6 @@