Questions tagged xamarin.ios

Explore the latest questions and answers asked by our top developers.

Detect AVPlayerItem Status change

This is my (Xamarin C#) code: (player is an AVPlayer.) var v = NSNotificationCenter.DefaultCenter.AddObserver(new NSString(“Status”), ReadyNow, player.CurrentItem); It never calls ReadyNow(NSNotification obj) even though the player plays fine. How do I fix it to call the method? (I don’t know if the error is in the Xamarin/C# part or in the object I’m using etc. […]

By ispiro
Categorised as c++, ios, xamarin, xamarin.ios

Xamarin iOS layout changes after adding launch screen storyboard

I inherited an old xamarin codebase. It launches in this strange windowed form with top and bottom black bars (pictured below). It also uses a launch image. As soon as I start using a launch storyboard, the app becomes fullscreen (no top/bottom black bars), and as a result, all the layout is messed up. Does […]

By xytor
Categorised as autolayout, ios, xamarin, xamarin.ios

Xamarin Forms: Editor acts weird on iOS when RTL text is pasted in comparison to Label

In Xamarin Forms, I created an Editor and a Label to test how RTL text appears in both. If I copy RTL text and paste it in the Editor, it looks weird whereas the Label looks right. <?xml version=”1.0″ encoding=”utf-8″ ?> <ContentPage xmlns=”” xmlns:x=”” xmlns:d=”” xmlns:mc=”″ mc:Ignorable=”d” x:Class=”App3.MainPage”> <StackLayout Orientation=”Vertical” Padding=”20,60″ Spacing=”20″ BackgroundColor=”Beige”> <Editor x:Name=”Editor” […]

By user246392
Categorised as ios, uitextview, xamarin, xamarin.forms, xamarin.ios

NSLayoutManager returns incorrect character index when tapping on LTR text in RTL attributed text

I wrote code to detect if the user taps within a specific range in UILabel. It seems to be working in most cases, but I have noticed that tapping the last line of an attributed text creates inconsistent results. public static bool DidTapRange(this UITapGestureRecognizer recognizer, UILabel label, NSRange range) { using (var ts = new […]

By user246392
Categorised as ios, nslayoutmanager, uilabel, xamarin, xamarin.ios

Not able to add an apple account to the visual studio 2017

I have an apple account with the admin role. Whenever I’m trying to add an apple account to visual studio, it displays “There was an error while trying to log in: A server with the specified hostname could not be found”. I updated Visual Studio 2017 also. Still, it displays the same error. Please help […]

By Priyanka
Categorised as account, connection, ios, visual-studio, xamarin.ios

iOS: NSMutableAttributedString.AddAttributes not rendered. (Xamarin)

I am trying to change the style of a link in a UILabel in Xamarin.iOS. I wrote the following code and the NSMutableAttributedString is updated correctly. However the updated style is not rendered. Am I missing something? I am testing on the iOS Simulator. mutableHtmlString.EnumerateAttribute(linkAttributeName, new NSRange(0, mutableHtmlString.Length), NSAttributedStringEnumeration.LongestEffectiveRangeNotRequired, (NSObject value, NSRange range, ref bool […]

By Matteo Bortolazzo
Categorised as ios, iphone, swift, xamarin, xamarin.ios

Xamarin iOS crash on startup after migrating from MvvmCross 4 to 5

After upgrading MvvmCross from version 4 to 5.1.1, I get the a TargetInvocationException at my entrypoint (UIApplication.Main(…)). This is the class: using UIKit; namespace sample { public class Application { // This is the main entry point of the application. static void Main(string[] args) { // if you want to use a different Application Delegate […]

By Yuri
Categorised as ios, mvvmcross, xamarin, xamarin.ios

Xamarin iOS Refreshing And Maintaining App Using BackgroundTasks

This is an attempt to use BGTaskScheduler in Xamarin.iOS. I have tried to run the sample Application from . Native version (both Swift,Objective C) is working fine. Platform Details Mac OS : Mac OS Mojave 10.14.6 XCode : Version 11.1 Device : iPhone 8 Plus | OS 13.1.2 Visual Studio : VS for Mac […]

By Don Chakkappan
Categorised as background-process, ios, ios13, xamarin.ios

Xamarin iOS Could not AOT the assembly Microsoft.EntityFrameworkCore.Migrations.Migration

We’ve added migrations to our xamarin forms project and ever since then we can’t deploy it to an iOS device. It will run on the simulator fine but will fail with AOT errors on deploying to device. It seems to be a fairly wide spread topic over the web but none of the ideas so […]

By matt
Categorised as ios, mono, xamarin, xamarin.forms, xamarin.ios

SSL Error while connecting through cellular connection

We have developed app iOS app using Xamarin. It’s working well in my test devices. My client is running into an issue of SSL error when he is using cellular connection. Same app is running perfectly fine when he is using Wifi connection. I am using Modern HTTP client to make web connection to use […]

By Iducool
Categorised as ios, xamarin.ios
1 2

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us