In this presentation we will study in detail the case of integrating Jahia directly with the Apple Watch and the iPhone, the technologies used, the challenges encountered and of course we will demonstrate the end result. We will leverage for this Jahia's REST API as well as custom actions and the power of OSGi modules, and the iOS Swift language on the front-end part.
JahiaOne 2015 - Jahia on your Wrist (The Apple Watch Integration example) by Serge Huber
1. Jahia on your Wrist
Serge Huber, CTO & Co-Founder,
shuber@jahia.com
2. But first…
Started coding Jahia in 1999
6 people meeting in my parents
house
Mom baking brownies for our
meetings
And now, a major player in the
UXP market
…Thanks to you !
3. Objectives
Create a tool for Jahia communities,
moderators and administrators
Highly focused utility with short
interactions
Do most immediate actions directly
on Watch, never take the iPhone
out!
React quickly, from anywhere, to
spam or important events
4. Attention !
This is a brand new technology
So most of the bugs will be
due to Apple or network
connectivity issues
(Wifi/Bluetooth)
The camera might fall on me
And the rest might be my fault
8. 1. Start iPhone App
2. Configure connection
to Jahia Server
3. You can then use both
iPhone and Watch
applications
Initial startup
9. Apple Watch app startup
flow
Watch App Digital Factory
login
load latest posts
10. Getting list of posts
JCR query using REST
API
Limited to last 20 posts
Result is JSON object
containing an array of
all the matching nodes
select * from
[jnt:post] as p
order by
p.[jcr:created]
desc
11. Post detail and actions
Details already loaded from list
Actions on post are a problem : they can differ
from one user to another (due to permissions)
Actions are retrieved through a separate
REST call on an custom DF action class
(postActions)
18. Tasks : how it works
Simple REST API access to retrieve all
tasks from a user
In detail view, use “taskActions.do” DF
action to retrieve list of next possible
workflow steps
Can work with custom workflows !
21. iPhone App Startup flow
iPhone App Digital Factory
login
register device token
Apple Push
Notification Service
register for remote notifications
load latest posts
22. Installing
3 modules:
ios-push-notifications : implements support for registering
iOS devices and pushing notifications to them
jahia-watcher-backend : implements DF actions used by
the native mobile app
jahia-spam-filtering : use to add “mark as spam” filtering
technology
Native watchOS app to install on iPhone/Watch
23. Tips and tricks
Don’t forget to deactivate Wrist detection
during development or your app will not launch
!
Keep traffic to a minimum as the user might
turn his watch and turn off the screen
Don’t require users to get the phone out for
simple actions, do them with the Watch directly
!
24. Watch impressions
Decent battery life (1 full day, 7-midnight with
about 20% charge remaining)
Screen will turn off very quickly, take that into
account !
Not a dumb reading terminal, you can and
should allow users to perform actions on it!
(lots of early apps make this mistake!)
25. watchOS 2
On Monday, June 8th, Apple announced the
new Watch SDK
Untethered apps are now possible !
App could now perform more operations offline,
and sync when network is available
Access to sensors can improve user
interactions or personalization
26. Where/when can I get it ?
Digital Factory modules :
iso-push-notifications : https://github.com/Jahia/ios-push-
notifications
jahia-watcher-backend : https://github.com/Jahia/jahia-
watcher-backend
jahia-spam-filtering : https://github.com/Jahia/jahia-spam-
filtering
iOS native module application : beta TestFlight program to
open soon, contact me for joining
Give example of being out with your kid, a spammer starts polluting your website, just using the watch app you can delete or even block the user !
In this demo, simply uncomment the “reply” function from the Jahia Watcher backend module, compile & deploy, and show that it is now available on the watch. Reply with dictation using the text “I’ll get back to you later, I’m a little busy right now!”.