Skip to content

Commit

Permalink
Merge pull request #49 from visenze/feature/upgrade-target-12
Browse files Browse the repository at this point in the history
[ES-7453] upgrade target to 12
  • Loading branch information
thehung111 authored Apr 27, 2023
2 parents e51637b + 85371d8 commit 780f755
Show file tree
Hide file tree
Showing 12 changed files with 142 additions and 63 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ xcuserdata/
## Other
*.moved-aside
*.xcuserstate
*.DS_STORE

## Obj-C/Swift specific
*.hmap
Expand Down
73 changes: 41 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

---

Expand Down Expand Up @@ -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 '<Your Target Name>' do
pod 'ViSearchSDK', '~>1.9.2'
pod 'ViSearchSDK', '~>1.10.0'
end
...
```
Expand All @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions ViSearchSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion ViSearchSDK/Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "visenze/visenze-tracking-swift" ~> 0.1.3
github "visenze/visenze-tracking-swift" ~> 0.2.0
2 changes: 1 addition & 1 deletion ViSearchSDK/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "visenze/visenze-tracking-swift" "0.1.4"
github "visenze/visenze-tracking-swift" "0.2.0"
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ xcuserdata/
## Other
*.moved-aside
*.xcuserstate
*.DS_STORE

## Obj-C/Swift specific
*.hmap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<Your Target Name>' do
pod 'ViSenzeAnalytics', '~>0.1.4'
pod 'ViSenzeAnalytics', '~>0.2.0'
end
...
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,10 +24,10 @@ Pod::Spec.new do |s|
s.author = { "Ngo Hung" => "[email protected]" }

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 ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 53;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -210,8 +210,9 @@
BD9AD0AC2507CC520012918F /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1130;
LastUpgradeCheck = 1130;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = ViSenze;
TargetAttributes = {
BD9AD0B42507CC520012918F = {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading

0 comments on commit 780f755

Please sign in to comment.