Post

Replies

Boosts

Views

Activity

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.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’22
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.
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
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.
Topic: Programming Languages SubTopic: Swift Tags:
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.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to iOS 16 crash on dismiss sheet with navigationView
I've also set the navigationViewStyle to be StackNavigationViewStyle()
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to iOS 16 crash on dismiss sheet with navigationView
Also this only happening on device. When running on simulator it is all fine
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to TestFlight Crash
This is the same issue as state here https://developer.apple.com/forums/thread/696197 Try update to Xcode 13.2RC it should solve your issue
Replies
Boosts
Views
Activity
Dec ’21
Reply to Dictionary crashed when updating value or init(capacity:) on iOS 14
Have you found the root cause of it? I'm experiencing a similar issue but my crash happened on String interpolation. The top frames of the crash report also is from libswiftCore.dylib and to do with memory allocation.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21