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
327
votes
11 answers

Looking to understand the iOS UIViewController lifecycle

Could you explain me the correct manner to manage the UIViewController lifecycle? In particular, I would like to know how to use Initialize, ViewDidLoad, ViewWillAppear, ViewDidAppear, ViewWillDisappear, ViewDidDisappear, ViewDidUnload and Dispose…
Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
274
votes
14 answers

How to decide between MonoTouch and Objective-C?

After sitting through a session today on Mono at a local .Net event, the use of MonoTouch was 'touched' upon as an alternative for iPhone development. Being very comfortable in C# and .Net, it seems like an appealing option, despite some of the…
jamesaharvey
  • 14,023
  • 15
  • 52
  • 63
155
votes
18 answers

Is MonoTouch now banned on the iPhone?

A recent post by John Gruber notes that the following legalese: 3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Has been revised as follows: 3.3.1 — Applications may…
tom greene
  • 5,361
  • 9
  • 39
  • 52
125
votes
13 answers

Check whether or not the current thread is the main thread

Is there any way to check whether or not the current thread is the main thread in Objective-C? I want to do something like this. - (void)someMethod { if (IS_THIS_MAIN_THREAD?) { NSLog(@"ok. this is main thread."); } else { …
fish potato
  • 5,319
  • 6
  • 27
  • 32
122
votes
10 answers

How can I launch multiple instances of MonoDevelop on the Mac?

I would like to open a new MonoDevelop instance to work on a different project on the Mac, and the OS is currently preventing me from opening a new instance.
miguel.de.icaza
  • 32,654
  • 6
  • 58
  • 76
86
votes
16 answers

How to force a UIViewController to Portrait orientation in iOS 6

As the ShouldAutorotateToInterfaceOrientation is deprecated in iOS 6 and I used that to force a particular view to portrait only, what is the correct way to do this in iOS 6? This is only for one area of my app, all other views can rotate.
Neal
  • 9,487
  • 15
  • 58
  • 101
83
votes
11 answers

Can I use a UIRefreshControl in a UIScrollView?

I have about 5 UIScrollView's already in my app which all load multiple .xib files. We now want to use a UIRefreshControl. They are built to be used with UITableViewControllers (per UIRefreshControl class reference). I do not want to re-do how…
SirRupertIII
  • 12,324
  • 20
  • 72
  • 121
69
votes
2 answers

HW kbd Failed to set (null) as keyboard focus ios

In my iOS app crash log I found this statement: HW kbd Failed to set (null) as keyboard focus ios Does anyone know what is this and how to resolve it?
Waris Shams
  • 1,606
  • 1
  • 15
  • 27
59
votes
13 answers

Could not find any available provisioning profiles for iOS

We are developing a iOS shopping cart application in c# and visual studio 2017 for xamarin. I have an iPad Air iOS 10.3, when I try to publish to real device, I am getting the following error message: "Could not find any available provisioning…
P.Thiyagu
  • 917
  • 2
  • 7
  • 15
57
votes
3 answers

How to know the current OS / platform of the executing code (Android / iOS)

Using Xamarin.Android and Xamarin.iOS, I need to now the current OS in a shared code section. Be it an enum, an int or a string, it doesn't matter. I tried this: System.Environment.OSVersion Which is always "Unix" with some kernel version…
Askolein
  • 3,250
  • 3
  • 28
  • 40
55
votes
5 answers

Xamarin iOS memory leaks everywhere

We've been using Xamarin iOS for the last 8 months and developed a non-trivial enterprise app with many screens, features, nested controls. We've done our own MVVM arch, cross platform BLL & DAL as "recommended". We share code between Android and…
Herman Schoenfeld
  • 8,464
  • 4
  • 38
  • 49
52
votes
5 answers

Publishing to TestFlight, new testers, do I really need to rebuild/download my provisioning profile?

I have published an app through the testflight website to allow my colleagues to test, and as more and more of them opens the initial email and find time to go through the registration process, testers are trickling in on my testflight…
Lasse V. Karlsen
  • 380,855
  • 102
  • 628
  • 825
50
votes
10 answers

com.apple.AuthenticationServices.Authorization Error Code 1000

I receive the following error in DidCompleteWitherror: com.apple.AuthenticationServices.Authorization Error Code 1000 I'm using the following code to sign in to Apple var appleIdProvider = new ASAuthorizationAppleIdProvider(); var request =…
50
votes
2 answers

How to prevent iOS crash reporters from crashing MonoTouch apps?

There are plenty iOS crash reporting libraries in iOS, including TestFlight and HockeyApp. If you don't want to depend on services, you can still use libraries like PLCrashReporter. Binding these libraries is fairly trivial because their public API…
Dan Abramov
  • 264,556
  • 84
  • 409
  • 511
48
votes
4 answers

Anyone have experience with architecture for cross platform WP7 Android iOS mobile development (monotouch, monodroid, C#)

This question is specifically related to a recommended architecture and people's previous experiences for cross-platform WP7, iOS, Android apps developed using C#, Monotouch and Monodroid respectively. I have researched previous questions here,…
1
2 3
99 100