IOS 2.1 Release and Project Update

After a long period of inactivity, our IOS client has received flurry of new activity and is now live. This has been done entirely by a new contributor, Tim Müller-Seydlitz (@timbms ) who has worked tirelessly for the last few months bringing our application into the modern world

While there are numerous changes and updates that can be found in the release notes below, by far the largest one is not something that will be immediately visible to end users, but is critically important for future development. Tim has completely ported our Objective-C based code to Swift. I can’t overstate how large this undertaking was, while there are tools that can assist efforts like this, the amount of code rework and rewrite was enormous. With our codebase now in Apple’s preferred language, we are hoping more of our community will be able to contribute and enhance our IOS application.

Other development improvements include using Fast Lane for automated builds and using BitrIse as a cloud based build and deploy server. Bitrise is linked to our github repo and will build and deploy branches and PR’s automatically using Fast Lane.

Please give Tim a big thank you for his work!

As always you can find the source code, submit issues and create pull requests at

Enjoy!
@digitaldan

(PS it may take 24 hours for Apple to distribute the new build to all regions)

Release Notes

Migration from ObjectiveC to Swift. Though this migration was as the start just a technical migration to a different programming language, it allowed to get the openhab iOS app out of a dead end and to come up to par with the development on other platforms and to be aligned with latest requirements on iOS.

Addressing known issue and bugs:

  • Setpoint got fixed, handles now decimals properly
  • Sliders cells fixed to honor min, max and step, improved to show value that will be set on release
  • Handling of images and videos got fixed
  • Maps: a default height is set, if none is given. Closes #184
  • Icons are fixed - App is now able to handle png AND svg icons
  • Long labels are correctly cut off
  • Accessibility improved by handling changes in font size
  • Reworking the connection to remote myopenhab.org
  • Search bar for items was added
  • Authentication with mTLS client certificates
  • Fixed handling push notifications
  • Automated generation of screenshots

The excellent ObjectiveC code quality allowed the usage of the migration tool Swiftify for the body of the application. Still, internally a lot of changes were applied:

  • Unit tests were introduced.
  • JSON decoding was migrated to Decodable
  • Frameworks were upgraded to more recent versions
  • Migrating to UNUserNotificationCenter
  • Migration to built-in functionality of iOS,
  • Migrating to Swift 5 and Xcode 10.2
  • Got rid of all compiler warnings - some remain in external frameworks (:wink:
  • Swiftlinted source
  • Got rid of trailing constraints in storyboard
  • Addresses deprecations for instance NSAttributedString and Reachability
  • Getting rid of last viewWithTag
  • Cleaning up code commented out
  • URL Strings composition migrated to Endpoint
  • Migration to logging framework os_log instead of print with typed access to UserDefaults.standard for string
  • Migrated to os_log for logging

A watchOS app is in the making and will be released soon.

54 Likes

Wow cool
Thank you Dan and team for all the hard work!

Awesome!

Really awesome! I know how much work this must have been! Kudos!

BoxSon

I love that there is a search bar! Do you plan to make it recursive?

1 Like

+1 from me

I’m following @timbms’s work on this since beginning of this task. Really great job… also kudos to @dhermanns for Watch part, and @weakfl and others for working with Tim…

1 Like

Thanks a lot, much appreciated!

Great work! @timbms, thanks for donating your time and talent!

3 Likes

Here’s a bug report:

On an nginx reverse proxy I am using an invalid certificate. The server is running on 192.168.10.5 while the certificate is a letsencrypt one for xyz.domain.com. The app will present a popup to not use, use once, use always. Fine. I select “use always”.

Afterwards, the app will work - But will never request icons (“GET /icon/…”) and thus display no icons.
If I switch to a http connection, i.e. turn off https, the icons will be loaded and displayed.

I assume the same will happen with a self-signed certificate for 192.168.10.5.

The new iOS app and the switch to Swift are great news!! Thanks a lot for your effort!

2 Likes

Great improvements, many thanks for your effort.

However, i have a question about the setpoint value change, how much is possible to press on the setpoint value and change it to any other value directly other than to click Up and Down only.

For example i have a min value 0 and maximum value 80 with step 1. If i need to change from 0 to 50 directly without clicking Up button to increase the value one by one.

Thank you again,

Hi Elie,
Not sure if I understand your question, but I think this is a setting you need to define in your sitemap, I have for instance this for a Sonos volume controller:

Setpoint item=Sonos_LR_Volume minValue=0 maxValue=100 step=5

Great work. Thank you so much, @timbms!

1 Like

As a workaround selecting “Ignore SSL Certificates” will work and icons will be displayed. Since this is not really an option for me, I created a root ca and imported the root certificate into my iphone.

In your example to get from 0 to 100 with a step of 5 you have to press the up button 20 times. I think what @Hollako means is to press on the setpoint item and directly input the value “100” (or whatever value) without having to use the UP and DOWN arrows.

I also would find this handy but I’m not sure that this functionality exists

Hello Maurits,

what i meant exactly this is what @Lucas mentioned, in the Android app this feature is included already so it will be great to be added to IOS app.

Thank you,

Please note that 2.1.4(24) is now available on appstore.

9 Likes

Hi @timbms!

Thanks for your big effort! I think many people like me appreciate it so much.

I have a question to the new version (openHAB 2.5M1 with app 2.1.4(24)): I am noticing that visibility and switches with mappings are a lot slower. The reactions are nearly instant, but the echo in the app that e.g. the button changes or something hidden is shown after clicking a normal switch is really delayed by approximately 30 seconds.

It is interesting that if I click on a mapping, go into a group and then immediately back, the view changes nearly instant, too. So from my perspective the probability is less that there is a general, big problem with app or installation.

Is it understandable what I try to say? :grinning:

So could this be a minor bug? Or do I have to structure my sitemap in a new way?

If you need more information or someone to test something, feel free to contact me!

Thanks for your big involvement!
HFM

Love the update! +1 for recursive search and would like to see multi state switches bigger perhaps I can pad them with spaces