Forum Xamarin.Forms

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Is it possible to build multiple apps from the same source code (Single Project) in xamarin forms

DarshanJSDarshanJS USMember ✭✭✭✭

Hi Guys ,

Is it possible to build multiple apps from the same source code in Xamarin forms
i.e i want to make some changes like login page and want to build different apps for different clients but the same code

i want to build in both Android and ios platforms using Xamarin Form

Please guide me unless i can't start the project

Thanks in Advance.

Answers

  • ankushguptaankushgupta USMember ✭✭

    yes, you can build multiple apps from the same source code.

  • ArtdemsArtdems FRMember ✭✭

    the goal of Xamarin.Forms is to bild multiple apps from the same code, or I don't understand your question.

  • DarshanJSDarshanJS USMember ✭✭✭✭

    @ankushgupta said:
    yes, you can build multiple apps from the same source code.

    Thanks for your reply but how, in ios using same signature can we build different apps

  • ArtdemsArtdems FRMember ✭✭

    Just, what do you mean by "different application with the same code"

  • DarshanJSDarshanJS USMember ✭✭✭✭

    @Artdems said:
    the goal of Xamarin.Forms is to bild multiple apps from the same code, or I don't understand your question.

    Bro you are not getting my question, i am not asking about different platform i am asking about building apk for same project for multiple clients but Some of the UI will change in that project.

    consider one app like Facebook i want to build same project of Facebook with different login page for different clients

  • ArtdemsArtdems FRMember ✭✭

    Ok, sorry. So I don't know how to do, my bad

  • DarshanJSDarshanJS USMember ✭✭✭✭

    @Artdems said:
    Ok, sorry. So I don't know how to do, my bad

    It's OK Bro if you came to know about this please reply

  • ArtdemsArtdems FRMember ✭✭

    Just to understand, you want a different view, or just different information for each user?

  • DarshanJSDarshanJS USMember ✭✭✭✭

    @Artdems said:
    Just to understand, you want a different view, or just different information for each user?

    ya i have to maintain different Database but working should be same along with that login page is different for different clients.

  • JohnHJohnH GBMember ✭✭✭✭✭

    Yes I do this in one of my solutions. I have 2 iOS projects, each one represents a different app on the app store. When building a specific app I select the appropriate start up project, for example. They use the same source code but behave differently.

  • lai0723lai0723 Member ✭✭

    can i know how? I got 2 android app but eventually it compile as one

  • JohnHJohnH GBMember ✭✭✭✭✭

    @lai0723 said:
    can i know how? I got 2 android app but eventually it compile as one

    Did you not read the post immediately above yours?

  • Saraswati_ChandraSaraswati_Chandra USMember ✭✭✭

    Yes you can have this in xamarin.Forms application
    You can have your App1 and App2 using the same code base.

  • hennehenne Member ✭✭
    edited May 2018

    I think the missing phrase in this discussion is "reuse source code in different cross-platform apps". The easy way to do this is to create different "Shared Projects" (see the one project in your cross-platform solution), save them to a location that is more appropriate for library projects and add references to them in all your starting applications (all platforms) of your apps.

    Furthermore a cross-platform NuGet-package realizes the same idea and leads to a more library-like solution.

    And..
    All the code in your Shared Projects that uses third-party libs and NuGets makes it necessary that all your starting applications have to refer to this libs.

  • DarshanJSDarshanJS USMember ✭✭✭✭

    Sorry guys, i asked this question last year at that time i was a beginner , all of the sudden i am getting replies after 1 year. In this one year, i got answer and i have created apps. Thanks for your valuable reply guys.

  • JohnHJohnH GBMember ✭✭✭✭✭

    @DarshanJS said:
    Sorry guys, i asked this question last year at that time i was a beginner , all of the sudden i am getting replies after 1 year. In this one year, i got answer and i have created apps. Thanks for your valuable reply guys.

    Ah yes, in this case it was @lai0723 that replied to your 1 year old thread rather than starting his/her own. And they didn't read the other replies on this thread...

  • S3CS3C Member ✭✭

    @DarshanJS Could you perhaps give an indepth explanation of what is the best practise to do this.

    • In my case I want to create 4 different mutliplatform apps, where all of them would share all the classes.
    • They would also share layout on all pages, except they should each use different StaticResource colors manually taken from client's logo. Logos are different, but I don't mind having them all named "logo.png".
    • Each of them should also make an API call to different domain but same-named file on each domain for login.
    • Also if possible, I would also have some pages that would be shown on 1 of the apps, but not the others.

    Am I wanting to much?

This discussion has been closed.