Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all 204402 articles
Browse latest View live

ApkFile or InstalledApp has not been configured

$
0
0

I just moved to a new computer and ran into this error when trying to run a test.
SetUp : System.Exception : ApkFile or InstalledApp has not been configured.

Looking further into the log, it seems to be hung up at this line:

09-10-2017 12:29:41.004 -07:00 - 45 - No named pipe value found in environment variable XTC_IDE.
09-10-2017 12:29:41.004 -07:00 - 46 - Skipped IDE integration, connection failed.

where as my previous PC would run the test with no issue with the following line in the log:

09-10-2017 12:23:16.045 -07:00 - 880 - Attempting IDE connection through pipe d1c8528c29c54462a9371f3ad9678d8e.
09-10-2017 12:23:16.197 -07:00 - 1031 - Deploying app through IDE.

I have read some solutions related to this involved specifying an apk path in the following line:

ConfigureApp.Android.ApkFile ("../path/to/apk")

But I did not have to do that on my previous PC, so I would like to try to figure out what is different (both are using Visual Studio 2015).


An error occurred after installing Xamarin.Auth

$
0
0

If introduce "Xamarin.Auth" from Nuget,
"ApplicationName, Hello, library_name" of Resource.Designer.cs disappears and an error is output. What is the solution to this?

UITest Projects: Outdated documentation and templates?

$
0
0

I'm just looking to build some UITest projects to cover the apps I'm building. I started following the official quickstarts but it fails at the first step. StartApp() fails with the following error:

Xamarin UITest Exception ApkFile or InstalledApp not configured

I can see from this post that I can work around this by hard-coding a path to the APK, switching to release mode, saying twelve hail-mary's etc. etc. but shouldn't this be reflected in the documentation?

Also, if I switch to release mode, it doesn't seem to produce an APK file?

Also, if I follow the above steps and hard code a path to the APK, what happens when I want to run the tests in the test cloud? Wont the paths be different?

Are there any plans to bring the documentation up to date and provide a working, end-to-end guide on getting a UI test project up and running?

PresentViewController Adding Threads until App Crash

$
0
0

When using:

which is in a UItabbarcontroller class, ViewControllerSelected function switch statement. The app adds threads every time this tab is selected and this code runs.

When clicked, but not every time, a new thread is started. When there are about 12 -14 threads my app crashes:

I'm very new to xamarin iOS development. How do I either, reduce the amount of threads being used so they do not stack up like this or avoid this multiple thread creation all together?

I've been looking around for a week now and cannot find any solutions to this problem, due to a specific functionality needed that cannot be done in the storyboard. All other storyboard tab bar items linked to uiviewcontrollers in the main.storyboard do not create threads and cause this problem.

Thanks in advanced.

Display an alert dialog from a background service?

$
0
0

I need to show some info on a dialog even if app is not in front, or even if it was closed and i am on a background service.
How can I achieve that?

Long press on a button

$
0
0

hi,
How to catch long press of a button or ToolBarItem ? Seems there is only Clicked event. my requirement is to do two different tasks in normal click & long click.

How to achieve this. Preferably i want to know if this could be done without using custom renderers?

Thank you in advance

Subclassed Custom UITableViewCell does not show image.

$
0
0

I am trying to create a custom cell that just simply displays an image in a listview. I don't need labels but the guides seem to indicate that custom cells have labels (I don't know if this is true). I'm subcassing UITableViewCell as shown here:

    using System;
    using Foundation;
    using UIKit;
    namespace Talli.iOS
    {
        public class CollageImageListViewCelliOS : UITableViewCell
        {
            private NSString cellIdentifier;
            private int row;
            UIImageView imageView;
            UILabel headingLabel, subheadingLabel;


            public CollageImageListViewCelliOS(NSString cellIdentifier, int row)
            {
                SelectionStyle = UITableViewCellSelectionStyle.Default;
                this.cellIdentifier = cellIdentifier;
                this.row = row;
                BackgroundView = new UIImageView { Image = ToImage(this.row) };
                headingLabel = new UILabel();
                subheadingLabel = new UILabel();
            }
            internal UIImage ToImage(int rowItem)
            {
                UserPost p = new UserPost();
                p.SetUserPost(rowItem);
                UIImage img = FromUrl(p.URL);
                return img;
            }
            internal void UpdateCell(int rowItem)
            {
                UserPost p = new UserPost();
                p.SetUserPost(rowItem);
                imageView = new UIImageView { Image = ToImage(this.row) };
                Console.Write(p.URL);
                ContentView.AddSubview(imageView);
                ContentView.AddSubview(headingLabel);
                ContentView.AddSubview(subheadingLabel);
            }
            public override void LayoutSubviews()
            {
                base.LayoutSubviews ();
                imageView.Frame = new CoreGraphics.CGRect(0,0,ContentView.Bounds.Width,80);
                //headingLabel.Frame = new CoreGraphics.CGRect (5, 4, ContentView.Bounds.Width - 63, 25);
                subheadingLabel.Frame = new CoreGraphics.CGRect (0, 0, 0, 0);
                imageView.Frame = new CoreGraphics.CGRect (0,0,0,0);
            }
            static UIImage FromUrl(string uri)
            {
                using (var url = new NSUrl(uri))
                using (var data = NSData.FromUrl(url))
                    return UIImage.LoadFromData(data);
            }
        }
    }

That said, I wonder if anything is loaded from here because from my subclassed UITableViewSource code, I put in a debug breakpoint in GetCell method and it never hits.

            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
                    {
                        // request a recycled cell to save memory
                        CollageImageListViewCelliOS cell = tableView.DequeueReusableCell(cellIdentifier) as CollageImageListViewCelliOS;

                        // if there are no cells to reuse, create a new one
                        if (cell == null)
                        {
                            cell = new CollageImageListViewCelliOS(cellIdentifier, indexPath.Row);
                        }
                        cell.UpdateCell(indexPath.Row);
                        return cell;
                    }

Does anyone have any suggestions as to why I am not getting any images to show in my list?

run on IOS Simulator simultaneously from two computer

$
0
0

can i run xamarin.form project on IOS Simulator simultaneously from two windows computer which is connected from one Mac Machine.
I have enable remote simulator to windows.


Programatically call a button's Click method

$
0
0

So in one of my Activity's OnCreate method, I assign a Click delegate to a button. I immediately afterward wish for that method to execute, but calling the button's PerformClick() function doesn't seem to be working. Should I be calling the PerformClick function in a method other than OnCreate?

Any insight would be greatly appreciated, thank you all for your time.

-mwerdekker

main.storyboard not see in solution

$
0
0

Hi!
I have solution. It have main.storyboard file.
But, in VS i don't see this file in solution browser.
How can i see it?

When will we have c# 7 support in Xamarin Studio/Visual Studio for Mac?

$
0
0

Now that VS2017 has been announced, and the latest Workbook support c# 7, when will this be available for use in Xamarin Studio/Visual Studio.Mac?

Can I set an ID using text or string dynamically ? How ?

Connect with FireBase Cloud DB

$
0
0

I have already developed my app with sqlite db,i want central db server to this app.so i choose firebase as the solution.Do anyone has better solution than firebase? can any one help me to connect my current app with firebase?

Assign SKColor to value

$
0
0

Hello!

I would like to use SkiaSharp for representation of my data, which consists of values in a specific range. Is it possible to assign colors to different values automatically?
My first approach would be to check each value for specific ranges and assign colors according to those ranges (f.e. red if value is high, green if value is low, ...). Does someone have an idea how I could also use interpolated colors? (f.e. if a value lies in the range between red and orange, the assigned color should be a mixture of red and orange)

Thanks in advance!

Windows 8.1 TLS 1.2 support within Xamarin

$
0
0

Hi,

We use Xamarin to target IOS, Android and Windows 8.1 devices. We have recently had the need to allow the use of TLS 1.2 for all 3 of these platforms. IOS does this out of the box. For Android we are using ModernHTTPClient to achieve this. But for Windows 8.1 there doesn't currently seem to be any way of supporting TLS 1.2.

We have tried the following approaches without success:
- Making use of the ServicePointManager to define the TLS versions available - SPM is not supported in PCL or Windows target projects
- Upgrade to .NET 4.6 - Xamarin does not allow this and reverts the version back to 4.5 each time
- Upgrade to Visual Studio 2017 with .NET Core 2.0 - VS2017 does not support Windows 8.1 App/Phone projects.

Does anyone know if there is any way of achieving this within 8.1 as there currently doesn't seem to be any way of doing it?

Thanks in advance

Regards

Scott


IOS BoxView flickering when scrolling

$
0
0

Hey,

I use a BoxView with HeightRequest="0.5" as a separator between some other elements.
The separator and the rest are inside a StackLayout that is inside a vertical ScrollView.

Everything looks good but while scrolling the height of my BoxView changes. So while scrolling the BoxViews have a flickering effect.
The flickering problem is only on iOS. I have already tried to use an Image instead but if flickers as well. In the same scene I do also have a vertical separator (HeightRequest="30", WidthRequest="0.5"). It doesn't flicker even while scrolling.

Have you any ideas how to solve the problem?

All iOS options in properties are gone

$
0
0

Hi everyone,

My Properties such as iOS build, iOS IPA,... are all gone.

Now it looks like this

imgur.    com/a/P6SsU

It was just fine a few hours ago. Now the project will not generate a new IPA file anymore.

Anyone can help me with this please?

Pin the Map.

$
0
0

i want user to pin the location by using map with out providing their location by address and through that pin i want to get the address of the user.is there any possible way to do this??

How to hide navigation back button while using Prism Xamarin

$
0
0

I want my app to work like ATM devices, navigations has to be done dynamically.
How to hide the navigation back button on top of the page?

Xamarin.Forms Localization, how to use a region indipendent localization?

$
0
0

I'm building an app with localization trought .resx files; i have created two file until now:

  • Languages.resx
  • Languages.en.resx

To test if it is all working i changed the locale on my android phone to en-GB but that doesn't work, i assume because of the "-GB".

How can i have a file that handle the language without considering the region?

Thanks

Viewing all 204402 articles
Browse latest View live


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