Commit graph

46 commits

Author SHA1 Message Date
Tor Lillqvist
5f2a6f6aa3 Avoid need for manual editing of the iOS app Xcode project file
Since some days, you need to run the configure script in a tree where
you are going to build the iOS app anyway (to set the app's
user-visible name). Use the configure script to set up a couple of
symbolic links pointing to the LibreOffice core source and build
directories and the Poco installation. Use those symbolic links in the
project file.

Also, now a vendor-specific app icon set can be given with the
--with-iosapp-appicon option.

Change-Id: Ib936388a4cc680bd97ca6ef95a91e3296ab04d18
2018-11-02 01:08:37 +02:00
Tor Lillqvist
aff35c9281 Add some source files from sw
I got a crash report from SwDocShell::Edit. Let's see if adding those
source files to the Xcode project (but not to be compiled by Xcode)
means that Xcode will be able to show the actual crash location based
on such a report. (At least for crashes in the code that Xcode itself
compiles, I assume it works perfectly. But LibreOffice core code is
not built by Xcode.)

Change-Id: I1b6bf34e35a0e5652081a6dca40ba04312fbe20b
2018-11-01 18:56:24 +02:00
Tor Lillqvist
6e121365b2 Bump CFBundleVersion to 4
Change-Id: I92e21fc3e2ab6a037812561b7326b0bc3aa5f3ee
2018-11-01 18:48:00 +02:00
Tor Lillqvist
c3ad73830b Actually we call this version 0.1
Change-Id: I52551a05a78da3caab4578b379da7ef728a80b26
2018-11-01 18:45:05 +02:00
Tor Lillqvist
2a12bf3371 Add xlsx to Info.plis(.in)
Added it to UTImportedTypeDeclarations, seemed to work. Not sure what
document types should be in UTImportedTypeDeclarations and what in
UTExportedTypeDeclarations. The documentation for document type
association is sadly rather vague.

I remember that some month ago I had horrible problems with this stuff
(see 26323fb92b), but now adding xlsx
went without a hitch. Not sure if I was just lucky, or whether iOS
12.1 has some bug fix related to this...

Change-Id: I75483719bd20496e8b44f935c788455148655a88
2018-11-01 18:34:14 +02:00
Tor Lillqvist
1fd5abc782 Add Emacs mode line and untabify
Change-Id: I9995a78cf59104e546f289dbaf685d70f9ba302e
2018-11-01 18:34:14 +02:00
Tor Lillqvist
ac18a7cd9d Add NSCameraUsageDescription so that the taking/using a photo doesn't crash
(Such a crash is intentionally caused by the system, in case an app
attempts to access the photo library or the camera without explicitly
declaring that intent in the Info.plist.)

The photo doesn't show up in the document, though, in fact the UI
kinda freezes... but that is another problem.

Change-Id: Ib998bdc2c2c3708f69f066522ade54c36dd5f551
2018-10-31 18:35:59 +02:00
Tor Lillqvist
772a5a0c90 Add the empty Image.imageset
Change-Id: Idf35f40260d9b6490f9ee693606bfd5b8c4b4cbb
2018-10-31 13:17:12 +02:00
Tor Lillqvist
14d72bdf3b Drop the debug=true parameter
Change-Id: I945b9610f4bb8158217517adfb48d6fe84c43e94
2018-10-31 13:17:12 +02:00
Tor Lillqvist
11de5ff75d Look in ios first, for the pre-canned config.h there
Change-Id: I416dd41fcdb5cb8d6344d80bccb0fc3ca3cf0457
2018-10-30 13:08:22 +02:00
Tor Lillqvist
143527b4c8 Delete this file that is now created by the configure script
Change-Id: Idfec149bd5f7c5b7fb24659d185b322190e7935a
2018-10-30 12:18:47 +02:00
Tor Lillqvist
0b49485383 Require running configure also in tree where you will build the iOS app
Take the user-visible name of the iOS app as a configure parameter
--with-iosapp-name. The only purpose of running the configure script
in this case is to get that expanded into the Info.plist file.

You need autofoo to build LibreOffice core for iOS anyway, so this
doesn't really add any new hurdles for a potential developer who wants
to build the iOS app

Bypass some checks that aren't relevant (and would fail) in this case.
Could bypass a lot more of configure.ac in the ENABLE_IOSAPP case.

Change-Id: Ia0cb82ad552da1bb597411748f0cd74f825774fa
2018-10-30 12:10:31 +02:00
Tor Lillqvist
15bd148f26 Add source files from vcl/headless for easier breakpointing
Change-Id: Iae08ef264ba8e03f478c16ea60a5dd46d06e4930
2018-10-30 00:22:45 +02:00
Tor Lillqvist
19361772c1 Change the user visible name of the "Mobile" app to "Collabora Office Mobile"
Change-Id: I3a80caaefcb601df80b89d63786c0f19c4471e32
2018-10-30 00:22:45 +02:00
Tor Lillqvist
6bb5353d33 Add iCloud entitlements that probably will be needed
Change-Id: I19e82484a53622a836bba70877ff52203d6b6866
2018-10-30 00:22:22 +02:00
Tor Lillqvist
050d9699e5 Use debug build of Poco libs also in Release configuration for now
Using an optimised build of Poco seems to cause some code to work
incorrectly, sigh. No time to investigate deeper now.

Change-Id: I47e1809d380226d489db35bf4fc97d0f731fd887
2018-10-30 00:22:22 +02:00
Tor Lillqvist
fb33a3d607 Minor edits
Change-Id: Ie392c6e5d5ba6c9f39c6786f48f4457d2478f23b
2018-10-24 12:44:47 +03:00
Tor Lillqvist
3f970778dd Add an initial README for the iOS app
Change-Id: Iad1d6f829b127243d6344f61f97e2cd3a417caf7
2018-10-24 12:07:55 +03:00
Tor Lillqvist
60a3733859 Add also some .hpp files for easier breakpointing
Change-Id: I8cb92c80f21bb2b3390e786d44c3621ff5836466
2018-10-23 15:19:10 +03:00
Tor Lillqvist
8194e2e1e7 Define LOOLWSD_CONFIGDIR also for Release
Change-Id: I41ce6a499d7dc8b76a0c1f8d91ca81008c5474af
2018-10-23 13:20:43 +03:00
Tor Lillqvist
8266582cc4 ICU version has been bumped
Change-Id: I135f989dcd65c3aeb5d12dc4f14839cb1e30f6ec
2018-10-22 23:24:21 +03:00
Tor Lillqvist
0dcad56a6a Sort file names 2018-10-17 22:49:39 +03:00
Tor Lillqvist
0af2a52b34 Add a completion handler that logs the success value 2018-10-17 15:59:19 +03:00
Tor Lillqvist
64c06b1f88 Give a name also to the main thread 2018-10-16 23:05:50 +03:00
Tor Lillqvist
434a62335b Give a name to the thread that forwards (fake) WebSocket messages to the JavaScript 2018-10-16 23:05:39 +03:00
Tor Lillqvist
c701e875f6 iOS app work in progress on closing and re-opening a document 2018-10-16 02:00:47 +03:00
Tor Lillqvist
ed348677f2 Add "Close document" menu entry (or corresponding button) to the iOS app
In the JS, send the special "BYE" message to the app code.

In the iOS app code, handle that message by closing the fake socket
connection to the Online code, which eventually will cause the
corresponding thread to exit etc, and the app to return to displaying
the DocumentBrowserViewController. (Currently it causes the whole app
to exit which is wrong of course; an iOS should never exit
intentionally.)
2018-10-12 17:48:45 +03:00
Tor Lillqvist
0318f383f7 Agan, add more core source files 2018-10-12 15:09:07 +03:00
Tor Lillqvist
b193e95696 Add source files from sfx2/source/doc for easier breakpointing in advance 2018-10-10 10:31:07 +03:00
Tor Lillqvist
f09c84e809 It's hard to get the references to the core build and source directories sane
Sadly we can't use the so-called user-defined LOSRCDIR and LOBUILDDIR
variables from the Build Settings in the pathnames to files. We have
to use relative pathnames, so if attempting to build this you need to
fix them all (instead of just editing the LOSRCDIR and LOBUILDDIR
values), most easily by editing the project.pbxproj manually.

Anyway, for me now I don't see any "red" (not found) referenced files
any more in Xcode.
2018-10-09 12:51:01 +03:00
Tor Lillqvist
72f36be509 Set up the EditFileExtensions set also for the mobile app
Use the same discovery.xml and the ClientRequestDispatcher::
InitStaticFileContentCache() call as in Online, even if as such we
aren't serving any "static files" (like discovery.xml) to a WOPI
server in the mobile app case.
2018-10-08 16:47:15 +03:00
Tor Lillqvist
de0d57faac Pass also permission=edit in the query URL 2018-10-08 16:25:02 +03:00
Tor Lillqvist
61c9a21c53 Add more core source files for easier setting of breakpoints in advance 2018-10-05 19:01:19 +03:00
Tor Lillqvist
79934ad4b2 Use the user-defined $(LOSRCDIR) variable for the paths to the core source files 2018-09-21 10:34:07 +03:00
Tor Lillqvist
72be8e3ad7 Add some source files from core to the project
For easier setting of breakpooints in them, in advance before stepping
into their code.
2018-09-21 10:29:56 +03:00
Tor Lillqvist
26323fb92b Struggle a bit back and forth with the UTIs etc in Info.plist
This stuff is a bit fragile, and the presence of other apps on the
device that claim to support "our" file types might, or might not,
affect how it works. Also, upgrading to iOS 12 seemed to have an
effect. Anyway, now it is back to working as I need.
2018-09-21 10:29:56 +03:00
Tor Lillqvist
f4ce5df7e1 Implement the timeout parameter to fakeSocketPoll()
Adapt callers that mistakenly passed 0 assuming it meant "forever".

This also seems to help with the occasional hangs.
2018-09-19 20:03:24 +03:00
Tor Lillqvist
95eb849217 Still more iOS app and related Online C++ code hacking
Re-think the plumbing between the different parts of the C++ Online
code. Do try to have it work more like in real Online on all but the
lowest socket level. Except that we don't have multiple processes, but
threads inside the same process. And instead of using actual system
sockets for WebSocket traffic between the threads, we use our own
FakeSocket things, with no WebSocket framing of messages.

Reduce the amount of #ifdef MOBILEAPP a bit also by compiling in the
UnitFoo things. Hardcode that so that no unit testing is ever
attempted, though. We don't try to dlopen any library.

Corresponding changes in the app Objective-C code. Plus fixes and
functionality improvements.

Now it gets so far that the JavaScript code thinks it has the document
tiles presented, and doesn't crash. But it hangs occasionally. And all
tiles show up blank.

Anyway, progress.

Change-Id: I769497c9a46ddb74984bc7af36d132b7b43895d4
2018-09-19 11:31:18 +03:00
Tor Lillqvist
384a57092c Make the "Online" source files actually show up in Xcode 2018-09-19 11:19:25 +03:00
Tor Lillqvist
435718e9f3 Improve shutdown semantics 2018-09-18 13:04:11 +03:00
Tor Lillqvist
7399a86f6a Use optional logging callback in FakeSocket.cpp instead of hardcoded writes
It's easier to either call the function to set the logging callback,
or not, in one place in client code, than to comment in and out all
the logging lines in FakeSocket.cpp as needed.

Change-Id: Id17f7e461c7df817440b47cb3124fcece13b189b
2018-09-16 13:39:43 +03:00
Tor Lillqvist
30ec64566b Attempt to fix various FakeSocket problems
Also add a bit of internals documentation.
2018-09-16 10:42:01 +03:00
Tor Lillqvist
0a2868b8d4 More FakeSocket hacking
As we use #ifdefs at all call sites anyway (because we don't dare use
the generic overrides of close() etc), we can leave out the parameters
related to actual BSD sockets that we ignore anyway.

"Real" Online always uses non-blocking sockets. We don't need to take
flags for that or check it. We can hardcode such behaviour always.
(Assuing that is what we want; let's see once something works.)

Change-Id: I6863907d71c5599b00ce1f8305a44d41bbaf7bee
2018-09-15 12:35:23 +03:00
Tor Lillqvist
55a2f804a6 Change the FakeSocket to be record-oriented
That is how Online uses the sockets for communication between the
processes anyway: It send and receives complete WebSocket frames.
Sure, in the mobile case there is just one process, but (I think) we
want to keep the same basic structure anyway, even if "wsd" and "kit"
are just threads. (We probably also want to drop the WebSocket framing
of the messages.)

Change-Id: I2397f321029c1cbbbc448a9b2403ad185a51cf14
2018-09-15 12:34:29 +03:00
Tor Lillqvist
6d81ebcfeb Add FakeSocket
Intended as a replacement for the real sockets used for WebSocket IPC
in Online on Linux. The idea is that in a mobile app we don't want to
bother with any actual sockets or WebSocket protocol (because we are
running as a single process after all), but keep much of the code that
thinks it is using such mostly unmodified. Just an idea so far, let's
see how this turns out.

Change-Id: I7878b0db99d9cbf70650227186c1fec9677fa74b
2018-09-15 12:30:50 +03:00
Tor Lillqvist
b59d160a08 Intermediate commit of work in progress on an iOS app
The app is unimaginatively called "Mobile" for now.

Runs but crashes pretty quickly after loading the document by the LO
core. Will need some heavy changes to get a ClientSession object
created in there, too, to handle the (emulated) WebSocket messages
from the JavaScript. It would then handle some of these messages
itself, and forwards some to the ChildSession, which in this case is
in the same process. Now the messsages from the JavaScript go to a
ChildSession, which is wrong. As the assertion says, "Tile traffic
should go through the DocumentBroker-LoKit WS"
2018-09-12 18:32:05 +03:00