How-tos

How to run your apps locally and remotely in IBM Cloud Tools for Swift

Share this post:

Disclaimer: IBM Cloud Tools for Swift (ICT) is no longer supported. Check out IBM Cloud App Service to take advantage of the same features of ICT in a more comprehensive experience for building Cloud Native applications in any programming language.

IBM Cloud Tools for Swift (ICT) is a tool for Mac users to deploy, manage and monitor applications on Bluemix. It’s part of a larger initiative at IBM to bring Swift to the Server.

ICT Version 1.2 and later makes it much easier and quicker for users to test their apps. Users can change their client app (front-end code) to point locally or remotely. To take advantage of this feature, an app must contain a plist file with the correct configurations.

Steps for configuration:

    1. Open Finder and navigate to your app’s directory. Once there, create a ‘Configuration’ directory inside your app directory.

creatingconfigurationfolder1

    1. Open Xcode and select File -> New -> File… When the dialog opens, select ‘Resource’ under OS X. Then select ‘Property List’.

creatingpropertylist1

    1. Click ‘Next’. Rename the Property List to ‘bluemix.plist’ then place the new Property List in your newly created ‘Configuration’ directory inside your app’s directory.

addingplistfile1

    1. Click ‘Create’. Inside the newly created bluemix.plist, create three keys:’isLocal’ (boolean), ‘appRouteLocal’ (String) and ‘appRouteRemote’ (String).
      Fill in ‘appRouteLocal’ and ‘appRouteRemote’ with the Values you want them to be.

plistexampleconfig1

    1. Changing the “Connected to:” selector within ICT will toggle ‘isLocal’ to be ‘NO’ or ‘YES’. You can also change these from the ‘bluemix.plist’ file, which will be shown in the IBM for Cloud Tools dashboard.When ‘isLocal’ = YES, ‘appRouteLocal’ is used as the client target.
      approutelocalexample1
      When ‘isLocal’ = NO, ‘appRouteRemote’ is used.

 

approuteremoteexample1

 

If you haven’t already done so, download the latest version of IBM Cloud Tools for Swift. If you would like to submit feedback to our team, please complete our survey. If you have any issues with the app, submit questions on dW Answers. To learn more about Swift@IBM, visit our website.

More How-tos stories

Extend your global reach with Ready for IBM Cloud branding for your Cloud Solution

If you are an Independent Software Vendor, Managed Service Provider or Cloud Solution Provider you have the opportunity to extend your brand, validate your technology and gain global exposure with the Ready for Cloud mark.

Continue reading

Serverless log file analysis with web scale using IBM SQL Query

The applications we build and the systems we run generate a massive amount of logging data ranging from alerting, monitoring, availability and performance. Analyzing logs, or log analytics, is a widespread practice to capture insights from mobile data, IoT devices, servers, websites and other sources. Most companies need programmatic access to this massive amount of […]

Continue reading

New Alarm based trigger events for IBM Cloud Functions

IBM Cloud Functions offers great flexibility when it comes to using events to invoke your Actions. Scheduled events are cloud native events you can programmatically control when they need to fire to run your serverless apps, instead of allocating an idle server just to schedule a job, you can use IBM Cloud Functions to orchestrate […]

Continue reading