Questions tagged [xamarin.ios]

Xamarin.iOS (previously known as MonoTouch) is a commercial software development kit for Mac OS X and Windows that lets you use C# (a .NET programming language) to create native applications for Apple iPhone, iPod Touch, iPad (iOS), Apple Watch (watchOS) and AppleTV (tvOS) devices.

Xamarin.iOS (previously known as MonoTouch) is a cross-platform implementation of Microsoft's CLI (.NET) that lets developers write "once" for iOS, OS X, Android, and Windows Phone in C#.

Xamarin comprises an IDE (Xamarin Studio for OS X and Windows), a plugin for Visual Studio, and libraries for each of the target OS's. Xamarin implements a hybrid approach to cross-platform development, whereby business logic exists in a shared core project, and the visual layer is implemented in platform-specific projects for each target platform.

Developers thus have access to advanced C# language features and libraries, as well as platform-specific UI libraries. To comply with Apple policy, iOS and OS X apps compile "all the way out" so as not to require a runtime.

16577 questions
24
votes
8 answers

No devices attached in xamarin VisualStudio for ios

I'm having real trouble when I try to use the IOS emulator from the visual studio. So I created a hello world app in VS using xamarin (latest stable version), I set the project as main project, and When I refresh the connexion with the mac, I can't…
clement
  • 4,204
  • 10
  • 65
  • 133
24
votes
5 answers

Is there a way to mix MonoTouch and Objective-C?

I'd like to know if there is a way to mix C# and Obj-C code in one project. Specifically, I'd like to use Cocos2D for my UI in Obj-C and call some MonoTouch C#-Library that does some computations and get some values back. Is there a way to do this?…
Kenny
24
votes
3 answers

Get DateTime.Now for a specific TimeZone regardless of the device timezone?

I have MonoTouch app which process data from a webservice. This data contains date information which is specific to a timezone. The timezone is UTC +12 which is for New Zealand. My app displays this data based on the current time. The problem with…
startupsmith
  • 5,554
  • 10
  • 50
  • 71
23
votes
2 answers

Cross Platform Logging in Xamarin

I am looking for either a logging utility such as NLog, Log4Net, etc... that will allow me to log in my Xamarin.Andriod, Xamarin.IOS, and a Xamarin.PCL project. All of the loggers I have looked at so far are not supported in the PCL projects for…
user3430360
  • 261
  • 1
  • 2
  • 6
23
votes
3 answers

UIViewController.View.Window is null in ViewDidLoad method

Regardless on which controller type (UIViewController, UITableViewController), the following line always yields null in the ViewDidLoad method: this.View.Window Is this behavior normal, or am I doing something odd? What could lead to…
Jonas Sourlier
  • 13,684
  • 16
  • 77
  • 148
22
votes
1 answer

How to port swift based cocoapods to Xamarin

I am trying to port cocoapods to xamarin. Objective C based cocoapods can be ported by converting it into a static library(.a) and subsequently converting that as binding library in xamarin studio or visual studio But Swift based cocoapods can not…
Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241
22
votes
3 answers

Xamarin build-times extremely slow

I have developed several (experimental and prototype) iOS apps using Xamarin and the new Visual Studio for Mac OS and the build-times intermittently take about 5-10 minutes on average. When starting a new project, build-times are fine. After a few…
Léon
  • 286
  • 1
  • 2
  • 7
22
votes
3 answers

Detecting when you're in/out of the main thread in Xamarin.iOS

Is there a way in Xamarin/MonoTouch to detect whether code is being called in the main thread? I'm looking for something like the equivalent of Java's EventQueue.isEventDispatchThread() -- I've found in Swing programming it's handy to assert that…
David Moles
  • 48,006
  • 27
  • 136
  • 235
21
votes
2 answers

.NET Unit test runner for iOS

Has anyone written (or know about) a .net unit-test runner, preference to NUnit, that runs on iOS ? or do I have to roll my own ? My goal is to execute the unit tests on the simulator or devices. So far I've seen quite a few posts / blogs on mocking…
poupou
  • 43,413
  • 6
  • 77
  • 174
21
votes
1 answer

iPhone MonoTouch - Get Version of Bundle

In MonoTouch, how can we get the version of the bundle currently running? My closest guess is somewhere in : NSBundle.MainBundle.ObjectForInfoDictionary
Ian Vink
  • 66,960
  • 104
  • 341
  • 555
21
votes
5 answers

UIView appereance from bottom to top and vice versa(Core Animation)

My goal is to understand and implement feature via Core Animation. I think it's not so hard,but unfortunately i don't know swift/Obj C and it's hard to understand native examples. Visual implementation So what exactly i want to do(few steps as…
XTL
  • 1,452
  • 2
  • 17
  • 40
21
votes
2 answers

Xamarin Notification Service Extension issue

I have an issue with Notification Service Extension. I have followed step by step…
Luigi Saggese
  • 5,299
  • 3
  • 43
  • 94
21
votes
2 answers

Do I need to create a new SQLite database every time an application is updated?

I have a Xamarin Forms application I would like to develop. It will have a SQLite database and I wish to make this available on iOS and Android. The database will be populated with data from a SQL Server database on the cloud with initial seed…
Alan2
  • 23,493
  • 79
  • 256
  • 450
21
votes
6 answers

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

I have the following XAML Xamarin.Forms.Button
sgarcia.dev
  • 5,671
  • 14
  • 46
  • 80
21
votes
6 answers

UIImagePickerController AllowsEditing not working

I am using UIImagePickerController to allow the user to take a picture. I want to allow him/her to edit it afterwards but, whatever I do, I get nothing. Here is my code (I am using Xamarin): UIImagePickerController imagePicker = new…
Amit Raz
  • 5,370
  • 8
  • 36
  • 63