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

application terminates when ios is opened

$
0
0

My application runs on the emulator, on the mobile it opens and ends. Apple rejected it and gave me this error. You know what it is?

{"app_name":"meuappApp.IOS","timestamp":"2018-03-11 04:39:25.79 -0700","app_version":"1.0","slice_uuid":"edfcbb95-3b54-3d9f-9ad4-5cb6462aa990","adam_id":0,"build_version":"1.7","bundleID":"com.meuappapp.meuapp","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 11.2.5 (15D60)","incident_id":"3CD2E372-8BAC-4E7A-A03C-7D5E8B6768D2","name":"meuappApp.IOS"}

Incident Identifier: 3CD2E372-8BAC-4E7A-A03C-7D5E8B6768D2
CrashReporter Key: d1e255b6bbba63239d1ebcb358f272a4ff92d897
Hardware Model: iPad5,1
Device Model: J96AP
Process: meuappApp.IOS [337]
Path: /private/var/containers/Bundle/Application/5D8FA83E-3A75-4C62-B1AF-B0344CF22C33/meuappApp.IOS.app/meuappApp.IOS
Identifier: com.meuappapp.meuapp
Version: 1.7 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd.development [1]
Coalition: com.meuappapp.meuapp [414]

Date/Time: 2018-03-11 04:39:25.6692 -0700
Launch Time: 2018-03-11 04:39:23.0013 -0700
OS Version: iPhone OS 11.2.5 (15D60)
Baseband Version: n/a
UDID: 19d5688bcf385b1407699196b9432bed7c64d9a9
Report Version: 104

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0

Application Specific Information:
abort() called

Filtered syslog:

Timestamp Thread Type Activity PID
2018-03-11 04:24:33.0712 -0700
0x46b 1024 0x0 100 hangtracerd: XPC: Client started new connection: pid 68
2018-03-11 04:24:33.0715 -0700
0x46b 1024 0x0 100 hangtracerd: New proc: /usr/libexec/backboardd(68)
2018-03-11 04:24:33.0716 -0700
0x46b 1024 0x0 100 hangtracerd: Initialization complete now watching hangs for backboardd(68) | com.apple.coreanimation.display.primary.hangEvent
2018-03-11 04:24:33.0748 -0700
0x400 1024 0x0 100 hangtracerd: refreshPreferences: Memory Logging Enabled
2018-03-11 04:24:33.0749 -0700
0x400 1024 0x0 100 hangtracerd: refreshPreferences: Hang Tracing Enabled
2018-03-11 04:24:33.0749 -0700
0x400 1024 0x0 100 hangtracerd: refreshPreferences: HangTracerEnableTailspin = 1
2018-03-11 04:24:33.0749 -0700
0x400 1024 0x0 100 hangtracerd: refreshPreferences: App Activation Logging Disabled
2018-03-11 04:24:45.6118 -0700
0x687 1024 0x0 100 hangtracerd: XPC: Client started new connection: pid 62
2018-03-11 04:24:45.6121 -0700
0x687 1024 0x0 100 hangtracerd: New proc: /System/Library/CoreServices/SpringBoard.app/SpringBoard(62)
2018-03-11 04:24:45.6122 -0700
0x687 1024 0x0 100 hangtracerd: Initialization complete now watching hangs for SpringBoard(62) | UIKit-runloop
2018-03-11 04:24:47.5319 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Hang detected 1.95s (UIKit-runloop)
2018-03-11 04:24:47.5468 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Attempting to save tailspin at /var/root/Library/Caches/hangtracerd/tmp/UIKit-runloop-SpringBoard-2018-03-11-042447.tailspin
2018-03-11 04:24:48.9447 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Moving tailspin to spool: /var/root/Library/Caches/hangtracerd/spool/UIKit-runloop-SpringBoard-2018-03-11-042447.tailspin
2018-03-11 04:24:48.9457 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard Log credits: 4 -> 3
2018-03-11 04:24:48.9457 -0700
0x687 1024 0x0 100 hangtracerd: Daily Log credits: 25 -> 24
2018-03-11 04:24:53.9378 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Hang detected 6.41s (UIKit-runloop)
2018-03-11 04:24:53.9381 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Attempting to save tailspin at /var/root/Library/Caches/hangtracerd/tmp/UIKit-runloop-SpringBoard-2018-03-11-042453.tailspin
2018-03-11 04:24:56.6531 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Moving tailspin to spool: /var/root/Library/Caches/hangtracerd/spool/UIKit-runloop-SpringBoard-2018-03-11-042453.tailspin
2018-03-11 04:24:56.6535 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard Log credits: 3 -> 2
2018-03-11 04:24:56.6535 -0700
0x687 1024 0x0 100 hangtracerd: Daily Log credits: 24 -> 23
2018-03-11 04:25:10.5716 -0700
0x935 1024 0x0 100 hangtracerd: refreshPreferences: Memory Logging Enabled
2018-03-11 04:25:10.5716 -0700
0x935 1024 0x0 100 hangtracerd: refreshPreferences: Hang Tracing Enabled
2018-03-11 04:25:10.5716 -0700
0x935 1024 0x0 100 hangtracerd: refreshPreferences: HangTracerEnableTailspin = 1
2018-03-11 04:25:10.5716 -0700
0x935 1024 0x0 100 hangtracerd: refreshPreferences: App Activation Logging Disabled
2018-03-11 04:36:33.0380 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Hang detected 1.25s (UIKit-runloop)
2018-03-11 04:36:33.0386 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Attempting to save tailspin at /var/root/Library/Caches/hangtracerd/tmp/UIKit-runloop-SpringBoard-2018-03-11-043633.tailspin


Tools for testing Xamarin UI on many Devices

$
0
0

Hello Everyone!
I need to testing one xamarin application UI on various Devices (Android and IOS ). But I don't want to create thousands virtual Devices in Visual Studio and then testing UI on each of them. I heard, that Xamarin Test Cloud can help with it, but Im absolutely do not know how to start? Have any one some manual or simple Example ?
Thanks!

Path to file located as embedded resource in a directory in a NetStandard class library ?

$
0
0

What is the file path of an embedded resource located in a directory inside a referenced NetStandard 2.0 class library ?
The UWP, Android, IoS applications have a reference to this common NetStandard class library and need to access such a file from it.

iOS. Archive for Publishing fails

$
0
0

Hello!
I need your help, friends.
After upgrading Visual Studio for Mac to version 7.4 (build 1033), I had problems with the "Archive for Publishing" command for the iOS project.

As usual, I select the Release configuration and execute the "Archive for Publishing" command. The operation fails. In the text of the error, I see the following:

Metadata file '/Users/admin/projects/solution/project/pcl/bin/Debug/netstandard2.0/project.dll' could not be found

The archive refers to Debug project.dll!

In this case, the assembly in the release is completed successfully (the designated file is also missing physically).

What's happening?

Push Notification for UWP using Amazon SNS.

$
0
0

We are developing a Xamarin UWP app that is supposed to receive Push Notifications using WNS. We are using Amazon SNS to send notifications. We made sure that the app is registering itself with proper channel uri to our backend, package name of the app is same as in the store and using cognito credential put device token entry in Amazon application arn. I have sent raw message to device endpoint and message recieved in device properly. We couldn't send as Json format and tried as mentioned in below link. But didn't know where to receive notification from application.

For example, ReceivedRemoteNotification as override method present in iOS and it will help process the notification. In my process sent argument then based an argument, we can navigate to different page. How can we do this in UWP using JSON format.

Please help me on this.

Reagrds,
Cheran

Odd error with xamarin forms "Wrong state class, expecting View State but received class ..."

$
0
0

The full error is:
Wrong state class, expecting View State but received class android.widget.ProgressBar$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/0x9. Make sure other views do not use the same id.

I'm seeing this error popping up a few times in Mobile Center (It's occurring on Android 5.1.1) - I don't suppose anyone has had luck tracking this down have they? The full stack trace is:

1
android.view.View.onRestoreInstanceState View.java:15063
2
android.widget.TextView.onRestoreInstanceState TextView.java:4574
3
android.view.View.dispatchRestoreInstanceState View.java:15039
4
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
5
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
6
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
7
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
8
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
9
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
10
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
11
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
12
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
13
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
14
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
15
android.view.ViewGroup.dispatchRestoreInstanceState ViewGroup.java:3198
16
android.view.View.restoreHierarchyState View.java:15017
17
com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState PhoneWindow.java:2297
18
android.app.Activity.onRestoreInstanceState Activity.java:1203
19
android.app.Activity.performRestoreInstanceState Activity.java:1148
20
android.app.Instrumentation.callActivityOnRestoreInstanceState Instrumentation.java:1190
21
android.app.ActivityThread.performLaunchActivity ActivityThread.java:3106
22
android.app.ActivityThread.handleLaunchActivity ActivityThread.java:3243
23
android.app.ActivityThread.access$1000 ActivityThread.java:218
24
android.app.ActivityThread$H.handleMessage ActivityThread.java:1718
25
android.os.Handler.dispatchMessage Handler.java:102
26
android.os.Looper.loop Looper.java:145
27
android.app.ActivityThread.main ActivityThread.java:6914
28
java.lang.reflect.Method.invoke Method.java
29
java.lang.reflect.Method.invoke Method.java:372
30
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run ZygoteInit.java:1404
31
com.android.internal.os.ZygoteInit.main ZygoteInit.java:1199

Xamarin Forms Trust Manager implementation

$
0
0

Hello ,
I am using https url and give an error (Trust Failure ) In HttpClient on Android.
I want to customize TrustManager for SSL. But i don't know how to implement TrustManager.

Any Advice Plz.
Thank You.

View that updates when items are added to a collection

$
0
0

I would like to implement an interface that similar to list view adds or removes items as they are added to an underlying collection. The big picture is I will extend stack layout and then for each item in the Binding Context I want to add a new label to the stack layout. To do this I believe I can override OnBindingContextChanged so when the binding context is set I can initially add child items. And I think from there I can hook into the INotifyPropertyChanged event handler to get notified anytime a new item gets added to the collection. But overall this seems like it is a path that has many pitfalls so I was looking for a code sample of this but could not find one. Can anyone point me in the correct direction?


Using Twilio's curl with HttpClient

$
0
0

Hi,

I have below API from Twilio and I want to know how can utilize this curl using HttpClient so that I can use it in my app?

I need to pass parameters too, e.g. Body, From, To, etc..

curl 'https://api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxxxxxxx529d6d/Messages.json' -X POST \
-u ACxxxxxxxxxxxxxxxxx529d6d:[AuthToken]

I tried below code but getting:

/Users/jassim/Projects/TwilioTest/TwilioTest/TwilioTestPage.xaml.cs(62,62): Error CS1729: 'AuthenticationHeaderValue' does not contain a constructor that takes 3 arguments (CS1729) (TwilioTest)

public async Task<HttpResponseMessage> SendReq()
{
    var accountSid = "zzzzzzzzzzz";
    var authToken = "xxxxxxxxxxx";
    var targeturi = "https://api.twilio.com/2010-04-01/Accounts/{0}/SMS/Messages";
    string from = "+0000000000";
    string to = "WoWSender";
    string message = "Test Message";

    var client = new System.Net.Http.HttpClient();
    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", accountSid, authToken);
    // client.DefaultRequestHeaders.Authorization = CreateAuthenticationHeader("Basic", accountSid, authToken);

    var content = new StringContent(string.Format("From={0}&amp;To={1}&amp;Body={2}", from, to, message));
    content.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");

    var response = await client.PostAsync(string.Format(targeturi, accountSid), content);
    if (response.IsSuccessStatusCode)
    {
        //the POST succeeded, so update the UI accordingly
    }
    else
    {
        //the POST failed, so update the UI accordingly
    }
    return response;
}

Thanks,

Jassim

Label Text , A word clickable

$
0
0

Hello, I have a text and I want to make a word clickable in given text. How can I do it by using gesture recognizers?

Android: How do I keep my Editor from scrolling below keyboard when moving the cursor?

$
0
0

I've got an Editor which is tall enough to accommodate multiple lines of input. The editor is at the bottom of the screen. Once multiple lines are entered, if you move the cursor up a line, the entire view shifts downward, so the line you just left is now obscured by the keyboard. I'd like it to not do this unless the line the cursor is on is either off screen or close to being off screen. Sort of like how the built in Android message app works. Here's what I mean in pictures.


Default state, everything looks good. We have 3 lines of input


I move the cursor up one line (either with keyboard arrow keys or just by dragging that purplish teardrop shaped handle upward): notice that the entire view has shifted down one line and so "line 3" is now obscured. I don't want this behavior (it among other things hides some UI elements).

This is the Android messaging app. This is the behavior I want: when you move the cursor to that next line, the view doesn't just shift downward. If you have enough lines to scroll past the visible area, Android just shifts the text and not the entire view to accommodate it.

What I noticed is that if I move my control up to like the middle of the screen instead of being at the bottom, then this behavior doesn't happen: moving the cursor upward doesn't scroll my editor until it's appropriate, like I want to. So why is it that because my editor is at the bottom of the screen, this behavior doesn't happen? The keyboard pans the entire screen upward.

Native Forms on Android

$
0
0

I am trying to experiment with Native Forms in XF. I have this in iOS working right. That is fine.

In Android, I am getting the following error:

'MainPage' does not contain a definition for 'CreateSupportFragment' and the best extension method overload 'PageExtensions.CreateSupportFragment(ContentPage, Context)' requires a receiver of type 'ContentPage'

The code is erroring in the following code:
var _cp = new MainPage(); // my page from XF.
_list = _cp.CreateSupportFragment(this);

I have made sure that my nuget packages are up to date. I have cleaned and compiled. I've done a bunch of things, but alas, no love. Any ideas on this?

TIA

Why xamarin map custom pin move?

$
0
0

i made custom pin in xamarin map.

and make 20 custom pins.

but pins are move somtimes and disappear and appear.

Why custom pin move and disappear?

please help me...

A little question about bar background color

$
0
0

already set the navigation bar background color to Cyan, when i run it to emulator it is showing correctly but after creating apk file and install it to my android phone then navigation bar background color is showing white.so what is wrong with this? how is it possible?and how to solve this?

I am using visual studio 2015 14.0 and xamarin version is 4.7.10

why xamarin map marker is disappear and appear for few seconds?

$
0
0

I made 20 marker in xamarin map. but in the map there are showen less than 20 marker maybe 8~10 marker only showed in map.

showing the map, disappeared marker show few seconds and disappear again.

i don't know why this situation occur.

down link is i captured video.

image

please help me


ListView.ScrollTo not working in UWP

$
0
0

I'm trying to scroll down to the last item of a ListView by calling a System.Action "refreshScrollDown()" in my ViewModel, which then gets handled in the code-behind of my xaml:

ViewModel:
refreshScrollDown ();

xaml.cs:

ViewModel.refreshScrollDown = () => {
    if (ViewModel.Messages.Count > 0) {
        Device.BeginInvokeOnMainThread (() => {

            ListViewMessages.ScrollTo (ViewModel.Messages [ViewModel.Messages.Count - 1], ScrollToPosition.End, true);
        }); 
    }
};

This works on iOS and Android, but not on UWP. Rarely it will scroll to the bottom, but most of the times it won't. There is no exception.

Does anyone have an idea how I could work on it? Suggestions are appreciated. Thank you!

EDIT: If I use ScrollTo just at the point where I added an item to the ListView, it will scroll. What's not working is uploading the message to the server, then refreshing my ListView and THEN trying to scroll in UWP.

using.NETFramwork, Version=v4.6.1' instead of the project target framwork' .NETStandard,Version=v2.0

$
0
0

i have a old project which is develop in 2017 and it work fine in 2017 on other pc , but when it move another pc which have also vs 2017 it give me errpor in some package i dont understand why it come and how to solve it ? the error is mention blow.

Package was restored using.NETFramwork, Version=v4.6.1' instead of the project target framwork' .NETStandard,Version=v2.0'. THis package may not be fully compatible with your project.

Can't authorize to Web api access token

$
0
0

Hello,
I have this code

 using (var client = new HttpClient())
        {              
            try
            {
                AuthenticationResult ar = await App.PCA.AcquireTokenSilentAsync(App.Scopes, GetUserByPolicy(App.PCA.Users, App.PolicySignUpSignIn), 
            App.Authority, false);
                string token = ar.AccessToken;
                HttpRequestMessage req = new HttpRequestMessage
                {
                    Content = new StringContent(request, Encoding.UTF8, "application/json"),
                    Method = HttpMethod.Delete,
                    RequestUri = uri
                };
                client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);
                var response  = await client.SendAsync(req);

                if (response.IsSuccessStatusCode)
                {                       
                    return;
                }

            }
            catch (Exception ex)
            {
                Debug.WriteLine($"{ex.StackTrace}{Environment.NewLine}{ex.Message}");
                throw ex;
            }
        }

And as I call to my API the call is returned saying error : "not authorized". How is this possible as I have sent my access token with the headers. Tried to set the headers in client and in httprequestmessage both with no success.
Any ideas or solutions?

CFBundleLocalizations in App Language

$
0
0

Hi fellas,

As you know on iOS platform. There is a couple of this to locatization like "Use Photo" or "Retake" if you add following kind of line in your info.plist these text comes from your phone language. After the adding these lines locatization basicly depends of your phone language. Do you know any solutions for this localization depands of your current app language ?

<key>CFBundleLocalizations</key> <array> <string>en</string> <string>nl</string> </array> <key>CFBundleDevelopmentRegion</key> <string>Dutch</string>

Store a push notification

$
0
0

Hello Xamarin forums am working with xamarin forms for the past four months and now am working with push notification, is there any method that can i store the notifications that i received from GCM to store in local machine using sqlite for future use. Am looking for your suggestions.

Viewing all 58056 articles
Browse latest View live


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