Open sadiq81 opened 5 years ago
When trying to access a nested object my app crashes
let baseURL = Environment.backendURL.appendingPathComponent("api") let dataSource = DataSource<ProductOfferResource>(strategy: .path(ProductOfferResource.resourceType), client: self.client) try! dataSource.fetch() .result({ (document: Document<[ProductOfferResource]>) in let productOffers = document.data observer.onNext(productOffers ?? []) // Causes crash let background = productOffers?[0].design?.background_image?.meta observer.onCompleted() }, { (error) in observer.onError(error ?? NetworkServiceError.unknown) })
All objects can be found https://gist.github.com/sadiq81/bf0e77a8561049ecd0a105479fc3ff5a
When trying to access a nested object my app crashes
All objects can be found https://gist.github.com/sadiq81/bf0e77a8561049ecd0a105479fc3ff5a