LinwoodDev / Butterfly

🎨 Powerful, minimalistic, cross-platform, opensource note-taking app
https://butterfly.linwood.dev
GNU Affero General Public License v3.0
996 stars 68 forks source link

[Feature request]: Stabilize iOS support #244

Open attzonko opened 2 years ago

attzonko commented 2 years ago

Update

Initial iOS support was merged. Download here! Click here to get to the latest update.


Is your feature request related to a problem? Please describe

No response

Describe your feature request!

Amazing work! Do you have any plans to add an iOS app and support using the Apple Pencil? If not would you consider it?

Additional context

No response

Code of Conduct

CodeDoctorDE commented 2 years ago

Hello,

iOS and Mac support (#191) are planned. But unlike mac, you need an apple developer account to get apps on the iPhone. For android you don't need to register and if you want you only need to play 15$ once. On apple you need to pay 99$ yearly. I can't afford this. Do you have any other ideas how I can do this without paying this yearly?

CodeDoctorDE commented 2 years ago

For now you can use the web version: https://butterfly.linwood.dev It has the same functionality and you can use it offline.

MrDrache333 commented 2 years ago

Hello,

iOS and Mac support (#191) are planned.

But unlike mac, you need an apple developer account to get apps on the iPhone.

For android you don't need to register and if you want you only need to play 15$ once.

On apple you need to pay 99$ yearly. I can't afford this.

Do you have any other ideas how I can do this without paying this yearly?

Maybe with Patreon? Or just Support via PayPal, BuyMeACoffe etc.?

CodeDoctorDE commented 2 years ago

That's planned. But I don't know if I'll make a minus financially then. It needs to pay yearly and if I want to have a partreon/paypal, I want to have some money for me. Additionally I need to buy a mac to test it and look if everything works. And a mac costs more than 1000€ https://www.apple.com/de/mac/ Additionally the web version has all features as the native version and I can test it on my linux/windows device. Safari has also the feature to let it run offline: https://caniuse.com/?search=service%20worker.

MrDrache333 commented 2 years ago

That's planned. But I don't know if I'll make a minus financially then. It needs to pay yearly and if I want to have a partreon/paypal, I want to have some money for me. Additionally I need to buy a mac to test it and look if everything works. And a mac costs more than 1000€ https://www.apple.com/de/mac/

Additionally the web version has all features as the native version and I can test it on my linux/windows device. Safari has also the feature to let it run offline: https://caniuse.com/?search=service%20worker.

For an affordable Mac take a look at scaleway.com. There you're able to rent a mac mini for a couple of euros per month. I've used it for some time and it works perfectly 😄👍🏻 And it's definitely cheaper then buying a mac yourself 😄

attzonko commented 2 years ago

Does the web version work with the Pencil?

CodeDoctorDE commented 2 years ago

Should be, you can try it. I tested it on windows and linux and it works fine

CodeDoctorDE commented 2 years ago

Please let it open that other users can find it too

xmha97 commented 1 year ago

I bought an iPad to install this app.

I thought that Apple App Store, like Google Play Store, only takes money from developers once, but now that I understand, I don't want to use it anymore.

Apple's store system is very bad and causes no free or open source apps to be made for iOS.

I hope that in the next version of iPadOS (iOS) it will be possible to sideload apps.

(Sorry for my bad English)

CodeDoctorDE commented 1 year ago

Oh yeah. In europe ios needs to be able to sideload apps. I hope I can add support for ios after that

thomastthai commented 10 months ago

You can run MacOS in a VM on Proxmox.

CodeDoctorDE commented 9 months ago

I tried it but I didnt get metal to work and flutter currently only supports metal

thomastthai commented 9 months ago

Temporary solution, downgrade Flutter to the last working version until they fix the situation. That atleast gets you going.

CodeDoctorDE commented 9 months ago

Hmm, I don't know if this is worth my time. Apple puts a thousand hurdles in front of me and I don't know how I can get it running. Downgrading doesn't help because I'm using the latest features of flutter and I don't know where they introduced it. The web version is one solution for ios users that wants to use my app. I'm open for any prs that fixes it

thomastthai commented 9 months ago

Sorry, Apple's wall garden sucks.

CodeDoctorDE commented 8 months ago

Sorry for the bad updates, but... Apple is making bad decisions to comply to the eu regulations... https://www.youtube.com/watch?v=cVEbxpOE13s I won't pay a runtime fee for a free app

thomastthai commented 8 months ago

I wished those people who buy Apple products realize the corporate behaviors they are supporting. It comes down to greed.

I need to buy a Mac Mini or MacBook Air to develop an app. Not looking forward to paying $100/year on top of 15-30% Apple tax.

fritzlb commented 8 months ago

If you own a mac and an Apple ID you can develop for iOS (without paying anything), just not distribute the app using the appstore. It is sufficient to log in to developer.apple.com once and accept the terms. distributing an ipa isn't that uncommon for projects that simply aren't allowed on the app store (UTMapp is an example). The issue I see with app store distribution is (apart from apples bs with their fees) the license, afaik gplv3 (and therefore agplv3) are fundamentally incompatible with apples terms

CodeDoctorDE commented 8 months ago

Hmm, I wouldn't change the license, I like the license for a end user application. And I wouldn't pay money for a platform where I don't know any device. I heard the app needs to be also verified and signed if you distribute it with a file?

fritzlb commented 8 months ago

Yesn‘t. You can (with apples new terms and runtime fees) get the app signed and then everyone can sideload it using an alternative App Store, but that’s not what I meant. Everyone with an Apple ID can sideload up to 3 apps to their devices, but the certificates do expire after about a week or so. There are tools like sideloadly or AltStore that run on a pc in your local network and automatically refresh the app certificates once in a while. So in theory it would be possible to distribute an unsigned ipa file and everyone who‘d like to install it has to sign it themselves - either with a paid dev account, then the certs last one year or with a free account, then they‘ll have to renew every week. Still not nice what Apple does to their developers

CodeDoctorDE commented 8 months ago

Hmm, very developer and user friendly... I think I need to add a guide to the documentation to explain this. If I have this ipa, should I simply add it to the downloads? If you are a bit familiar with this, it would be nice if you could create a pr for this. The build.yml needs to have a new build-ios step.

fritzlb commented 8 months ago

Yeah I can probably do that, might take a while bc of my university exams though

CodeDoctorDE commented 8 months ago

No problem. There is no hurry. I assigned you to this issue so I can see that's your issue

fritzlb commented 8 months ago

Okay, the ipa does build in my fork. It's not pretty (yet) and the app is quite large, by setting the minimum ios version to something like 14.4+ we could probably get our file size down from ~90mb to ~30mb.

CodeDoctorDE commented 8 months ago

Wow that's wonderful. Can you test if everything works fine on it? 90mb is really quite large but removing an 3 year old operating version isn't good. I'm also supporting windows 7 and android 5. How about releasing 2 binaries: one smaller with 14.4+ requirement and one for older devices? You could solve this for example by creating a script in app/scripts and replacing it with higher requirements

fritzlb commented 8 months ago

for some reason compiling locally reduces file sizes by a lot for me, with the right settings (14.4+) I got the file size down to 16mb, while compiling using github actions creates files with ~80mb. two binaries would be an option, idk how xcode stores the minimum ios version and idk either how to change it with a script or sth. anyway... the app needs a lot of work before ios becomes usable, importing packages is impossible, trying to use the camera will result in a crash, including images doesn't work, ... maybe a dependency isn't compatible with ios or requires a newer minimum version? also the build number isn't the app version number right now

CodeDoctorDE commented 8 months ago

I commented on this issue. Can you look if the min requirements are at iOS if it is set to iOS 12? Also to work with imports, we need to add Uniform Type Identifiers to all XTypeGroups (you can search for this in the code. If you are familiar with this you can add this in your pr, otherwise I will try adding it after that

CodeDoctorDE commented 8 months ago

Update 2024-02-10:

Initial iOS support was merged. It will be available in nightly versions starting with 2.0.3-rc.1! I renamed this issue to better reflect the current state. Please report all iOS problems here. I will post updates here to the current status. After stabilizing, this issue will get closed and all issues should be reported as normal issue. Known issues:

fritzlb commented 8 months ago

Just tested the build, works beautifully so far! As for the camera thing simply adding the camera permission nscamerausagedescription to info.plist doesn‘t change anything except that the apps asks for camera permissions before crashing Also export seems to be broken

CodeDoctorDE commented 8 months ago

It should already be fixed in the latest commit. Can you test it and maybe debug it? Here is a guide for this: https://docs.flutter.dev/tools/vs-code#run-app-with-breakpoints, https://docs.flutter.dev/platform-integration/ios/ios-debugging or maybe it works with xcode?

fritzlb commented 8 months ago

Camera works. Export doesn't. Here is a file with all logs I could collect: bterfly.txt

for exporting the document it seems like "Only support loading options for CKShare and SWY types." is the issue for exporting svg creating the image already seems like an issue, idk if iOS supports creating svgs at all exporting an image doesn't work bc of some entitlements if I interpret the log correctly, probably something similar as with the camera. pdf seems like a similar issue like exporting a document. changing the quality in the print dialog might crash the app, but the iOS print window does open and actually can be used to export a pdf.

CodeDoctorDE commented 8 months ago

I think I fixed it in https://github.com/LinwoodDev/Butterfly/commit/965eb0b219f1dc3a7323df5b30abfef17b100200. Can you try it?

fritzlb commented 8 months ago

log.txt nope, different errors but same result.

CodeDoctorDE commented 8 months ago

okay, now it should finally be fixed https://github.com/LinwoodDev/Butterfly/commit/4fc05efb2567ca523e2ce944ab054a77028889bd

Btw: the camera also needs to have microphone permission for some reason, maybe this was the fix

fritzlb commented 8 months ago

exporting bfly does work but throws errors, the rest doesn't.

error.txt for exporting images it seems like there is still a permission error ...and my Xcode is taking about 70GB of storage again for pretty much nothing with no easy way to delete it, now I know again why I didn't like iOS development.

CodeDoctorDE commented 8 months ago

Okay thanks for testing. I couldn't help you with xcode, I don't have any experience with this. The exportPdf should be fixed now. Can you join the discord/matrix so we can look at it, otherwise this issue can get very large

Lenni-builder commented 5 months ago

What about publishing this to TestFlight? I know a few iPad users who'd like to try this out, but yideloading is too complicated for them.

fritzlb commented 5 months ago

I'm pretty sure that's against the AGPL v3 (cause nobody's able to run modified code on their devices because of codesigning with Apple) Long story short: apple isn't developer friendly, especially not open source developer friendly

CodeDoctorDE commented 5 months ago

For a testflight system I also need a developer account which costs me too much money for this what it's worth. Apple is the most closed system I could know of. The eu has tried their best to open it a bit but it doesn't help. In the eu you also need to pay install fees if you didn't push it to the appstore.

Lenni-builder commented 5 months ago

Oh right, that Apple and GPL thing...

Lenni-builder commented 5 months ago

For a testflight system I also need a developer account which costs me too much money for this what it's worth. Apple is the most closed system I could know of. The eu has tried their best to open it a bit but it doesn't help. In the eu you also need to pay install fees if you didn't push it to the appstore.

Yes, I also hate Apple, but sadly their products are very popular, especially in German schools for some reason.

CodeDoctorDE commented 5 months ago

Yeah I can agree. I was also on a german school and they all had ipads. The only thing you can do to run butterfly on these devices is to use the webversion sadly

Lenni-builder commented 5 months ago

I don't know if it's a Flutter or Safari/WebKit issue, but the web version is as good as unusable on iPads

CodeDoctorDE commented 3 months ago

Welcome to the Apple news :)

The eu doesn't like what apple does with their new rules: https://ec.europa.eu/commission/presscorner/detail/en/IP_24_3433 I hope they will change their rules on their os so I can finally support ios/ipad os officially

fritzlb commented 3 months ago

Just read about that but I kinda fear it'll take a long time.

Obi-Wahn commented 2 weeks ago

does anyone have an ipad with ios 18 and is in the eu? There should be new possibilities with AltStore:

https://techcrunch.com/2024/09/13/alternative-app-stores-allowed-on-the-ipad-in-the-eu-starting-september-16/

fritzlb commented 2 weeks ago

I do! Already installed AltStore which works pretty well. The issue with a paid developer account and mac persists tho and while it seems like Apple is finally waiving the stupid ‘core technology fee‘ for developers that only publish free apps, all the hassle with app review remains. Also they didn’t change their DRM or TOS which means there’s a risk that every contributor (even of only a few lines of code) could take down the app at any time

To properly support iOS it’d need for every contributor to sign an alternative license that allows distribution via app store/alternative stores, at least 500€/year for hardware, apples developer subscription and a lot of time to deal with app review