GithubHelp home page GithubHelp logo

kiwix / apple Goto Github PK

View Code? Open in Web Editor NEW
433.0 21.0 69.0 27.7 MB

Kiwix for offline access on iOS and macOS

Home Page: https://apple.kiwix.org

License: GNU Lesser General Public License v3.0

Swift 91.94% Objective-C 2.34% Objective-C++ 4.93% CSS 0.17% JavaScript 0.48% Ruby 0.15%
kiwix wikipedia offline ios swift macos

apple's Introduction

Kiwix for Apple iOS & macOS

This is the home for Kiwix apps for Apple iOS and macOS.

CodeFactor CI Build Status CD Build Status License: GPL v3 Drawing=

Download

Kiwix apps are made available primarily via the App Store and Mac App Store. macOS version can also be downloaded directly.

Most recent versions of Kiwix support the three latest major versions of the OSes (either iOS or macOS). Older versions of Kiwix being still downloadable for older versions of macOS and iOS on the Mac App Store.

Develop

Kiwix developers usually work with latest macOS and Xcode. Check our Continuous Integration Workflow to find out which Xcode version we use on Github Actions.

Get started

To get started, you will need the following:

Steps

  1. clone this repository
  2. from the project folder run the following command: brew bundle

Xcode settings

To compile and run Kiwix from Xcode locally, you will need to:

  • Change the Bundle Identifier (in Signing & Capabilities)
  • Select appropriate Signing Certificate/Profile.
  • It is recommended to enable:

Xcode settings > Text Editing > Editing

"While Editing":

  • ✅ "Automatically trim trailing whitespace"
  • ✅ "Include whitespace-only lines"

Dependencies installed for you

Our Brewfile will install all the necessary dependencies for you:

  • our CoreKiwix.xcframework (libkiwix and libzim) - the version of which is specified in the Brewfile
  • XcodeGen which will create the project files for you

How XcodeGen is working?

Xcode project files are not directly contained within this repository, instead they are generated for you automatically (as git hooks on post-merge, post-checkout, post-rewrite - see the .pre-commit-config.yaml).

This means, that you can work in Xcode as usual, but you don't need to worry about the project file changes anymore.

Contributors: please note, changes to the Xcode project folder will not be tracked by git.

If you wish to change any settings as part of your contribution, please edit the project.yml file instead.

Please refer to the XcodeGen documentation for further details.

CPU Architectures

Kiwix compiles on both macOS architectures x86_64 and arm64 (Apple silicon).

Kiwix for iOS and macOS can run, in both cases, on x86_64 or arm64.

Switch to another version of the CoreKiwix.xcframework

CoreKiwix.xcframework is published with all supported platforms and CPU architectures:

In order to use another version of CoreKiwix, than the one pre-installed, you can simply replace the CoreKiwix.xcframework folder at the root of the project with the version downloaded, and unpacked.

Compiling CoreKiwix.xcframework

You may want to compile it yourself, to use different branches of said projects for instance.

The xcframework is a bundle of all libkiwix dependencies for multiple architectures and platforms. The CoreKiwix.xcframework will contain libkiwix library for macOS archs and for iOS. It is built off kiwix-build repo.

Make sure to preinstall kiwix-build prerequisites (ninja and meson). If you use homebrew, run the following

brew install ninja meson

Make sure Xcode command tools are installed. Make sure to download an iOS SDK if you want to build for iOS.

xcode-select --install

Then you can build libkiwix

git clone https://github.com/kiwix/kiwix-build.git
cd kiwix-build
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

kiwix-build --target-platform apple_all_static libkiwix
# assuming your kiwix-build and apple folder at at same level
cp -r BUILD_apple_all_static/INSTALL/lib/CoreKiwix.xcframework ../apple/

You can now launch the build from Xcode and use the iOS simulator or your macOS target. At this point the xcframework is not signed.

Deployment

Nightly to FTP

Each night 01:32 am CET, we build our iOS and macOS apps. These are developer signed builds, notarized (a process required to install them outside of the app store) and uploaded to our FTP nightly folder. The files are versioned using the current date.

Weekly to TestFlight

Mondays at 02:00 am CET, we build our apps, but only if there were code changes within the last week (any git commits to main). These are AppStore builds, which are uploaded to TestFlight, using the current app version from code (see project.yml).

On-demand TestFlight

It is also possible to create TestFlight builds on-demand, by pushing a git tag starting with "testflight" to the repo. This will run the same process as the "weekly" build (we just do not need to wait a whole week).

Releasing to AppStore and FTP

Once we are happy with the quality of the app in TestFlight, we can send it for approval to Apple. Once approved by Apple, we can release them to the AppStore. At the same time, we do want to release our macOS app via FTP as well. For this, we run our "Post App Release" workflow, which can be triggered by creating a Github Release, based on the git commit used for the TestFlight apps (the ones that were approved by Apple). The specific commit that triggered the (now approved) TestFlight app, can be found under Github Actions. This Github Release (based on this specific commit) will rebuild the macOS application and upload it to FTP to the release folder. Again, the purpose of this is to make the very same macOS app - which was released to the AppStore - also available via FTP.

Last step

If all that is done, we should create a PR, incrementing the version number of the project (see: project.yml), and the deployment cycle can start again.

Reporting a bug

  • Bug reports and features requests should be done online.
  • Follow issue reporting good practices.
  • On macOS - if requested by a maintainer - pack your Kiwix app container with the following command (then make it available somewhere online): tar -czvf ~/Documents/self.Kiwix.tgz ~/Library/Containers/self.Kiwix.

License

GPLv3 or later, see LICENSE for more details.

apple's People

Contributors

automactic avatar bperlakih avatar code-factor avatar codnee avatar doblev55 avatar julianharty avatar kelson42 avatar outcoldman avatar psypherium avatar quocduyvu6262 avatar rgaudin avatar translatewiki avatar tvision251 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apple's Issues

Auto Lang Filter alert defer present if library is not visible

If user open library for the first time, and app start to refresh library, and user dismiss library before refresh is finished. The auto lang filter alert will not be able to present, because the presenter is not in the view hierarchy. It also cause the library view to be slightly broken when opening it again.

Should defer auto lang filter alert and present it when library is opened again.

Support custom url schemes / AppExtension

The use case is the following: a 3rd party app wants to display some of the content stored in kiwix, for example a specific Wiktionary entry.

It would be great if this content could be addressed directly, either with a custom url scheme or as an app extension.

Kiwix for iOS should be able to open chunked ZIM files

Big ZIM files are often chunked in 2GB parts. That's for example the case in portable versions. Currently if such chunks are important Kiwix does not recognize them. Probably Kiwix should also have a look to the *.zimaa file and simply try to open them (they can be open like the *.zim files).

Book upgrade operation

if book has pid, search for older zim
if older version found, check for bookmarks associated
if has bookmarks, reset bookmarks' book property to new book
remove old book, if old book is no longer on disk

Book.status

  • 0: cloud
  • 1: downloading
  • 2: local
  • 3: retained by bookmarks

Kiwix hangs w/out internet or wifi connection

in iOS there seems to be an issue when in offline mode or on roaming. Using version 1.2, Kiwix hangs when there is no internet or wifi connection available.

Examples:

Offline Mode, no wifi -> hangs
Offline Mode, wifi connection(without internet connection!) -> Works
Roaming (Data off), no wifi -> hangs
3G, Wifi, etc -> Works

There is no need for an active internet connection, but apparently some some sort of connection to make it work. But as a fun fact, for some reason there is data-traffic shown in the settings for Kiwix.


First reported on Sourceforge https://sourceforge.net/p/kiwix/bugs/932/

Cannot play video

In iOS app video cannot be played. Tested using French TedxLausanneChange2013 Mar18, 2015, 81.8MB.

Here is the video player in the HTML
<video class="vjs-tech" preload="true" data-setup="{&quot;autoplay&quot;: true, &quot;preload&quot;: &quot;true&quot;}" id="vjs_video_3_html5_api" autoplay="" controls=""></video>
It does't have the source element. (The HTML video example from W3School has.) @kelson42, could this be mwoffliner's fault?

iOS 1.8 Roadmap

Phase 1

All features without alerts and download function

  • library
  • search bar
  • bookmark
  • setting
  • CoreSpotlight
  • iCloud bookmark sync

Phase 2

Download system

App Localization

We need to translate our app to other languages! 🌏🌍🌎

  1. create localization files
  2. put it on translatewiki.net to translate
  3. import translated localizations to app (this works automatically via PR)

4. Make app store versions and screenshot for newly translated apps Moved to dedicated issue #535

Provide IPA file for iOS releases

Feedback from a user:

Can you send me 1.2v of Kiwix app for ipad in ipa format? Because I have ios 8.2, and now I can't update my iPad to iOS 9

Would that be possible?

Allow content download using mobile network

It seems impossible (with 1.7) to download big (>100MB) ZIM files using the mobile network. I have tried yesterday with a ZIM file of 1GB and the download stays "queued", nothing happens and no information is given to the user. The app looks simply buggy from a user perspective. I think this is really important to fix that problem for 1.8.

A better workflow might be:

  • Allow the download because we do not need to (over)protect the user as there is anyway an authorization for the Kiwix app to use the mobile network. So we should rely on this.
  • That said, an alert/dialog/warning (with maybe a "Never show checkbox") should be display if a big ZIM file is downloaded (just to be sure the user does not do something stupid per inadvertence).

Download Mode: Don't ask for «Cellular» on WiFi only models

Each time I start a download in v1.8 I have to choose between «WiFi Only» and «WiFi + Cellular». In my case this does not make sense since my iPad is a WiFi only model. The app should only ask this question if cellular is a real option which means a) the hardware is present and b) a 3G/4G connection is currently established.

Duplicates in the language list

I have a lots of duplicates in the content manager language list. For example "Low German", "Lower Sorbian", "Ligurian", etc... I dozen of languages have duplicates.

Implement Text-to-Speech

iOS SDK provide a TTS (Text-to-Speech) framework which should allow relatively easily to provide a way to read articles. This is useful for many users, in particular the ones suffering from impairments (inability to read). This feature has been implemented on Android and we know that this is really appreciated by users.

Favorites are not saved correctly in IOS

I have currently Kiwix 1.7.1 for Ios installed on my iphone. I have downloaded the database Wikivoyage (complete version). When you bookmark/favoritize an article, it stores it, but the same disappears a while and once you exit the application.

Would appreciate your input on this bug and when it is expected to be resolved if at all.
Thanks

This bug was previously reported at: https://sourceforge.net/p/kiwix/bugs/961/

Create a CHANGELOG file

This CHANGELOG file should be put a the root en list the releases with there respective bug fixes and new improvments. This is necessary to follow the dev over time.

C&C++ not support IOS Device

  Project C & C ++ folder .a library does not support iOS real machine (arm64, armv7), I hope you provide library support for iPhone , thank you!

Table of Index should not release on <h*> "id" attribute

The table of index does not work correctly for the Vikida ZIM files (see openzim/mwoffliner#24). The reason is that <h*> structure DOM nodes do not have an id.

The "id" attribute is not mandatory in HTML and the HTML we have in ZIM files is not generated by us, but by the Mediawiki backend (in the case of Wikipedai). Kiwix should therefore not rely on it.

The app should simply works with indexes (of item in list given by something like getElementsByTagName()).

app should be able to use local zim first when loading external resource

When opening external link in an article, if user have zim file containing the offline version of the external link. App should know to open the locally stored resource, instead of loading from Internet.

An Example:
Say user is browsing the Montesquieu article in WikiQuote zim file, there happens to be a external link, linking to Montesquieu's Wikipedia page.

  • how it is handled now: App open the external link using SFSafariViewController.
  • it would be great if app could do this:
    • see if user has zim file that offline the domain of the external link (en.wikipedia.org)
    • see if zim file has that article (check against the relative URL)
    • load article from zim file or fall back to loading from Internet

LZMA_DATA_ERROR when load content and search async

libkiwix produce an error if start search in a thread when load happens in another thread in the first place.

Reproduce:

  • file: wikipedia_en_wp1-0.8_2016-07.zimaa, ab, ac
  • steps:
    1. load a big article, in this case I loaded "united states"
    2. start a search, search term doesn't matter
    3. app crashed
  • note: you have to do it fast, or use a older(slower) device, so the article loading didn't finish before the search starts
  • note2: it seems that this happens to all search term and all articles

Exception & Call Stack:
libc++abi.dylib: terminating with uncaught exception of type zim::UnlzmaError: inflate-error 9: LZMA_DATA_ERROR
screenshot 2016-07-27 12 00 05

Possible solution:
I could always queue search task after article loading tasks, but this kind of forfeit the benefit of multi threading.

Download content got stuck

I have achieve to get content stuck in the download queue. That means that I was not able to continue the download and not able to delete the (paused) download.

imgpsh_fullsize

Probably the root cause is that:
1 - I have started a download of a content available in the the online library
2 - This content has been superseed by a newer version (and removed from the online library)
3 - The app gets lost because of the lack of information in the online library

Wrong message "succesfully refreshed" in 1.8

Because nothing has happen: I have a little bit network but after a long time (timeout) of "refreshing..." the cloud book store is still empty althoug the message "successfully refreshed" (not sure about the exact wording) is displayed.

Kiwix should open automatically a content in some case

1 - no content is already loaded in the HTML view
2 - a (first) content just finish to download
3 - this triggers the load of the welcome page
4 - at the time the user leaves the library, the content is already loaded and the user does not need to search to start "surfing".

This is necessary to avoid a few users to search how to "open" the content they just have downloaded - not all users intuitively understand that they have to click on the search box an put a term to search.

Is this the official repo?

Hi,

I just found this awesome project as I was looking for an offline wikipedia solution. On the main website and the wiki page I did not see this repo referenced only the sourceforge one.

Thank you.

Laszlo

1.8 Dev Tracking

Localized Strings

  • Library
  • Alerts

Library

  • re-associate session when background download finish
  • notification permission when refresh library for the first time
  • book detail, add actions
  • empty table backgrounds
  • extensive testing downloading System

Alerts

  • Copy URL Alert
  • Encapsulate lang filter alert and defer them if lib is not on screen
  • Rate me alert, with Reachability check

Bug report on Sourceforge

iPhone 6s, running latest iOs 9.

Have the kiwix app with a number of offline wikis downloaded.

Enter search screen, enter "f", application quits immediately when push "space" following that.
If enter search beginning with "f" and continue typing other letters but not yet "space", application quits following second or two.

Have not encountered this except in search beginning with F.

Was not able to create new topic/ticket in dedicated bug section.

https://sourceforge.net/p/kiwix/discussion/604122/thread/f852b10c/?limit=25#0366

App status persist between sessions

Remember open article over app restarts
and article in position, so next time you open the app with the same article and position in article.

[1.5] Crash by deleting files

Steps:

  • Uninstall Kiwix
  • Install last version of Kiwix from testflight (1.5)
  • Download many content
  • Go to the local file list in thelibrary
  • Delete a content

You get:

  • Content is deleted but app crashs/stops immediatly

You want:

  • Content deleted, but no crash

Download does not recover with 1.8

Steps:
1 - No access to internet
2 - Start download of a content
3 - I get in the "download" tab, the content with "error" (I think it should be written "pending")
4 - At the time wifi is again available the download does not start and there is not way to start it (except removing the content and restarting the download).

Better utilize URLSession's discrepancy feature

Tested on 1.5.

Steps:
1 - Download 5 content
2 - Stop the app before the download have completed (no hibernation)
3 - Restart the app
4 - Download are paused, clikc on each of them to resume the download

I get:

  • Almost impossible to resume the downloads. I have to click many times, stronger, more preciser... I don't know exactly and I have only achieved to resume 2/5 downloads

I should get:

  • 5 clicks and all the downloads restarts quickly (or are queued)

Remove code that indicates app use Wallet

in the app store page of kiwix, the app is labeled as using Wallet. Well, I didn't link passkit.framework, but there might be code in apple's advanced operation library that checks passkit permission, which is the likely cause of this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.