1

I'm trying to migrate the application implemented using xamarin form and xamarin native.

For example application has four screens out of it two screens(screen1,screen2) implemented using xamarin.form and other two(screen3, screen4) using xamarin native(xamarin.android and xamarin.ios).

Now while migration able to migrate screen1 and screen2(Form) but facing challenges with screen3 and 4(Native).

Can we use the existing screens implemented using storyboard for iOS and xml layout for Android. As of now storyboard initialization using Storyboard.InstantiateViewController(..) as myViewController returns null.

Even getting resource path from bundle returns null

NSBundle.MainBundle.PathForResource(..)

For storyboard not able to set build action to InterfaceDefinition under maui project as this option not available inside Platforms iOS folder.

How can we add new Storyboard/Viewcontroller class to Platform/iOS ?

Any hints/example link for similar project migration will be helpful.

Update:

Recreating both viewcontroller and storyboard and moving to root directory with root namespace worked intialisation. Still facing some tableviewcell unknown key exception

4
  • You can check this doc. It tells Invoke platform code in details. Commented Oct 21, 2022 at 9:11
  • This one i already implemented. i'm looking for migration of screen implemented using using xamarin native(ex : iOS story board ). Commented Oct 21, 2022 at 10:40
  • @Suchith have you seen this? learn.microsoft.com/en-us/xamarin/xamarin-forms/platform/… Commented Oct 21, 2022 at 22:26
  • @Saamer Not looking for native view implementation in Form. Native views which are already implemented using storyboard need to migrate to MAUI. Commented Oct 25, 2022 at 6:52

1 Answer 1

1

Copy the code in the file named "LaunchScreen.storyboard" in the xamarin.ios project. Then create a xml file named "LaunchScreen.storyboard" in Platform\ios folder in the .net MAUI project, and Paste the code you copied into it.

Sign up to request clarification or add additional context in comments.

6 Comments

still facing the issue listed in the question. storyboard typecasting throwing error and NSBundle.MainBundle.PathForResource returns null. Created sample app here. drive.google.com/file/d/1c0C2pKZYg1m7WFcy1zQF0GHDOKKN2sLJ/…
@Suchith Could you upload the code to GitHub, I can't see the code from the link you provide. :(
Viewcontroller initialization working after moving storyboard and viewcontroller to root directory
@Suchith I am in the process of migrating a Xamarin.iOS storyboard and associated view controller to MAUI ,it would be great if you could share a sample app, how you do it for your project
@RaGibNoor What issue you are facing ?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.