Commit 9d547b65 authored by Martin Straka's avatar Martin Straka

iOS: Updated objective-c codes, refactoring, used qml-interaction-zfo

parent 96db84a2
...@@ -13,41 +13,41 @@ ...@@ -13,41 +13,41 @@
<string>ZFO file</string> <string>ZFO file</string>
<key>LSHandlerRank</key> <key>LSHandlerRank</key>
<string>Owner</string> <string>Owner</string>
<key>CFBundleTypeRole</key> <key>CFBundleTypeRole</key>
<string>Editor</string> <string>Editor</string>
<key>LSItemContentTypes</key> <key>LSItemContentTypes</key>
<array> <array>
<string>cz.nic.mobile-datovka.zfo</string> <string>cz.nic.mobile-datovka.zfo</string>
</array> </array>
<key>CFBundleTypeIconFiles</key> <key>CFBundleTypeIconFiles</key>
<array> <array>
<string>AppIcon_40px.png</string> <string>AppIcon_80px.png</string>
</array> </array>
</dict> </dict>
</array> </array>
<key>UTExportedTypeDeclarations</key> <key>UTExportedTypeDeclarations</key>
<array> <array>
<dict>
<key>UTTypeDescription</key>
<string>ZFO - 602XML Form Or Data Message Format</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeIdentifier</key>
<string>cz.nic.mobile-datovka.zfo</string>
<key>UTTypeSize320IconFile</key>
<string>4S@2x</string>
<key>UTTypeSize64IconFile</key>
<string>4</string>
<key>UTTypeTagSpecification</key>
<dict> <dict>
<key>public.filename-extension</key> <key>UTTypeDescription</key>
<string>zfo</string> <string>ZFO - 602XML Form Or Data Message Format</string>
<key>public.mime-type</key> <key>UTTypeConformsTo</key>
<string>application/vnd.software602.filler.form-xml-zip</string> <array>
<string>public.data</string>
</array>
<key>UTTypeIdentifier</key>
<string>cz.nic.mobile-datovka.zfo</string>
<key>UTTypeSize320IconFile</key>
<string>4S@2x</string>
<key>UTTypeSize64IconFile</key>
<string>4</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<string>zfo</string>
<key>public.mime-type</key>
<string>application/vnd.software602.filler.form-xml-zip</string>
</dict>
</dict> </dict>
</dict>
</array> </array>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>mobile-datovka</string> <string>mobile-datovka</string>
......
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
*/ */
#include <QtCore> #include <QtCore>
#include "src/files.h" #include "src/qml_interaction/interaction_zfo_file.h"
#import "app_delegate.h" #import "app_delegate.h"
@implementation QtAppDelegate @implementation QtAppDelegate
/* Pointer to Files object - use openZfoFileFromStorage for zfo showing */ /* Pointer to InteractionZfoFile object */
Files *filesPtr; InteractionZfoFile *interactionZfoFilePtr;
+(QtAppDelegate *)sharedQtAppDelegate +(QtAppDelegate *)sharedQtAppDelegate
{ {
...@@ -39,7 +39,8 @@ Files *filesPtr; ...@@ -39,7 +39,8 @@ Files *filesPtr;
return shared; return shared;
} }
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{ {
Q_UNUSED(application); Q_UNUSED(application);
Q_UNUSED(sourceApplication); Q_UNUSED(sourceApplication);
...@@ -48,18 +49,18 @@ Files *filesPtr; ...@@ -48,18 +49,18 @@ Files *filesPtr;
if (url != nil && [url isFileURL]) { if (url != nil && [url isFileURL]) {
if ([[url pathExtension] isEqualToString:@"zfo"]) { if ([[url pathExtension] isEqualToString:@"zfo"]) {
//NSLog(@"URL:%@", [url absoluteString]); //NSLog(@"URL:%@", [url absoluteString]);
if (Q_NULLPTR != filesPtr) { if (Q_NULLPTR != interactionZfoFilePtr) {
filesPtr->openZfoFileFromStorage(QString::fromNSString(url.path)); interactionZfoFilePtr->openZfoFile(QString::fromNSString(url.path));
} }
} }
} }
return YES; return YES;
} }
void QtAppDelegateInitialize (Files *files) void QtAppDelegateInitialize(InteractionZfoFile *interactionZfoFile)
{ {
/* Pointer to Files object */ /* Pointer to InteractionZfoFile object */
filesPtr = files; interactionZfoFilePtr = interactionZfoFile;
/* Init share app delegate with iOS */ /* Init share app delegate with iOS */
[[UIApplication sharedApplication] setDelegate:[QtAppDelegate sharedQtAppDelegate]]; [[UIApplication sharedApplication] setDelegate:[QtAppDelegate sharedQtAppDelegate]];
//NSLog(@"Created a new appdelegate"); //NSLog(@"Created a new appdelegate");
......
/*
* Copyright (C) 2014-2017 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
* OpenSSL library under certain conditions as described in each
* individual source file, and distribute linked combinations including
* the two.
*/
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface DocViewController : UIViewController <UIDocumentInteractionControllerDelegate> @interface DocViewController : UIViewController <UIDocumentInteractionControllerDelegate>
......
/*
* Copyright (C) 2014-2017 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
* OpenSSL library under certain conditions as described in each
* individual source file, and distribute linked combinations including
* the two.
*/
#import "doc_view_controller.h" #import "doc_view_controller.h"
#include <QtCore>
@interface DocViewController () @interface DocViewController ()
@end @end
...@@ -8,19 +33,23 @@ ...@@ -8,19 +33,23 @@
#pragma mark - #pragma mark -
#pragma mark View Life Cycle #pragma mark View Life Cycle
- (void)viewDidLoad { - (void)viewDidLoad
{
[super viewDidLoad]; [super viewDidLoad];
} }
#pragma mark - #pragma mark -
#pragma mark Document Interaction Controller Delegate Methods #pragma mark Document Interaction Controller Delegate Methods
- (UIViewController *) documentInteractionControllerViewControllerForPreview: (UIDocumentInteractionController *) controller { - (UIViewController *) documentInteractionControllerViewControllerForPreview: (UIDocumentInteractionController *)controller
{
Q_UNUSED(controller);
//return [[[[UIApplication sharedApplication]windows] firstObject]rootViewController]; //return [[[[UIApplication sharedApplication]windows] firstObject]rootViewController];
return self; return self;
} }
- (void)documentInteractionControllerDidEndPreview:(UIDocumentInteractionController *)controller - (void)documentInteractionControllerDidEndPreview:(UIDocumentInteractionController *)controller
{ {
Q_UNUSED(controller);
[self removeFromParentViewController]; [self removeFromParentViewController];
} }
......
/* /*
* Copyright (C) 2014-2016 CZ.NIC * Copyright (C) 2014-2017 CZ.NIC
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -27,14 +27,13 @@ ...@@ -27,14 +27,13 @@
#include <QtCore/QtGlobal> #include <QtCore/QtGlobal>
#ifdef Q_OS_IOS #ifdef Q_OS_IOS
//#import <Foundation/Foundation.h>
//#import <Foundation/NSString.h>
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface iOSFileOpener : NSObject <UIDocumentInteractionControllerDelegate> @interface iOSFileOpener : NSObject <UIDocumentInteractionControllerDelegate>
+ (iOSFileOpener *)getInstance; + (iOSFileOpener *)getInstance;
- (void)openFile:(NSString *)path fromViewController:(UIViewController *)viewController;
- (void)openFile:(NSString *)path fromViewController:(UIViewController *)viewController;
@end @end
......
/* /*
* Copyright (C) 2014-2016 CZ.NIC * Copyright (C) 2014-2017 CZ.NIC
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <QtCore> #include <QtCore>
@interface iOSFileOpener () @interface iOSFileOpener ()
@property (nonatomic) bool visible; @property (nonatomic) bool visible;
@property (nonatomic, strong) UIViewController *viewController; @property (nonatomic, strong) UIViewController *viewController;
...@@ -36,51 +35,46 @@ ...@@ -36,51 +35,46 @@
+ (iOSFileOpener *)getInstance + (iOSFileOpener *)getInstance
{ {
static dispatch_once_t pred; static dispatch_once_t pred;
static iOSFileOpener *instance = nil; static iOSFileOpener *instance = nil;
dispatch_once(&pred, ^{ dispatch_once(&pred, ^{instance = [[iOSFileOpener alloc] init];});
instance = [[iOSFileOpener alloc] init]; return instance;
});
return instance;
} }
- (id)init - (id)init
{ {
self = [super init]; self = [super init];
if(!self) if (!self) return nil;
return nil;
self.visible = false; self.visible = false;
self.documentInteractionController = [[UIDocumentInteractionController alloc] init]; self.documentInteractionController = [[UIDocumentInteractionController alloc] init];
[self.documentInteractionController setDelegate:self]; [self.documentInteractionController setDelegate:self];
return self; return self;
} }
- (void)openFile:(NSString *)path fromViewController:(UIViewController *)viewController - (void)openFile:(NSString *)path fromViewController:(UIViewController *)viewController
{ {
if (self.visible) if (self.visible) return;
return;
self.visible = true; self.visible = true;
self.viewController = viewController; self.viewController = viewController;
NSURL *urlPath = [NSURL URLWithString:[path stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSURL *urlPath = [NSURL URLWithString:[path stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
self.documentInteractionController.URL = urlPath; self.documentInteractionController.URL = urlPath;
[self.documentInteractionController presentPreviewAnimated:YES]; [self.documentInteractionController presentPreviewAnimated:YES];
} }
- (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller - (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller
{ {
Q_UNUSED(controller); Q_UNUSED(controller);
return self.viewController; return self.viewController;
} }
- (void)documentInteractionControllerDidEndPreview:(UIDocumentInteractionController *)controller - (void)documentInteractionControllerDidEndPreview:(UIDocumentInteractionController *)controller
{ {
Q_UNUSED(controller); Q_UNUSED(controller);
self.visible = false; self.visible = false;
} }
@end @end
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
#ifndef QTAPPDELEGATECINTERFACE_H #ifndef QTAPPDELEGATECINTERFACE_H
#define QTAPPDELEGATECINTERFACE_H #define QTAPPDELEGATECINTERFACE_H
#include "src/files.h" #include "src/qml_interaction/interaction_zfo_file.h"
/*! /*!
* @brief Inicialization of App Delegate for interaction with iOS service * @brief Inicialization of App Delegate for interaction with iOS service
* "Open in" in Qt. * "Open in" in Qt.
* *
* @param[in] files Pointer to Files object. * @param[in] interactionZfoFile Pointer to InteractionZfoFile object.
*/ */
void QtAppDelegateInitialize(Files *files); void QtAppDelegateInitialize(InteractionZfoFile *interactionZfoFile);
#endif // QTAPPDELEGATECINTERFACE_H #endif // QTAPPDELEGATECINTERFACE_H
/*
* Copyright (C) 2014-2017 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
* OpenSSL library under certain conditions as described in each
* individual source file, and distribute linked combinations including
* the two.
*/
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h> #import <MessageUI/MessageUI.h>
#import <MessageUI/MFMailComposeViewController.h> #import <MessageUI/MFMailComposeViewController.h>
...@@ -6,7 +29,7 @@ ...@@ -6,7 +29,7 @@
@interface SimpleEmailSendController:UIViewController<MFMailComposeViewControllerDelegate> { @interface SimpleEmailSendController:UIViewController<MFMailComposeViewControllerDelegate> {
} }
- (void)createEmail:(NSString *)body sub:(NSString *)subject files:(NSArray *)filePaths; - (void)createEmail:(NSString *)body sub:(NSString *)subject
files:(NSArray *)filePaths;
@end @end
/*
* Copyright (C) 2014-2017 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
* OpenSSL library under certain conditions as described in each
* individual source file, and distribute linked combinations including
* the two.
*/
#import "send_email_controller.h" #import "send_email_controller.h"
#include <QtCore>
@implementation SimpleEmailSendController @implementation SimpleEmailSendController
- (void) showCantSendMailAlert { - (void) showCantSendMailAlert
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle: NSLocalizedString(@"Can't send email", @"Can't send email") UIAlertView *alert = [[UIAlertView alloc] initWithTitle: NSLocalizedString(@"Can't send email", @"Can't send email")
message: NSLocalizedString(@"The device is not configured for sending email", @"The device is not configured for sending email") message: NSLocalizedString(@"The device is not configured for sending email", @"The device is not configured for sending email")
delegate: self delegate: self
...@@ -12,8 +38,8 @@ ...@@ -12,8 +38,8 @@
[alert release]; [alert release];
} }
- (NSString *)guessMIMETypeFromFileName:(NSString *)fileName
- (NSString *)guessMIMETypeFromFileName:(NSString *)fileName { {
CFStringRef UTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)[fileName pathExtension], NULL); CFStringRef UTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)[fileName pathExtension], NULL);
CFStringRef MIMEType = UTTypeCopyPreferredTagWithClass(UTI, kUTTagClassMIMEType); CFStringRef MIMEType = UTTypeCopyPreferredTagWithClass(UTI, kUTTagClassMIMEType);
CFRelease(UTI); CFRelease(UTI);
...@@ -23,8 +49,8 @@ ...@@ -23,8 +49,8 @@
return (__bridge NSString *)(MIMEType); return (__bridge NSString *)(MIMEType);
} }
- (void)createEmail:(NSString *)body sub:(NSString *)subject
- (void)createEmail:(NSString *)body sub:(NSString *)subject files:(NSArray *)filePaths files:(NSArray *)filePaths
{ {
if (![MFMailComposeViewController canSendMail]) { if (![MFMailComposeViewController canSendMail]) {
[self showCantSendMailAlert]; [self showCantSendMailAlert];
...@@ -41,9 +67,7 @@ ...@@ -41,9 +67,7 @@
for (NSUInteger i = 0; i < [filePaths count]; i++) { for (NSUInteger i = 0; i < [filePaths count]; i++) {
NSData *filedata = [NSData dataWithContentsOfFile:filePaths[i]]; NSData *filedata = [NSData dataWithContentsOfFile:filePaths[i]];
NSString *filename = [filePaths[i] lastPathComponent]; NSString *filename = [filePaths[i] lastPathComponent];
//NSLog(filename);
NSString *mimetype = [self guessMIMETypeFromFileName:filename]; NSString *mimetype = [self guessMIMETypeFromFileName:filename];
//NSLog(mimetype);
[controller addAttachmentData:filedata mimeType:mimetype fileName:filename]; [controller addAttachmentData:filedata mimeType:mimetype fileName:filename];
} }
...@@ -51,10 +75,11 @@ ...@@ -51,10 +75,11 @@
[controller release]; [controller release];
} }
- (void)mailComposeController:(MFMailComposeViewController *)controller - (void)mailComposeController:(MFMailComposeViewController *)controller
didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
{ {
Q_UNUSED(controller);
if (error) { if (error) {
NSLog(@"Error : %@", error); NSLog(@"Error : %@", error);
} }
......
/* /*
* Copyright (C) 2014-2016 CZ.NIC * Copyright (C) 2014-2017 CZ.NIC
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
*/ */
/*! /*!
* @brief Used for opening URLs on iOS. * @brief Used for opening URLs and create email with attachments on iOS.
*/ */
class UrlOpener : public QObject { class UrlOpener : public QObject {
Q_OBJECT Q_OBJECT
...@@ -46,8 +46,20 @@ public: ...@@ -46,8 +46,20 @@ public:
*/ */
UrlOpener(QObject *parent = 0); UrlOpener(QObject *parent = 0);
/*!
* @brief Open file on iOS.
*
* @param[in] filePath Path to file.
*/
void openFile(const QString &filePath); void openFile(const QString &filePath);
/*!
* @brief Create email on iOS.
*
* @param[in] bodyText Email text.
* @param[in] subject Email subject.
* @param[in] filePaths Paths to attachment files.
*/
void createEmail(const QString &bodyText, const QString &subject, void createEmail(const QString &bodyText, const QString &subject,
const QStringList &filePaths); const QStringList &filePaths);
}; };
......
...@@ -72,7 +72,6 @@ void UrlOpener::openFile(const QString &filePath) ...@@ -72,7 +72,6 @@ void UrlOpener::openFile(const QString &filePath)
#endif /* !Q_OS_IOS */ #endif /* !Q_OS_IOS */
} }
void UrlOpener::createEmail(const QString &bodyText, const QString &subject, void UrlOpener::createEmail(const QString &bodyText, const QString &subject,
const QStringList &filePaths) const QStringList &filePaths)
{ {
......
...@@ -294,6 +294,11 @@ ApplicationWindow { ...@@ -294,6 +294,11 @@ ApplicationWindow {
"fromLocalDb": false, "fromLocalDb": false,
"rawZfoContent": fileContent "rawZfoContent": fileContent
}, StackView.Immediate) }, StackView.Immediate)
/*
* Next function has effect only for iOS.
* Detail info is in the header file.
*/
files.deleteTmpFileFromStorage(filePath)
} }
} }
......
...@@ -575,6 +575,8 @@ void Files::sendEmail(const QString &emailMessage, const QStringList &fileList, ...@@ -575,6 +575,8 @@ void Files::sendEmail(const QString &emailMessage, const QStringList &fileList,
{ {
Q_UNUSED(subject); Q_UNUSED(subject);
Q_UNUSED(body); Q_UNUSED(body);
Q_UNUSED(emailMessage);
Q_UNUSED(msgId);
if (!fileList.isEmpty()) { if (!fileList.isEmpty()) {
...@@ -901,3 +903,13 @@ bool Files::setAttachmentModel(FileListModel &attachModel, ...@@ -901,3 +903,13 @@ bool Files::setAttachmentModel(FileListModel &attachModel,
return parseXmlData(Q_NULLPTR, Q_NULLPTR, Q_NULLPTR, &attachModel, return parseXmlData(Q_NULLPTR, Q_NULLPTR, Q_NULLPTR, &attachModel,
Q_NULLPTR, getXmlFromCms(rawZfoData)); Q_NULLPTR, getXmlFromCms(rawZfoData));
} }
void Files::deleteTmpFileFromStorage(const QString &filePath)
{
#if defined Q_OS_IOS
QFile file(filePath);
file.remove();
#else
Q_UNUSED(filePath);
#endif /* defined Q_OS_IOS */
}
...@@ -202,6 +202,18 @@ public: ...@@ -202,6 +202,18 @@ public:
bool setAttachmentModel(FileListModel &attachModel, bool setAttachmentModel(FileListModel &attachModel,
const QByteArray &rawZfoData); const QByteArray &rawZfoData);
/*!
* @brief Delete temporary file from storage.
*
* @note This function is used on iOS when external ZFO file is opened.
* iOS moves target file to Datovka private folder. Here, after
* reading of file content, Datovka must this file removed itself.
*
* @param[filePath] Path to file.
*/
Q_INVOKABLE
void deleteTmpFileFromStorage(const QString &filePath);
class File { class File {
public: public:
File(void) File(void)
......
...@@ -218,12 +218,6 @@ int main(int argc, char *argv[]) ...@@ -218,12 +218,6 @@ int main(int argc, char *argv[])
IsdsWrapper isds; IsdsWrapper isds;
GlobalSettingsQmlWrapper settings; GlobalSettingsQmlWrapper settings;
/* Inicialize app delegate component for interaction with iOS
* Reaction on the iOS action "Open in..." */
#if defined Q_OS_IOS
QtAppDelegateInitialize(&files);
#endif
/* Connect slot for update message detail after downloading */ /* Connect slot for update message detail after downloading */
QObject::connect(&isds, SIGNAL(messageDownloadFinish(QString, qint64)), QObject::connect(&isds, SIGNAL(messageDownloadFinish(QString, qint64)),
&messages, SLOT(fillMessageDetail(QString, qint64))); &messages, SLOT(fillMessageDetail(QString, qint64)));
...@@ -259,6 +253,12 @@ int main(int argc, char *argv[]) ...@@ -259,6 +253,12 @@ int main(int argc, char *argv[])
InteractionZfoFile interactionZfoFile; InteractionZfoFile interactionZfoFile;
/* Inicialize app delegate component for interaction with iOS
* Reaction on the iOS action "Open in..." */
#if defined Q_OS_IOS
QtAppDelegateInitialize(&interactionZfoFile);
#endif
/* register classes in QML */ /* register classes in QML */
ctx->setContextProperty("isds", &isds); ctx->setContextProperty("isds", &isds);
ctx->setContextProperty("messages", &messages); ctx->setContextProperty("messages", &messages);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment