Skip to content

Commit

Permalink
Merge pull request #48 from plaidev/flutter
Browse files Browse the repository at this point in the history
[ios] use N_ERROR_RECORD instead of hard coded string
  • Loading branch information
RyosukeCla authored Jun 26, 2024
2 parents 5606eda + eda4f21 commit 1e0ce58
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Nativebrik.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Nativebrik'
s.version = '0.5.8'
s.version = '0.5.9'
s.summary = 'Nativebrik SDK'
s.description = <<-DESC
Nativebrik SDK for iOS.
Expand Down
4 changes: 2 additions & 2 deletions ios/Nativebrik/Nativebrik/data/track.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ class TrackRespositoryImpl: TrackRepository2 {
}) ?? false) || (crashRecord.reason?.contains("Nativebrik") ?? false)
self.buffer.append(TrackEvent(
typename: .Event,
name: "N_CRASH_RECORD",
name: TriggerEventNameDefs.N_ERROR_RECORD.rawValue,
timestamp: formatToISO8601(getCurrentDate())
))
if causedByNativebrik {
self.buffer.append(TrackEvent(
typename: .Event,
name: "N_CRASH_IN_SDK_RECORD",
name: TriggerEventNameDefs.N_ERROR_IN_SDK_RECORD.rawValue,
timestamp: formatToISO8601(getCurrentDate())
))
}
Expand Down
2 changes: 2 additions & 0 deletions ios/Nativebrik/Nativebrik/generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ enum TriggerEventNameDefs: String, Decodable, Encodable {
case USER_ENTER_TO_APP = "USER_ENTER_TO_APP"
case USER_ENTER_TO_APP_FIRSTLY = "USER_ENTER_TO_APP_FIRSTLY"
case USER_ENTER_TO_FOREGROUND = "USER_ENTER_TO_FOREGROUND"
case N_ERROR_RECORD = "N_ERROR_RECORD"
case N_ERROR_IN_SDK_RECORD = "N_ERROR_IN_SDK_RECORD"
case unknown = "unknown"
init(from decoder: Decoder) throws {
self = try TriggerEventNameDefs(rawValue: decoder.singleValueContainer().decode(RawValue.self)) ?? .unknown
Expand Down
2 changes: 1 addition & 1 deletion ios/Nativebrik/Nativebrik/sdk.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation
import SwiftUI
import Combine

public let nativebrikSdkVersion = "0.5.8"
public let nativebrikSdkVersion = "0.5.9"
public let isNativebrikAvailable: Bool = {
if #available(iOS 15.0, *) {
return true
Expand Down

0 comments on commit 1e0ce58

Please sign in to comment.