Forum Xamarin.iOS

Xamarin forms - iOS: Images not visible on real device but visible on emulator

BeranekCZBeranekCZ Member ✭✭
edited October 2020 in Xamarin.iOS

I made app from Visual studio Xamarin.Forms Shell template. I added local images to android(drawable folders) and iOS project (assets catalog). In Android is everything OK. But in iOS project is image visible only in iPhone simulator. Image does not show on real device (iPhone). And I don´t know where is problem. I am using Xamarin.Form 4.8

Images in assets catalog

ItemDetailPage with included image.
<StackLayout Spacing="20" Padding="15"> <Image Source="baseline_home_black_48.png" HeightRequest="100" WidthRequest="100"></Image> <Image Source="baseline_home_black_48" HeightRequest="100" WidthRequest="100"></Image> ... </StackLayout>

I attached project.

EDIT: I have some information from another web, that project is working on another device. So maybe there is problem with iPhone or Visual studio deploy settings. Is it possible?

Answers

  • YelinzhYelinzh Member, Xamarin Team Xamurai
    edited October 2020

    Images not visible on real device but visible on emulator

    Hi, I tested your sample on a real device, the images are shown properly. Try testing the project on another iphone to check the issue.

    And you could download the official sample to test the 'local image' part on your device to check if the issue is caused by the device.
    https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/workingwithimages/

  • BeranekCZBeranekCZ Member ✭✭

    I tried pack app to ipa package and distribute it via MS App center. And images are OK. So there is maybe problem with deploy setting in visual studio. But now...I cant see iPhone in visual studio :(

  • BeranekCZBeranekCZ Member ✭✭
    edited October 2020

    EDIT: post deleted

  • YelinzhYelinzh Member, Xamarin Team Xamurai
    edited October 2020

    But now...I cant see iPhone in visual studio

    1.Try to empty the bin and obj folder of both the shared project and the platform project. Then open the project and test again.

    2.What the version of the VS? Try to update the VS to lastest statable version and test the project.

  • BeranekCZBeranekCZ Member ✭✭

    I have last version of Visual studio and I tried clear bin and obj folders. Nothing new :(

  • YelinzhYelinzh Member, Xamarin Team Xamurai

    Did you test the official sample about local images? Will the sample work on your side?

  • FullEnglishFullEnglish GBMember ✭✭

    We are experiencing the same issue.

    When running our app on real iOS devices (in debug) the images do not show. Images show OK when using an iOS simulators or Android. This has been tested with both local and remote hosted images and neither work on a real iOS device.

    We've been developing this app for over 4yrs so it's not something we've missed. It's just stopped working. The versions of iOS, Xcode and VS do not make a difference so it's pretty strange.

    We also use ffimageloader and see the same issue with and without cached images.

  • BenoitPaquinBenoitPaquin CAUniversity ✭✭

    I have the same problem with the sample (.../xamarin-forms-samples/workingwithimages/) .

    The Xaml image is visible in the simulator but not on the device.

  • BenoitPaquinBenoitPaquin CAUniversity ✭✭

    @BenoitPaquin said:
    I have the same problem with the sample (.../xamarin-forms-samples/workingwithimages/) .

    The Xaml image is visible in the simulator but not on the device.

    This is when the iphone is plugged into the windows machine, if it is connected in the mac the images are visible.

Sign In or Register to comment.