Commit graph

12 commits

Author SHA1 Message Date
Tor Lillqvist
ae88fc1052 tdf#124930: Look for settings also in the managed configuration thing
Could not test whether it works, but it is not complicated, so
hopefully yes. Followed the examples from
https://developer.apple.com/videos/play/wwdc2013/301/ and
https://developer.apple.com/library/archive/samplecode/sc2279/Introduction/Intro.html .

The Mobile.plist file is a sample only.

Note that here in the master branch there is no on-disk tile cache, so
no setting for emptying that or not.

Change-Id: I0b8cf8d35930cdf60808d14361378f050cf41037
2019-05-30 11:45:02 +03:00
Tor Lillqvist
bf520d5fa5 Log the timestamp of the template file at its site and of its cached version 2019-04-26 12:04:28 +03:00
Tor Lillqvist
db9208d364 tdf#124918: Don't crash on invalid URLs in the template list file 2019-04-26 12:04:20 +03:00
Tor Lillqvist
d550944053 tdf#124918: More logging in template download error situations 2019-04-26 12:04:09 +03:00
Tor Lillqvist
4e2ad4d2bc tdf#124918: Allow empty lines in the template list file 2019-04-26 12:04:01 +03:00
Tor Lillqvist
824834dfa8 Turn on Unipoll for the iOS app, too
Change-Id: Ib0b7ac53b7c936e75446004c4581ace415b1dd5c
2019-04-24 13:24:53 +03:00
Tor Lillqvist
e2f48faf14 tdf#123742: Fix lifecycle issues for the "Office" object
Because of the use of std::shared_ptr in lokit_main(), the (singleton)
lok::Office (or LibLibreOffice_Impl) object gets destroyed when
lokit_main() exits. We shouldn't keep our own copy of a raw pointer to
it around. Just call lok_init_2() to get the pointer where we need it.
We don't need to call lok_init_2() already in -[AppDelegate
application:didFinishLaunchingWithOptions:].
2019-03-28 17:28:26 +02:00
Tor Lillqvist
73ad6c300a Bin some boilerplate comments
Change-Id: Ida0a8279f081d5b9c5d963d7d721e4c7c01f3a9e
2019-02-25 09:14:14 +02:00
Tor Lillqvist
3ec92f137e Be less fragile in case of missing resources when downloading templates
It is not enough ot look at the NSError* parameter. Need to check the
HTTP status code, too.

Change-Id: I8db146c77626d4080ef6606999d27e6bb845876c
2018-12-19 13:38:43 +02:00
Tor Lillqvist
61bd04fefb Add a way to have templates specific to a customer deployment
Add two settings: One setting "Template list URL" is a string that
should either be empty (the typical case for a random user of the
app), or contain a https: URL. If this setting is empty, only the
templates bundled in the app are provided.

If the "Template list URL" is non-empty, it should be a https: URL
pointing to a text file (or dynamically generated text resource). That
file is downloaded and read when the app starts. Each line in the file
should either be a comment (starting with a hash '#'), or a https: URL
pointing to a template document, that is of type .ott, .ots, or .otp.
That document is downloaded if it hasn't been downloaded already, or
if its time stamp is newer than that of the already downloaded copy.
Also a thumbnail image for the template, formed by appending ".png" to
its URL, is downloaded, if available.

Any previously downloaded templates that aren't mentioned in the list
file are removed.

The intent is that in some managed mass deployment environment, the
mobile device management software would set up this setting, so that
the end-user devices would see the same templates.

Obviously, this URL does not have to point to a static file on a web
server, but could point to some dynamically generated resource on a
web server, that enumerates the templates available on the server and
returns their URLs as a text document.

Another setting is "Empty tile cache next time". This is a toggle. If
toggled on, the next time a document is opened in the app, the tile
cache is emptied (and the toggle is reset off). This is mostly for
potential problem solving, and might be removd later.

Various refactoring to support the new functionality.

Change-Id: Ie2ebf032acb9e43bb1c6f7ae4d0c449ae66eaa05
2018-12-17 22:56:14 +02:00
Tor Lillqvist
c65f3e43a1 Fetch the locale already in the AppDelegate's didFinishLaunchingWithOptions
It will be needed by code that runs before the Document object is
created.

Change-Id: I5c4646e08c670b88b6d3a4d38450cc80e11ec402
2018-12-10 22:41:55 +02:00
Tor Lillqvist
a6eadf4e81 Move the iOS app to the ios folder
Change-Id: I46e0722b027e93f90b5cd6a74cd7dc46f6c8cea2
2018-11-22 16:50:57 +02:00
Renamed from Mobile/Mobile/AppDelegate.mm (Browse further)