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

Error "Use of 'mgl_interpolate:withCurveType:parameters:stops:' as an NSExpression is forbidden" on iOS 15 #6

Closed
adetante opened this issue Sep 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@adetante
Copy link

Steps to Trigger Behavior

  1. Use the provided sample code
  2. Call to navigationView.showRoutes causes the error

Actual Behavior

  • Error:
NSPredicate: Use of 'mgl_interpolate:withCurveType:parameters:stops:' as an NSExpression function is forbidden
  • Map is not displayed

Version(s) affected

  • Platform: iOS
  • OS version: iOS 16
  • Device type: iPhone 14 Pro
  • Emulator/ Simulator: yes/yes
  • Development OS: OSX 13.5.2
  • maplibre-navigation-ios Version 2.0.0
  • MapLibre GL version 5.13.0

Additional context

if #available(iOS 15, *) {
    circleExpression = NSExpression(
        forMGLInterpolating: NSExpression(forConstantValue: mag),
        curveType: .linear,
        parameters: nil,
        stops: NSExpression(forConstantValue: stops))
} else {
    // This works up to iOS 14.5
    circleExpression = NSExpression(
        format: "mgl_interpolate:withCurveType:parameters:stops:(mag, 'linear', nil, %@)",
        stops)
}
@louwers louwers added the bug Something isn't working label Sep 18, 2023
@Djibs
Copy link
Contributor

Djibs commented Dec 30, 2023

I confirm

@Patrick-Kladek
Copy link
Contributor

I think we can close this as it was resolved in #33

@boldtrn
Copy link
Collaborator

boldtrn commented Apr 12, 2024

Ok, please reopen if this occurs again 👍

@boldtrn boldtrn closed this as completed Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants