xamarin.ios - Xamarin - Using Portable Class Libraries a mandatory way to go? -


recently requested setup design new app, needs build using xamarin. team created demo app android, ios , windows phone. demo version needs transformed/refactored proper maintainable product.

when looking code implemented in demo app, found out third party libraries used not available pcl. means cannot build app using pcl's unless can port third party library pcl.

my findings are:

  • the functionality use third party library works fine on 3 platforms
  • i cannot find blocking reason why should not use normal class libraries

questions:

  • are there blocking reasons why cannot make use of normal class libraries?
  • will public apps stores accept these apps or not issue @ all?
  • if not.. can give recommendations take care of going normal class library's
  • if there are.. how can port third party libraries pcl or there other way work around?

first: public app stores don't care internals of app, long follows guidelines. , that's xamarin takes care of, dropping out of compiler okay.

second: you're totally fine not using pcl if fits needs in better way. in addition pcl make use of shared projects or linking files common library projects each platform-specific project.

but personal experience pcl way make sure code you're writing , tools you're using working on every platform, don't have afraid of bad surprises afterwards. , pcl profile 78 support of stuff linq etc. pretty good.

what can in addition, use facade inside shared pcl code, hides away concrete implementation, provided each platform individually.

that like:

(pcl)

public interface ilogger {     void log(string message); }  public static class sharedutilities {     public static ilogger logger { get; private set; }      public static void setup(ilogger logger)     {         logger = logger;     } }  // use everywhere in code: sharedutilities.logger.log("hello pcl!"); 

in ios app, example:

public class ioslogger : ilogger {     public void log(string message)      {         // make use of native logging library or whatever want     } }  // appdelegate: sharedutilities.setup(new ioslogger()); 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

node.js - How to abort query on demand using Neo4j drivers -