Closed fabian-guerra closed 5 years ago
I am getting this message on a new iOS project that I have just started. How do I resolve? Are there some initial properties I need to set on the MGLMapView object?
When I add MGLMapView class at added UIView in storyboard. Storyboard got crashed. How can I fix it? Please help.
Is this a duplicate of #10072?
You are right. Even tho I didn't use cocoapods it's the same error. Duplicate of #10072
@fabian-guerra just want to confirm - you weren't using CocoaPods?
cc @akitchen
@julianrex I confirm that I was not using cocoapods.
Reopening – #10072 is definitely caused by CocoaPods. This would be unrelated in that case. Do you have reliable steps to reproduce?
Import the SDK in a new app, or in the same test app storyboard add a map view. Has the same error as in #10072.
I can reproduce this issue in Xcode 9.4 with iOS map SDK v4.1.0-beta.1. With the “Developer” crash reporting preference turned on, I see this crash in IBDesignablesAgentCocoaTouch:
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes: 0x0000000000000032, 0x000000011d458000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x2
Same in Xcode 10 beta 1 with IBDesignablesAgent-iOS:
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes: 0x0000000000000032, 0x00000001262f7000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x2
The framework bundle isn’t codesigned. At build time, we rely on the “Code Sign On Copy” setting in the Embed Frameworks build phase. But apparently the designables agent now expects the bundle to be codesigned. I thought I’ve seen this work at times in the recent past, but perhaps I’m misremembering.
The codesigning issue explains why the macOS map SDK has never been affected by the designable crash, and why using a static framework can also avoid the crash.
In investigating this issue, I discovered that the designable agent has been renamed: #12140. That fix is necessary but insufficient for addressing the IB designable crash.
This seems more an Xcode bug than ours, https://github.com/mapbox/mapbox-gl-native/pull/12140 helped fix our side of the issue.
I made a test project with a UIView
that had IBInspectables
with an IB crash. I cleaned the project and restarted my Mac, that seemed to fix the crash I was having in the maps SDK project too.
I asked @julianrex to confirm if cleaning a project and restarting the mac fixed the crash and he confirmed that this fix
works.
The solution for this ticket is clean the project and restart the mac (not only Xcode).
If anyone else encounters a way to re reproduce this issue feel free to re-open it.
I cleaned my project and restarted my Mac, but I'm still facing the error.
FYI: subclassing MGLMapView solved it.
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
Fixed in #14379.
Platform: iOS 11 Mapbox SDK version: 3.7.0
Steps to trigger behavior
MGLMapView
through storyboards.Expected behavior
IB will work.
Actual behavior
IB crashes with the following message:
This work well using
master
branch.