Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Simulator Crashes #564

Open
brentforder opened this issue Dec 16, 2024 · 3 comments
Open

iOS Simulator Crashes #564

brentforder opened this issue Dec 16, 2024 · 3 comments

Comments

@brentforder
Copy link

brentforder commented Dec 16, 2024

Motivation

Related to #531
We're currently using the Aug 7th MapLibre Native iOS 6.5.4 release (https://github.com/maplibre/maplibre-native/releases/tag/ios-v6.5.4).
6.9.0 released today (Dec 16th), and it appears that there are several significant fixes and improvements in the 6 releases since 6.5.4.

I've personally encountered several roadblocks with testing my MLRN app on iOS in previous months, including MapView consistently crashing during load and C++ MetalKit draw calls, specifically on the iOS simulator with version 6.5.4. I had to acquire an iPhone to work around this, because the MapView loads fine on actual apple hardware. In the #maplibre-native and #maplibre-ios Slack channels, I previously spoke to others having similar roadblocks with the iOS simulator just not working for MapLibre Native.

I'd like to propose that we do some testing to determine if we can update to 6.8.1 or 6.9.0, and hopefully unlock iOS Simulator as a testing tool, and if we aren't ready for that then at least we can discuss other intermediate steps to get there.

Implementation / Test Setup

  • Find the following block of script in maplibre-react-native.podspec:
  def $MLRN.post_install(installer)
    spm_spec = {
      url: "https://github.com/maplibre/maplibre-gl-native-distribution",
      requirement: {
        kind: "exactVersion",
        `version: "6.5.4"`
      },
      product_name: "MapLibre"
    }
  • Set "version" to "6.9.0"

Testing

  • I will be testing with my custom app, which employs vector OSM tiles using the MapView.styleURL property

  • I'm using the following MLRN components:

    • UserLocation, Camera, Images
    • 2 sets of ShapeSource + SymbolLayer (for separately-managed marker layers)
    • PointAnnotation for a draggable marker
  • Hopefully a couple others can test with the example app, and their custom apps

  • I think it would be worth developing even very simple tests that verify component mounting and/or visibility after MapView.onDidFinishLoadingMap(), perhaps assisting with Create more E2E Tests #541

@KiwiKilian
Copy link
Collaborator

KiwiKilian commented Dec 16, 2024

It just did what you asked for today 😄. Check out this branch, run yarn pack and use the package.tgz within your project to test: #563

I can't state, that 6.5.4 was unstable for me. I can't remember cases, in which I had crashes. Were there reproducible steps, to create crashes?

I work lots within the iOS simulator on an M1 chip, works great.

@brentforder
Copy link
Author

Awesome, thanks @KiwiKilian I haven't migrated to Yarn yet, but I'll see if I can try that out!

@KiwiKilian
Copy link
Collaborator

You only have to use yarn within this repository. Once packed, you can use this package.tgz within any other project with any package manager.

I keep this one open to see, if we can sort something out about your simulator issues. Bumping the native version is already part of #531.

@KiwiKilian KiwiKilian reopened this Dec 16, 2024
@KiwiKilian KiwiKilian changed the title Update MapLibre Native iOS Dependency iOS Simulator Crashes Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants