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

[ios] expose nativebrikTrackUrl, nativebrikCdnUrl #51

Merged
merged 2 commits into from
Oct 3, 2024
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
2 changes: 1 addition & 1 deletion ios/Nativebrik/Nativebrik/component/page.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class PageView: UIView {
// when it has http request, render loading view, and then
self.loading = true
self.renderView()

Task {
let result = await Task.detached {
let variable = self.container.createVariableForTemplate(data: nil, properties: self.props)
Expand Down
8 changes: 6 additions & 2 deletions ios/Nativebrik/Nativebrik/sdk.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import Foundation
import SwiftUI
import Combine

// for development
public var nativebrikTrackUrl = "https://track.nativebrik.com/track/v1"
public var nativebrikCdnUrl = "https://cdn.nativebrik.com"
public let nativebrikSdkVersion = "0.5.9"

public let isNativebrikAvailable: Bool = {
if #available(iOS 15.0, *) {
return true
Expand Down Expand Up @@ -49,8 +53,8 @@ func createDispatchNativebrikEvent(_ client: NativebrikClient) -> (_ event: Comp
class Config {
let projectId: String
var url: String = "https://nativebrik.com/client"
var trackUrl: String = "https://track.nativebrik.com/track/v1"
var cdnUrl: String = "https://cdn.nativebrik.com"
var trackUrl: String = nativebrikTrackUrl
var cdnUrl: String = nativebrikCdnUrl
var eventListeners: [((_ event: ComponentEvent) -> Void)] = []

init() {
Expand Down
Loading