Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to lightweight 3.5.0 #21

Merged
merged 3 commits into from
Aug 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Example/LightweightCharts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@
INFOPLIST_FILE = LightweightCharts/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.3.0;
MARKETING_VERSION = 3.5.0;
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "tradingview.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -638,7 +638,7 @@
INFOPLIST_FILE = LightweightCharts/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.3.0;
MARKETING_VERSION = 3.5.0;
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "tradingview.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- LightweightCharts (3.3.0)
- LightweightCharts (3.5.0)

DEPENDENCIES:
- LightweightCharts (from `../`)
Expand All @@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
LightweightCharts: 05a4b19200513eb5a063ff81b09b8e18aee3997e
LightweightCharts: 9a374056b466a14aba9513907af6c6763a209cc3

PODFILE CHECKSUM: 10aa45b030d82b96cfc0e4e3b143c5488576107b

COCOAPODS: 1.9.3
COCOAPODS: 1.10.1
6 changes: 3 additions & 3 deletions LightweightCharts.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'LightweightCharts'
s.version = '3.3.0'
s.version = '3.5.0'
s.summary = 'LightweightCharts for iOS.'
s.description = 'LightweightCharts pod. Swift wrapper above JavaScript library.'
s.homepage = 'https://tradingview.com'
Expand All @@ -19,9 +19,9 @@ Pod::Spec.new do |s|
:script => 'LIBRARY=${TEMP_DIR}/lightweight-charts.js

if [ "${CONFIGURATION}" = "Release" ]; then
curl -o $LIBRARY https://unpkg.com/lightweight-charts@3.3.0/dist/lightweight-charts.standalone.production.js
curl -o $LIBRARY https://unpkg.com/lightweight-charts@3.5.0/dist/lightweight-charts.standalone.production.js
else
curl -o $LIBRARY https://unpkg.com/lightweight-charts@3.3.0/dist/lightweight-charts.standalone.development.js
curl -o $LIBRARY https://unpkg.com/lightweight-charts@3.5.0/dist/lightweight-charts.standalone.development.js
fi

cp -f $LIBRARY ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/lightweight-charts.js'
Expand Down
2 changes: 1 addition & 1 deletion LightweightCharts/Classes/Implementations/API/Chart.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import WebKit

public protocol ChartDelegate: class {
public protocol ChartDelegate: AnyObject {

func didClick(onChart chart: ChartApi, parameters: MouseEventParams)
func didCrosshairMove(onChart chart: ChartApi, parameters: MouseEventParams)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import WebKit

public protocol LightweightChartsDelegate: class {
public protocol LightweightChartsDelegate: AnyObject {

func lightweightChartsDidLoad(_ lightweightCharts: LightweightCharts)
func lightweightCharts(_ lightweightCharts: LightweightCharts, didFailLoadWithError error: Error)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import WebKit

protocol JavaScriptEvaluator: class {
protocol JavaScriptEvaluator: AnyObject {

func evaluateScript(_ script: String, completion: ((Any?, Error?) -> Void)?)
func decodedResult<T: Decodable>(forScript script: String, completion: @escaping (T?) -> Void)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
protocol JavaScriptObject: class {
protocol JavaScriptObject: AnyObject {

var jsName: String { get }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import WebKit

protocol MessageHandlerDelegate: class {
protocol MessageHandlerDelegate: AnyObject {

func messageHandler(_ messageHandler: MessageHandler,
didReceiveClickWithParameters parameters: MouseEventParams)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import WebKit

protocol ClosuresStore: class {
protocol ClosuresStore: AnyObject {

func addMethod<Input, Output>(_ method: JavaScriptMethod<Input, Output>, forName name: String)

Expand Down
2 changes: 1 addition & 1 deletion LightweightCharts/Classes/Implementations/WebView.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import WebKit

public protocol JavaScriptErrorDelegate: class {
public protocol JavaScriptErrorDelegate: AnyObject {

func didFailEvaluateScript(_ script: String, withError error: Error)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ public struct TimeScaleOptions {

public var rightOffset: Double?
public var barSpacing: Double?
public var minBarSpacing: Double?
public var fixLeftEdge: Bool?
public var fixRightEdge: Bool?
public var lockVisibleTimeRangeOnResize: Bool?
public var rightBarStaysOnScroll: Bool?
public var borderVisible: Bool?
Expand All @@ -26,7 +28,9 @@ public struct TimeScaleOptions {

public init(rightOffset: Double? = nil,
barSpacing: Double? = nil,
minBarSpacing: Double? = nil,
fixLeftEdge: Bool? = nil,
fixRightEdge: Bool? = nil,
lockVisibleTimeRangeOnResize: Bool? = nil,
rightBarStaysOnScroll: Bool? = nil,
borderVisible: Bool? = nil,
Expand All @@ -38,7 +42,9 @@ public struct TimeScaleOptions {
tickMarkFormatter: JavaScriptMethod<TickMarkFormatterParameters, String>? = nil) {
self.rightOffset = rightOffset
self.barSpacing = barSpacing
self.minBarSpacing = minBarSpacing
self.fixLeftEdge = fixLeftEdge
self.fixRightEdge = fixLeftEdge
self.lockVisibleTimeRangeOnResize = lockVisibleTimeRangeOnResize
self.rightBarStaysOnScroll = rightBarStaysOnScroll
self.borderVisible = borderVisible
Expand Down
2 changes: 1 addition & 1 deletion LightweightCharts/Classes/Protocols/ChartApi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import UIKit
/**
The main interface of a single chart
*/
public protocol ChartApi: class {
public protocol ChartApi: AnyObject {

/**
* Subsription delegate for chart events. Weak reference.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

/** Interface to be implemented by the object in order to be used as a price formatter */
public protocol PriceFormatterApi: class {
public protocol PriceFormatterApi: AnyObject {

/**
* Formatting function
Expand Down
2 changes: 1 addition & 1 deletion LightweightCharts/Classes/Protocols/PriceLineApi.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public protocol PriceLineApi: class {
public protocol PriceLineApi: AnyObject {

func applyOptions(options: PriceLineOptions)
func options(completion: @escaping (PriceLineOptions?) -> Void)
Expand Down
2 changes: 1 addition & 1 deletion LightweightCharts/Classes/Protocols/PriceScaleApi.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

/** Interface to control chart's price scale */
public protocol PriceScaleApi: class {
public protocol PriceScaleApi: AnyObject {

/**
* Applies new options to the price scale
Expand Down
2 changes: 1 addition & 1 deletion LightweightCharts/Classes/Protocols/SeriesApi.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public protocol SeriesApi: class {
public protocol SeriesApi: AnyObject {

associatedtype Options: SeriesOptionsCommon
associatedtype TickValue: SeriesData
Expand Down
2 changes: 1 addition & 1 deletion LightweightCharts/Classes/Protocols/TimeScaleApi.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import CoreGraphics

/** Interface to chart time scale */
public protocol TimeScaleApi: class {
public protocol TimeScaleApi: AnyObject {

var delegate: TimeScaleDelegate? { get set }

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LightweightCharts is available through [CocoaPods](https://cocoapods.org). To in
it, just simply add the following line to your Podfile:

```ruby
pod 'LightweightCharts', '~> 3.3.0'
pod 'LightweightCharts', '~> 3.5.0'
```
## Usage

Expand Down