Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

MBGLBundleCanary, MGLNativeNetworkManager implemented twice #206

Open
1ec5 opened this issue Mar 11, 2020 · 0 comments
Open

MBGLBundleCanary, MGLNativeNetworkManager implemented twice #206

1ec5 opened this issue Mar 11, 2020 · 0 comments

Comments

@1ec5
Copy link
Contributor

1ec5 commented Mar 11, 2020

MBGLBundleCanary and MGLNativeNetworkManager are included twice in the unit tests, causing undefined behavior at runtime:

objc[30486]: Class MBGLBundleCanary is implemented in both /path/to/mapbox-gl-native-ios/build/ios/Debug-iphonesimulator/Mapbox.framework/Mapbox (0x10f92a1f8) and /path/to/mapbox-gl-native-ios/build/ios/Debug-iphonesimulator/test.xctest/test (0x10d604d18). One of the two will be used. Which one is undefined.
objc[30486]: Class MGLNativeNetworkManager is implemented in both /path/to/mapbox-gl-native-ios/build/ios/Debug-iphonesimulator/Mapbox.framework/Mapbox (0x10f92a220) and /path/to/mapbox-gl-native-ios/build/ios/Debug-iphonesimulator/test.xctest/test (0x10d604d40). One of the two will be used. Which one is undefined.

MGLNetworkIntegrationManager.h pulls in both classes from mbgl/interface/native_apple_interface.h. MGLNetworkIntegrationManager.h is a project header, so it ends up getting included separately by MGLNetworkConfigurationIntegrationTests.mm. MGLNetworkIntegrationManager.h should be a private header so it can be included without redundantly including a redundant implementation.

/cc @mapbox/maps-ios

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants