Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I'm doing a feasibility analysis for an upcoming project.

One of the requirements is to inject client specific code onto selected devices without having to include all the code at the time of build/publish.

The client code would then be added to a protocol stack and be processed along with a number of other pre-existing providers.

In .Net you would do something like this. Is there an equivalent for iOS?

C#
public Stack<IFoo> ProtocolStack;

public interface IContext { }

public interface IFoo {
  void Process(IContext bar);
};

public void InjectCode(string assemblyLocation, string className)
{
  System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFile(assemblyLocation);
  IFoo provider = (IFoo)assembly.CreateInstance(className);
  ProtocolStack.Push(provider);
}
Posted
Comments
Stephen Hewison 2-Dec-15 4:15am    
Bump!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900