Select to view content in your preferred language

MinScale ignored in Release build for iOS

90
3
Jump to solution
yesterday
ChrisDalla_Piazza
Regular Contributor

Hello,

We noticed in a mmpk we authored with MinScale for one of our layers will correctly show and hide when we are in Debug on the iOS simulator for a mac paired to Visual Studio on Windows.

However, when we build for Test Flight as well as run that same paired mac iOS simulator in Release, the layer displays at all scales.

We are on 200.8.1 of the MAUI ArcGIS runtime.

Our older production Release on Xamarin forms 100.14.1 does not have this problem.

Can anyone think of any build options for Release we can try?

Thank you for your help!

0 Kudos
1 Solution

Accepted Solutions
JenniferNery
Esri Regular Contributor

Thanks for the additional details.

Since this only occurs in an iOS Release build and not in Debug, it seems more likely to be related to Release build configuration (linking, trimming, AOT, or LLVM optimizations) than the MMPK content itself.

To help narrow down the cause, could you try the following, starting with the simplest checks?

  • Test with the latest 200.8.2 release instead of 200.8.1 to determine whether the issue has already been addressed in a newer patch.
  • Run a Release build on the simulator and a Debug build on a physical device to determine whether the behavior is tied to the build configuration or device architecture.
  • What type of FeatureLayer.DisplayFilterDefinition is being used: manual or scale-based?
  • What are the values of FeatureLayer.RenderingMode and FeatureLayer.TilingMode?
  • Is FeatureLayer.DefinitionExpression, ServiceFeatureTable.DefinitionExpression, or FeatureLayer.FloorDefinition also set? If so, what values are being applied?
  • For scale-based display filters, verify that the current MapView.MapScale falls within at least one authored display filter range.
  • Compare the layer state between Debug and Release builds and check whether the active display filter changes or becomes null after loading.
  • Inspect the MMPK JSON (.mmap) and confirm the layer's displayFilterInfo is present and contains the expected values for filterMode, filters, id, where, and activeFilterId.

It would also be helpful to subscribe to GeoView.LayerViewStateChanged and capture the LayerViewStateChangedEventArgs for the affected layer. Specifically:

  • Does LayerViewState.Error contain an exception? Is Layer.LoadError populated?
  • Does LayerViewState.Status include any of: LayerViewStatus.Error, LayerViewStatus.Warning, LayerViewStatus.OutOfScale, LayerViewStatus.NotVisible


If the issue still reproduces, please try the following Release-build configuration changes:

  • Test with linking/trimming reduced or disabled.
  • Test with LLVM disabled (and optionally enable the interpreter).

If any of these checks or configuration changes affect the behavior, that would provide a useful workaround and help narrow down the root cause.

Thanks.

View solution in original post

0 Kudos
3 Replies
JenniferNery
Esri Regular Contributor

Thanks for the additional details.

Since this only occurs in an iOS Release build and not in Debug, it seems more likely to be related to Release build configuration (linking, trimming, AOT, or LLVM optimizations) than the MMPK content itself.

To help narrow down the cause, could you try the following, starting with the simplest checks?

  • Test with the latest 200.8.2 release instead of 200.8.1 to determine whether the issue has already been addressed in a newer patch.
  • Run a Release build on the simulator and a Debug build on a physical device to determine whether the behavior is tied to the build configuration or device architecture.
  • What type of FeatureLayer.DisplayFilterDefinition is being used: manual or scale-based?
  • What are the values of FeatureLayer.RenderingMode and FeatureLayer.TilingMode?
  • Is FeatureLayer.DefinitionExpression, ServiceFeatureTable.DefinitionExpression, or FeatureLayer.FloorDefinition also set? If so, what values are being applied?
  • For scale-based display filters, verify that the current MapView.MapScale falls within at least one authored display filter range.
  • Compare the layer state between Debug and Release builds and check whether the active display filter changes or becomes null after loading.
  • Inspect the MMPK JSON (.mmap) and confirm the layer's displayFilterInfo is present and contains the expected values for filterMode, filters, id, where, and activeFilterId.

It would also be helpful to subscribe to GeoView.LayerViewStateChanged and capture the LayerViewStateChangedEventArgs for the affected layer. Specifically:

  • Does LayerViewState.Error contain an exception? Is Layer.LoadError populated?
  • Does LayerViewState.Status include any of: LayerViewStatus.Error, LayerViewStatus.Warning, LayerViewStatus.OutOfScale, LayerViewStatus.NotVisible


If the issue still reproduces, please try the following Release-build configuration changes:

  • Test with linking/trimming reduced or disabled.
  • Test with LLVM disabled (and optionally enable the interpreter).

If any of these checks or configuration changes affect the behavior, that would provide a useful workaround and help narrow down the root cause.

Thanks.

0 Kudos
ChrisDalla_Piazza
Regular Contributor

Thank you for the swift and detailed suggestions @JenniferNery!

I made a mistake, it is purely a MinScale issue.  There is no DisplayFilterDefinition involved at all and I revised the post to reflect that.

Debug iOS simulator - no issue
Release iOS similator - has the issue
Release TestFlight - has the issue
Release Windows - no issue
Debug Windows - no issue
Release Xamarin Forms AppStore - no issue

I'll try the rest of the suggestions tonight.

0 Kudos
ChrisDalla_Piazza
Regular Contributor

Hi @JenniferNery ,

I think I found my problem.  I'm using AutoMapper to transfer some settings and in fact MinScale is not getting set which makes perfect sense.

Your suggestion to change linker behavior did help me find this.  Thank you for your help!

0 Kudos