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

There is no valid device selected

$
0
0

I am trying to run (write click on project debug) my ios application from Visual studio I got the exception attached screenshot. Connection between VS2012 and xamarin mac server is successfully created. there is no issue. Please help me regarding this issue.

Thanx


DialogViewController EntyElement Caption Font Size

$
0
0

Hey Guys,

I noticed that the caption font size increased, maybe in the latest Beta build? Is there any way to make the caption font smaller for an EntryElement?

Thanks

cannot archive project from the command line (mdtool)

$
0
0

I can archive within Xamarin Studio without any problem, but when I try to do it from the command line using the following command:

/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool archive -c:"MyAppStore | iPhone" MySolution.sln

Then I have the following error:

MonoDevelop Archive Tool INFO:Found Xcode, version 5.0.2 (3335.32). INFO:Found Xamarin.iOS, version 7.0.4.209. Loading solution: /Users/Smith/Git/MyProject/MySolution.sln Loading solution: /Users/Smith/Git/MyProject/MySolution.sln Loading projects .. FATAL ERROR [2013-11-22 12:07:42Z]: System.InvalidCastException: Cannot cast from source type to destination type. at Xamarin.Ide.ArchiveTool.Run (System.String[] arguments) [0x0029b] in /Users/builder/data/lanes/monodevelop-lion-license-sync/844a84fe/source/md-addins/Xamarin.Ide/Xamarin.Ide/Xamarin.Ide.Archival/ArchiveTool.cs:125 at MonoDevelopProcessHost.Main (System.String[] args) [0x002d2] in /Users/builder/data/lanes/monodevelop-lion-license-sync/844a84fe/source/monodevelop/main/src/tools/mdtool/src/mdtool.cs:132

Note that I'm running this command in the context of my regular user (not root).

Thanks,

Morgan

Connection to Xamarin.iOS Build Host Failed

$
0
0

I've set up a virtual machine via Parallels on my mac and I'm trying to get a simple Hello World running. I'm able to see the mac computer to act as my host when I try to connect it within Visual Studio, but it's not successfully connecting. Specifically, the error I get is 'Connection to Xamarin.iOS Build Host Failed'.

I've performed a diagnostic and it fails at the 'Reachability Test', which I think is odd because my windows and mac computers are actually the same computer. I've modified the Network settings on Parallel to be 'Shared' since other posts suggested that, but it didn't work.

Note, I have been able to get a Hello World up when using Xamarin Studio directly on the mac. I've also made sure I have the latest Xcode.

Can't filter MPMediaQuery to show only music (crazy parameter error)

$
0
0

Hello,

I'm trying to use MPMediaQuery to filter by MPMediaType.Music (and others predicates but this is the only one causing problems):

MPMediaQuery mq = new MPMediaQuery ();
mq.AddFilterPredicate (MPMediaPropertyPredicate.PredicateWithValue (MPMediaType.Music, MPMediaItemProperty.MediaType));

With this code I get the following error:

Error CS1502: The best overloaded method match for MonoTouch.MediaPlayer.MPMediaPropertyPredicate.PredicateWithValue(MonoTouch.Foundation.NSObject, string) has some invalid arguments (CS1502) Error CS1503: Argument `#1' cannot convert MonoTouch.MediaPlayer.MPMediaType' expression to type MonoTouch.Foundation.NSObject (CS1503)

I'm using Xamarin.iOS 6.3 from the Beta channel.

Just to compare this is the equivalent Objective-C code that I use and works:

MPMediaQuery *mq = [[MPMediaQuery alloc] init];
[mq addFilterPredicate:[MPMediaPropertyPredicate predicateWithValue:@(MPMediaTypeMusic) forProperty:MPMediaItemPropertyMediaType]];

How can I solve this?

xib outlet not loading correctly on iPhone 5C

$
0
0

I have a very simple view with a button and a label. In XCode's Interface Builder I ctrl-dragged to get a reference to the UIButton and called it btnPlay. In my view controller I have this code:

public override void ViewDidLoad()
{
    base.ViewDidLoad();

    // On my phone this line causes a crash:
    Console.WriteLine("Button title: {0}", btnPlay.CurrentTitle);
}

When I run the app in the iPhone Simulator (3.5" Retina / iOS 7.0) all is well. Inspecting btnPlay at a breakpoint shows it as a MonoTouch.UIKit.UIButton object.

When I run the app on my iPhone 5C (iOS 7.0.4) btnPlay shows up as a MonoTouch.UIKit.UIView object which has no CurrentTitle property and so crashes the app.

What can be the cause of this?

UIMenuController fails when Guided Access is on

$
0
0

I noticed my app is failing while running with Guided Access enabled.

Specifically,UIMenuController failed to create a popup menu on long touch

UIMenuController uim = UIMenuController.SharedMenuController; //build menu items in list uim.MenuItems = list.ToArray (); //loc is location in View - loc=_gr.LocationInView (this.View); while _gr is a UILongPressGestureRecognizer uim.SetTargetRect (new RectangleF (loc.X, loc.Y, 1, 1), this.View); uim.SetMenuVisible (true, true);

When invoked the menu doesn't show up. I checked in debugger, uim.MenuFrame is a zero size frame

Otherwise the code works just fine if Guided Access is not enabled. I am running ios7 with app compiled with ios7 sdk

Any ideas?

Set alphanumeric keyboard to show numeric first in EditText(C# android)

$
0
0

I'm implementing an Android App and I need a tip. My EditText, usually, is just numbers, but sometimes numbers and letters.

This is the keyboard that I need as "default", when the EditText is focused:

If I put android:inputType="phone" or android:inputType="number", the result isn't what I need:

I need numbers and letters. So, is it possible to do?


UIMenuController fails when Guided Access is on

$
0
0

I noticed my app is failing while running with Guided Access enabled.

Specifically,UIMenuController failed to create a popup menu on long touch

UIMenuController uim = UIMenuController.SharedMenuController; //build menu items in list uim.MenuItems = list.ToArray (); //loc is location in View - loc=_gr.LocationInView (this.View); while _gr is a UILongPressGestureRecognizer uim.SetTargetRect (new RectangleF (loc.X, loc.Y, 1, 1), this.View); uim.SetMenuVisible (true, true);

I checked uim.MenuFrame is zero size frame

Otherwise the code works just fine if Guided Access is not enabled. I am running ios7 with app compiled with ios7 sdk. With ios6 menu works just fine.

Any ideas?

SQLite Encryption Extension

$
0
0

We are porting an existing application to C# mono on android. Our current solution uses SQLite Encryption Extension and we are thinking about the SoundEx extension as well.

How do I push a custom version of sqlite to my device? What do I have to do inside my project to connect to the custom version?

I appreciate your help. Thank you in advance.

Adding a Developer Account Throws an Error

$
0
0

Just tried adding a Developer Account to the Xamarin Studio Preferences and I am receiving this error.

Any Help would be great!!

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Could not add internet password to keychain: The specified item already exists in the keychain. at MonoDevelop.MacInterop.Keychain.AddInternetPassword (System.Uri uri, System.String password) [0x0015f] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/addins/MacPlatform/MacInterop/Keychain.cs:774 at MonoDevelop.MacDev.Gui.DeveloperAccountManagerWidget.AddClicked (System.Object sender, System.EventArgs args) [0x0005d] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/Gui/AppleDeveloperAccountsPanel.cs:365 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/MonoMethod.cs:230 --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00069] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/MonoMethod.cs:238 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/MethodBase.cs:114 at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000d5] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System/Delegate.cs:424 at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00018] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System/MulticastDelegate.cs:72 at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System/Delegate.cs:398 at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in :0 at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in :0 at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in :0

show subview of the documentView in a scrollView

$
0
0

I'm adding a scroll to the following sample, to see all the subview are added:

In Xamarin http://docs.xamarin.com/samples/AnimatingViews/

I am trying to change the CustomView for scrollview. assign the CustomView documentView enable the scrollers of scrollview. but not shown.

Any ideas?

Facebook SDK - Multiple types error when opening xib

$
0
0

Has anyone seen this issue. I am creating a new solution, adding the Facebook SDK (by Facebook) from the component store and after adding the SDK I go to open a xib (any xib) I get this error:

Error updating Objective-C type information. Multiple types (MonoTouch.FacebookConnect.FBGraphObjectProtocol and MonoTouch.FacebookConnect.FBGraphObject) registered with the same Objective-C name: FBGraphObject

Details: System.ArgumentException: Multiple types (MonoTouch.FacebookConnect.FBGraphObjectProtocol and MonoTouch.FacebookConnect.FBGraphObject) registered with the same Objective-C name: FBGraphObject at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update () [0x00118] in /Users/builder/data/lanes/monodevelop-lion-license-sync/9f5e11a6/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:89 at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update (Boolean force) [0x0000e] in /Users/builder/data/lanes/monodevelop-lion-license-sync/9f5e11a6/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:65 at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateTypes (IProgressMonitor monitor) [0x00040] in /Users/builder/data/lanes/monodevelop-lion-license-sync/9f5e11a6/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:491

My first IOS App Rejected - Where to go from here!?

$
0
0

First of all, Happy New Year to You All. My New year was met with a message from Apple telling me that the first App I had submitted to the Apple App Store had been rejected :(

We found that your app crashed on an iPad running iOS 7.0.4 and iPhone 5s running iOS 7.0.4, which is not in compliance with the App Store Review Guidelines.

anyway, I'm not sure I know what to do now. I tested my app on the simulator within Xamarin Studio and it worked fine. I also tested it on actual iPhone 4S and iPhone 5 devices that had IOS7.0.4 installed and it worked perfectly. I don't have access to an iPhone 5S so not really sure how to test it.

Has anyone built an application using Xamarin Studio and had it working on a 5S? Also is this an issue with Xamarin Studio (does it need to be updated to target the 5S) or do I have to download the 7.0.4 SDK from somewhere (and if so how do I install it so it is picked up by Xamarin Studio?). My XCode version is 5.0.2 which seems to include IOS 7.0.3 SDK but there's no mention of the IOS 7.0.4 SDK anywhere.

Apple also sent some (un)helpful crash logs which is complete gobbledegook to me! Any help would be much appreciated Thanks

Installed xamarin android .apk file only work for 24 hours

$
0
0

Hello, I am using paid version of xamarin studio for android application. Whenever I am installing my.apk file , I am getting message " Build with evaluation software This build will only work for 24 hours." After 24 hours my installed application .apk file has not been worked for us. So please provide me the relevant solution for this problem

Thanks 

Sanjaya Verma


How to use geolocation in webview?

$
0
0

I had tried to override the onGeolocationPermissionsShowPrompt, but it said no suitbale method found to override? Are there any problem on my code?

//public class CustChromeWebViewClient : WebChromeClient //{ // // private Context _context; // // public CustChromeWebViewClient(Context oCon) // { // _context = oCon; // // } // // public override bool OnJsAlert(WebView view, string url, string message, JsResult result) // { // new AlertDialog.Builder(_context).SetTitle("Title").SetMessage(message).SetPositiveButton("ok", delegate // { // result.Confirm(); // }).Create().Show(); // // // return true; // // } // // // public override void onGeolocationPermissionsShowPrompt(string origin, GeolocationPermissions.ICallback callback) // { // callback.Invoke (origin, true, true); // // //return true; // // } //}

Xamarin for VS - build, but can't see an emulator

$
0
0

Hello!

I've installed Xamarin and tested it both on VS2010 and VS2013.
After creation or opening an Android project (any project, e.g. "Hello, Android" from the guide) both studios give the same error - "Error populating device list".
However project builds without errors.
But I can't start it in the emulator ("Device: is either not running or not attached" in VS2010).
It starts ok in Xamarin studio and publishing without problems to the emulator. But VS can't see this emulator.

I've tried to uninstall/install Xamarin, VS, Android SDK a couple of times, but it doesn't help.
What should I do?

How to Set DateElement Value to NULL?

$
0
0

I have a screen where I can refine my search, and it contains some DateElement(s). Now, at the beginning or when I reset the filter, I want my DateElement to be null, or empty...anyway with no value.

I can't set a default value because it really doesn't make sense for my purpose.

How to do that?

android device emulator list is blank

$
0
0

Trying to go thru the Hello world app for android. When I run the project in xamarin studio, select run --> run with --> monosoft.. the select device is blank.

Please advise

Thanks

How to develop iOS app without physical MAC, using iPad as a debugging device?

$
0
0

I am trying to use Xamarin in VisualStudio for developing iOS application.

VS is asking me for Mac Build Host. I have registered as iOS developer and paid for it, expecting that it is enough for development, but it seems that I also have to purchase a physical Mac desktop (which was not in my budget at all, after I invested additional few hundred bucks for an iPad mini, which I actually did not expect to use other than for development).

This whole situation looks pretty disappointing - especially because there was no any warning about it upfront.

Am I missing something, or is it really impossible to develop for iOS without physical MAC?

Any help will be greatly appreciated. BTW - the whole Xamarin looks absolutely awesome - excluding this first disappointment.

Thanks, Eugene

Viewing all 204402 articles
Browse latest View live


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