Xamarin Whitelabel应用程序

编程入门 行业动态 更新时间:2024-10-27 18:29:15
本文介绍了Xamarin Whitelabel应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在为我的项目研究Xamarin解决方案.

I'm investigating Xamarin solution for my project.

项目要求是:

  • IOS应用

  • IOS app,

Android应用

MacOS应用

Windows 7,8,10应用程序.

Windows 7,8,10 app.

我已经基于MvvmCross构建了测试解决方案,并且效果很好.

I already build test solution based on MvvmCross and it works fine.

我的问题是,如何为所有基于我的测试解决方案的平台构建白标应用程序?在这些应用程序中,我将仅更改资源,例如字符串,图标,字体等,但逻辑,视图和UI相同.

My question is, how can I build whitelabel apps for all platforms that will be based on my test solution? In those apps I will change only resources, such as Strings, icons, fonts...and so on, but logic, views and UI will be the same.

有没有办法像android中的gradle(构建变体)那样做?

Is there any way to do it like gradle in android (build variants) ?

推荐答案

MSBuild 具有很多功能,并且可以实现与 gradle 的构建变体类似的功能.但是,如果您没有 MSBuild 的背景知识,那么深入研究这些东西就很复杂.

MSBuild has a lot of features and can certainly achieve something similar to what gradle has with build variants. However, it is complicated to dive into that stuff if you don't have a background with MSBuild.

我认为这可能是更简单的方法(以及我会做的事情):

I think this might be the easier approach (and what I would do):

  • 使用项目来组织一切
  • 将所有跨平台代码保留在共享项目(或PCL)中
  • 在每个平台的共享项目中保留所有Windows,iOS,Android专用代码
  • 为应用程序的每个样式/平台创建一个启动项目,并引用共享项目.如果您愿意,可以为应用程序的每种样式添加预处理器定义.

在启动项目中,您可以包括不同的字符串资源,图像等.此外,还请研究如何在Visual Studio/Xamarin Studio中使用文件链接",因为这将帮助您摆脱困境(尤其是如果您的应用程序的不同风格会以不同的方式发生变化.

In the startup projects you can include different string resources, images, etc. Also look into how to use "file-linking" in Visual Studio/Xamarin Studio, as it will help you out of tight spots here--especially if the different flavors of your app vary in different ways.

更多推荐

Xamarin Whitelabel应用程序

本文发布于:2023-10-07 01:32:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1468063.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   Xamarin   Whitelabel

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!