Forum Xamarin.Forms

Issue with picker deploying through App Center to iOS

jhershmanjhershman Member ✭✭
edited March 2020 in Xamarin.Forms

I have an app that loads up a data source for a picker control dynamically at runtime. These pickers no longer load when the application is deployed through App Center. Going back through deployments it would seem that the first deployment to break occurred after the release of XCode 13.1. We had not regression tested some areas of the application and not noticed the issue until recently.

Everything works as expected if I deploy through the debugger to either a simulator or onto my device. This only occurs when deployed through an App Center build deployment. I have played around with different build setups in App Center without success.

Also the issue only occurs on DataSources that are loaded dynamically at runtime. In a situation where a DataSource is loaded statically when a ViewModel is constructed the picker works as expected.

Also we only deploy to iOS, do not know if this issue would occur on other platforms

Any thoughts? Anyone ever see something similar? I am not aware of any other ways to deploy a Xamarin app so don't know what else to try

Thanks
-Joe

Posts

  • GraverobberGraverobber Member ✭✭✭

    Sorry but that makes no sense at all.
    AppCenter doesn't do any changes on your code. It just takes a pre-bundled binary and makes it easier to distribute it to testers.
    The only reason I see here that could cause this is an issue in your deployment chain.
    But for that I would need to know more about your setup.

    For example if you're using a different backend for the AppCenter version because your client should not run on the dev environment, then it might be an issue related to the backend. Did you test with the correct backend?

    If you're deploying to AppCenter by using a continuous integration perhaps it is executing some script in order to configure the app in a certain way (different language, different colors, different urls whatever) which could cause a difference between your local build and the AppCenter one. Did you check all that?

    Perhaps you're distributing a Release build which, for example, uses a different HTTPClient than the Debug build that you run from the IDE which causes issues then.

    When you take the binary from Appcenter and install it manually via iTunes does the problem still persist or is it really only if you install directly via AppCenter?

    In the case that you bundle the binary locally and upload it manually to AppCenter, does the binary run on your device when installing it via iTunes correctly or not? If not, then it is not an issue on AppCenter.

    Those are some ideas I spontaneously got. From my experience, this issue is not to be searched on AppCenter.

  • jhershmanjhershman Member ✭✭

    I know it absolutely makes no sense. I have AppCenter configured to use the most current versions of Xamarin.iOS and XCode which match my machine.

    I use an Ad-Hoc deployment because this is the option that allows us to distribute to the registered iOS device, Debug build is not an option for iOS deployment (at least that is my understanding)

    AppCenter doesn't do any changes on your code. It just takes a pre-bundled binary and makes it easier to distribute it to testers.

    I don't believe this is 100% correct, App Center does do a build in it's hosted environment prior to the deployment. But the issue is consistent across my app anywhere that the Picker Datasource is loaded at Runtime (except if done at ViewModel construction) show the same issue

    When you take the binary from Appcenter and install it manually via iTunes does the problem still persist or is it really only if you install directly via AppCenter?

    In the case that you bundle the binary locally and upload it manually to AppCenter, does the binary run on your device when installing it via iTunes correctly or not? If not, then it is not an issue on AppCenter.

    I have not tried these approaches so will do that and see what happens.

    Thanks

  • jhershmanjhershman Member ✭✭

    So after further review and following advice from @Graverobber I found that changing the configuration setting from Ad-Hoc to Debug the deployed build worked. I have no idea what is done differently based on these configuration settings but that seems to be the fix, and it does still distribute to the assigned devices in the profile

    This works:

  • GraverobberGraverobber Member ✭✭✭

    Hmm difficult to say depending on your configuration a lot of stuff can change, so you would need to compare all the settings for the AdHoc configuration to make sure that there isn't a difference somewhere.

    How is the data source dynamically loaded, via a Webserver?
    I would double check if the same HTTPClient is used. You can find that by right click on your project, Options, iOS Build and there is HttpClient implementation.

    Another field in this option window that made troubles for me in the past is the Linker behavior. Make sure that the value there is the same.

    Check any other config in the iOS build window.

    Check if the same .NET version is used.

    Other than that I have no more ideas right now :D

  • JohnHJohnH GBMember ✭✭✭✭✭

    It sounds like your Ad-Hoc configuration is linking away a dependency. You should be able to test that locally.

Sign In or Register to comment.