Skip to content
Open
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
8 changes: 5 additions & 3 deletions ios/DecorationData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ struct LocatorData: Codable {

// Try to create Locator.Locations from JSON, fall back to empty if it fails
let locatorLocations: ReadiumShared.Locator.Locations
do {
locatorLocations = try ReadiumShared.Locator.Locations(json: locationsDict.isEmpty ? nil : locationsDict)
} catch {
if locationsDict.isEmpty {
locatorLocations = ReadiumShared.Locator.Locations()
} else {
let json = JSONValue(locationsDict)
let jsonLocations = try? ReadiumShared.Locator.Locations(json: json)
locatorLocations = jsonLocations ?? ReadiumShared.Locator.Locations()
}

// Convert text data to Locator.Text if present
Expand Down
8 changes: 4 additions & 4 deletions react-native-readium.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ Pod::Spec.new do |s|
s.swift_version = "5.0"
s.module_name = "NitroReadium"

s.dependency 'ReadiumShared', '~> 3.5.0'
s.dependency 'ReadiumStreamer', '~> 3.5.0'
s.dependency 'ReadiumNavigator','~> 3.5.0'
s.dependency 'ReadiumAdapterGCDWebServer', '~> 3.5.0'
s.dependency 'ReadiumShared', '~> 3.9.0'
s.dependency 'ReadiumStreamer', '~> 3.9.0'
s.dependency 'ReadiumNavigator','~> 3.9.0'
s.dependency 'ReadiumAdapterGCDWebServer', '~> 3.9.0'
s.dependency 'ReadiumInternal'

# Adds React Native dependencies, framework header search paths, and
Expand Down