Posts

Post not yet marked as solved
1 Replies
We ran into a very similar issue yesterday. also Xcode 14.3 tests that require host app duplicate symbol warning when running app target tests only SwiftPM modules pulled in by multiple targets and app tests run in a host application at the end we are having issues with casting a concrete type to the protocol type (yours is the other way around, but same concept) In the debugger we can cast to a different type that also implements the protocol that is failing to be cast to correctly If I run the same code that fails to be cast correctly in a SwiftPM Module test target, it works just fine. Here are the relevant types protocol FMLoadable {} protocol LayerProtocol: FMLoadable {} protocol FeatureLayerProtocol: LayerProtocol {} class FeatureLayerMock: FeatureLayerProtocol {} In the code below, baseLayers is [LayerProtocol] and flattenedOperationalLayers is [LayerProtocol] but contains FeatureLayerMock instances let items: [Loadable] = (baseLayers + map.flattenedOperationalLayers).filter { !($0 is UnsupportedLayerProtocol) } This code emits the following when run in the app-level test target, with host application Could not cast value of type '<moduleA>.FeatureLayerMock' (0x14fd582a0) to '<moduleB>.FMLoadable' (0x141b334c0). This same code runs fine in a SwiftPM test target test
Post not yet marked as solved
7 Replies
We've started seeing issues since upgrading to iOS 13.3, only on certain devices where location manager doesn't return locations consistently (background or foreground) and will send a number of locations with (0,0) with 2500m accuracy. This was fine before 13.3. Various devices and carriers are exhibiting this behavior. Running an app like Strava on the same phone at the same time, Strava gets locations, our app still doesn't. It is very strange -- made more difficult because it can't be debugging while connected to Xcode in any manner