Skip to content

Commit

Permalink
Merge pull request #40 from patryk-sredzinski/release/1.3
Browse files Browse the repository at this point in the history
Fix issue with file write
  • Loading branch information
patryk-sredzinski authored Jan 15, 2024
2 parents 1795938 + 8b16ca8 commit 51b5540
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion IteoLogger.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'IteoLogger'
spec.version = '1.2'
spec.version = '1.3'
spec.license = { :type => 'MIT' }
spec.homepage = 'https://github.com/psredzinski/IteoLogger'
spec.authors = { 'Patryk Średziński' => '[email protected]' }
Expand Down
4 changes: 2 additions & 2 deletions IteoLogger.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.2;
MARKETING_VERSION = 1.3;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -784,7 +784,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.2;
MARKETING_VERSION = 1.3;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand Down
11 changes: 7 additions & 4 deletions IteoLogger/Consumers/IteoLoggerStorageItemConsumer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ private extension IteoLoggerStorageItemConsumer {
}

let file = try FileHandle(forWritingTo: filePath)
file.seekToEndOfFile()
file.write(dataToLog)
file.closeFile()

if #available(iOS 13.4, *) {
try file.seekToEnd()
try file.write(contentsOf: dataToLog)
} else {
file.write(dataToLog)
file.closeFile()
}
}

}
6 changes: 6 additions & 0 deletions IteoLogger/Models/IteoLoggerModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ public struct IteoLoggerModule: Codable, Equatable, Hashable {
/// Deeplink - ⛓
public static let deeplink = IteoLoggerModule("Deeplink" ,prefix: "")

/// Link - 🔗
public static let link = IteoLoggerModule("Link" ,prefix: "🔗")

/// RichLink - 🗾
public static let richlink = IteoLoggerModule("RichLink" ,prefix: "🗾")

/// Call - 📞
public static let call = IteoLoggerModule("Call" ,prefix: "📞")

Expand Down

0 comments on commit 51b5540

Please sign in to comment.