libreoffice-online/ios
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
..
Mobile tdf#123742: Fix lifecycle issues for the "Office" object 2019-03-28 17:28:26 +02:00
Mobile.xcodeproj Add source files from sfx2/source/appl for convenience 2019-03-22 16:22:05 +02:00
TestFakeSocket Move the iOS app to the ios folder 2018-11-22 16:50:57 +02:00
config.h.in Remove unnecessary leftovers after Michael's removal of the on-disk tile cache 2019-02-15 21:36:16 +01:00
ios.h Fix crash in iOS app: Just use a raw pointer as the lok_document hack 2019-02-26 14:07:59 +02:00
ios.mm Fix crash in iOS app: Just use a raw pointer as the lok_document hack 2019-02-26 14:07:59 +02:00
README The iOS app now works again 2019-03-15 09:48:51 +02:00

How to build the iOS app:

1) First you need to build the LibreOffice core code for iOS. Put in
your autogen.input something like this:

--enable-debug
--enable-dbgutil
--enable-werror
--with-distro=LibreOfficeiOS

and build "normally". (Naturally, no unit tests will be run when
cross-compiling LibreOffice.) Of course there is no requirement to use
those --enable options; as a minimum, just
--with-distro=LibreOfficeiOS should work.

This will produce a large number of static archives (.a) here and
there in instdir and workdir, but no app that can be run as such. (You
can see a list of them in
workdir/CustomTarget/ios/ios-all-static-libs.list)

2) Do a separate clone of the online repo on macOS, but don't run any
make or open the Mobile project there yet.

3) Either: do a separate clone of the online repo on Linux, run autogen.sh,
and configure it with the --enable-iosapp option:

./configure --enable-iosapp --with-iosapp-name="My Own Mobile LibreOffice"

Then run make. That will produce files in loleaflet/dist, nothing
else. Copy those to the corresponding folder in the online clone
from step 2. This is what I do:

make clean && make && tar cf - loleaflet/dist | ssh misan.local 'cd lo/online-ios-device && tar xvf -'

where misan.local is the macOS machine where I build the app, in the
~/lo/online-ios-device folder.

3) Or: install brew: https://brew.sh/

   Then:

brew install libtool npm
./autogen.sh
sudo python -m ensurepip --default-pip
sudo pip install polib lxml
make ; make

4) In the online folder form step 2, edit the
ios/Mobile.xcodeproj/project.pbxproj file in your favourite text
editor.

Change LOSRCDIR and all instances of "../ios-device" to refer the the
LibreOffice core source directory from step 1.

Then run:

./autogen.sh

and

./configure --enable-iosapp --with-iosapp-name="My Own Mobile LibreOffice" --with-lo-builddir=$HOME/lo/ios --with-poco-includes=/opt/ios-poco/include --with-poco-libs=/opt/ios-poco/lib

The configure script puts the app name as the CFBundleDisplayName
property into the ios/Mobile/Info.plist file, and set up some
symbolic links that point to the LibreOffice core source and build
directories (which can be the same, of course).

4) Before opening the Xcode project for the first time
   - seriously consider disabling source code indexing, this
   spawns a vast number of git processes, and consumes huge
   amounts of CPU & memory:

	Xcode -> Preferences, "Source Control", uncheck "Enable Source Control"

5) Now you can open the Mobile Xcode project, build it, and run it.