Latest1.0.7
Homepagehttps://github.com/RoleModel/RMSHostSelector
LicenseMIT
Platformsios 5.0, requires ARC
Authors

RMSHostSelector

Manages server selection for iOS apps

Use RMSHostSelector to allow user-selection of a server host when
testing/debugging iOS apps. Host choices are defined in a Hosts.plist
file that you add to your app’s resources. Each host is defined as a
key/value pair (i.e. production => myserver.com)

Release builds should not permit user-selection of a back-end server.
For these builds, preference is given to the production key in the
Hosts.plist file. All other keys will be stripped out of the bundled
Hosts.plist file and the user will not be prompted for server selection.
The special handling is performed by the host_selector_build_phase.sh
that must be added as a "Run Script" build phase in order to take
effect.

A key other than production can be coerced by defining the
RMS_HOST_KEY preprocessor macro. The value specified by this key must
be quoted and must match one of the keys in the Hosts.plist file.

Non-release builds can also make use of the RMS_HOST_KEY override. For
non-release builds where RMS_HOST_KEY is defined, the Hosts.plist file
is left in tact, but user-selection of the host is circumvented.

Custom Build Phase

Once you’ve installed this CocoaPod, you’ll need to set up a custom
build phase to incorporate host_selector_build_phase.sh into your
project. Do this by navigating to the application target in Xcode
and selecting Add Build Phase -> Add Run Script Build Phase from the
Editor menu.

Add run script build phase

Then, in the shell script entry area for the newly
added run build phase enter the following:

"${SRCROOT}"/Pods/RMSHostSelector/Resources/host_selector_build_phase.sh

That’s all you need to do to get the default behavior, provided that
your Hosts.plist file contains an entry for the production host.

Run script configuration

Latest podspec

{
    "name": "RMSHostSelector",
    "version": "1.0.7",
    "summary": "Helper class for selecting server hosts in iOS apps",
    "description": "RMSHostSelectorn===============nnManages server selection for iOS appsnnUse `RMSHostSelector` to allow user-selection of a server hostnwhen testing/debugging iOS apps. Host choices are definednin a Hosts.plist file that you add to your app's resources.nEach host is defined as a key/value pair (i.e. production => myserver.com)nnRelease builds should not permit user-selection of a back-end server.nFor these builds, preference is given to the `production` keynin the Hosts.plist file. All other keys will be stripped outnof the bundled Hosts.plist file and the user will not be promptednfor server selection. The special handling is performed by then`host_selector_build_phase.sh` that must be added as a "Run Script"nbuild phase in order to take effect.nnA key other than `production` can be coerced by defining then`RMS_HOST_KEY` preprocessor macro. The valuenspecified by this key must be quoted and must match one of thenkeys in the Hosts.plist file.nnNon-release builds can also make use of the `RMS_HOST_KEY` override. nFor non-release builds where `RMS_HOST_KEY` is defined, the Hosts.plist nfile is left in tact, but user-selection of the host is circumvented.n",
    "homepage": "https://github.com/RoleModel/RMSHostSelector",
    "license": "MIT",
    "authors": {
        "Tony Ingraldi": "[email protected]"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source": {
        "git": "https://github.com/RoleModel/RMSHostSelector.git",
        "tag": "1.0.7"
    },
    "source_files": "Source",
    "resources": [
        "Resources/*"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This