Bug 6096 - InputView does not get called on device but works on Simulator
Summary: InputView does not get called on device but works on Simulator
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- major
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on: 1353
Blocks:
  Show dependency tree
 
Reported: 2012-07-12 12:03 UTC by Chris Hardy [MSFT]
Modified: 2012-11-06 09:25 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Chris Hardy [MSFT] 2012-07-12 12:03:48 UTC
When wanting to use a custom keyboard, you can override the InputView property when subclassing a UITextField, doing this on Xcode causes the "empty view" to be used as a keyboard on both simulator and device (to know it was called, a NSLog value is used) but on MonoTouch, the simulator displays the Console.WriteLine message but when it is deployed to device, the InputView is not overridden and the default keyboard is used.

Here's the Xcode project: https://www.dropbox.com/s/6qgt7vfgcjnd0xo/InputViewOverriding-Xcode.zip
Here's the MonoTouch project: 
https://www.dropbox.com/s/1lo57ijig1l5zj8/InputViewOverriding-MonoTouch.zip

This was tested using MonoTOuch 5.3.5.
Comment 2 Sebastien Pouliot 2012-07-16 11:05:30 UTC
The MyUITextField is not even created on device (e.g. adding CWL inside .ctors). Switching to "Don't link" did not change anything on devices.

It could be a registration issue (c.c. Rolf) or something related to the XIB.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-07-16 13:44:10 UTC
Yep, registration issue. Passing --noregistrar to mtouch makes it work.
Comment 4 Marek Safar 2012-08-14 18:05:44 UTC
Fixed in master
Comment 5 Rolf Bjarne Kvinge [MSFT] 2012-10-02 18:43:58 UTC
Backported to ios6:

master: acbd9c141a172693b71dac73dddb625ec6b47152.
ios6: ab756836ec33a8dc49dde88b5a80bbc52415e8ac.
Comment 6 Michael Rutherford 2012-11-02 16:39:00 UTC
This is not working in the latest everything on the physical device.
Comment 7 Chris Hardy [MSFT] 2012-11-02 16:44:03 UTC
Michael,

Can you provide the MonoDevelop Version Info so we know what the latest "everything" is, since we have multiple stable and beta versions out to the public.
Comment 8 Rolf Bjarne Kvinge [MSFT] 2012-11-02 18:42:36 UTC
This is not the same bug as before, since the workaround in comment 3 doesn't work now.

Still trying to find out what's happening though.
Comment 9 Rolf Bjarne Kvinge [MSFT] 2012-11-02 18:47:32 UTC
Workarounds (on my iPad3):
- If app is iPhone/iPod: click 2x twice.
- If app is iPad or Universal the problem doesn't appear.
Comment 10 Rolf Bjarne Kvinge [MSFT] 2012-11-02 18:51:31 UTC
From the workaround it seems similar to bug #7410 (comment #14).
Comment 11 Michael Rutherford 2012-11-02 19:12:12 UTC
iPhone 5: 6.0.1 (10A525)
iPad mini: 6.0.1 (10A523)
MonoDevelop: 3.0.4.7
MonoTouch: 6.0.4
Runtime: Mono 2.10.9
Xcode: 4.5.2 (4G2008a)
Using the test project in Chris's original comment
I'm building a universal storyboard app.
The bug is happening on the iPad mini and the iPhone 5 (I don't see the 2x button)
Comment 12 Michael Rutherford 2012-11-02 19:28:30 UTC
Tried the project on iPad Wi-Fi + 4G (LTE/CDMA) with 6.0.1 (10A523) - poked the 2x button and still got the standard keyboard. Tried my own project (universal storyboard app) and this showed the standard keyboard as well.
Comment 13 Rolf Bjarne Kvinge [MSFT] 2012-11-02 19:47:00 UTC
Michael, 

Have you tried adding --noregistrar in the additional mtouch arguments in the project's iPhone Build options?
Comment 14 Chris Hardy [MSFT] 2012-11-02 20:15:28 UTC
Using my repro project, it displayed the Console.WriteLine message every time.

iPhone 5: 6.0.1 (10A525)
iPad mini: 6.0.1 (10A523)
MonoDevelop: 3.0.5 (in Beta channel)
MonoTouch: 6.0.6 (in Beta channel)
Runtime: Mono 2.10.9
Xcode: 4.5.2 (4G2008a)

So I wonder if it's worth getting 6.0.6 installed to see if that resolves the issue.
Comment 15 Michael Rutherford 2012-11-02 20:34:47 UTC
I'll download the 6.0.6 and try that tomorrow morning. Also, I can try the --noregistrar (does this have any side-effects I should be aware of?). Thanks!
Comment 16 Rolf Bjarne Kvinge [MSFT] 2012-11-06 08:54:12 UTC
Michael, did 6.0.6 work for you?
Comment 17 Michael Rutherford 2012-11-06 09:10:13 UTC
6.0.6 is working perfectly. Thanks for all the help :)