jidoujisho icon indicating copy to clipboard operation
jidoujisho copied to clipboard

iOS Build

Open Roxiun opened this issue 1 year ago • 9 comments

Since this app is built using flutter is it possible to get an iOS build (not publish to app store but just an ipa)

Has anyone had an experience with this? Are there any issues that have been encountered?

If so I am happy to contribute and try getting it to work

Roxiun avatar Jun 11 '23 04:06 Roxiun

Hi @Roxiun, first of all I'd like to say that your expression of interest to contribute means a lot to me -- I have never attempted to build the app for iOS, and I have never tried to set up the iOS-specific code of any dependencies that I use, you're welcome to try --

My guess is that it would be a matter of fixing compile errors until this thing finally boots, but do note the things I've written in the FAQ that you might run into attempting this.

I'm happy to provide guidance if you're willing to attempt this, we can move this in a discussion or you can contact me on Discord if you'd like to get in touch.

arianneorpilla avatar Jun 11 '23 04:06 arianneorpilla

If you do manage make a build of this please post the build

xrishox avatar Jun 12 '23 14:06 xrishox

My guess is that it would be a matter of fixing compile errors until this thing finally boots, but do note the things I've written in the FAQ that you might run into attempting this. Both of the dependencies in the FAQ seem to support iOS so hopefully no

I'm happy to provide guidance if you're willing to attempt this, we can move this in a discussion or you can contact me on Discord if you'd like to get in touch.

~~I'll get in touch once I make some progress.~~ Is there a discord server or something where I can get in touch? I'm having some issues with a wakelock repo not existing. Having a quick lock it seems to be related to wakelock windows and not even ios?

I'm not 100% sure how we can work around the local path subtitles issue but for Mokuro there are programs which can create pdfs from OCR hence eliminating the issue of local image loading (as its embedded within the pdf)

Roxiun avatar Jun 18 '23 10:06 Roxiun

There are currently some maintenance shenanigans with the wakelock repo.

It's caused my git pulls and flutter pub gets and Git workflows to fail a while ago, I've resolved these and the latest commit should pass if you check the pubspec.yaml for it or just pull and rebase from my main. A majority of users reach me through the #jidoujisho channel in themoeway Discord server.

arianneorpilla avatar Jun 19 '23 00:06 arianneorpilla

Also, this is just a shot at the dark, but if somehow the local files on an iPhone can be exposed with an HTTP server, maybe this would work? I'm not sure what the limitations are, so we'll just have to do trial and error until something works.

My guess is once the flutter pub get succeeds, with your flutter run you might get packages that fail to compile due to some things that have never been set up (I would check the earliest diffs for the android folder to see what those are). Then the Podfile would have to be set up.

Once you get the project to actually compile, I imagine the app would not hit the main menu due to some things in the AppModel's initialise having some code that is specifically for Android (i.e. checking local storage directories or doing version checks, so would have to just make platform checks and implement iOS-specific code).

Then it's just a matter of comparing between an Android emulator/real world device and an iOS real world device for every feature and seeing what doesn't work. It's a lot -- but on the flip side, I imagine it's doable and just a matter of trying and fixing platform-specific things that are found one step at a time. Happy to help with every step of the way.

The real blocker that I think is not Flutter dependency related is finding a parallel to the AnkiDroid API, but we'll cross that bridge when we get there.

arianneorpilla avatar Jun 19 '23 00:06 arianneorpilla

Hi @lrorpilla maybe for quick fix the issue like me you can use my repo

  wakelock:
    git:
      url: https://github.com/chandrabezzo/wakelock.git # repository
      ref: main # branch
      path: wakelock/ # folder
  wakelock_windows:
    git:
      url: https://github.com/chandrabezzo/wakelock.git # repository
      ref: main # branch
      path: wakelock_windows/ # folder

chandrabezzo avatar Jun 19 '23 01:06 chandrabezzo

Also, this is just a shot at the dark, but if somehow the local files on an iPhone can be exposed with an HTTP server, maybe this would work? I'm not sure what the limitations are, so we'll just have to do trial and error until something works.

I know that local files can be exposed via HTTP server as I’ve seen KantanManga and PPSPP access local files before. I don’t think this should be too much of issue to load in subtitles. It just may have to be kept the app’ specific folder, or manually selected.

Edit: ImmersionReader also accesses local files without any issue. I think iOS just requires a user to manually select the file.

The real blocker that I think is not Flutter dependency related is finding a parallel to the AnkiDroid API, but we'll cross that bridge when we get there.

Not a complete solution but I looked through a few apps and the way they handle it is just connecting to a computer running Anki with AnkiConnect exposed to the local network. It’s far from ideal however it’s better than nothing.

Roxiun avatar Jun 19 '23 01:06 Roxiun

Not a complete solution but I looked through a few apps and the way they handle it is just connecting to a computer running Anki with AnkiConnect exposed to the local network. It’s far from ideal however it’s better than nothing.

To clarify the situation with Immersion Reader, you can export to Anki by

  1. On device: user selects Anki as the target app to export their csv file. No need for another computer or server here, but the user will have to select the field mapping on their phone.
  2. Through a computer: user exports the csv file to their computer through airdrop or other means. Users can use Anki Dojo (or desktop Anki) to import their words. No need for field mapping every time and other stuff like audio can be integrated.

You can also try url schemes. That seems to only support one word at a time, but it might be helpful to grab deck information. Anything along those lines would likely produce too much friction for a general iOS app, but I could see someone doing it for their private app.

mathewthe2 avatar Aug 08 '23 23:08 mathewthe2

In the next 4 months iOS is getting non-bad sideloading in the EU (with possible workarounds to sideload around the world). With that in mind Third-party services and Store submission, cost and compliance will no longer be blockers.

KolbyML avatar Jan 15 '24 17:01 KolbyML