3

I am creating schemas(To differentiate between development & production environment) for my iOS application which uses IBM MobileFirst platform. I need to provide different values for PROTOCOL, HOST & PORT based on the selected schema value.

For Production Schema values should be as follows:

PROTOCOL : HTTPS  
HOST: PRODUCTION HOST NAME  
PORT: PRODUCTION PORT  

For Development Schema values should be as follows:

PROTOCOL : HTTP  
HOST: DEVELOPMENT HOST NAME  
PORT: DEVELOPMENT PORT  

As per the IBM mobilefirst development We need to place the above mentioned values in the mfpclient.plist file.

jkalden
  • 1,548
  • 4
  • 24
  • 26
Rameez
  • 312
  • 4
  • 20
  • 1
    Can you further elaborate on what exactly you are trying to differentiate and what you have done thus far? Please edit the question. Also mention your IBM MobileFirst version... – Idan Adar Feb 09 '17 at 07:19

1 Answers1

0

There is no need to manually update the .plist file of the application or create different "schemas".

What you should do is as follows:

  1. Define the server profiles of your development and production servers in the MobileFirst CLI.

    • From command-line, run: mfpdev server info. This will show you the current list of server profiles.
    • Now run mfpdev server add to another server profile. Learn how to add server profiles
  2. Once you have server profiles for development and production, whenever you want to "switch" your application to connect to either way, you simply need to register the application with the required server.

    • To register with the default server: mfpdev app register
    • To register to a specific server profile: mfpdev app register replace-with-server-profile-name

When you register the application, this command updates the .plist file with the required properties (host, port, etc...).

Idan Adar
  • 44,156
  • 13
  • 50
  • 89