QuickBirdEng / XCoordinator

🎌 Powerful navigation library for iOS based on the coordinator pattern
MIT License
2.26k stars 177 forks source link

Present fail on UIActivityViewController #236

Closed Ledvance-Beet closed 1 year ago

Ledvance-Beet commented 2 years ago

tried to present an UIActivityViewController, but It always failed with log:

2022-10-20 00:39:45.515868+0800 smartunify[958:102454] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} 2022-10-20 00:39:45.516026+0800 smartunify[958:102454] [default] Attempt to map database failed: permission was denied. This attempt will not be retried. 2022-10-20 00:39:45.516119+0800 smartunify[958:102454] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} 2022-10-20 00:39:45.568113+0800 smartunify[958:102454] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} 2022-10-20 00:39:45.568205+0800 smartunify[958:102454] [default] Attempt to map database failed: permission was denied. This attempt will not be retried. 2022-10-20 00:39:45.568266+0800 smartunify[958:102454] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}

pauljohanneskraft commented 1 year ago

I'm not sure how this is connected to this library necessarily. Could you please provide more context and also check the regular UIKit way to present a UIActivityViewController?

An example for such a check would be:

func prepareTransition(for route: RouteType) -> TransitionType {
    switch route {
    case .activityViewController:
         let viewController = UIActivityViewController(...)
         rootViewController.present(viewController, animated: true)
         return .none()
    }
}

If this were to also fail like the present transition, then it is very likely not connected to this library.

I will close this for now and reopen when there are more people having this issue or we actually know that the issue is caused by this library.