Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Closed
brentforder opened this issue Dec 16, 2024 · 5 comments
Closed

iOS Simulator Crashes #564

brentforder opened this issue Dec 16, 2024 · 5 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
@brentforder
Copy link
Author

Hi @KiwiKilian, unfortunately it didn't solve my issue with the iOS simulator, but after testing with this, I'm pretty certain that the cause is hardware-related (GPU acceleration, as required by Metal is just not working for me).
Your branch otherwise appears to be working great with a hardware iPhone and RN New Architecture. Thanks for your help and consideration.

@KiwiKilian
Copy link
Collaborator

I guess this then more of a concern for MapLibre Native. Did you discuss this on the #maplibre-native Slack channel? If that's a general problem on specific macOS Hardware?

@maplibre maplibre locked and limited conversation to collaborators Dec 20, 2024
@KiwiKilian KiwiKilian converted this issue into discussion #568 Dec 20, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants