Xamarin Universal iOS app runs only on iphone - ios

I have a Xamarin iOS Universal app with simple forms in a Tabbed Controller (with three Tabs). The IDE am using is Visual Studio 2015 with Xamarin in it.
In each tab, I have simple UITextFields and the problem now is they appear only in iPhone in the Main.Storyboard. When I select "iPAD" under "View As", all the UI components disappear. (added screenshots of the IDE below)
Same happens when I run the app on simulators too. The app UI appears on iPhone simulators but not on iPAD simulator.
I understand that I do not need to explicitly do anything to make this run on an iPAD. Please correct me if am wrong, and help me on what to do to make this work.
Thanks.

Have you set Devices in info.plist as Universal ?
Also in Storyboard, for each of the UI Controls that are removed while selecting iPad check if that UI control is installed for All Size Classes.
Scroll to the bottom of properties Tab after selecting the widget and check if it is wAnyhAny.
Tutorial for size classes can be found in Xamarin's documentation

Related

Problems with device target for iOS app

)
Hello all :-)
I want to release an iPhone/iPod Touch only app. However, I know iPad users can still download the app from the app store, which is fine by me. I was simulating my app on simulator to see how it would look like on an iPad. When I simulated it, the app looked terrible: the layout was not the same as the iPhone version, some labels were colliding and buttons were "cut" out of the screen.
I want iPad users to have the same view as an iPhone. I believe a 1x/2x button would appear on the screen in that case. How can I do that?
Any help/advice would be really appreciated!
Thank you :-)
When you upload your app to the App Store it will also allow iPad users to download the iPhone version of the app. This will have the 1x/2x button you are looking for.
However if you test your project on the iPad simulator before you upload the app, it will not be the same iPhone version of the app that the iPad users will see. Instead the simulator will run an actual iPad version of the app which is not what your looking for.
In your project settings, set your target device to iPhone only. Upload the app. When iPad users download the app they will get the iPhone only version with the 1x/2x button for the iPad.
In your project settings, make sure the "Devices" settings is "Universal" (this is under "Deployment Info"). If it was not before, you may have to make some layout adjustments.
Use Autolayout for fixing the design issues
in storyboard right pane -> attribute inspector -> simulated metrics-> select inferred in size for all controllers
You should be seeing this in the simulator (note the letterboxing on all sides):
And your build settings should show 1 as the target device family:
If not, you are iPad-native and that's the source of the trouble.

Xamarin App Keyboard is a different size to iOS Keyboard

I'm developing an iOS app in Xamarin (not using Forms, using Xamarin.iOS) and I have noticed that the keyboard which appears in my Xamarin built app is larger than Keyboards which appear in other apps.
E.G. My app
E.G. Other iOS app (Apple Notes)
The numbers aren't really important, what is important is that there is definitely a difference in size between the two keyboards in terms of key height and key spacing.
There does not appear to be any obvious options or settings surrounding this. Trying different Keyboard Styles (I'm using "Default") does not solve the problem.
I would like to get my Keyboard to be the same size as a normal iOS App Keyboard.
EDIT
Krumelur's answer is correct.
This is how I specified the launch screens
https://stackoverflow.com/a/25960203/807836
In Visual Studio, there does appear to be an issue with this XML entry being lost if you edit the project file through the IDE.
This is not Xamarin related. Your app is running in compatibility mode on an iPhone5 or 6. You will have to provide a launch screen for the particular device or a launch image to let iOS know you support the bigger screen.
See here on how to use launch screens.

iPhone not showing same results as simulator

I have an app that was developed for iOS 4 and 5 and I migrated it to iOS7. When I test it on my iPhone 4 with iOS 7.1 is not showing the same results as the simulator.
Any suggestions?
Basically is not showing the initial segmented control, the map segmented control, the view associated with the control and it´s showing the scanner in a bigger size. The simulator showed the same issues before I restore the contents and settings in the simulator.
EDIT
If you watch very closely on the iphone it shows the segments and other elements of the view behind de navigation bar . But in the storyboard they appear right in the place that i want them. Is any form to consolidate my storyboard ??? Are any files that depend of the storyboard that i´m not including or generating.
The storyboard icon looks like black and also the .plist what does this means?
Simulator doesn't have the memory limitation as the device.
Simulator uses x86 arch, device uses ARM
It is a simulator, so it only "simulates" the behavior. Always test on device before submitting to the App Store.
Ok the problem was that i had installed the original app that is published in the app store. When I tested the current development on the iphone the existing app was replaced with the current one and that caused trouble. The solution was to delete the app from the device and then run again the current version of the app and that was all.

How to set app-icons in XCode 5?

I am using XCode 5.
I am properly setting up all app-icons in proper size and resolution.
When I run the app in iPhone Simulator, the app-icon displays correctly. But, when I change the simulator from iPhone to iPad, then the app-icons does not appear.
What could be the root cause of issue ?
Few Tests
Make sure you have set the icons for iPad as well.
If you have, you can probably stop the project, quit the simulator manually, clean, build and run the project by selecting iPad Simulator.
Make sure you have all the icons set -ie- iPhone and iPad specific. Following is the checklist for the same:
App Icons
Splash Screens
Hope this helps !!!
Icon size for iphone and ipad differs. Check here for apple's documentation
Click on project name.On the right side click General Tab and check whether you have added icons of correct resolution or not.
Icons for Universal Apps
Universal applications use the following icons. Items marked with "Required" must be included.
In addition to the above icons, universal applications with a deployment target of iOS 6.1 or earlier use the following icons. Items marked with "Required" must be included if the application's deployment target is iOS 6.1 or earlier.
more detail https://developer.apple.com/LIBRARY/IOS/qa/qa1686/_index.html

Convert from Universal App to iPhone?

I have a MonoTouch project from a year ago which was created as a universal app (but only programmed like a iPhone app. Just in case...) When I uploaded it on an iPad it was shown in this iPhone simulator.
I changed the Target from Universal to iPhone/iPod in the IPhone Application Settings in MonoDevelop to achieve this. This seems not to work anymore.
Now, when I updated to the latest verion of iOS and MonoTouch the iPad stays white nothing is shown. Which is traceable because i have no code in the AppDelegateIPad.
So my current project exists of the files:
AppDelegateIPad.cs
AppDelegateIPhone.cs
MainWindowIPad.xib
MainWindowIPad.xib.designer.cs
MainWindowIPhone.xib
MainWindowIPhone.xib.designer.cs
Main.cs
MainWindowIPhone.xib contains a NavigationController which will be added with window.AddSubview in AppDelegateIPhone.cs
What is the best, easiest way to convert the project to a iPhone only project. So it runs in the iPhone simulator on iPad?
Thanks in advance!
You can still keep it as a universal app and target iPhone or iPad only. I'm doing this too.
In Monodevelop go to Project Settings -> iPhone Application
In the "Devices" drop down select "iPhone".
In the section "iPhone Deployment Info" you will have to select the correct main interface. Pick your MainWindowIPhone.xib
That should be all.
If you really want to convert it and remove the code for iPad, follow the steps above, then start removing all iPad related stuff.
One more side note: you should not use window.AddSubview(rootController.View) anymore. Instead use window.RootViewController = rootController;

Resources