FAQ Database Discussion Community


UITabBarController wait loading UIViewController until selected Xamarin

ios,monotouch,xamarin
Is it possible to call a method when a new UIViewController is selected in a UITabBarController ? Or is it possible to wait loading the whole UIViewController until the view is selecte? I have a UITabBarController that looks like: public sealed class VisualizationViewController : UITabBarController { private UIViewController tabVand, tabVarme,...

Access tmp directory in iOS 8 with Xamarin.iOS

c#,ios8,xamarin,monotouch,tmp
Does anyone know how to get the path to the tmp directory in iOS 8 with Xamarin?

MonoTouch - System.ServiceModel.Dispatcher.ClientOperation fails ("Could not Load signature of [type]).

c#,wcf,mono,monotouch
We have a custom JSON WCF binding that we use in our .net SDK (to support JSON similar to the WebHttpBinding). Our SDK is a PCL supporting .net 4.5, Win8, IOS, Android profile - It works in our Windows Desktop application, and Android without any problem. We are just diving...

Is the tag still necessary in Xamarin Applications?

monotouch,xamarin,xamarin-studio
We have a 4 year old MonoTouch application, now a Xamarin.iOS application. It has a tag in each project <MtouchSdkVersion>3.0</MtouchSdkVersion> In the list of warnings with the current Xamarin.iOS and Xcode 6.1.1, I see /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Warning: The iOS SDK version '3.0' is not installed. Using newer version '8.1' instead'. ({myProjectName})...

Truncate nfloat to two decimal places but never round up

c#,ios,math,monotouch,xamarin
I have a nfloat. Now I want to have only two decimals, but there should be no rounding involved. If it should be rounded it should be rounded down. I tried this nfloat test = 45.71629f; Console.WriteLine (test.ToString("F2")); but here he rounds up (result: 45.72). It should be 45.71. I...

Animate Layer Opacity with UIView.Animate

c#,ios,xamarin,monotouch
I have 2 CALayers, each with an image. Both have an initial Opacity of 0. I want to animate Layer1's Opacity to 1 over 1 second, starting straight away. Then after a delay of 0.5 seconds, I want to animate Layer2's Opacity to 1 over 1 second. These 2 layers...

How to prevent Images squeezed in Xamarin.Forms Button?

monotouch,xamarin.forms
Button Images inside Xamarin.Forms are appearing squeezed on iOS. How do you set the Image to display in normal aspect ratio in XAML? Also as a bonus how do you make sure the Button Images line up vertically? I have tried setting the WidthRequest XAML property but it has no...

Write float values to Pointer Array of float in C# (unsafe or safe) using AVAudioPCMBuffer

ios,.net,c#-4.0,mono,monotouch
While I'm not very comfortable using the unsafe context in C#, I do understand that I may have to sometimes use it. To get right to it, in order to write byte values to an IntPtr, I could write the below from a safe context: for (int i = 0;...

Xamarin Forms: ContentPage OnCreate event?

c#,xamarin,monotouch,xamarin.forms
I'm creating a messaging app, and I need that when I enter the messaging thread with someone, message bubbles show inside the layout. I'm doing this easily using: MyMessageThreadStackLayout.Children.Add( // Message bubble building logic goes here ); But currently, I'm putting this inside the: protected override void OnAppearing () But...

Xamarin.Forms: Use of GetMainPage()

c#,ios,monotouch,xamarin,xamarin.forms
I'm currently reading the navigation section from An Introduction to Xamarin.Forms. One should use the GetMainPage() method. But how should that be used? The default implementation of the app delegate looks like the following: Applicaton Delegate: public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate { public override bool FinishedLaunching (UIApplication app, NSDictionary...

Xamarin: How to implement NSDictionary with YES

c#,ios,objective-c,xamarin,monotouch
I need to create a NSDictionary in Xamarin/C# with YES Value. The NSDictionary in Objective-C looks like this: NSDictionary *requestSettings = @{ kKeyOne : @YES, kKeyTwo : @YES }; I have no idea where in Xamarin I can find the YES keyword....

How to, applicationDidBecomeActive in Xamarin iOS?

ios,xamarin,monotouch,nsnotificationcenter
How do I do this in Xamarin iOS? ViewDidAppear is not called when Opening app from background The link below mentions the OnActivated method for Xamarin in the AppDelegate, but how do I subscribe my ViewController so it knows when the app comes from the background? https://forums.xamarin.com/discussion/10594/where-is-applicationdidbecomeactive-in-xamarin-ios...

Override separateSecondaryViewControllerForSplitViewController: for specific UIViewController in monotouch

ios,monotouch,xamarin,uisplitviewcontroller
I am trying to override the default UINavigationController behavior on separateSecondaryViewControllerForSplitViewController: which is according to Apple doc Discussion Most view controllers do nothing by default but the UINavigationController class responds by popping and returning the view controller from the top of its navigation stack. My aim is to: return null...

WebRequest not working with ssl on Xamarin.Forms, despite servicePointManager hack

mono,monotouch,xamarin,monodroid,xamarin.forms
I am writing an application that needs to read from a REST api that is only available over https. I am running into the issue where the request fails in Mono.Security, with the message: "The authentication or decryption has failed." I did my research and found that Mono by default...

Xamarin : Loading resources via GetManifestResourceStream

opengl-es,xamarin,monotouch,xamarin.forms
I am working on a Xamarin forms project to use OpenGL/OpenTK. I am trying to load a shader using GetManifestResourceStream. Whatever I do I get null code is being run from .Shared project, shaders are in .ios / .Android resources directory string prefix; #if __IOS__ prefix = "OpenGLTesting.iOS."; #endif #if...

The runtime version supported by this application is unavailable during app startup

xamarin,monotouch
I'm getting the following lines on app startup. Application works fine though: Jun 22 18:29:54 Alexeys-iPod-touch xxx[1169] : WARNING: The runtime version supported by this application is unavailable. Jun 22 18:29:54 Alexeys-iPod-touch xxx[1169] : Using default runtime: v4.0.30319 What should I do about it (and should I)?...

Xamarin Forms application architecture

xamarin,monotouch,xamarin-forms
I am developing an app for iOS, Android and Windows using Xamarin forms. From their web site application architecture shared code such as DAL or BL goes in Shared code folder and UI layer in platform specific folders. Looking at the sample code from Xamarin, the UI code is also...

Running on iOS 7.1 simulator brings errors in the console output

ios,xcode,xamarin,mono,monotouch
I'm using Xamarin Studio 5.9.3 on Mac with Mono 4.0.1, Xcode 6.3.2 and Xamarin.iOS 8.10.1.64. When I try to run my app in the iOS 7.1 simulator I get the following console output: objc[1102]: Class AXEmojiUtilities is implemented in both /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities and /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS...

Xamarin.Forms Dependency Service ActivityNotFoundException: No Activity found to handle Intent

android,xamarin,monotouch,monodroid,xamarin.forms
I'm using Xamarin.Forms Dependency Service to make a phone call in my PCL. The method itself is : public void Call(string number) { var uri = Android.Net.Uri.Parse(number); var intent = new Intent(Intent.ActionView, uri); Forms.Context.StartActivity(intent); } Method call: DependencyService.Get<IPhoneDialler>().Call("+447836726414"); Using it throws Android.Content.ActivityNotFoundException: No Activity found to handle Intent Same approach...

UICollectionViewLayoutAttributes custom derived class instance is not created

xamarin,monotouch,uicollectionviewlayout
I have created this class public class CustomLayoutAttributes: UICollectionViewLayoutAttributes { public float PhotoHeight { get; set; } public override NSObject Copy (NSZone zone) { CustomLayoutAttributes copy = base.Copy(zone) as CustomLayoutAttributes; copy.PhotoHeight = PhotoHeight; return copy; } public override bool IsEqual (NSObject anObject) { CustomLayoutAttributes attributes = anObject as CustomLayoutAttributes; if...

I am unable to add identifiers to segues. Is there a way to repair a ios xamarin storyboard?

ios,xamarin,monotouch,storyboard,segue
I have been working with Xamarin since August and it has worked fine until recently. Our storyboards do not allow us to name newly created segues. I am only able to see some of the previously named segues in properties window. However if i open the storyboard using xcode it...

How to use xamarin sidebar with storyboard

monotouch,xamarin,sidebar
I'm trying to create a application with sidebar drawer navigation, but the controls is hard coded in your controller like what I see in the example, What I want is my sidebar menu and content will be designed in storyboard, the problem is I really don't know where to start....

What is the difference between Mvvmcross nuget package and Mvvmcross.HotTuna.CrossCore?

monotouch,xamarin,mvvmcross
What is the difference between Mvvmcross nuget package and Mvvmcross.HotTuna.CrossCore? I built touch project using Mvvmcross.HotTuna.CrossCore and MvvmCross.HotTuna.MvvmCrossLibraries packages. Now It's working well. Should I add Mvvmcross nuget package additionally? When I try to add Mvvmcross nuget package, it asks to overwrite Setup.cs file. Should I continue to overwrite?...

NSUserDefaults can not save NSDictionary Data in Xamarin

monotouch,xamarin
In the B Viewcontroller, I store data into NSUserDefaults and retrieve them in AViewController. During the execution, it performs as it expected. However, once I close and re-run the app, I figure out that these information (dictionary) does not being stored. Here is the BViewController where I store the data...

Use different cell style in Xamarin.iOS

c#,ios,uitableview,xamarin,monotouch
I want to create a simple example, where I want to use another UITableViewCellStyle. In my example it is UITableViewCellStyleValue1. I added a UITableViewController to the storyboard, set the class name to NakedTableViewController, thereby using Dynamic Prototypes as Content, then I set the Table View Cell Style to Right Detail...

Xamarin build cross platform sdk for native developers

android,ios,mono,monotouch,xamarin
I'm going to build a sdk target for android & ios developers. I thought maybe instead of writing it for objective c and java i will use mono cross platform to my advance. The only issue is that xamarin can generate apk and ipa. Is it possible to make it...

How to set ItemsSource of ListView?

c#,xaml,monotouch,xamarin,xamarin.forms
Here I have defined my data myListOfEmployeeObjects: public class App : Application { public List<Employee> myListOfEmployeeObjects; public App () { Employee emp1 = new Employee () { FirstName = "Max", LastName = "Mustermann", Twitter = "@fake1" }; Employee emp2 = new Employee () { FirstName = "Evy", LastName = "Mustermann",...

DateTime vs. NSDate - What is more suitable for a calendar implementation?

c#,ios,calendar,monotouch,xamarin
I want to include a small calendar implementation in my app. In general, you have two possibilities to implement this: Either working with DateTime or with NSDate (NSCalendar, NSDateComponents). This is an essential design decision. What I've found out is that not all methods can be translated one to one...

file is always empty if I use ReadElementContentAsBase64

c#,xml,monotouch,base64,xmlreader
I'm using XmlReader to parse a XML document. One of the nodes contains base64 encoded data and I want to decode it. This is what I do: byte[] buffer = new byte[4096]; int readBytes = 0; using (FileStream outputFile = File.OpenWrite (path)) using (BinaryWriter bw = new BinaryWriter (outputFile)) {...

How to Invoke the IntPtr result of method_getImplementation

c#,ios,monotouch,xamarin
The result of calling method_getImplementation(method) is an IntPtr. How do I convert an IntPtr to a method? [DllImport("/usr/lib/libobjc.dylib")] extern static IntPtr method_getImplementation(IntPtr method); public void SomeMethod { var method = class_getInstanceMethod(new UIViewController().ClassHandle, new Selector("viewWillAppear:").Handle); IntPtr original_impl = method_getImplementation(method); } In obj-c: IMP originalImp = method_setImplementation(method,swizzleImp); originalImp(self,_cmd) ...

Xamarin UITableView animation starts from wrong position

ios,uitableview,animation,monotouch,xamarin
In my View I have one UILabel and one UITableView. I want them to animate downwards by 40 pixels. The following is my code var newFrame = newsStand.Frame; newFrame = new CGRect (newsStand.Frame.X, newsStand.Frame.Y+40, newsStand.Frame.Width, newsStand.Frame.Height); UIView.BeginAnimations ("slideAnimation"); UIView.SetAnimationDuration (2); UIView.SetAnimationCurve (UIViewAnimationCurve.EaseInOut); UIView.SetAnimationDelegate (this); UIView.SetAnimationDidStopSelector (new Selector ("slideAnimationFinished")); nfloat...

UILabel not wrapping in UITableView until device rotate (iOS8)

monotouch,mvvmcross
I have a custom MvxTableViewCell that is associated with an MvxStandardTableViewSource. That Source is then applied to a UITableView. The custom table cell is defined without any Storyboard or NIB. It is laid out in code and uses AutoLayout. this.searchResultsTable = new UITableView(); this.searchResultsTable.AccessibilityIdentifier = "SearchView_SearchResultsTable"; this.searchResultsTable.TranslatesAutoresizingMaskIntoConstraints = false; this.searchResultsTable.RowHeight...

Snapshot of a Xamarin.Forms.View

android,bitmap,xamarin,monotouch,xamarin.forms
I am making an application using Xamarin.Forms, and I need to make a snapshot of a view (including parts not currently visible). I know full well how to do this on android, but I haven't found any clues on how to do this with Xamarin.Forms.View Is there a way to...

MonoTouch Convert UTC time to American Eastern Standard Time

monotouch
How to convert UTC time to American Eastern Standard Time zone. TimeZoneInfo easternZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"); DateTime easternTime = TimeZoneInfo.ConvertTimeFromUtc(timeUtc, easternZone); I am getting exception at first line - TimeZoneNotFoundException...

Difficulty binding iOS delegate method without parameters

c#,ios,objective-c,xamarin,monotouch
When binding a iOS lib.a for Xamarin, I'm getting the following error: btouch: The delegate method Device.SomeDeviceDelegate.CaptureComplete needs to take at least one parameter (BI1003) The bindings were generated Objective Sharpie. namespace Device { // @protocol SomeDeviceDelegate <NSObject> [Protocol, Model, Preserve] [BaseType(typeof(NSObject))] interface SomeDeviceDelegate { // @optional -(void)CaptureComplete; [Export("CaptureComplete")] void...

Multiple Views for single ViewModel (iOS)

ios,monotouch,xamarin,monodroid,mvvmcross
I am aware that in order to achieve this, I need to create a custom presenter and map the ViewModel to my Views manually by overriding the InitializeViewLookup method. I successfully did this on Android and so far it works fine, but I can't seem to do it on iOS....

Migrating to Unified API and new reference counting

monotouch,xamarin,reference-counting
I had a Xamarin.iOS Classic project and migrated it to Unified API. I have a view controller in my code (simplified version): public class TestViewController : UIViewController { private WeakReference<UIView> _viewRef; public override void ViewDidLoad() { base.ViewDidLoad(); _viewRef = new WeakReference<UIView>(View); StartTimer(); } private async void StartTimer() { await Task.Delay(1000);...

Error CS1525: Unexpected symbol

ios,xamarin,monotouch,xamarin-studio
I m using: Xamarin 5.8.3 (build 1) Xcode 6.3.1 Having the above error in this line: <?xml version="1.0" encoding="UTF-8" standalone="no"?> In one of my .xib. The error is: Error CS1525: Unexpected symbol `<' (CS1525) Any idea where this weird Error/Bug coming from? Thanks in advance...

how to solve unhandled mamaged exception in xamarino.ios?

c#,ios,exception,button,monotouch
I am new to this. Please do not give me minus reputation & block. My problem is i have a button in xamarin.ios. I used that button to read list of data from a table view & value is upload to php server. But when i click on button, i...

Pushing a DialogViewController onto a ViewController onto NavigationController stack gives 2 pages

c#,ios,monotouch,xamarin,monotouch.dialog
Noob Xamarin/MonoTouch.Dialog question: I have laid out my iOS app in the storyboard designer of Xamarin Studio. I have a UINavigationController with a root view containing a UITableView with static cells, essentially creating a main menu. The cells segue to their respective UIViewControllers. I want to layout the about/settings screen...

Xamarin iOS: Can't fetch record from private database in icloud

ios,xamarin,monotouch,icloud
Want to save a asset to the private database but.... ...my output says every launch "creating file...", so where's the problem at my code? :( (uploading/saving seems to work because "uploaded" appears) var recordID = new CKRecordID("diary"); AppleHelper.PrivateDatabase.FetchRecord(recordID, (record, err) => { // Was there an error? if (err !=...

Offline authentication best practices in Xamarin

c#,xamarin,monotouch
I intend to create a Xamarin(.Forms) application, and it has to have authentication: the user should provide a username and password to obtain data. The problem is that it has to work offline as well (meaning it shouldn't rely on a server for the authentication process). I considered the following...

Xamarin Forms: How can I add padding to a button?

xaml,xamarin,mono,monotouch,xamarin.forms
I have the following XAML Xamarin.Forms.Button <Button Text="Cancel" BackgroundColor="#3079a8" TextColor="White" /> I tried to add padding to it via the Padding property but that didn't work. After checking the forums and the docs, I realised there is no padding property in the documentation for Xamarin.Forms.Button (link to the docs) ,...

Xamarin iOS: Simulator Works but Phone is blank

ios,monotouch,xamarin
I got a Xamarin iOS Project with a PCL. The App works fine when I deploy it to a Simulator. But on a real device it just shows a blank screen. No errors in Logs. Anyone got a similar problem or can me direct where to search for the cause?...

NSAttributedString not working on UITextField ios xamarin

c#,ios,monotouch,xamarin
I'm having trouble changing the font and fontsize of a placeholder inside a UITextField. this.emailTextField = new UITextField (); //Not working this.emailTextField.AttributedPlaceholder = new NSAttributedString ("Email address", UIFont.FromName("Didot-Italic", 6.0f)); this.emailTextField.KeyboardType = UIKeyboardType.EmailAddress; this.emailTextField.ReturnKeyType = UIReturnKeyType.Next; this.emailTextField.AdjustsFontSizeToFitWidth = true; this.emailTextField.ClearButtonMode = UITextFieldViewMode.Always;...

Error since migrating to Unified version in Xamarin.IOS

monotouch,xamarin
I'm failing trying to migrate my Xamarin.IOS to use the new unified API using the automatic Xamarin Studio tools. The solution is composed of 2 project. One PCL project and one Xamarin.IOS project that reference the PCL. When I try to build the project the following error appears: .../FoodTruckiOS/MenuViewController.cs(10,10): Error...

IOS remote notifications not working in background for IOS 8

c#,ios,ios8,monotouch,xamarin
I have been using Xamarin.IOS, and I recently came across the problem of trying to receive a remote notification payload when the Iphone/Ipad is in background. IOS 7 devices seem to be working when in background or in forground. However, for the IOS 8 devices the DidReceiveRemoteNotification is only called...

Can't apply multiple transformation to UIImageView

xamarin,monotouch
I can't find out why my transformations are not being applied to a UIImageView in Xamarin iOS. Here's the code: CGAffineTransform transform = new CGAffineTransform(); transform.Rotate((float)Math.PI / 2); transform.Scale(0.8f, 0.8f); this.imageViewOverlay = new UIImageView { ContentMode = UIViewContentMode.Center, BackgroundColor = UIColor.Clear, Opaque = false, Frame = new CGRect(0,0,this.View.Bounds.Width, this.View.Bounds.Height), Transform...

Xamarin binding broken after updating Xamarin.iOS & unified API

ios,monotouch,xamarin
I have upgraded my Xamarin project and binding to a newer version of Xamarin.iOS and converted to the unified API. Since doing this one of the bindings I created is causing my app build to fail with the error: MTOUCHTASK: error MT5211: Native linking failed, undefined Objective-C class: _OBJC_CLASS_$_EAAccessoryManager. If...

Monotouch floating point pointer throws NullReferenceException when not 4-byte aligned

c#,ios,.net,monotouch,unsafe
I'm facing a problem I just can't understand. While playing with unsafe pointers in C# with Monotouch, I get a NullReferenceException on device (ARM), but I can't explain why, let's see some code var rand = new Random(); var buffer = new byte[2 * 1024 * 1024]; rand.NextBytes(buffer); fixed (byte*...

Xamarin Forms error using System.Timers and Sysem.Json

xamarin,monotouch,xamarin-forms
I want to use System.Timer in my Xamarin Forms based project. I am actually converting my Xamarin iOS project to Xamarin Formbased project. My Xamarin iOS project has all code for Timer using System.Timer aTimer = new Timer (tm); // Hook up the Elapsed event for the timer. aTimer.Elapsed +=...

SIGABRT error after last Xamarin.iOS update

c#,ios,xamarin,monotouch,xamarin-studio
Just updated to the lastest version of Xamarin studio and Xamarin.iOS. Now I am getting this error: Got a SIGABRT while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. Well, its not even an error...

CLLocation DistanceFrom performance implications

ios,iphone,xamarin,monotouch
I'm developing an iOS application where I need to track the distance walked by the user real-time and alter data accordingly. Essentially what I'm doing is, as soon as the user makes a move, I check the distance between the original and current positions and react accordingly (using CLLocation's DistanceFrom...

Portable Class Library vs. library project

c#,dll,monotouch,xamarin,portable-class-library
I want to now the difference between PCL and a normal library. PCL uses profiles with which it can be determined which plattforms and features are available. Both can generate a DLL which can be used on different plattforms. For a normal library project you can also set the target...

MVVMCross iOS reselect table row after table refresh

ios,monotouch,mvvmcross
Does anyone know how to make an iOS table view visually re-select a row after the table is refreshed? Here is my current implementation: MainView public override void ViewDidLoad() { base.ViewDidLoad(); var source = new MvxSimpleTableViewSource(MainTableView, MainInspectionCell.Key, MainInspectionCell.Key); MainTableView.Source = source; var set = this.CreateBindingSet<MainView, MainViewModel>(); set.Bind(source).To(vm => vm.Inspections); set.Bind(source).For(s...

Binding UIImageView invalid cast in Xamarin after upgrade

c#,ios,binding,monotouch,xamarin
I recently tried to recompile a project that had been working in a newer version of Xamarin. The project compiles, but crashes on the device with an invalid cast exception. System.InvalidCastException: Cannot cast from source type to destination type. The crash occurs in designer generated code: [MonoTouch.Foundation.Connect("turnOnAnimation")] private MonoTouch.UIKit.UIImageView turnOnAnimation...

AttributedText on MvxTableViewCell

c#,ios,uitableview,monotouch,mvvmcross
I'm trying to set underline on UILabel of MvxTableViewCell. [Register("KittenCell")] public class KittenCell : MvxTableViewCell { private UIImageView MainImage; private UILabel NameLabel; private UILabel PriceValueLabel; private UILabel PriceLabel; public static readonly NSString Key = new NSString ("KittenCell"); private MvxImageViewLoader imageLoader; public KittenCell () { CreateLayout (); InitializeBindings (); } public...

iOS webview height pin (xamarin or code)

ios,monotouch,xamarin
I have a Xamarin iOS app that is created with a storyboard. The storyboard is set to view as iPhone 5. I have a webview as below that fits the screen fine. When run on an iPhone 6 plus, it seems to grow fine and fills the entire iphone 6...

Monotouch Dialog - Multi line RootElement

monotouch,xamarin,multiline,monotouch.dialog,dialogviewcontroller
I am using MonoTouch.Dialog to create a page in my Xamarin iOS app. I am trying to create a multi-line RootElement by leveraging the GetCell method. This works fine on load, but if you click to a different tab and back the element shrinks back to default size (also when...

UICollectionView Help What is the Best Way for adding section in MVVMCross Xamarin?

monotouch,xamarin,mvvmcross
How to add Section headers in UICollectionView in Xamarin.iOS and MVVMCross. I just want to ask the best approach. I am searching from 2 days but unable to find any simple approach. My data is List and and Section Contain List My design looks like ...

Binding to Text property ios-unified not working

c#,binding,monotouch,xamarin,mvvmcross
I updated my xamarin ios-project to the unified API (64 Bit support). Everything worked as expected. The project builds and works. But I detected one problem. The binding to UILabel.Text properties won't work anymore. All other bindings are still working (to a UIButton.Hidden property for example). Here is my code:...

Creating an assembly from Xamarin (or Module), then importing it into Swift?

swift,monotouch,xamarin
That would be the million dollar question! Is it possible to create an assembly in Xamarin (C#) for IOS, then import that into a Swift project? I am getting really into Swift and I know there are some major things that I am still missing such as the ease of...

Policy Handle issues in conjunction with Refit package and Xamarin

c#,monotouch,xamarin,mvvmcross,refit
I have set up my Xamarin core project with a lot of the tips I read from here. I have a simple service that I'm using to see if an entered url for a server is valid: IValidateUrlService I'm trying to use the Polly library to do something like this:...

'Cannot Decode' error when trying to save file using AVAssetExportSession when using Xamarin

monotouch,xamarin,avfoundation,avassetexportsession
I ported this example: of overlaping video to Xamarin. When i use this AVMutableComposition in AVPlayer i can watch edited video. But when i try to save it using AVAssetExportSession i always get 'Cannot Decode' error. I tried every preset and every file type and it doesn't help. I also...

Xamarin iOS Black screen only after update UnifiedAPI. apparently all resources not loading

monotouch,xamarin
After migrate Xamarin iOS project to Unified API, the app shows black screen only. Apparently all resources are not loaded at all. Not only all images including icon, splash are not loaded, but also all XIBs are not loaded. Now only default black window screen is shown. Any advice to...

Xamarin UISwipeGestureRecognizer Renderer

c#,monotouch,uigesturerecognizer,xamarin.forms
In Xamarin.Forms I want to be able to swipe left and right to navigate a list of pictures. At the moment I just want to be able to fire an event each time a swipe is detected. child class to be used in the renderer: public class LRMasterDetailPage : ContentView...

How to show alert message from UIViewController using UIAlertController

c#,ios8,monotouch,xamarin
I'm trying to display message using UIAlertController in my UIViewController. Using VisualStudio 2015 CTP 5... Used samples from: http://forums.xamarin.com/discussion/26404/uialertcontroller-question-for-ipad http://www.hjerpbakk.com/blog/2014/11/23/from-uialertview-to-uialertcontroller-using-xamarin-and-async-await https://gist.github.com/Sankra/622e5855f95189e13d77 Based on samples above I have this so far: public partial class MyViewController : GenericViewController //inherits from UIViewController { ..... public async override void...

How do I rotate an image from a file with Xamarin on iOS

ios,image-processing,monotouch,xamarin,uiimage
I have been trying to rotate an image for a couple days now, but the best I get is still a black image. I suspect it may have something to do with the point I'm rotating around but I'm not sure. I say that because I tried the whole solution...

How to run mtouch command to launch Xamarin.iOS app on simulator for automated testing?

testing,xamarin,monotouch
I am new to Xamarin and I need to be able to launch a Xamarin iOS app on iOS simulator from command line. I have tried running mtouch but obviously am missing on something as I am not able to successfully launch the app on simulator. I don't know if...

Xamarin.Forms: Custom renderer for displaying disclosure indicator on UITableViewCell

c#,ios,uitableview,monotouch,xamarin.forms
I want to show a disclosure indicator on my table view cell for iOS. I found this thread and a custom renderer has been proposed. I tried this: [assembly: ExportRenderer (typeof (EmployeeCell), typeof (EmployeeCellRenderer))] namespace HelloXamarinFormsWorld.iOS { public class EmployeeCellRenderer : Xamarin.Forms.Platform.iOS.ViewCellRenderer { public override UITableViewCell GetCell (Cell item, UITableView...

When making requests with parse an exception is thrown with the message “This header must be modified with the appropiate property.”

parse.com,monotouch,xamarin,monodroid
I'm working on a project with a parse backend. I have run into an issue where I always get an exception when making requests on Android. [mono] System.ArgumentException: This header must be modified with the appropiate property. [mono] at System.Net.WebHeaderCollection.CheckRestrictedHeader (System.String headerName) [0x00000] in :0 [mono] at System.Net.WebHeaderCollection.Set (System.String name,...

Autolayouts in UIScrollView using Cirrious.FluentLayouts.Touch

ios,uiscrollview,xamarin,monotouch
I've to do a ViewController with autolayouts in scrollView, but here is few problems: public SomeVC() : UIViewController { _mainScrollView = new UIScrollView { ShowsHorizontalScrollIndicator = false, ShowsVerticalScrollIndicator = true, BackgroundColor = UIColor.Clear, ScrollEnabled = true, AutoresizingMask = UIViewAutoresizing.FlexibleHeight, TranslatesAutoresizingMaskIntoConstraints = true }; _userDataTableView = new UITableView(CGRect.Empty, UITableViewStyle.Grouped); _userDataTableView.LayoutIfNeeded(); _saveButton...

Implementing cell reuse for varying height cells in UITableView (iOS8+)

monotouch,mvvmcross
I have a custom cell layout, inheriting from MvxTableViewCell. One of the cell's contained views is a UILabel that supports text wrapping. The wrapping will mean the cells can be of different heights as that is driven by how much text is in each data item. The custom table cell...

iOS Project Fails to Compile

monotouch,xamarin,mvvmcross
When compiling iOS project developed with MvvmCross version 3.5.0, I get the following error: Failed to resolve "Foundation.NSDate Foundation.NSDate::op_Explicit(System.DateTime)" reference from "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065"...

How to show iOS add contact screen from Xamarin Forms?

xamarin,monotouch,xamarin.forms
I'm trying to show the iOS add contact screen using Xamarin Forms. From what I can see Xamarin Forms does not support this out of the box but Xamarin iOS does. Unfortunately I can't get them to work together. What I mean by "together" is that I need get access...

Environment.GetFolderPath(Environment.SpecialFolder.Personal) is returning different paths in different location

c#,ios,monotouch,xamarin
when i use Environment.GetFolderPath(Environment.SpecialFolder.Personal) in appDelegate of .ios project , i get a path say path1. same code when used in .core project , the path i get is different path than path1 . Can anyone explain, why the paths are different when same code is used in two different...

Translate Objective-C to Xamarin - Blur Image

objective-c,monotouch,xamarin
I'm trying to create a blur effect in an iOS Xamarin project and I found an example article that has a very good explanation and seems to be what I want to do but it is written in Objective-C. I know there are probably a thousand ways to do this...

how to put a private use character in string with xamarin

c#,fonts,xamarin,monotouch,monodroid
I want to use some icons from the metro font (http://metroui.org.ua/font.html) on my Xamarin project, I can't find a solution to put a character in private use on my string, it's always replace by a square with a ? inside. If anyone know how I can put special character, it...

Conditional Binding of Properties using MVVMCross

c#,ios,xamarin,monotouch,mvvmcross
What is the best way to implement the following using mvvmcross binding: if (ViewModel.NumberOfUsers > 1) set.Bind (NumberOfUsersLabel).To ("NumberOfUsers + ' Users'"); else set.Bind (NumberOfUsersLabel).To ("NumberOfUsers + ' User'"); Thanks a lot for your help!...

How to Change the MenuItem Colors of Forms ViewList in iOS ViewCellRenderer?

ios,xaml,monotouch,xamarin,xamarin.forms
Is there any way to Change the color of ContextAction Menus added in Xamarin.Forms Xaml file. IsDestructive="True" sets the menu color to Red. But i need another menu to look like Green or some other color. Here is my Forms Xaml code.. <ListView x:Name="planList" ItemsSource="{x:Static local:SampleData.PLAN_DATA}" RowHeight="150" HorizontalOptions="FillAndExpand"> <ListView.ItemTemplate> <DataTemplate>...

Hosting and initialising multiple MVVMCross ViewModels for the MvxTabViewController

monotouch,mvvmcross
I need to create a Tab view in iOS. I tried to do this by simply adding a UITabBar to an MvxViewController but I could not get that to work (See this question if interested) I am now trying to go use the approach MVVMCross and Apple seem to push...

Xamarin Forms PCL Consuming WCF does not always return a value

c#,wcf,xamarin,monotouch
I have a simple WCF service that is validating a login and return an object representing a user. It is being run with a Xamarin Forms PCL project. When I click the login button, the returned object returns null the first time, but when pressing a second time it returns...

Can Xamarin create an object instance by class name?

monotouch,xamarin,monodroid
In Xamarin Android, is it possible to create an instance of an object from the class name? For example if my class is Foo, I would like to do this: ObjectHandle handle = (Foo)System.Activator.CreateInstance(null, "Foo"); Foo foo = (Foo)handle.Unwrap(); foo.PartyOn(); The class Foo is in the same project (the main...

Web service call missing field value xamarin IOS

ios,web-services,monotouch,xamarin
I'm having a web reference which is being used by both a Xamarin IOS application, Xamaring Android application, and a Windows Store application. And this all worked very well, until I updated Xamarin. Now, there is a field that But it works fine for the Android and Windows applications. I...

Xamarin lost custom objc categories (unrecognized selector sent to instance) on device only

c#,ios,xamarin,monotouch
The situation: I have a custom category defined in my objc static library: @implementation UIViewController (Colorful) -(void)changeColor:(UIColor *)color { self.view.backgroundColor = color; } @end It is bind to Xamarin project: [Category, BaseType(typeof(UIViewController))] interface UIViewController_Colorful { [Export ("changeColor:")] void ChangeColor(UIColor color); } This category is used in code like this: public...

ios8 and iPhone 6 Plus Tab Bar Size

objective-c,ios8,monotouch,xamarin,iphone-6-plus
I am bulding an iOS8 app and i have noticed that on the iPhone 6 Plus my TabBars and Navigation bars are bigger than the stock Apple apps. I cant seem to find any documentation for this. How do i tell my top and bottom bars to resize for the...

Draw method of subclassed UIView (child of another subclassed UIView) not called

c#,ios,uiview,xamarin,monotouch
I have a subclassed parent UIView object which should add another subclassed UIView. This is the UIView I want to add and where the Draw method is not called: public class Circle : UIView { private UIColor color; public Circle () { this.color = UIColor.Black; this.BackgroundColor = UIColor.Clear; } public...