| Hi, I finally managed to build and run the mobile app for iOS with bluetooth enabled. Here is a patch to make that work: |
From 46adb3d5dbecdd9671895b4469f02c8168ec7b32 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" <[email protected]> Date: Thu, 1 Jun 2017 21:39:26 +0200 Subject: [PATCH] Enable BT for iOS build To: [email protected]
and add some new source files to .pro file Signed-off-by: Robert C. Helling <[email protected]> --- packaging/ios/Subsurface-mobile/Subsurface-mobile.pro | 11 +++++++++-- packaging/ios/Subsurface-mobile/dummy.qml | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro b/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro index 12356e16..29da480f 100644 --- a/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro +++ b/packaging/ios/Subsurface-mobile/Subsurface-mobile.pro @@ -1,8 +1,8 @@ TEMPLATE = app -QT += qml quick quickcontrols2 widgets positioning concurrent svg +QT += qml quick quickcontrols2 widgets positioning concurrent svg bluetooth -DEFINES += SUBSURFACE_MOBILE +DEFINES += SUBSURFACE_MOBILE BT_SUPPORT CONFIG += c++11 @@ -13,6 +13,10 @@ SOURCES += ../../../subsurface-mobile-main.cpp \ ../../../core/devicedetails.cpp \ ../../../core/gpslocation.cpp \ ../../../core/imagedownloader.cpp \ + ../../../core/downloadfromdcthread.cpp \ + ../../../core/qtserialbluetooth.cpp \ + ../../../core/plannernotes.c \ + ../../../core/uemis-downloader.c \ ../../../core/qthelper.cpp \ ../../../core/checkcloudconnection.cpp \ ../../../core/color.cpp \ @@ -81,6 +85,7 @@ SOURCES += ../../../subsurface-mobile-main.cpp \ ../../../qt-models/divepicturemodel.cpp \ ../../../qt-models/divesitepicturesmodel.cpp \ ../../../qt-models/divetripmodel.cpp \ + ../../../qt-models/diveimportedmodel.cpp \ ../../../qt-models/filtermodels.cpp \ ../../../qt-models/models.cpp \ ../../../qt-models/tankinfomodel.cpp \ @@ -176,6 +181,7 @@ HEADERS += \ ../../../core/windowtitleupdate.h \ ../../../core/worldmap-options.h \ ../../../core/worldmap-save.h \ + ../../../core/downloadfromdcthread.h \ ../../../core/subsurface-qt/CylinderObjectHelper.h \ ../../../core/subsurface-qt/DiveObjectHelper.h \ ../../../core/subsurface-qt/SettingsObjectWrapper.h \ @@ -202,6 +208,7 @@ HEADERS += \ ../../../qt-models/tankinfomodel.h \ ../../../qt-models/treemodel.h \ ../../../qt-models/yearlystatisticsmodel.h \ + ../../../qt-models/diveimportedmodel.h \ ../../../profile-widget/diveprofileitem.h \ ../../../profile-widget/profilewidget2.h \ ../../../profile-widget/ruleritem.h \ diff --git a/packaging/ios/Subsurface-mobile/dummy.qml b/packaging/ios/Subsurface-mobile/dummy.qml index aaf0a798..96a1e374 100644 --- a/packaging/ios/Subsurface-mobile/dummy.qml +++ b/packaging/ios/Subsurface-mobile/dummy.qml @@ -9,6 +9,7 @@ import QtQuick.Layouts 1.2 import QtQuick.Window 2.2 import QtGraphicalEffects 1.0 import QtQml.Models 2.1 +import QtBluetooth 5.2 ApplicationWindow { -- 2.11.0 (Apple Git-81)
When I run it and ask the phone to download dives, I get the following on the console: Starting download from BT Starting the thread 0 INFO: FTDI disabled Failed to connect to device /tmp/ttyS1 . Device state QBluetoothSocket::UnconnectedState . Error: QBluetoothSocket::SocketError( -2 ) [5.261126] ERROR: Failed to open the serial port. [in ../../libdivecomputer/src/hw_ostc3.c:344 (hw_ostc3_device_open)] INFO: dc_deveice_open error value of -6 Finishing the thread Unzureichende Privilegien zum Ãffnen von Gerät %s %s (%s) dives downloaded 0 qrc:///qml/DownloadFromDiveComputer.qml:118:12: Unable to assign [undefined] to QString qrc:///qml/DownloadFromDiveComputer.qml:117:15: Unable to assign [undefined] to QString qrc:///qml/DownloadFromDiveComputer.qml:116:15: Unable to assign [undefined] to QString Not yet perfect, but looks promising. That’s it for tonight. Best Robert |
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
