'Why am I getting this error/warning whenever I try to use MediaPicker.PickPhotoAsync?

Whenever I use the following code in order to select a photo from my Library using my iOS simulator I get an error/warning. The image is then selected and shown on my View, but the source is not actually put inside the list

     var result = await MediaPicker.PickPhotoAsync(new MediaPickerOptions
        {
            Title = "Please pick a photo"
        });
        var stream = await result.OpenReadAsync();

        Profile.ImageSources.Insert(NumberOfImages-1, ImageSource.FromStream(() => stream));
                    
        Profile.ImageSources = Profile.ImageSources;
        Console.WriteLine("Number of Image: " + NumberOfImages);
                

[unspecified] container_system_group_path_for_identifier: error = ((container_error_t)98) NOT_CODESIGNED [MC] Error getting system group container for systemgroup.com.apple.configurationprofiles: 98 [MC] Failed to get profile system group container path. Overriding with expected path: /Users/user/Library/Developer/CoreSimulator/Devices/5C228DCC-D446-423B-BE53-EFE37BDE02A6/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles objc[6750]: Class _PathPoint is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x121945650) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x16724d690). One of the two will be used. Which one is undefined. objc[6750]: Class _PointQueue is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x121945628) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x16724d6b8). One of the two will be used. Which one is undefined.

any idea?



Solution 1:[1]

  1. Make Profile.ImageSources as ObservableCollection type ,it will notify the change dynamically when items get added .

  2. Try to use Add instead of Insert method .

    Profile.ImageSources.Add(ImageSource.FromStream(() => stream));
    

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ColeX - MSFT