Commit 46847eae by Dmitriy Stepanets

Working on tint graph line

parent 3abd9e14
......@@ -75,6 +75,7 @@
CD483A9B2664DF7300CA53AB /* SF-Pro-Display-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = CD483A992664DF7300CA53AB /* SF-Pro-Display-Light.otf */; };
CD483A9D2664E08200CA53AB /* SF-Pro-Display-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = CD483A9C2664E08200CA53AB /* SF-Pro-Display-Regular.otf */; };
CD483A9E2664E08200CA53AB /* SF-Pro-Display-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = CD483A9C2664E08200CA53AB /* SF-Pro-Display-Regular.otf */; };
CD50555F26983C14006776AB /* CubicCurveAlgorithm.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD50555E26983C14006776AB /* CubicCurveAlgorithm.swift */; };
CD5293D8266908DB009547C8 /* WidgetPlaceholderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD5293D7266908DB009547C8 /* WidgetPlaceholderView.swift */; };
CD5293DA2669094E009547C8 /* WeatherEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD5293D92669094E009547C8 /* WeatherEntry.swift */; };
CD5293DF266A235F009547C8 /* ForecastWidgetViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD5293DE266A235F009547C8 /* ForecastWidgetViewModel.swift */; };
......@@ -147,7 +148,6 @@
CD8B60B626381E0F0055CB3F /* AdsUserDefaultsWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8B60B526381E0F0055CB3F /* AdsUserDefaultsWrapper.swift */; };
CD8E041225F8F775001785B6 /* ForecastViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8E041125F8F775001785B6 /* ForecastViewModel.swift */; };
CD8E041625F8F91B001785B6 /* ForecastCellFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8E041525F8F91B001785B6 /* ForecastCellFactory.swift */; };
CD9B6B1125DBC723001D9B80 /* CubicCurveAlgorithm.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD9B6B1025DBC723001D9B80 /* CubicCurveAlgorithm.swift */; };
CD9B6B1425DBCDE2001D9B80 /* GraphView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD9B6B1325DBCDE2001D9B80 /* GraphView.swift */; };
CDA5542825EF734200A2E08C /* TodayCellFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA5542725EF734200A2E08C /* TodayCellFactory.swift */; };
CDA5542D25EF7C9700A2E08C /* ReusableCellProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA5542C25EF7C9700A2E08C /* ReusableCellProtocol.swift */; };
......@@ -386,6 +386,7 @@
CD4742CF261200500061AC95 /* TodayAlertCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayAlertCell.swift; sourceTree = "<group>"; };
CD483A992664DF7300CA53AB /* SF-Pro-Display-Light.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-Pro-Display-Light.otf"; sourceTree = "<group>"; };
CD483A9C2664E08200CA53AB /* SF-Pro-Display-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-Pro-Display-Regular.otf"; sourceTree = "<group>"; };
CD50555E26983C14006776AB /* CubicCurveAlgorithm.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CubicCurveAlgorithm.swift; sourceTree = "<group>"; };
CD5293D7266908DB009547C8 /* WidgetPlaceholderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetPlaceholderView.swift; sourceTree = "<group>"; };
CD5293D92669094E009547C8 /* WeatherEntry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeatherEntry.swift; sourceTree = "<group>"; };
CD5293DE266A235F009547C8 /* ForecastWidgetViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForecastWidgetViewModel.swift; sourceTree = "<group>"; };
......@@ -451,7 +452,6 @@
CD8B60B526381E0F0055CB3F /* AdsUserDefaultsWrapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdsUserDefaultsWrapper.swift; sourceTree = "<group>"; };
CD8E041125F8F775001785B6 /* ForecastViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForecastViewModel.swift; sourceTree = "<group>"; };
CD8E041525F8F91B001785B6 /* ForecastCellFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForecastCellFactory.swift; sourceTree = "<group>"; };
CD9B6B1025DBC723001D9B80 /* CubicCurveAlgorithm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CubicCurveAlgorithm.swift; sourceTree = "<group>"; };
CD9B6B1325DBCDE2001D9B80 /* GraphView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GraphView.swift; sourceTree = "<group>"; };
CDA5542725EF734200A2E08C /* TodayCellFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayCellFactory.swift; sourceTree = "<group>"; };
CDA5542C25EF7C9700A2E08C /* ReusableCellProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReusableCellProtocol.swift; sourceTree = "<group>"; };
......@@ -1182,7 +1182,7 @@
CD1237F3255D889F00C98139 /* GradientView.swift */,
CDD0F1E72572429E00CF5017 /* AppFont.swift */,
CDD0F1ED25725BCF00CF5017 /* ThemeManager.swift */,
CD9B6B1025DBC723001D9B80 /* CubicCurveAlgorithm.swift */,
CD50555E26983C14006776AB /* CubicCurveAlgorithm.swift */,
CD86246B25E6826A0097F3FB /* InnerShadowLayer.swift */,
CD32CDFE260B2E5400235081 /* ForecastDescriptionView.swift */,
);
......@@ -1835,7 +1835,6 @@
CD37D3FA260DF714002669D6 /* SettingsThemeCell.swift in Sources */,
CD6B303E25726960004B34B3 /* ThemeProtocol.swift in Sources */,
CD6B303B2572680C004B34B3 /* SelfSizingButton.swift in Sources */,
CD9B6B1125DBC723001D9B80 /* CubicCurveAlgorithm.swift in Sources */,
CD8B60B4263819790055CB3F /* NotificationsViewController.swift in Sources */,
CD67617026259D220079D273 /* RadarMapLayersController.swift in Sources */,
CEC8FBAF2639756A0001A6BF /* OnboardingViewController.swift in Sources */,
......@@ -1856,6 +1855,7 @@
CD251ED82603633800ED7A65 /* ForecastPrecipitationCell.swift in Sources */,
CE13B816262480B3007CBD4D /* NativeAdLoader.swift in Sources */,
CDF9BF8E26133D050037847D /* LocationSearchCoordinator.swift in Sources */,
CD50555F26983C14006776AB /* CubicCurveAlgorithm.swift in Sources */,
CDC3F858269460E600AAE3BF /* PromotionMediumWidgetView.swift in Sources */,
CD7D318B268F36AF000D01FA /* UIApplication+Version.swift in Sources */,
CD86246125E662BC0097F3FB /* SunUvLineView.swift in Sources */,
......@@ -2083,7 +2083,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = 1Weather/1Weather.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 8;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 24W4XMQ38L;
ENABLE_BITCODE = NO;
......@@ -2114,7 +2114,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = 1Weather/1Weather.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 8;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 24W4XMQ38L;
ENABLE_BITCODE = NO;
......@@ -2188,7 +2188,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = OneWeatherNotificationServiceExtension/OneWeatherNotificationServiceExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = 24W4XMQ38L;
INFOPLIST_FILE = OneWeatherNotificationServiceExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
......@@ -2212,7 +2212,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = OneWeatherNotificationServiceExtension/OneWeatherNotificationServiceExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = 24W4XMQ38L;
INFOPLIST_FILE = OneWeatherNotificationServiceExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
......
......@@ -31,7 +31,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<string>8</string>
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-7118865896152167~5937109115</string>
<key>GADNativeAdValidatorEnabled</key>
......
......@@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>8</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
......
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "79",
"green" : "129",
"red" : "255"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "79",
"green" : "129",
"red" : "255"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "243",
"green" : "103",
"red" : "31"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "243",
"green" : "103",
"red" : "31"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
//
// MediumWidgetViewModel.swift
// EdgeInsets+Zero.swift
// OneWeatherUI
//
// Created by Dmitry Stepanets on 08.07.2021.
// Created by Dmitry Stepanets on 09.07.2021.
//
import SwiftUI
@available(iOS 14, *)
final class MediumWidgetViewModel: ObservableObject {
@Published var hourlyViewFrames = [CGRect]()
func add(rect: CGRect) {
self.hourlyViewFrames.append(rect)
self.hourlyViewFrames.sort{$0.origin.x < $1.origin.x}
objectWillChange.send()
extension EdgeInsets {
static var zero: EdgeInsets {
return .init(top: 0, leading: 0, bottom: 0, trailing: 0)
}
}
//
// CubicCurveAlgorithm.swift
// 1Weather
//
// Created by Dmitry Stepanets on 16.02.2021.
//
import UIKit
struct CubicCurveSegment
{
let controlPoint1: CGPoint
let controlPoint2: CGPoint
}
class CubicCurveAlgorithm
{
private var firstControlPoints: [CGPoint?] = []
private var secondControlPoints: [CGPoint?] = []
func controlPointsFromPoints(dataPoints: [CGPoint]) -> [CubicCurveSegment] {
//Clean up
firstControlPoints.removeAll()
secondControlPoints.removeAll()
//Number of Segments
let count = dataPoints.count - 1
//P0, P1, P2, P3 are the points for each segment, where P0 & P3 are the knots and P1, P2 are the control points.
if count == 1 {
let P0 = dataPoints[0]
let P3 = dataPoints[1]
//Calculate First Control Point
//3P1 = 2P0 + P3
let P1x = (2*P0.x + P3.x)/3
let P1y = (2*P0.y + P3.y)/3
firstControlPoints.append(CGPoint(x: P1x, y: P1y))
//Calculate second Control Point
//P2 = 2P1 - P0
let P2x = (2*P1x - P0.x)
let P2y = (2*P1y - P0.y)
secondControlPoints.append(CGPoint(x: P2x, y: P2y))
} else {
firstControlPoints = Array(repeating: nil, count: count)
var rhsArray = [CGPoint]()
//Array of Coefficients
var a = [CGFloat]()
var b = [CGFloat]()
var c = [CGFloat]()
for i in 0..<count {
var rhsValueX: CGFloat = 0
var rhsValueY: CGFloat = 0
let P0 = dataPoints[i];
let P3 = dataPoints[i+1];
if i==0 {
a.append(0)
b.append(2)
c.append(1)
//rhs for first segment
rhsValueX = P0.x + 2*P3.x;
rhsValueY = P0.y + 2*P3.y;
} else if i == count-1 {
a.append(2)
b.append(7)
c.append(0)
//rhs for last segment
rhsValueX = 8*P0.x + P3.x;
rhsValueY = 8*P0.y + P3.y;
} else {
a.append(1)
b.append(4)
c.append(1)
rhsValueX = 4*P0.x + 2*P3.x;
rhsValueY = 4*P0.y + 2*P3.y;
}
rhsArray.append(CGPoint(x: rhsValueX, y: rhsValueY))
}
//Solve Ax=B. Use Tridiagonal matrix algorithm a.k.a Thomas Algorithm
for i in 1..<count {
let rhsValueX = rhsArray[i].x
let rhsValueY = rhsArray[i].y
let prevRhsValueX = rhsArray[i-1].x
let prevRhsValueY = rhsArray[i-1].y
let m = CGFloat(a[i]/b[i-1])
let b1 = b[i] - m * c[i-1];
b[i] = b1
let r2x = rhsValueX - m * prevRhsValueX
let r2y = rhsValueY - m * prevRhsValueY
rhsArray[i] = CGPoint(x: r2x, y: r2y)
}
//Get First Control Points
//Last control Point
let lastControlPointX = rhsArray[count-1].x/b[count-1]
let lastControlPointY = rhsArray[count-1].y/b[count-1]
firstControlPoints[count-1] = CGPoint(x: lastControlPointX, y: lastControlPointY)
for i in (0 ..< count - 1).reversed() {
if let nextControlPoint = firstControlPoints[i+1] {
let controlPointX = (rhsArray[i].x - c[i] * nextControlPoint.x)/b[i]
let controlPointY = (rhsArray[i].y - c[i] * nextControlPoint.y)/b[i]
firstControlPoints[i] = CGPoint(x: controlPointX, y: controlPointY)
}
}
//Compute second Control Points from first
for i in 0..<count {
if i == count-1 {
let P3 = dataPoints[i+1]
guard let P1 = firstControlPoints[i] else{
continue
}
let controlPointX = (P3.x + P1.x)/2
let controlPointY = (P3.y + P1.y)/2
secondControlPoints.append(CGPoint(x: controlPointX, y: controlPointY))
} else {
let P3 = dataPoints[i+1]
guard let nextP1 = firstControlPoints[i+1] else {
continue
}
let controlPointX = 2*P3.x - nextP1.x
let controlPointY = 2*P3.y - nextP1.y
secondControlPoints.append(CGPoint(x: controlPointX, y: controlPointY))
}
}
}
var controlPoints = [CubicCurveSegment]()
for i in 0..<count {
if let firstControlPoint = firstControlPoints[i],
let secondControlPoint = secondControlPoints[i] {
let segment = CubicCurveSegment(controlPoint1: firstControlPoint, controlPoint2: secondControlPoint)
controlPoints.append(segment)
}
}
return controlPoints
}
}
......@@ -29,7 +29,6 @@ public struct MediumTemperatureWidgetView: View {
//Private
private let temps = [25, 23, 19, 32]
@ObservedObject private var viewModel = MediumWidgetViewModel()
@State private var hourlyStackFrame: CGRect = .zero
@Environment(\.colorScheme) private var colorScheme
......@@ -99,12 +98,12 @@ public struct MediumTemperatureWidgetView: View {
}
)
LineShape(temps: temps)
.stroke(Color.red,
style: .init(lineWidth: 3,
lineCap: .round,
lineJoin: .round))
.frame(width: hourlyStackFrame.width, height: 22)
TemperatureGraphView(temps: temps,
viewModel: .init(graphSize: .init(width: hourlyStackFrame.width,
height: 22),
hourlyItemWidth: 70,
spacingPerItem: 10,
graphInset: .zero))
}
.frame(width: geo.frame(in: .local).width)
}
......
......@@ -7,133 +7,50 @@
import SwiftUI
private struct FramePreferenceKey: PreferenceKey {
typealias Value = CGRect
static var defaultValue: CGRect = .zero
static func reduce(value: inout CGRect, nextValue: () -> CGRect) {
value = nextValue()
}
}
private struct PointOriginPreferenceKey: PreferenceKey {
typealias Value = CGPoint
static var defaultValue: CGPoint = .zero
static func reduce(value: inout CGPoint, nextValue: () -> CGPoint) {
value = nextValue()
}
}
@available(iOS 14, *)
struct HourlyView: View {
//Private
@State private var viewFrame = CGRect.zero
@State private var tempLabelFrame = CGRect.zero
@State private var timeLabelFrame = CGRect.zero
@Environment(\.colorScheme) private var colorScheme
private let hourlyTemps: HourlyTemps
//Computed
private var lineAreaRect: CGRect {
return .init(x: 0,
y: tempLabelFrame.origin.y + tempLabelFrame.height + 4,
width: viewFrame.width,
height: tempLabelFrame.origin.y + tempLabelFrame.height - timeLabelFrame.origin.y - 4)
}
private var calcPointOriginY: CGFloat {
let diff = hourlyTemps.maxTemp - hourlyTemps.lowTemp
let currentMultiply = CGFloat(hourlyTemps.maxTemp - hourlyTemps.currentTemp) / CGFloat(diff)
return lineAreaRect.height * CGFloat(currentMultiply) + lineAreaRect.origin.y
}
//Public
init(hourlyTemps: HourlyTemps, viewIndex: Int) {
self.hourlyTemps = hourlyTemps
}
var body: some View {
GeometryReader { viewGeo in
ZStack {
VStack {
Text("\(hourlyTemps.currentTemp)" + "°")
.foregroundColor(Color("PrimaryTextColor",
bundle: OneWeatherUI.frameworkBundle))
.font(WidgetFont.SFProDisplay.bold(size: 16).font)
.padding(.top, 8)
.framePreference()
.onPreferenceChange(FramePreferenceKey.self) { value in
self.tempLabelFrame = value
}
Spacer()
Text("NOW")
.foregroundColor(Color("PrimaryTextColor",
bundle: OneWeatherUI.frameworkBundle))
.font(WidgetFont.SFProDisplay.bold(size: 12).font)
.padding(.bottom, 8)
.framePreference()
.onPreferenceChange(FramePreferenceKey.self, perform: { value in
self.timeLabelFrame = value
})
}
.frame(width: 70)
.background(Color("HourlyContainerBackground",
bundle: OneWeatherUI.frameworkBundle))
.compositingGroup()
.cornerRadius(12)
.primaryShadow(for: colorScheme)
.secondaryShadow(for: colorScheme)
.overlay(
RoundedRectangle(cornerRadius: 12)
.stroke(Color("HourlyContainerBorder",
bundle: OneWeatherUI.frameworkBundle),
lineWidth: 1)
)
.preference(key: FramePreferenceKey.self, value: viewGeo.frame(in: .local))
.onPreferenceChange(FramePreferenceKey.self, perform: { value in
self.viewFrame = value
})
}
.position(x: viewFrame.width / 2, y: viewFrame.height / 2)
Circle()
.overlay(
Circle()
.stroke(Color.blue, lineWidth: 2)
)
.frame(width: 5, height: 5)
.foregroundColor(.white)
.position(x: viewFrame.width / 2,
y: calcPointOriginY)
VStack {
Text("\(hourlyTemps.currentTemp)" + "°")
.foregroundColor(Color("PrimaryTextColor",
bundle: OneWeatherUI.frameworkBundle))
.font(WidgetFont.SFProDisplay.bold(size: 16).font)
.padding(.top, 8)
Spacer()
Text("NOW")
.foregroundColor(Color("PrimaryTextColor",
bundle: OneWeatherUI.frameworkBundle))
.font(WidgetFont.SFProDisplay.bold(size: 12).font)
.padding(.bottom, 8)
}
.frame(width: 70)
.background(Color("HourlyContainerBackground",
bundle: OneWeatherUI.frameworkBundle))
.compositingGroup()
.cornerRadius(12)
.primaryShadow(for: colorScheme)
.secondaryShadow(for: colorScheme)
.overlay(
RoundedRectangle(cornerRadius: 12)
.stroke(Color("HourlyContainerBorder",
bundle: OneWeatherUI.frameworkBundle),
lineWidth: 1)
)
}
}
//MARK:- UI helpers
@available(iOS 14, *)
private extension View {
func framePreference() -> some View {
background(
GeometryReader {
Color.clear.preference(key: FramePreferenceKey.self,
value: $0.frame(in: .local))
}
)
}
func originPreference() -> some View {
background(
GeometryReader {
Color.clear.preference(key: PointOriginPreferenceKey.self,
value: $0.frame(in: .local).origin)
}
)
}
func primaryShadow(for colorScheme: ColorScheme) -> some View {
switch colorScheme {
case .light:
......
//
// LineShape.swift
// OneWeatherUI
//
// Created by Dmitry Stepanets on 06.07.2021.
//
import SwiftUI
@available(iOS 14, *)
struct LineShape: Shape {
//Private
private let kViewWidth: CGFloat = 70
private let kInset: CGFloat = 0
//Public
let temps: [Int]
func path(in rect: CGRect) -> Path {
var line = Path()
let maxTemp = temps.sorted{$0 > $1}.first ?? 0
let minTemp = temps.sorted{$0 < $1}.first ?? 0
let diff = maxTemp - minTemp
line.move(to: .init(x: kInset, y: rect.height / 2))
var points = [CGPoint]()
for index in 0..<temps.count {
let multiply = CGFloat(maxTemp - temps[index]) / CGFloat(diff)
let space:CGFloat = index > 0 && index <= 3 ? 10 : 0
if index == 0 {
points.append(.init(x: kViewWidth / 2, y: rect.height * multiply))
}
else {
let xOffset = (kViewWidth + space) * CGFloat(index) + kViewWidth / 2
points.append(.init(x: xOffset, y: rect.height * multiply))
}
}
points.append(.init(x: rect.width - kInset, y: rect.height / 2))
for index in 0..<points.count {
line.addLine(to: points[index])
}
return line
}
}
//
// TemperatureGraphView.swift
// OneWeatherUI
//
// Created by Dmitry Stepanets on 09.07.2021.
//
import SwiftUI
//import BezierKit
struct TemperatureGraphView: View {
//Public
let temps: [Int]
let graphViewModel: GraphViewModel
//Private
private var points = [CGPoint]()
//Computed
private var linePath: UIBezierPath {
let path = UIBezierPath()
var localPoints = self.points
localPoints.append(.init(x: graphViewModel.graphSize.width - graphViewModel.graphInset.leading,
y: graphViewModel.graphSize.height / 2))
let cubicCurveAlgorithm = CubicCurveAlgorithm()
let controlPoints = cubicCurveAlgorithm.controlPointsFromPoints(dataPoints: localPoints)
path.move(to: .init(x: graphViewModel.graphInset.leading,
y: graphViewModel.graphSize.height / 2))
for index in 1..<localPoints.count {
path.addCurve(to: localPoints[index],
controlPoint1: controlPoints[index - 1].controlPoint1,
controlPoint2: controlPoints[index - 1].controlPoint2)
}
return path
}
// private var tintPath: UIBezierPath {
// func getSubcurvePath(baseCurve: CubicCurve, leftBoundary: LineSegment, rightBoundary: LineSegment) -> UIBezierPath? {
// guard
// let leftIntersection = baseCurve.intersections(with: leftBoundary).first,
// let rightIntersection = baseCurve.intersections(with: rightBoundary).first
// else {
// return nil
// }
//
// let subcurve = baseCurve.split(from: leftIntersection.t1, to: rightIntersection.t1)
// let path = UIBezierPath()
// path.move(to: subcurve.startingPoint)
// path.addCurve(to: subcurve.endingPoint, controlPoint1: subcurve.p1, controlPoint2: subcurve.p2)
//
// return path
// }
//
// let path = UIBezierPath()
// let leftBoundary = LineSegment(p0: .zero,
// p1: .init(x: 0, y: graphViewModel.graphSize.height))
// let rightBoundary = LineSegment(p0: .init(x: graphViewModel.hourlyItemWidth, y: 0),
// p1: .init(x: graphViewModel.hourlyItemWidth, y: graphViewModel.graphSize.height))
//
// var localPoints = self.points
// localPoints.append(.init(x: graphViewModel.graphSize.width - graphViewModel.graphInset.leading,
// y: graphViewModel.graphSize.height / 2))
// let lineCurve = CubicCurve(points: localPoints)
//
// if let subcurve = getSubcurvePath(baseCurve: lineCurve, leftBoundary: leftBoundary, rightBoundary: rightBoundary) {
// path.append(subcurve)
// }
//
// return path
// }
init(temps: [Int], viewModel: GraphViewModel) {
self.temps = temps
self.graphViewModel = viewModel
self.calulatePoints()
}
public var body: some View {
//Line
Path(linePath.cgPath)
// Path(self.linePath.cgPath)
// .stroke(Color("GraphLine",
// bundle: OneWeatherUI.frameworkBundle),
// style: .init(lineWidth: 3,
// lineCap: .round,
// lineJoin: .round))
// .frame(width: graphViewModel.graphSize.width,
// height: graphViewModel.graphSize.height)
//Tint line
// Path(self.tintPath.cgPath)
// .stroke(Color("GraphLineTint",
// bundle: OneWeatherUI.frameworkBundle),
// style: .init(lineWidth: 3,
// lineCap: .round,
// lineJoin: .round))
//Points
Group {
ForEach(0..<points.count) { index in
Circle()
.overlay(
Circle()
.stroke(Color("GraphLine",
bundle: OneWeatherUI.frameworkBundle),
lineWidth: 2)
)
.frame(width: 5, height: 5)
.foregroundColor(.white)
.position(points[index])
}
}
.frame(width: graphViewModel.graphSize.width,
height: graphViewModel.graphSize.height)
}
private mutating func calulatePoints() {
let maxTemp = temps.sorted{$0 > $1}.first ?? 0
let minTemp = temps.sorted{$0 < $1}.first ?? 0
let diff = maxTemp - minTemp
for index in 0..<temps.count {
let multiply = CGFloat(maxTemp - temps[index]) / CGFloat(diff)
let space:CGFloat = index > 0 && index <= 3 ? graphViewModel.spacingPerItem : 0
if index == 0 {
points.append(.init(x: graphViewModel.hourlyItemWidth / 2,
y: graphViewModel.graphSize.height * multiply))
}
else {
let xOffset = (graphViewModel.hourlyItemWidth + space) * CGFloat(index) + graphViewModel.hourlyItemWidth / 2
points.append(.init(x: xOffset, y: graphViewModel.graphSize.height * multiply))
}
}
}
}
//
// GraphViewModel.swift
// OneWeatherUI
//
// Created by Dmitry Stepanets on 09.07.2021.
//
import SwiftUI
struct GraphViewModel {
let graphSize: CGSize
let hourlyItemWidth: CGFloat
let spacingPerItem: CGFloat
let graphInset: EdgeInsets
}
......@@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>8</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
......
......@@ -73,6 +73,7 @@ end
#UI
target 'OneWeatherUI' do
use_frameworks!
project 'OneWeatherUI/OneWeatherUI.project'
end
......
PODS:
- AlgoliaSearchClient (8.8.1):
- AlgoliaSearchClient (8.9.0):
- Logging
- AmazonPublisherServicesSDK (4.1.0)
- AppsFlyerFramework (6.3.2):
......@@ -12,23 +12,23 @@ PODS:
- FBSDKCoreKit_Basics (11.0.1):
- FBSDKCoreKit_Basics/Basics (= 11.0.1)
- FBSDKCoreKit_Basics/Basics (11.0.1)
- Firebase/Analytics (8.2.0):
- Firebase/Analytics (8.3.0):
- Firebase/Core
- Firebase/Core (8.2.0):
- Firebase/Core (8.3.0):
- Firebase/CoreOnly
- FirebaseAnalytics (~> 8.2.0)
- Firebase/CoreOnly (8.2.0):
- FirebaseCore (= 8.2.0)
- Firebase/Crashlytics (8.2.0):
- FirebaseAnalytics (~> 8.3.0)
- Firebase/CoreOnly (8.3.0):
- FirebaseCore (= 8.3.0)
- Firebase/Crashlytics (8.3.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 8.2.0)
- Firebase/RemoteConfig (8.2.0):
- FirebaseCrashlytics (~> 8.3.0)
- Firebase/RemoteConfig (8.3.0):
- Firebase/CoreOnly
- FirebaseRemoteConfig (~> 8.2.0)
- FirebaseABTesting (8.2.0):
- FirebaseRemoteConfig (~> 8.3.0)
- FirebaseABTesting (8.3.0):
- FirebaseCore (~> 8.0)
- FirebaseAnalytics (8.2.0):
- FirebaseAnalytics/AdIdSupport (= 8.2.0)
- FirebaseAnalytics (8.3.0):
- FirebaseAnalytics/AdIdSupport (= 8.3.0)
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
......@@ -36,36 +36,36 @@ PODS:
- GoogleUtilities/Network (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- nanopb (~> 2.30908.0)
- FirebaseAnalytics/AdIdSupport (8.2.0):
- FirebaseAnalytics/AdIdSupport (8.3.0):
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleAppMeasurement (= 8.2.0)
- GoogleAppMeasurement (= 8.3.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/MethodSwizzler (~> 7.4)
- GoogleUtilities/Network (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- nanopb (~> 2.30908.0)
- FirebaseCore (8.2.0):
- FirebaseCore (8.3.0):
- FirebaseCoreDiagnostics (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Logger (~> 7.4)
- FirebaseCoreDiagnostics (8.2.0):
- FirebaseCoreDiagnostics (8.3.0):
- GoogleDataTransport (~> 9.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Logger (~> 7.4)
- nanopb (~> 2.30908.0)
- FirebaseCrashlytics (8.2.0):
- FirebaseCrashlytics (8.3.0):
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleDataTransport (~> 9.0)
- nanopb (~> 2.30908.0)
- PromisesObjC (~> 1.2)
- FirebaseInstallations (8.2.0):
- FirebaseInstallations (8.3.0):
- FirebaseCore (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/UserDefaults (~> 7.4)
- PromisesObjC (~> 1.2)
- FirebaseRemoteConfig (8.2.0):
- FirebaseRemoteConfig (8.3.0):
- FirebaseABTesting (~> 8.0)
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
......@@ -84,14 +84,14 @@ PODS:
- Google-Mobile-Ads-SDK (8.7.0):
- GoogleAppMeasurement (< 9.0, >= 7.0)
- GoogleUserMessagingPlatform (>= 1.1)
- GoogleAppMeasurement (8.2.0):
- GoogleAppMeasurement/AdIdSupport (= 8.2.0)
- GoogleAppMeasurement (8.3.0):
- GoogleAppMeasurement/AdIdSupport (= 8.3.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/MethodSwizzler (~> 7.4)
- GoogleUtilities/Network (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- nanopb (~> 2.30908.0)
- GoogleAppMeasurement/AdIdSupport (8.2.0):
- GoogleAppMeasurement/AdIdSupport (8.3.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/MethodSwizzler (~> 7.4)
- GoogleUtilities/Network (~> 7.4)
......@@ -252,25 +252,25 @@ CHECKOUT OPTIONS:
:git: "git@gitlab.pinsightmedia.com:oneweather/wdt-skywisetilekit-ios.git"
SPEC CHECKSUMS:
AlgoliaSearchClient: bbafe7f014cc0b474646d794ae3675ef4e92f0d5
AlgoliaSearchClient: 357f07735f0697ade2040ae18a04918bebc6d490
AmazonPublisherServicesSDK: 3ce8e44f693c585fe069dde00236a256187e2a56
AppsFlyerFramework: c66d79d965ccc2f44fd5db3df3d214428cc7665a
BezierKit: 8b9bc3aaaa34ede809ff7c7c8aecc2bbe3b86a89
Cirque: 1eb134f2180b33107106dc72e47340aefb054da3
FBAudienceNetwork: 9a5f277d6ed36a46354a045c46a4858b47407a72
FBSDKCoreKit_Basics: 06780a4a12e16596bde8406add02c6aa1bf38616
Firebase: 12c568897b807321964e89d2b263ef4c6cff3db6
FirebaseABTesting: 5f37131c5eceea579c471c915f7a0f8cad484d1f
FirebaseAnalytics: 7a744b1e7dc50125cb37714c6bdaea167e412082
FirebaseCore: 3a83f24c3de69ec9f9a426e2598125ea51f3a2ce
FirebaseCoreDiagnostics: 61384f54989065b15c36b5922b65112e86811d3c
FirebaseCrashlytics: 935dbdb043a286ca92a22d15e5780802403ea0ea
FirebaseInstallations: 9394ea09e242bf0816e95ac30e56a9214cc86ced
FirebaseRemoteConfig: 6695557b3dac704527c952502e799586941d399e
Firebase: 817b9171d0d51dccc458b94a5e8edff6b1dd323d
FirebaseABTesting: 7fe1b1d6b2bba76d3259f5d2a2089c05faf72ff0
FirebaseAnalytics: 456f2c51599870a15ded4548d1f1f7b2cabf65a7
FirebaseCore: a6dba751680d7033b9d3831e1cfc95ead0605118
FirebaseCoreDiagnostics: 7e873baabcfaa9512f538554ae4fa0817aaafbdb
FirebaseCrashlytics: 3d83f2e8a47f476f47c82ff4536b169df6781271
FirebaseInstallations: b69db7680870dbac17bba7a51fc0b5c4b365baa7
FirebaseRemoteConfig: 648648205dc7fd546880aeafc737bc19a2543d31
Flurry-iOS-SDK: 5831da8fc6bedb31fa1f94aac6fd204d36dd351d
Fyber_Marketplace_SDK: 8ba09b9df4cc225d34fb52260c0174269746b8e4
Google-Mobile-Ads-SDK: e242f463fdb8564ac3f11847a30215a0e042c934
GoogleAppMeasurement: b52eafc9dff542d580700e708216568bd2fbf168
GoogleAppMeasurement: de70802583dedceb0bca18172b345307e8f410b8
GoogleDataTransport: 04c3e9a480bbcaa2ec3f5d27f1cdeb6a92f20c8d
GoogleMobileAdsMediationFacebook: 83729e35dabb60960aa4e708fa4dcbaebb8ed85b
GoogleMobileAdsMediationFyber: e3879da61a72fabfdda09e5a544e836c4c52eaac
......@@ -290,6 +290,6 @@ SPEC CHECKSUMS:
Swarm: 95393cd52715744c94e3a8475bc20b4de5d79f35
XMLCoder: f884dfa894a6f8b7dce465e4f6c02963bf17e028
PODFILE CHECKSUM: 659661f4f40b1e968a316ebeaf2afc8bc6f0190a
PODFILE CHECKSUM: 429f8565da0a2b7d9bc78b2cbbbea3e4cbd28fcc
COCOAPODS: 1.10.1
......@@ -157,6 +157,12 @@ index.search(query: "jimmie") { result in
print("Error: \(error)")
case .success(let response):
print("Response: \(response)")
do {
let foundContacts: [Contact] = try response.extractsHits()
print("Found contacts: \(foundContacts)")
} catch let error {
print("Contact parsing error: \(error)")
}
}
}
```
......
//
// RecommendationClient.swift
// PersonalizationClient.swift
//
//
// Created by Vladislav Fitc on 27/05/2020.
// Created by Vladislav Fitc on 05/07/2021.
//
import Foundation
......@@ -10,7 +10,7 @@ import Foundation
import FoundationNetworking
#endif
public struct RecommendationClient: Credentials {
public struct PersonalizationClient: Credentials {
let transport: Transport
let operationLauncher: OperationLauncher
......@@ -26,7 +26,7 @@ public struct RecommendationClient: Credentials {
public init(appID: ApplicationID, apiKey: APIKey, region: Region? = nil) {
let configuration = RecommendationConfiguration(applicationID: appID, apiKey: apiKey, region: region)
let configuration = PersonalizationConfiguration(applicationID: appID, apiKey: apiKey, region: region)
let sessionConfiguration: URLSessionConfiguration = .default
sessionConfiguration.httpAdditionalHeaders = configuration.defaultHeaders
......@@ -36,7 +36,7 @@ public struct RecommendationClient: Credentials {
}
public init(configuration: RecommendationConfiguration, requester: HTTPRequester) {
public init(configuration: PersonalizationConfiguration, requester: HTTPRequester) {
let queue = OperationQueue()
queue.qualityOfService = .userInitiated
......@@ -64,9 +64,9 @@ public struct RecommendationClient: Credentials {
}
extension RecommendationClient: TransportContainer {}
extension PersonalizationClient: TransportContainer {}
public extension RecommendationClient {
public extension PersonalizationClient {
// MARK: - Set personalization strategy
......@@ -125,3 +125,8 @@ public extension RecommendationClient {
}
}
@available(*, deprecated, renamed: "PersonalizationClient")
public typealias RecommendationClient = PersonalizationClient
......@@ -8,7 +8,7 @@
import Foundation
protocol AlgoliaCommand {
associatedtype Path: PathComponent
var method: HTTPMethod { get }
......@@ -20,9 +20,9 @@ protocol AlgoliaCommand {
}
extension AlgoliaCommand {
var body: Data? {
return nil
}
}
......@@ -24,7 +24,7 @@ extension Command {
}
}
struct AppTaskStatus: AlgoliaCommand {
let method: HTTPMethod = .get
......@@ -39,7 +39,6 @@ extension Command {
}
struct GetLogs: AlgoliaCommand {
let method: HTTPMethod = .get
......
......@@ -11,15 +11,15 @@ import FoundationNetworking
#endif
extension Command {
struct Custom: AlgoliaCommand {
let method: HTTPMethod
let callType: CallType
let path: Path
let body: Data?
let requestOptions: RequestOptions?
init(method: HTTPMethod,
callType: CallType,
path: Path,
......@@ -32,7 +32,6 @@ extension Command {
self.requestOptions = requestOptions
}
init(callType: CallType,
urlRequest: URLRequest,
requestOptions: RequestOptions?) throws {
......@@ -48,11 +47,11 @@ extension Command {
self.body = urlRequest.httpBody
self.requestOptions = requestOptions
}
enum AlgoliaCommandError: Error {
case invalidHTTPMethod
case invalidPath
}
}
}
......@@ -12,7 +12,7 @@ extension Command {
enum Personalization {
struct Get: AlgoliaCommand {
let method: HTTPMethod = .get
let callType: CallType = .read
let path: PersonalizationRoute = .strategies >>> .personalization
......
......@@ -8,7 +8,7 @@
import Foundation
extension Data {
var jsonString: String? {
return (try? JSONSerialization.jsonObject(with: self, options: .allowFragments))
.flatMap {
......@@ -22,5 +22,5 @@ extension Data {
}
.flatMap { String(data: $0, encoding: .utf8) }
}
}
......@@ -7,7 +7,7 @@
import Foundation
public extension TimeInterval {
extension TimeInterval {
var milliseconds: Int64 {
return Int64((self * 1000.0).rounded())
......@@ -15,7 +15,7 @@ public extension TimeInterval {
}
public extension TimeInterval {
extension TimeInterval {
static let hour: TimeInterval = minute * 60
......@@ -25,7 +25,7 @@ public extension TimeInterval {
}
public extension TimeInterval {
extension TimeInterval {
static let minute: TimeInterval = 60
......@@ -35,7 +35,7 @@ public extension TimeInterval {
}
public extension TimeInterval {
extension TimeInterval {
static let second: TimeInterval = 1
......@@ -45,7 +45,7 @@ public extension TimeInterval {
}
public extension TimeInterval {
extension TimeInterval {
static let day: TimeInterval = hour * 24
......
// This is generated file. Don't modify it manually.
public extension Version { static let current: Version = .init(major: 8, minor: 8, patch: 1, prereleaseIdentifier: nil) }
public extension Version { static let current: Version = .init(major: 8, minor: 9, patch: 0, prereleaseIdentifier: nil) }
......@@ -10,7 +10,7 @@ import Foundation
extension ABTestResponse {
public struct Variant: Codable {
public let indexName: IndexName
public let trafficPercentage: Int
......
......@@ -148,7 +148,7 @@ public protocol CommonParameters {
- [Documentation](https://www.algolia.com/doc/api-reference/api-parameters/queryLanguages/?language=swift)
*/
var queryLanguages: [Language]? { get set }
/**
Enable word segmentation (also called decompounding) at query time for
compatible languages.
......@@ -276,7 +276,7 @@ public protocol CommonParameters {
- [Documentation](https://www.algolia.com/doc/api-reference/api-parameters/attributeCriteriaComputedByMinProximity/?language=swift)
*/
var attributeCriteriaComputedByMinProximity: Bool? { get set }
/**
The relevancy threshold to apply to search in a virtual index [0-100]. A Bigger
value means fewer, but more relevant results, smaller value means more, but
......@@ -285,5 +285,5 @@ public protocol CommonParameters {
- [Documentation](https://www.algolia.com/doc/api-reference/api-parameters/?language=swift)
*/
var relevancyStrictness: Int? { get set }
}
......@@ -22,7 +22,7 @@ struct Path: PathComponent {
}
init(_ rawValue: String) { self.rawValue = rawValue }
static var indexesV1: Self { .init("/1/indexes") }
static var settings: Self { .init("/settings") }
static var clustersV1: Self { .init("/1/clusters") }
......
......@@ -18,7 +18,7 @@ protocol PathComponent {
}
extension Never: PathComponent {
var rawValue: String {
return ""
}
......@@ -31,7 +31,7 @@ extension Never: PathComponent {
set {
}
}
}
extension PathComponent {
......
//
// RecommendationConfiguration.swift
// PersonalizationConfiguration.swift
//
//
// Created by Vladislav Fitc on 27/05/2020.
// Created by Vladislav Fitc on 05/07/2021.
//
import Foundation
public struct RecommendationConfiguration: Configuration, Credentials {
public struct PersonalizationConfiguration: Configuration, Credentials {
public let applicationID: ApplicationID
......@@ -44,3 +44,6 @@ public struct RecommendationConfiguration: Configuration, Credentials {
}
}
@available(*, deprecated, renamed: "PersonalizationConfiguration")
public typealias RecommendationConfiguration = PersonalizationConfiguration
//
// RenderingContent.swift
//
//
// Created by Vladislav Fitc on 11/03/2021.
//
import Foundation
/**
* Content defining how the search interface should be rendered.
* This is set via the settings for a default value and can be overridden via rules
*/
public struct RenderingContent: Codable {
/// Defining how facets should be ordered
public let facetOrdering: FacetOrdering?
}
......@@ -21,7 +21,7 @@ extension Rule {
/// Indicates if the rule can be applied with alternatives.
public var alternatives: Alternatives?
public var filters: String?
public init(anchoring: Anchoring? = nil,
......
......@@ -35,6 +35,10 @@ extension Rule {
/// Objects to hide from hits.
public var hide: [ObjectID]?
/// Content defining how the search interface should be rendered.
/// A default value for this can be set via settings.
public var renderingContent: RenderingContent?
/// Custom JSON object that will be appended to the SearchResponse.userData.
/// This object is not interpreted by the API. It is limited to 1kB of minified JSON.
public var userData: JSON?
......@@ -92,11 +96,13 @@ extension Rule.Consequence {
var queryTextAlteration: QueryTextAlteration?
var automaticFacetFilters: [Rule.AutomaticFacetFilters]?
var automaticOptionalFacetFilters: [Rule.AutomaticFacetFilters]?
var renderingContent: RenderingContent?
enum CodingKeys: String, CodingKey {
case query
case automaticFacetFilters
case automaticOptionalFacetFilters
case renderingContent
}
public init() {}
......@@ -107,6 +113,7 @@ extension Rule.Consequence {
queryTextAlteration = try container.decodeIfPresent(forKey: .query)
automaticFacetFilters = try container.decodeIfPresent(forKey: .automaticFacetFilters)
automaticOptionalFacetFilters = try container.decodeIfPresent(forKey: .automaticOptionalFacetFilters)
renderingContent = try container.decodeIfPresent(forKey: .renderingContent)
}
public func encode(to encoder: Encoder) throws {
......@@ -115,6 +122,7 @@ extension Rule.Consequence {
try container.encodeIfPresent(queryTextAlteration, forKey: .query)
try container.encodeIfPresent(automaticFacetFilters, forKey: .automaticFacetFilters)
try container.encodeIfPresent(automaticOptionalFacetFilters, forKey: .automaticOptionalFacetFilters)
try container.encodeIfPresent(renderingContent, forKey: .renderingContent)
}
}
......@@ -136,6 +144,7 @@ extension Rule.Consequence: Codable {
self.queryTextAlteration = params.wrapped.queryTextAlteration
self.automaticFacetFilters = params.wrapped.automaticFacetFilters
self.automaticOptionalFacetFilters = params.wrapped.automaticOptionalFacetFilters
self.renderingContent = params.wrapped.renderingContent
let container = try decoder.container(keyedBy: CodingKeys.self)
self.promote = try container.decodeIfPresent(forKey: .promote)
self.filterPromotes = try container.decodeIfPresent(forKey: .filterPromotes)
......@@ -150,6 +159,7 @@ extension Rule.Consequence: Codable {
.set(\.queryTextAlteration, to: queryTextAlteration)
.set(\.automaticFacetFilters, to: automaticFacetFilters)
.set(\.automaticOptionalFacetFilters, to: automaticOptionalFacetFilters)
.set(\.renderingContent, to: renderingContent)
try ParamsWrapper<Params>(params).encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(promote, forKey: .promote)
......
......@@ -79,6 +79,7 @@ extension SearchParametersStorage: Codable {
enableABTest = try container.decodeIfPresent(forKey: .enableABTest)
explainModules = try container.decodeIfPresent(forKey: .explainModules)
naturalLanguages = try container.decodeIfPresent(forKey: .naturalLanguages)
relevancyStrictness = try container.decodeIfPresent(forKey: .relevancyStrictness)
}
public func encode(to encoder: Encoder) throws {
......@@ -150,6 +151,7 @@ extension SearchParametersStorage: Codable {
try container.encodeIfPresent(enableABTest, forKey: .enableABTest)
try container.encodeIfPresent(explainModules, forKey: .explainModules)
try container.encodeIfPresent(naturalLanguages, forKey: .naturalLanguages)
try container.encodeIfPresent(relevancyStrictness, forKey: .relevancyStrictness)
}
enum CodingKeys: String, CodingKey, CaseIterable {
......@@ -220,6 +222,7 @@ extension SearchParametersStorage: Codable {
case enableABTest
case explainModules
case naturalLanguages
case relevancyStrictness
}
}
......@@ -183,6 +183,7 @@ extension Query: URLEncodable {
urlEncoder.set(responseFields, for: .responseFields)
urlEncoder.set(percentileComputation, for: .percentileComputation)
urlEncoder.set(naturalLanguages, for: .naturalLanguages)
urlEncoder.set(relevancyStrictness, for: .relevancyStrictness)
urlEncoder.set(customParameters)
return urlEncoder.encode()!
......
//
// FacetOrdering.swift
//
//
// Created by Vladislav Fitc on 15/06/2021.
//
import Foundation
/// Facets and facets values ordering rules container
public struct FacetOrdering {
/// The ordering of facets.
public let facets: FacetsOrder
/// The ordering of facet values, within an individual list.
public let values: [Attribute: FacetValuesOrder]
/**
- parameters:
- facets: The ordering of facets.
- values: The ordering of facet values, within an individual list.
*/
public init(facets: FacetsOrder = .init(),
values: [Attribute: FacetValuesOrder] = [:]) {
self.facets = facets
self.values = values
}
}
extension FacetOrdering: Codable {
enum CodingKeys: String, CodingKey {
case facets
case values
}
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.facets = try container.decodeIfPresent(forKey: .facets) ?? FacetsOrder()
let rawValues = try container.decodeIfPresent([String: FacetValuesOrder].self, forKey: .values) ?? [:]
self.values = rawValues.mapKeys(Attribute.init)
}
}
//
// FacetValuesOrder.swift
//
//
// Created by Vladislav Fitc on 15/06/2021.
//
import Foundation
/// Facet values ordering rule container
public struct FacetValuesOrder {
/// Pinned order of facet values.
public let order: [String]
/// How to display the remaining items.
public let sortRemainingBy: SortRule?
/// Rule defining the sort order of facet values.
public enum SortRule: String, Codable {
/// alphabetical (ascending)
case alpha
/// facet count (descending)
case count
/// hidden (show only pinned values)
case hidden
}
/**
- parameters:
- order: Pinned order of facet values.
- sortRemainingBy: How to display the remaining items.
*/
public init(order: [String] = [],
sortRemainingBy: SortRule? = nil) {
self.order = order
self.sortRemainingBy = sortRemainingBy
}
}
extension FacetValuesOrder: Codable {
enum CodingKeys: String, CodingKey {
case order
case sortRemainingBy
}
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.order = try container.decodeIfPresent(forKey: .order) ?? []
self.sortRemainingBy = try container.decodeIfPresent(forKey: .sortRemainingBy)
}
}
//
// FacetsOrder.swift
//
//
// Created by Vladislav Fitc on 15/06/2021.
//
import Foundation
/// Facets ordering rule container
public struct FacetsOrder {
/// Pinned order of facet lists.
public let order: [Attribute]
/// - parameter order: pinned order of facet lists.
public init(order: [Attribute] = []) {
self.order = order
}
}
extension FacetsOrder: Codable {
enum CodingKeys: String, CodingKey {
case order
}
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.order = try container.decodeIfPresent(forKey: .order) ?? []
}
}
......@@ -40,6 +40,9 @@ extension SearchResponse: Codable {
case queryID
case hierarchicalFacetsStorage = "hierarchicalFacets"
case explain
case renderingContent
case appliedRelevancyStrictness
case nbSortedHits
}
public init(from decoder: Decoder) throws {
......@@ -75,6 +78,9 @@ extension SearchResponse: Codable {
self.queryID = try container.decodeIfPresent(forKey: .queryID)
self.hierarchicalFacetsStorage = try container.decodeIfPresent(forKey: .hierarchicalFacetsStorage)
self.explain = try container.decodeIfPresent(forKey: .explain)
self.renderingContent = try container.decodeIfPresent(forKey: .renderingContent)
self.appliedRelevancyStrictness = try container.decodeIfPresent(forKey: .appliedRelevancyStrictness)
self.nbSortedHits = try container.decodeIfPresent(forKey: .nbSortedHits)
}
public func encode(to encoder: Encoder) throws {
......@@ -110,6 +116,9 @@ extension SearchResponse: Codable {
try container.encodeIfPresent(queryID, forKey: .queryID)
try container.encodeIfPresent(hierarchicalFacetsStorage, forKey: .hierarchicalFacetsStorage)
try container.encodeIfPresent(explain, forKey: .explain)
try container.encodeIfPresent(renderingContent, forKey: .renderingContent)
try container.encodeIfPresent(appliedRelevancyStrictness, forKey: .appliedRelevancyStrictness)
try container.encodeIfPresent(nbSortedHits, forKey: .nbSortedHits)
}
}
......@@ -224,12 +224,17 @@ public struct SearchResponse {
Meta-information as to how the query was processed.
*/
public var explain: Explain?
/**
The relevancy threshold applied to search in a virtual index.
*/
public var appliedRelevancyStrictness: Int?
/**
Content defining how the search interface should be rendered.
*/
public var renderingContent: RenderingContent?
/**
Subset of hits selected when relevancyStrictness is applied.
*/
......
......@@ -276,5 +276,5 @@ public protocol SearchParameters: CommonParameters {
- [Documentation](https://www.algolia.com/doc/api-reference/api-parameters/_/?language=swift)
*/
var explainModules: [ExplainModule]? { get set }
}
......@@ -80,7 +80,7 @@ public protocol SettingsParameters: CommonParameters {
var separatorsToIndex: String? { get set }
// MARK: - Languages
/**
Specify on which attributes to apply transliteration.
......@@ -158,6 +158,12 @@ public protocol SettingsParameters: CommonParameters {
var attributeForDistinct: Attribute? { get set }
/**
Content defining how the search interface should be rendered.
This is set via the settings for a default value and can be overridden via rules
*/
var renderingContent: RenderingContent? { get set }
/**
Lets you store custom data in your indices.
*/
var userData: JSON? { get set }
......
......@@ -64,4 +64,5 @@ public enum SettingsParametersCodingKeys: String, CodingKey {
case customNormalization
case primary
case attributeCriteriaComputedByMinProximity
case renderingContent
}
......@@ -66,6 +66,7 @@ struct SettingsParametersStorage: SettingsParameters {
var version: Int?
var primary: IndexName?
var relevancyStrictness: Int?
var renderingContent: RenderingContent?
}
extension SettingsParametersStorage: Codable {
......@@ -310,4 +311,8 @@ extension SettingsParametersStorageContainer {
get { settingsParametersStorage.relevancyStrictness }
set { settingsParametersStorage.relevancyStrictness = newValue }
}
public var renderingContent: RenderingContent? {
get { settingsParametersStorage.renderingContent }
set { settingsParametersStorage.renderingContent = newValue }
}
}
......@@ -19,13 +19,13 @@ protocol TransportContainer {
extension TransportContainer {
func execute<Command: AlgoliaCommand, Response: Decodable, Output>(_ command: Command,
transform: @escaping (Response) -> Output,
completion: @escaping (Result<Output, Error>) -> Void) -> Operation & TransportTask {
transform: @escaping (Response) -> Output,
completion: @escaping (Result<Output, Error>) -> Void) -> Operation & TransportTask {
transport.execute(command, transform: transform, completion: completion)
}
func execute<Command: AlgoliaCommand, Response: Decodable, Output>(_ command: Command,
transform: @escaping (Response) -> Output) throws -> Output {
transform: @escaping (Response) -> Output) throws -> Output {
try transport.execute(command, transform: transform)
}
......
......@@ -66,7 +66,6 @@ class HTTPRequest<ResponseType: Decodable, Output>: AsyncOperation, ResultContai
tryLaunch(request: request, intermediateErrors: [])
}
// swiftlint:disable cyclomatic_complexity function_body_length
private func tryLaunch(request: URLRequest, intermediateErrors: [Error]) {
guard !isCancelled else {
......@@ -75,7 +74,7 @@ class HTTPRequest<ResponseType: Decodable, Output>: AsyncOperation, ResultContai
}
do {
guard let host = hostIterator.next() else {
throw HTTPTransport.Error.noReachableHosts(intermediateErrors: intermediateErrors)
}
......@@ -85,7 +84,7 @@ class HTTPRequest<ResponseType: Decodable, Output>: AsyncOperation, ResultContai
underlyingTask = requester.perform(request: effectiveRequest) { [weak self] (result: IntermediateResult) in
guard let httpRequest = self else { return }
httpRequest.retryStrategy.notify(host: host, result: result)
switch result {
......@@ -111,13 +110,13 @@ class HTTPRequest<ResponseType: Decodable, Output>: AsyncOperation, ResultContai
super.cancel()
underlyingTask?.cancel()
}
func description(for request: URLRequest) -> String {
[
"Method: \(request.httpMethod ?? "nil")",
"URL: \(request.url?.description ?? "nil")",
"Headers: \(request.allHTTPHeaderFields?.description ?? "nil")",
"Body: \(request.httpBody.flatMap { $0.jsonString ?? $0.debugDescription } ?? "nil")",
"Body: \(request.httpBody.flatMap { $0.jsonString ?? $0.debugDescription } ?? "nil")"
].joined(separator: "\n")
}
......
......@@ -69,15 +69,15 @@ class AlgoliaRetryStrategy: RetryStrategy {
}
}
func isRetryable(_ error: Error) -> Bool {
switch error {
case HostSwitcher.Error.badHost:
return true
case is URLError:
return true
case let httpError as HTTPError where !httpError.statusCode.belongs(to: .success, .clientError):
return true
......@@ -85,20 +85,20 @@ class AlgoliaRetryStrategy: RetryStrategy {
return false
}
}
func isTimeout(_ error: Error) -> Bool {
switch error {
case let urlError as URLError where urlError.code == .timedOut:
return true
case let httpError as HTTPError where httpError.statusCode == .requestTimeout:
return true
default:
return false
}
}
func canRetry(inCaseOf error: Error) -> Bool {
return isTimeout(error) || isRetryable(error)
}
......
......@@ -27,11 +27,11 @@ struct HostSwitcher {
}
extension URLRequest {
func setting(_ host: RetryableHost, timeout: TimeInterval) throws -> URLRequest {
return try HostSwitcher.switchHost(in: self, by: host, timeout: timeout)
}
}
extension HostSwitcher {
......@@ -40,7 +40,7 @@ extension HostSwitcher {
case missingURL
case malformedURL(String)
case badHost(String)
var errorDescription: String? {
switch self {
case .badHost(let host):
......
......@@ -7,14 +7,14 @@
import Foundation
protocol RetryStrategy: class {
protocol RetryStrategy: AnyObject {
/// Returns the iterator providing retryable hosts for a call type
func retryableHosts(for callType: CallType) -> HostIterator
/// Notify the strategy object about the result of request executed to a provided host in order to update its state
func notify<T>(host: RetryableHost, result: Result<T, Swift.Error>)
/// Check if a request can be retried on another host in case of provided error
func canRetry(inCaseOf error: Error) -> Bool
......
......@@ -264,7 +264,7 @@ extension BezierCurve {
}
public let defaultIntersectionAccuracy = CGFloat(0.5)
internal let reduceStepSize: CGFloat = 0.01
public let reduceStepSize: CGFloat = 0.01
public func == (left: BezierCurve, right: BezierCurve) -> Bool {
return left.points == right.points
......
......@@ -6,32 +6,32 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>FirebaseAnalytics.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<string>ios-arm64_i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>FirebaseAnalytics.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
......
......@@ -13,7 +13,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleVersion</key>
<string>8.1.1</string>
<string>8.3.0</string>
<key>DTSDKName</key>
<string>iphonesimulator11.2</string>
</dict>
......
......@@ -13,7 +13,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleVersion</key>
<string>8.1.1</string>
<string>8.3.0</string>
<key>DTSDKName</key>
<string>iphonesimulator11.2</string>
</dict>
......
......@@ -129,7 +129,7 @@ static FIRApp *sDefaultApp;
FIROptions *options = [FIROptions defaultOptions];
if (!options) {
[NSException raise:kFirebaseCoreErrorDomain
format:@"`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) could not find "
format:@"`FirebaseApp.configure()` could not find "
@"a valid GoogleService-Info.plist in your project. Please download one "
@"from %@.",
kPlistURL];
......@@ -250,8 +250,11 @@ static FIRApp *sDefaultApp;
}
FIRLogError(kFIRLoggerCore, @"I-COR000003",
@"The default Firebase app has not yet been "
@"configured. Add `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) to your "
@"application initialization. Read more: https://goo.gl/ctyzm8.");
@"configured. Add `FirebaseApp.configure()` to your "
@"application initialization. This can be done in "
@"in the App Delegate's application(_:didFinishLaunchingWithOptions:)` "
@"(or the `@main` struct's initializer in SwiftUI). "
@"Read more: https://goo.gl/ctyzm8.");
return nil;
}
......
......@@ -14,8 +14,6 @@
#import <Foundation/Foundation.h>
#import "Interop/Analytics/Public/FIRAnalyticsInterop.h"
NS_ASSUME_NONNULL_BEGIN
@class FIRCLSSettings;
......
......@@ -189,10 +189,10 @@ static const NSUInteger kExpectedAPIKeyLength = 39;
if (!defaultApp) {
[NSException raise:kFirebaseInstallationsErrorDomain
format:@"The default FirebaseApp instance must be configured before the default"
@"FirebaseApp instance can be initialized. One way to ensure that is to "
@"call `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) in the App"
@" Delegate's `application:didFinishLaunchingWithOptions:` "
@"(`application(_:didFinishLaunchingWithOptions:)` in Swift)."];
@"FirebaseApp instance can be initialized. One way to ensure this is to "
@"call `FirebaseApp.configure()` in the App Delegate's "
@"`application(_:didFinishLaunchingWithOptions:)` "
@"(or the `@main` struct's initializer in SwiftUI)."];
}
return [self installationsWithApp:defaultApp];
......@@ -256,9 +256,12 @@ static const NSUInteger kExpectedAPIKeyLength = 39;
return;
#else
if (![self isIIDVersionCompatible]) {
[NSException raise:kFirebaseInstallationsErrorDomain
format:@"FirebaseInstallations will not work correctly with current version of "
@"Firebase Instance ID. Please update your Firebase Instance ID version."];
[NSException
raise:kFirebaseInstallationsErrorDomain
format:@"Firebase Instance ID is not compatible with Firebase 8.x+. Please remove the "
@"dependency from the app. See the documentation at "
@"https://firebase.google.com/docs/cloud-messaging/ios/"
@"client#fetching-the-current-registration-token."];
}
#endif
}
......
......@@ -13,7 +13,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleVersion</key>
<string>8.1.1</string>
<string>8.3.0</string>
<key>DTSDKName</key>
<string>iphonesimulator11.2</string>
</dict>
......
......@@ -13,7 +13,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleVersion</key>
<string>8.1.1</string>
<string>8.3.0</string>
<key>DTSDKName</key>
<string>iphonesimulator11.2</string>
</dict>
......
PODS:
- AlgoliaSearchClient (8.8.1):
- AlgoliaSearchClient (8.9.0):
- Logging
- AmazonPublisherServicesSDK (4.1.0)
- AppsFlyerFramework (6.3.2):
......@@ -12,23 +12,23 @@ PODS:
- FBSDKCoreKit_Basics (11.0.1):
- FBSDKCoreKit_Basics/Basics (= 11.0.1)
- FBSDKCoreKit_Basics/Basics (11.0.1)
- Firebase/Analytics (8.2.0):
- Firebase/Analytics (8.3.0):
- Firebase/Core
- Firebase/Core (8.2.0):
- Firebase/Core (8.3.0):
- Firebase/CoreOnly
- FirebaseAnalytics (~> 8.2.0)
- Firebase/CoreOnly (8.2.0):
- FirebaseCore (= 8.2.0)
- Firebase/Crashlytics (8.2.0):
- FirebaseAnalytics (~> 8.3.0)
- Firebase/CoreOnly (8.3.0):
- FirebaseCore (= 8.3.0)
- Firebase/Crashlytics (8.3.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 8.2.0)
- Firebase/RemoteConfig (8.2.0):
- FirebaseCrashlytics (~> 8.3.0)
- Firebase/RemoteConfig (8.3.0):
- Firebase/CoreOnly
- FirebaseRemoteConfig (~> 8.2.0)
- FirebaseABTesting (8.2.0):
- FirebaseRemoteConfig (~> 8.3.0)
- FirebaseABTesting (8.3.0):
- FirebaseCore (~> 8.0)
- FirebaseAnalytics (8.2.0):
- FirebaseAnalytics/AdIdSupport (= 8.2.0)
- FirebaseAnalytics (8.3.0):
- FirebaseAnalytics/AdIdSupport (= 8.3.0)
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
......@@ -36,36 +36,36 @@ PODS:
- GoogleUtilities/Network (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- nanopb (~> 2.30908.0)
- FirebaseAnalytics/AdIdSupport (8.2.0):
- FirebaseAnalytics/AdIdSupport (8.3.0):
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleAppMeasurement (= 8.2.0)
- GoogleAppMeasurement (= 8.3.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/MethodSwizzler (~> 7.4)
- GoogleUtilities/Network (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- nanopb (~> 2.30908.0)
- FirebaseCore (8.2.0):
- FirebaseCore (8.3.0):
- FirebaseCoreDiagnostics (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Logger (~> 7.4)
- FirebaseCoreDiagnostics (8.2.0):
- FirebaseCoreDiagnostics (8.3.0):
- GoogleDataTransport (~> 9.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Logger (~> 7.4)
- nanopb (~> 2.30908.0)
- FirebaseCrashlytics (8.2.0):
- FirebaseCrashlytics (8.3.0):
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleDataTransport (~> 9.0)
- nanopb (~> 2.30908.0)
- PromisesObjC (~> 1.2)
- FirebaseInstallations (8.2.0):
- FirebaseInstallations (8.3.0):
- FirebaseCore (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/UserDefaults (~> 7.4)
- PromisesObjC (~> 1.2)
- FirebaseRemoteConfig (8.2.0):
- FirebaseRemoteConfig (8.3.0):
- FirebaseABTesting (~> 8.0)
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
......@@ -84,14 +84,14 @@ PODS:
- Google-Mobile-Ads-SDK (8.7.0):
- GoogleAppMeasurement (< 9.0, >= 7.0)
- GoogleUserMessagingPlatform (>= 1.1)
- GoogleAppMeasurement (8.2.0):
- GoogleAppMeasurement/AdIdSupport (= 8.2.0)
- GoogleAppMeasurement (8.3.0):
- GoogleAppMeasurement/AdIdSupport (= 8.3.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/MethodSwizzler (~> 7.4)
- GoogleUtilities/Network (~> 7.4)
- "GoogleUtilities/NSData+zlib (~> 7.4)"
- nanopb (~> 2.30908.0)
- GoogleAppMeasurement/AdIdSupport (8.2.0):
- GoogleAppMeasurement/AdIdSupport (8.3.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/MethodSwizzler (~> 7.4)
- GoogleUtilities/Network (~> 7.4)
......@@ -252,25 +252,25 @@ CHECKOUT OPTIONS:
:git: "git@gitlab.pinsightmedia.com:oneweather/wdt-skywisetilekit-ios.git"
SPEC CHECKSUMS:
AlgoliaSearchClient: bbafe7f014cc0b474646d794ae3675ef4e92f0d5
AlgoliaSearchClient: 357f07735f0697ade2040ae18a04918bebc6d490
AmazonPublisherServicesSDK: 3ce8e44f693c585fe069dde00236a256187e2a56
AppsFlyerFramework: c66d79d965ccc2f44fd5db3df3d214428cc7665a
BezierKit: 8b9bc3aaaa34ede809ff7c7c8aecc2bbe3b86a89
Cirque: 1eb134f2180b33107106dc72e47340aefb054da3
FBAudienceNetwork: 9a5f277d6ed36a46354a045c46a4858b47407a72
FBSDKCoreKit_Basics: 06780a4a12e16596bde8406add02c6aa1bf38616
Firebase: 12c568897b807321964e89d2b263ef4c6cff3db6
FirebaseABTesting: 5f37131c5eceea579c471c915f7a0f8cad484d1f
FirebaseAnalytics: 7a744b1e7dc50125cb37714c6bdaea167e412082
FirebaseCore: 3a83f24c3de69ec9f9a426e2598125ea51f3a2ce
FirebaseCoreDiagnostics: 61384f54989065b15c36b5922b65112e86811d3c
FirebaseCrashlytics: 935dbdb043a286ca92a22d15e5780802403ea0ea
FirebaseInstallations: 9394ea09e242bf0816e95ac30e56a9214cc86ced
FirebaseRemoteConfig: 6695557b3dac704527c952502e799586941d399e
Firebase: 817b9171d0d51dccc458b94a5e8edff6b1dd323d
FirebaseABTesting: 7fe1b1d6b2bba76d3259f5d2a2089c05faf72ff0
FirebaseAnalytics: 456f2c51599870a15ded4548d1f1f7b2cabf65a7
FirebaseCore: a6dba751680d7033b9d3831e1cfc95ead0605118
FirebaseCoreDiagnostics: 7e873baabcfaa9512f538554ae4fa0817aaafbdb
FirebaseCrashlytics: 3d83f2e8a47f476f47c82ff4536b169df6781271
FirebaseInstallations: b69db7680870dbac17bba7a51fc0b5c4b365baa7
FirebaseRemoteConfig: 648648205dc7fd546880aeafc737bc19a2543d31
Flurry-iOS-SDK: 5831da8fc6bedb31fa1f94aac6fd204d36dd351d
Fyber_Marketplace_SDK: 8ba09b9df4cc225d34fb52260c0174269746b8e4
Google-Mobile-Ads-SDK: e242f463fdb8564ac3f11847a30215a0e042c934
GoogleAppMeasurement: b52eafc9dff542d580700e708216568bd2fbf168
GoogleAppMeasurement: de70802583dedceb0bca18172b345307e8f410b8
GoogleDataTransport: 04c3e9a480bbcaa2ec3f5d27f1cdeb6a92f20c8d
GoogleMobileAdsMediationFacebook: 83729e35dabb60960aa4e708fa4dcbaebb8ed85b
GoogleMobileAdsMediationFyber: e3879da61a72fabfdda09e5a544e836c4c52eaac
......@@ -290,6 +290,6 @@ SPEC CHECKSUMS:
Swarm: 95393cd52715744c94e3a8475bc20b4de5d79f35
XMLCoder: f884dfa894a6f8b7dce465e4f6c02963bf17e028
PODFILE CHECKSUM: 659661f4f40b1e968a316ebeaf2afc8bc6f0190a
PODFILE CHECKSUM: 429f8565da0a2b7d9bc78b2cbbbea3e4cbd28fcc
COCOAPODS: 1.10.1
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>8.8.1</string>
<string>8.9.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>8.2.0</string>
<string>8.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -149,5 +149,5 @@ install_xcframework() {
echo "Copied $source to $destination"
}
install_xcframework "${PODS_ROOT}/FirebaseAnalytics/Frameworks/FirebaseAnalytics.xcframework" "FirebaseAnalytics" "framework" "ios-arm64_i386_x86_64-simulator" "ios-arm64_armv7"
install_xcframework "${PODS_ROOT}/FirebaseAnalytics/Frameworks/FirebaseAnalytics.xcframework" "FirebaseAnalytics" "framework" "ios-arm64_armv7" "ios-arm64_i386_x86_64-simulator"
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>8.2.0</string>
<string>8.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -2,7 +2,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreDiagnostics" "${PODS_CONFIGURATION_BUILD_DIR}/GoogleDataTransport" "${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" "${PODS_CONFIGURATION_BUILD_DIR}/nanopb"
GCC_C_LANGUAGE_STANDARD = c99
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 Firebase_VERSION=8.2.0
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 Firebase_VERSION=8.3.0
HEADER_SEARCH_PATHS = $(inherited) "${PODS_TARGET_SRCROOT}"
OTHER_CFLAGS = $(inherited) -fno-autolink
OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit"
......
......@@ -2,7 +2,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreDiagnostics" "${PODS_CONFIGURATION_BUILD_DIR}/GoogleDataTransport" "${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities" "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC" "${PODS_CONFIGURATION_BUILD_DIR}/nanopb"
GCC_C_LANGUAGE_STANDARD = c99
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 Firebase_VERSION=8.2.0
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 Firebase_VERSION=8.3.0
HEADER_SEARCH_PATHS = $(inherited) "${PODS_TARGET_SRCROOT}"
OTHER_CFLAGS = $(inherited) -fno-autolink
OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit"
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>8.2.0</string>
<string>8.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>8.2.0</string>
<string>8.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>8.2.0</string>
<string>8.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>8.2.0</string>
<string>8.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment