Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all 81910 articles
Browse latest View live

Xamarin forms android splash screen appear when navigation.pushasync and navigation.popasync

$
0
0

style.xml

<? xml version="1.0" encoding="utf-8"? >
< resources >
< style name = "MainTheme" parent="MainTheme.Base" >
< /style >
< item name = "windowNoTitle"> true < /item >
< item name="windowActionBar">false< /item>
< item name = "colorPrimary">#2196F3< /item>
< item name="colorPrimaryDark">#1976D2< /item>
< item name = "colorAccent">#FF4081< /item>
< item name="windowActionModeOverlay">true
< item name = "android:datePickerDialogTheme" > @style / AppCompatDialogStyle </ item >
</ style>
< style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog" >
< item name = "colorAccent" >#FF4081< /item>
< /style>
< style name="MyTheme.Splash" parent="Theme.AppCompat.Light.NoActionBar" >
< item name = "android:windowBackground"> @drawable / Splash_background < / item>
</ style>
</ resources>

and

mainActivity class

[Activity(Label = "xxx", Icon = "@mipmap/icon", Theme = "@style/MyTheme.Splash", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, ScreenOrientation = ScreenOrientation.Portrait, WindowSoftInputMode = SoftInput.AdjustResize)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{

    public FirebaseAnalytics firebaseAnalytics;

    protected override void OnCreate(Bundle bundle)
    {
        TabLayoutResource = Resource.Layout.Tabbar;
        ToolbarResource = Resource.Layout.Toolbar;

        base.OnCreate(bundle);
        LoadApplication(new App());
    }

}

help me to resolve the issue


Where are the XAML designer tools?

$
0
0
Years have past ;-) not really but I think this question has been asked many Times' before.

The forms previewer crash all the time. It could be seen more of a compile:designer that breaks as soon as you start adding codebehind stuff.

We need a designer for Xaml not css? I think the web guys gonna stick to other tools anyways
The live previewer very nice idea, same thing doesn't work yet.

I just need BLEND with a Visual state manager. where is the backning from the Microsoft team that dream up stuff like the Blend tools :-)

Entry.Completed Event doesn't fire on Android when pressing the Done button

$
0
0

Hi,

I have attached to the Completed event of an Entry view however when I press the Done button on my Android device the event doesn't fire.

However the event does fire when running the same application on a Windows Phone.

Has anyone else experienced this?

Thanks

Paul Diston

Display Online PDF in Android Webview

$
0
0

Problem Statement:

I am trying to display a hosted PDF from a secure site using https in a WebView using Xamarin.Forms.

What I Have Tried:

I have a custom renderer for the Android WebView control.

If I try using the pdfjs library, I get the following output

enter image description here

Below is my custom renderer:

public class BindableWebviewRenderer : WebViewRenderer
{
    public BindableWebviewRenderer(Context context)
        :base (context)
    {

    }

    protected override void OnElementChanged(ElementChangedEventArgs<WebView> e)
    {
        base.OnElementChanged(e);

        if (e.NewElement != null)
        {
            var customWebView = Element as BindableWebView;
            Control.Settings.AllowUniversalAccessFromFileURLs = true;
            Control.LoadUrl(string.Format("file:///android_asset/pdfjs/web/viewer.html?file={0}", string.Format("file:///android_asset/Content/{0}", WebUtility.UrlEncode(customWebView.URL))));
        }
    }
}

I have also tried using

Control.LoadUrl("https://drive.google.com/viewerng/viewer?embedded=true&url=" + customWebView.URL);

But this just displays an empty page (it is also worth noting that the URL created from this also does not work in a browser).

Questions I Have Already Consulted:

Is Visual="Material" for Android and iOS only?

app crash by editor control : focus search returned a view that wasn't able to take focus!

$
0
0

xamarin forms standard

look like a bug to me and I wonder how to bypass that..

[1]
on some devices the app crash when editor control got focus right after showing the keyboard.
[2]
(on my device) crashes after the clicking the done/next button when on landscape mode.
the error log in bellow.

so for [2] I tried to bypass that by:
having the editor int a frame parent control as so:

                 <Frame x:Name="frameEditor" IsTabStop="True" >
                     <Editor Margin="10"
                        x:Name="txtMemoriam"
                        HorizontalOptions="FillAndExpand"
                        AutoSize="TextChanges"
                        Placeholder="Memoriam"
                        Parent="frameEditor"

                        Completed="TxtMemoriam_Completed"
                        Focused="TxtMemoriam_Focused"

                        ></Editor>
                    </Frame>

so now: on landscape mode the "done" button change to "next" control...
and apparently, its give focus to DatePicker control (open the datepicker)... (it's unexpected Behavior but it prevents it from crashing...)

for the first issue, I have tried to set focus.. but i dont yet know if its working - cause its not crashing on my device (got the report from google play)..

    private void TxtMemoriam_Completed(object sender, EventArgs e)
    {
        //txtMemoriam.Unfocus();
        //frameEditor.Focus();
        Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
        {
            Task.Delay(1).ContinueWith(x => { this.txtMemoriam.Focus(); });
            Task.Delay(10).ContinueWith(x => { this.txtMemoriam.Focus(); });
            Task.Delay(100).ContinueWith(x => { this.txtMemoriam.Focus(); });
            Task.Delay(1000).ContinueWith(x => { this.txtMemoriam.Focus(); });
        });
    }

    private void TxtMemoriam_Focused(object sender, Xamarin.Forms.FocusEventArgs e)
    {
        this.txtMemoriam.Focus();

        Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
        {
            Task.Delay(1).ContinueWith(x => { this.txtMemoriam.Focus(); });           
            Task.Delay(10).ContinueWith(x => { this.txtMemoriam.Focus(); });
            Task.Delay(100).ContinueWith(x => { this.txtMemoriam.Focus(); });
            Task.Delay(1000).ContinueWith(x => { this.txtMemoriam.Focus(); });
        });  
    }

Issue: java.lang.IllegalStateException: focus search returned a view that wasn't able to take focus!

FATAL EXCEPTION: main
Process: com.shaot.nosafot, PID: 14496
java.lang.IllegalStateException: focus search returned a view that wasn't able to take focus!
at android.widget.TextView.onKeyUp(TextView.java:6674)
at android.view.KeyEvent.dispatch(KeyEvent.java:2766)
at android.view.View.dispatchKeyEvent(View.java:9948)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.widget.ScrollView.dispatchKeyEvent(ScrollView.java:391)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:439)
at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1861)
at android.support.v4.view.KeyEventDispatcher.activitySuperDispatchKeyEventPre28(KeyEventDispatcher.java:130)
at android.support.v4.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:87)
at android.support.v4.app.SupportActivity.dispatchKeyEvent(ComponentActivity.java:126)
at android.support.v7.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:535)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at android.support.v7.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:2533)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:353)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4736)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4707)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4244)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4297)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4263)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4390)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4271)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4447)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4244)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4297)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4263)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4271)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4244)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6671)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6645)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6606)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3915)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6524)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)

[Bug?] ListView Separator Style on iOS

$
0
0

I have a simple ListView and I want its separators to span the whole length but the code I found that should enable it doesn't get recognized by IntelliSense and I get an error. The code is the following snippet taken from the Microsoft docs site:

<ContentPage ...
         xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core">
<StackLayout Margin="20">
    <ListView ... ios:ListView.SeparatorStyle="FullWidth">
        ...
    </ListView>
</StackLayout>

Unfortunately though it's not working for me and I get a squiggly line saying that "The attachable property 'SeparatorStyle' was not found in the type 'ListView'. Is there something wrong in my code? It is as follows:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="Eorzea_Gatherer.Pages.NodesPage"
         xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" 
         ios:Page.UseSafeArea="true"
         BackgroundColor="#F4F4F4">
<!--https://xamarinhelp.com/safeareainsets-xamarin-forms-ios/-->
<ListView x:Name="nodesListView"
          HasUnevenRows="True"
          BackgroundColor="#F4F4F4"
          Margin="30, 30, 30, 0">
    <ListView.ItemTemplate>
        <DataTemplate>
            <ViewCell>
                <Grid Padding="0, 5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Image Source="{Binding icon}"
                           HeightRequest="50"
                           WidthRequest="50"
                           Grid.Column="0"/>
                    <StackLayout Grid.Column="1">
                        <Label Text="{Binding item}"
                               TextColor="#171717"
                               FontSize="13"
                               FontFamily="SegoeUI"/>
                        <!--https://forums.xamarin.com/discussion/97996/binding-more-than-one-property-in-listview-->
                        <Label TextColor="#171717"
                               FontSize="12"
                               FontFamily="SegoeUI">
                            <Label.FormattedText>
                                <FormattedString>
                                    <Span Text="{Binding zone}"/>
                                    <Span Text=" - "/>
                                    <Span Text="{Binding slot}"/>
                                </FormattedString>
                            </Label.FormattedText>
                        </Label>
                        <Label TextColor="#171717"
                               FontSize="12"
                               FontFamily="SegoeUI">
                            <Label.FormattedText>
                                <FormattedString>
                                    <Span Text="{Binding time}"/>
                                    <Span Text=" - "/>
                                    <Span Text="00:00 AM"/>
                                </FormattedString>
                            </Label.FormattedText>
                        </Label>
                    </StackLayout>
                </Grid>
            </ViewCell>
        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>

I am running Xamarin UI test on local fine but having trouble running on the Appcenter

$
0
0

I am running the my tests on the local emulator and they are working as expected but when i tried to run the same on the Appcenter, I am getting Object not set to an instance of object error. when i tried to find the actual error i found the app is not even initialising on the device.


Xamarin forms how to remove splash image once loaded

$
0
0

splash screen image appear when navigate one page to another page. i want remove or hide after splash screen loaded.

ERROR ITMS-90022: Missing required icon file

$
0
0

I am getting following error while deploying the app using application loader:


ERROR ITMS-90022: “Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly ‘120x120’ pixels, in .png format for iOS versions >= 10.0.”
ERROR ITMS-90023: “Missing required icon file. The bundle does not contain an app icon for iPad of exactly ‘152x152’ pixels, in .png format for iOS versions >= 10.0.”


Any ideas how to fix this, Here is info.plist file

<key>CFBundleIcons</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
    <key>AppIcon2</key>
    <dict>
        <key>CFBundleIconFiles</key>
        <array>
            <string>icon-60@2x</string>
            <string>icon-76@2x</string> 
        </array>
        <key>UIPrerenderedIcon</key>
        <false/>
    </dict>
</dict>
</dict>

Set ToolbarItem.Icon

$
0
0

Hi,
how can I set the ToolbarItem.Icon property (in xaml) from the viewmodel that reads a resource embedded in a pcl?
Thanks in advance.

MVVM not work properly

$
0
0

I have a XAML form linked to an MVVM with the binding. At the first call the form is rarely populated, from the second onwards, it works sporadically. No errors are ever generated.
This is the code:

public class IspezioneFile
        {
            public string NomeFile { get; set; } = string.Empty;
            public int NumeroIspezioni { get; set; } = 0;
            public int NumeroAnomalie { get; set; } = 0;
            public int NumeroFoto { get; set; } = 0;
            public bool ErrorFile { get; set; } = false;
            public bool CanDelete { get; set; } = false;

            ICommand UploadCloud;
            public ICommand UploadCloudCommand =>
                    UploadCloud ??
                    (UploadCloud = new Command(async () => await ExecuteUploadCloudCommand()));

            private async Task ExecuteUploadCloudCommand()
            {
                Application.Current?.MainPage?.DisplayAlert("Upload", "zzz", "Ok", "no");
            }
        }

        public class IspezioneFileRoot
        {
            public List<IspezioneFile> Items { get; set; }

        }
        public class IspezioneFilesVM : BaseViewModel
        {
            IspezioneFileRoot listFilesIsp;
            public IspezioneFileRoot ListFilesIsp
            {
                get { return listFilesIsp; }
                set { listFilesIsp = value; OnPropertyChanged(); }
            }

            ICommand getFiles;
            public ICommand GetFilesCommand =>
                    getFiles ??
                    (getFiles = new Command(async () => await ExecuteGetFilesCommand()));

            private async Task ExecuteGetFilesCommand()
            {
                if (IsBusy)
                    return;

                IsBusy = true;
                try
                {
                    VariabiliGlobali VarGlobal = VariabiliGlobali.Instance();

                    //var list = System.IO.Directory.GetFiles(VarGlobal.pathDocuments, "*.json");
                    //if (list.Length > 0)
                    //{
                    //    for (int i = 0; i < list.Length; i++)
                    //    {
                    //        System.IO.File.Delete(list[i]);
                    //    }
                    //}

                    PCLStorage.IFolder folder = await PCLStorage.FileSystem.Current.GetFolderFromPathAsync(VarGlobal.pathDocuments);
                    var ListFiles = await folder.GetFilesAsync();//istruzione per trovare tutti i dati
                    ListFilesIsp = new BmsClassi.IspezioneFileRoot();
                    ListFilesIsp.Items=new  List<BmsClassi.IspezioneFile>();

                    foreach (var item in ListFiles)
                    {
                        BmsClassi.IspezioneFile InfoFile = new BmsClassi.IspezioneFile();

                        await ExecuteGetFilesTask(InfoFile, item, folder);
                        if (VarGlobal.TipoUser=="Amministratore") { InfoFile.CanDelete = true; };
                        ListFilesIsp.Items.Add(InfoFile);
                    }
                }
                catch (Exception ex)
                {
                    //Temp = "Unable to get Weather";
                    System.Diagnostics.Debug.WriteLine(ex.Message);
                    IsBusy = false;
                }
                finally
                {
                    IsBusy = false;
                }
            }

            private async Task<BmsClassi.IspezioneFile> ExecuteGetFilesTask(BmsClassi.IspezioneFile InfoFile, PCLStorage.IFile file, PCLStorage.IFolder folder)
            {
                var jsonWork = await UtilsPCLstorage.ReadAllTextAsync(file.Name, folder);
                InfoFile.NomeFile = file.Name;
                try
                {
                    List<BmsClassi.BmsIspezioni> tempListIsp = JsonConvert.DeserializeObject<List<BmsClassi.BmsIspezioni>>(jsonWork);
                    InfoFile.NumeroIspezioni = tempListIsp.Count();
                    if (InfoFile.NumeroIspezioni > 0)
                    {
                        InfoFile.NumeroAnomalie = (from p in tempListIsp select p.AnomalieRilevateVM.AnomalieItemsList.Count).Sum();//http://www.csharp-examples.net/linq-sum/
                        InfoFile.NumeroFoto = (from p in tempListIsp select p.SegnalazioneVM.ListPhoto.Count).Sum();
                    }
                }
                catch (Exception ex)
                {
                    InfoFile.ErrorFile = true;
                }

                return InfoFile;
            }
        }

<ContentPage.Content>
        <StackLayout>
            <Grid BackgroundColor="LightGray" Padding="5">
                <Grid.RowDefinitions>
                    <RowDefinition Height="60"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.26*"/>
                    <ColumnDefinition Width="0.18*"/>
                    <ColumnDefinition Width="0.18*"/>
                    <ColumnDefinition Width="0.18*"/>
                    <ColumnDefinition Width="0.10*"/>
                    <ColumnDefinition Width="0.10*"/>
                </Grid.ColumnDefinitions>
                <Label Grid.Column="0" Text="Nome File" Style="{StaticResource LabelHeader}" HorizontalOptions="Start" />
                <Label Grid.Column="1" Text="N° Ispezioni" Style="{StaticResource LabelHeader}" TextColor="Red"/>
                <Label Grid.Column="2" Text="N° Anomalie" Style="{StaticResource LabelHeader}" TextColor="Blue"/>
                <Label Grid.Column="3" Text="N° Foto" Style="{StaticResource LabelHeader}" TextColor="Black"/>
            </Grid>
            <ListView ItemsSource="{Binding ListFilesIsp.Items}"
              HasUnevenRows="True"
              CachingStrategy="RecycleElement"
              IsPullToRefreshEnabled="True"
              RefreshCommand="{Binding GetFilesCommand}"
              IsRefreshing="{Binding IsBusy, Mode=OneWay}"
              RowHeight="75"
              x:Name="ListViewJsonFiles">
                <ListView.SeparatorColor>
                    <OnPlatform x:TypeArguments="Color" iOS="Transparent"/>
                </ListView.SeparatorColor>
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <Grid Padding="5">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="0.26*"/>
                                    <ColumnDefinition Width="0.18*"/>
                                    <ColumnDefinition Width="0.18*"/>
                                    <ColumnDefinition Width="0.18*"/>
                                    <ColumnDefinition Width="0.10*"/>
                                    <ColumnDefinition Width="0.10*"/>
                                </Grid.ColumnDefinitions>
                                <Label Grid.Column="0" Text="{Binding NomeFile}" Style="{StaticResource LabelHeader}" FontSize="15" HorizontalOptions="Start" />
                                <Label Grid.Column="1" Grid.ColumnSpan="3" Text="Errore lettura file" IsVisible="{Binding ErrorFile}" Style="{StaticResource LabelContatore}"/>
                                <Label Grid.Column="1" Text="{Binding NumeroIspezioni}" Style="{StaticResource LabelContatore}" TextColor="Red"/>
                                <Label Grid.Column="2" Text="{Binding NumeroAnomalie}" Style="{StaticResource LabelContatore}" TextColor="Blue"/>
                                <Label Grid.Column="3" Text="{Binding NumeroFoto}" Style="{StaticResource LabelContatore}" TextColor="Black"/>
                                <Image Grid.Column="4" Source="UploadToCloud.png" >
                                    <Image.GestureRecognizers>
                                        <TapGestureRecognizer Command="{Binding UploadCloudCommand}" NumberOfTapsRequired="2"/>
                                    </Image.GestureRecognizers>
                                </Image>
                                <Image Grid.Column="5" Source="trash.png" IsVisible="{Binding CanDelete}"/>
                            </Grid>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </StackLayout>
    </ContentPage.Content>

public DataForm ()
        {
            InitializeComponent ();

            this.BindingContext = IspFilesVM;

            IspFilesVM.GetFilesCommand.Execute(null);

        }

What's the problem?!?

XamlStyles FontSize Not working

$
0
0

I'm trying to implement XamlStyles in my app, but the FontSize doesn't work. TextColor, Font, HorizontalTextAlignment, Margin all seem to be working, but i'm not sure what's going on with FontSize..

any ideas how to resolve this please?

In my Page:

<Label Text ="Edit Profile" Style="{StaticResource HeaderStyle}" />

In App.Xaml:

       <Style x:Key="HeaderStyle" TargetType="Label">

            <Setter Property="TextColor"    Value = "Red"/>
            <Setter Property="Font"         Value = "Hind-Bold"/>
            <Setter Property="HorizontalTextAlignment"    Value = "Center"/>
            <Setter Property="Margin"    Value = "0,60,0,0"/>

            <Setter Property="FontSize" Value="30"/>

        </Style>

Application Loader: ERROR ITMS-90171

$
0
0

I am trying to upload the .ipa file using Application Loader. The .ipa built using VS.net Xamarin. While deploying the .ipa file using Application Loader I am getting following error:

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'StreamLine.iOS.app/libMicrosoft.CSharp.dll.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure.",

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'StreamLine.iOS.app/libOpenTK-1.0.dll.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure.",

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'StreamLine.iOS.app/libSystem.Numerics.dll.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure.",

Any ideas how to fix this? I have removed the bin and obj folder from the forms and ios project, also clean the project and rebuild it multiple times, but still having the same issues.

how to use multicolored icons on tabbedPage

$
0
0

Hi all,
I just want to add an multicolored icon on my tabbedPage but my tabbedPage display the icon with one color
thanks for ur help


How to Call TabPage Class with the FormsAppCompatActivity

$
0
0

My Code Like This.

public class OtpReceive : FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
NavigationPage nav = new NavigationPage(new MainPage() { Title = "First Page" });
}
}

Toolbar Icon Hover Color

$
0
0

Trying to figure out if at all possible to set what is effectively a hover color for toolbar icons.

I have toolbar icons with dark background and white icons, and hovered selections turnout dim and don't stand out as they should. Obviously more important for a mouse input than touch as in the UWP case, but also ideal if the same can be easily set for Android (if cross-platform option doesn't exist), say in styles.xml (which I am getting to know some of the settings in there, such as Toolbar height setting, etc).

  • Can you set the toolbar icons hover color across all platforms, and if so how?
  • Is there an equivalent Android setting in styles.xml?

Package Xam.Plugin.Connectivity 3.2.0 is not compatible with netstandard2.0

$
0
0

I am trying to install Xam.Plugin.Connectivity in my Xamarin. Forms project which is targeting .NetStandard 2.0 Standard. But I am getting following error:

Error NU1202 Package Xam.Plugin.Connectivity 3.2.0 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Xam.Plugin.Connectivity 3.2.0 does not support any target frameworks.

My Forms version is : 3.4.01008975

The weird thing is it was working fine until my Computer got rested (Without deleting any data except uninstalling recently installed applications) yesterday due to some issue. After that when I try to open my project I got so many errors related to different stuffs. But it was working fine before Reset.

Exif data from photo

$
0
0

I'm looking for a way to extract the Exif data (specifically, gps coordinates where photo was taken, when available) from images on the phone, both iOS and Android.

XLabs Media Picker doesn't provide this information, and neither does the Xamarin Media Picker plug-in. None of the meta data for an image is set with either of these solutions. Has anybody implemented a way to get this information from an image on the phone?

How to save the metadata of the image taken and saved (using jamesmontemagno/MediaPlugin)?

$
0
0

This is how I take the picture.

             Location location = new Location();
                    location.Latitude = 52.0271723411551;
                    location.Longitude = 0.764563267810425;

                photoFile = await CrossMedia.Current.TakePhotoAsync(new StoreCameraMediaOptions
                {

                    SaveToAlbum = true,
                    Location = location,
                    Directory = "Komunalac",
                    Name = "photoKomunalac.jpg",
                    SaveMetaData = true,
                });


                var picInfo = ExifLib.ExifReader.ReadJpeg(photoFile.GetStream());

                imageSource = ImageSource.FromStream(() =>
                {
                    return photoFile.GetStream();
                });

And the picInfo does indeed hold the metadata with GPS location.

But then when I want to get the picture back from album using :

 photoPicked = await CrossMedia.Current.PickPhotoAsync(new PickMediaOptions
                {
                    PhotoSize = PhotoSize.Medium,
                    SaveMetaData = true
                });

                picInfo = null;


                if (photoPicked != null)
                {

                    picInfo = ExifReader.ReadJpeg(photoPicked.GetStream());

                    imageSource = ImageSource.FromStream(() =>
                      {
                          return photoPicked.GetStream();
                      });
                }

picInfo here doesn't contain the GPS metadata. Anyone knows what went wrong or a different way to save the image with metadata to the android/ios?

Viewing all 81910 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>