ios


Update device data on IoT for Automotive Starter Application using Bluemix iOS Client api


I have successfully configured a Bluemix backend vehicle monitoring app described in this tutorial:
http://www.ibm.com/developerworks/library/mo-connectedcar-app/index.html.
I have configured and ran the tester app successfully. I have also successfully initiated BMSClient on iOS( after adding mobile access service to the backend app), using the following code:
BMSClient.sharedInstance.initialize(bluemixAppRoute: backendURL, bluemixAppGUID: backendGUID, bluemixRegion: BMSClient.Region.usSouth)
let mcaAuthManager = MCAAuthorizationManager.sharedInstance
mcaAuthManager.initialize(tenantId: tenantId)
BMSClient.sharedInstance.authorizationManager = mcaAuthManager
BMSClient.sharedInstance.authorizationManager = MCAAuthorizationManager.sharedInstance
Here is a snippet of how tester app updates the information:
var id = $("#prop_id").val();
var property = $("#property").val();
var value = $("#value").val();
var payload = {
id: id,
property: property,
value: value
};
var group = id.split("-")[0];
var num = id.split("-")[1];
var message = new Messaging.Message(JSON.stringify(payload));
message.destinationName = "iot-2/type/"+window.config.iot_deviceType+"/id/"+id.split("-")[0]+"/cmd/setProperty/fmt/json";
$("#statusMessage").html("Published command!<br><b>Topic: </b>" + message.destinationName + "<br><b>Payload: </b><pre>" + JSON.stringify(payload, null, 4) + "</pre>");
$("#statusMessage").css("display", "block");
client.send(message);
Now I want to update manage(update properties, and/or send message to) the simulated vehicles via iOS app. The thing is that I am unable to find an API to do this on iOS.
Do I need to develop a backend API also? If no, on iOS, how can I get an API to do this?
Also here are URLs:
Backend app: http://alvi-app.mybluemix.net/
Tester app URL to update properties: http://alvi-app.mybluemix.net/tester
You will need to develop a custom backend API to accept messages for updating properties, etc. sent from your iOS app.
You can send a REST request using the BMS Core libraries from your iOS app to your backend. Then you can have your backend process these requests to update properties, etc.
https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-swift-core
The Core SDK has an example of a REST request in the README.

Related Links

get objectId from relation parse
setNavigationBar translucent pushes view down
Remove BlurView in swift
UITesting of Alerts in xCode 7.1
Escaping parameters in iOS Apple App Store Download Link
Resizing UISearchBar in UINavigationBar titleView doesn't work
Swift 2 - Protocol conforming to Equatable issue
Your iOS Development certificate has been revoked?
IB_DESIGNABLE for UIButton Failed to render instance
Firing a UIButton instantly
Compile FFMPEG in iOS with bitcode mode
UITableViewCell's contents' alpha changes on its own
Ranging beacons in background
Accessibility Id's for GLKView
Manual UINavigationBar layout issue
What is the blur/translucency of the Tab Bar iOS

Categories

HOME
mocking
oozie
apt-get
watson
order
xamarin.forms-listview
feed
gluu
open-source
gluon
active-directory
winsql
telerik
akka.net
base
tcplistener
hyperion
openframeworks
command-line-arguments
tapi
oracle-agile-plm
deserialization
plots.jl
monaco-editor
image-gallery
amadeus
lazy-loading
spring-boot-admin
javers
contains
accelerated-mobile-page
text-parsing
flexjs
webfocus
monads
whatsapi
breakpoint-sass
evercookie
pyparsing
django-users
subtotal
zipline
jsonstore
message-hub
compass-lucene
stateful
php-5.5
android-calendar
clientscript
federation
simple.odata.client
ternary
haste
tryton
catalina
tfs2008
ultratree
measurement-protocol
activity-diagram
hyperterm
android-location
pager
sejda
monkeyrunner
wt
android-listfragment
bonfire
alienvault
ehcache-bigmemory
gitattributes
jasmin
bitrock
sendto
iqueryable
cpp-netlib
subdirectory
dataformat
sirtrevor
magic-unipaas
delphi-2009
lightstreamer
batman.js
parsekit
glulookat
jquery-data
gdb-python
12factor
domain-mapping
ariatemplates
media-manager
ekeventkit
expressionvisitor
replay
sharepoint-timer-job
automapping
sharepoint-feature

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App