Post

Replies

Boosts

Views

Activity

Reply to DefaultStringInterpolation Could not allocate memory
I've got this more symbolicated crash report hopefully it will help. crash report.crash Also here is the code for the GraphClient Init method that referenced in the crash log init(storeDomain: String, additionalHeaders: [String: String], authorisationSource: APIAuthorizationSource) { let baseHost: String #if DEVSTORE baseHost = "abc.com" #else baseHost = "efg.com" #endif let url = URL(string: "https://\(storeDomain).\(baseHost)/api/graphql")! let store = ApolloStore(cache: InMemoryNormalizedCache()) let provider = NetworkInterceptorProvider(authorisationSource, store: store) let nt = RequestChainNetworkTransport(interceptorProvider: provider, endpointURL: url, additionalHeaders: additionalHeaders) apollo = ApolloClient(networkTransport: nt, store: store) apollo.cacheKeyForObject = { [$0["__typename"], $0["id"]] } } My guess is that the problem is at line let url = URL(string: "https://\(storeDomain).\(baseHost)/api/graphql")! with string interpolation. I don't think the force unwrap for of URL here is the cause here but open for any suggestions.
May ’21
Reply to DefaultStringInterpolation Could not allocate memory
The GraphClient is created inside another class. func createGraphClient() -> GraphClient {     return GraphClient(storeDomain: domain,               additionalHeaders: additionalHeaders,               authorisationSource: self)   } The domain passed in here is a private(set) var domain: String This variable is set on init based on some user input or after some API callback handler. But it won't be set to nil.
May ’21
Reply to iOS 16 crash on dismiss sheet with navigationView
I've found a workaround which can prevent this crash from happening. if #available(iOS 16.0, *) {             let keyWindow = UIApplication.shared.connectedScenes               .filter { $0.activationState == .foregroundActive }               .first(where: { $0 is UIWindowScene })               .flatMap { $0 as? UIWindowScene }?.windows               .first(where: \.isKeyWindow)             if let window = keyWindow {               window.rootViewController?.presentedViewController?.dismiss(animated: true)             } } Using UIKit to dismiss the model seem to work fine and won't trigger the crash. But this is not ideal and I don't know when this can get fixed.
Oct ’22