Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for iOS #26

Open
jeroen1602 opened this issue Sep 1, 2020 · 21 comments
Open

Add support for iOS #26

jeroen1602 opened this issue Sep 1, 2020 · 21 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jeroen1602
Copy link
Owner

Since the app is made with Flutter it should be relatively easy to create a build for iOS.
I however don't have the required devices to do this, so it would be nice if there was someone who could pick this up.

@jeroen1602 jeroen1602 added enhancement New feature or request help wanted Extra attention is needed labels Sep 1, 2020
@jeroen1602 jeroen1602 pinned this issue Sep 1, 2020
@HeLau1337
Copy link
Contributor

HeLau1337 commented Sep 3, 2020

Hi @jeroen1602, first of all: Cool app! Thanks for making it free and open source! (Came here from the post on reddit :) )

I was hoping I could try to work on the iOS version of the app by only using my Macbook (with Bluetooth) and the xcode simulator because I don't own a real iOS device. Unfortunately you can not use Bluetooth in the simulator (afaik, did some quick research) :(
But here are screenshots of the app running on iOS in case you have not seen it before:
Screenshot 2020-09-04 at 00 26 03

Screenshot 2020-09-04 at 00 53 58

I think I saw that you have already written some code for iOS support (Bluetooth permission stuff for iOS?), right? So do you expect that there will be (many) other necessary adjustments to make it work on iOS?

If I find some time for it in the future, I'm going to try to contribute to this project :)

@jeroen1602
Copy link
Owner Author

Thanks for the help. I am an Android developer myself so I have more knowledge about that platform, but form what I have been able to find about Bluetooth Low Energy on iOS is that you just get the permission from the system without any hassle.

So from my understanding all we need is someone to test the app and fix possible bugs.
And for distribution we need some instructions on side loading (like this). And maybe if someone is generous they could sponsor uploading to the App store.

P.S. can you check if I did the app icon correctly?

@HeLau1337
Copy link
Contributor

HeLau1337 commented Sep 4, 2020

Yeah, I don't really consider myself a proper iOS developer either. I made one rather basic iOS app with Swift (unpublished), without using device features like Bluetooth (or similar stuff where you'd need permissions).
But I'm familiar with flutter since I have created two slightly more complex apps with flutter (focused on Android though). I thought that this knowledge (and my Macbook) could be enough to work on the iOS version of lighthouse pm.

all we need is someone to test the app and fix possible bugs.

Maybe I can borrow an iPhone from friends/family to do this...

for distribution we need some instructions on side loading [...]. And maybe if someone is generous they could sponsor uploading to the App store.

I think this going to be the real problem. Your link to these instructions on side loading an iOS app is interesting but damn... these would be quite a lot of steps to get a simple iOS app running. If someone who is not a developer and wants to sideload the app, they would need to download xcode first (around 8 GB i think). And in our case they'd probably also need to install and setup the flutter sdk... (not sure about this). So basically they need to be a flutter developer to install the lighthouse pm app, lol.

I really hate the way Apple is treating small developers who just want to publish a small (free) app. $99/year and no easy way to sideload apps (like apks).

Sorry, back to the topic... Yes, I'm seeing your app icon in the iPhone simulator. But it looks like the black lighthouse icon is not perfectly centered. Take a look:

@jeroen1602
Copy link
Owner Author

Damn I was really hoping the icon would work, but I guess I should create the icon again. Unless you can do it the original SVG file is on the local_assets folder.

I was also thinking about using Flutter web and the Bluetooth web API to get past this restriction. But according to can I use it isn't supported (source). So that isn't a good route either.

@HeLau1337
Copy link
Contributor

HeLau1337 commented Sep 4, 2020

How about this?

Used your original SVG and the Icon Set Creator App for macOS.

@jeroen1602
Copy link
Owner Author

That looks like what it was supposed to look like. Thanks!

HeLau1337 added a commit to HeLau1337/lighthouse_pm that referenced this issue Sep 4, 2020
HeLau1337 added a commit to HeLau1337/lighthouse_pm that referenced this issue Sep 5, 2020
@jeroen1602
Copy link
Owner Author

In the file bloc.dart there is a check for the iOS system version, that I couldn't test. It would be appreciated if anyone can test this and fix it if needed.

HeLau1337 added a commit to HeLau1337/lighthouse_pm that referenced this issue Nov 8, 2020
@AdlerXiviD
Copy link

Hey guys,
thanks for your work. Is this still WIP?

@jeroen1602
Copy link
Owner Author

Well the app seems to work correctly on iOS. The problem is that I have no way of building for it and I'm not planning on paying the 100 euro a year developer program fee.

So if you are able to do this, you are free to do so.

@HeLau1337
Copy link
Contributor

HeLau1337 commented Feb 10, 2021

@AdlerXiviD I'm not working on anything related to this issue right now, too. But as jeroen said, there's certainly some work to do regarding publishing the iOS app on the App Store.


@jeroen1602

Well the app seems to work correctly on iOS.

Were you able to test the iOS app with Bluetooth enabled? (I was not)

@jeroen1602
Copy link
Owner Author

@HeLau1337 It seems I misremembered, I thought that we did test that. Though in my experience talking to iOS devs the Bluetooth stack on iOS is a bit more robust than on Android, so I'm pretty confident that it will work.

@SockToy
Copy link

SockToy commented Apr 15, 2021

Have this compiled and executing on my devices. Will check functionality later tonight. Minor note: Info.plist is missing a key (NSBluetoothAlwaysUsageDescription) /value (string) pair for bluetooth usage description for the code to run.

Want a PR?

@jeroen1602
Copy link
Owner Author

Sure throw me a PR.

@ghost
Copy link

ghost commented Jul 11, 2021

Hey guys, quick question. Does the website build actually work? I just installed a Bluetooth Web browser (BlueFy) on my iPhone and it seems to work kinda. It recognizes the base stations, but as soon as I connect it immediately disconnects.

Only error code I can find is “unable to find characteristic that satisfies request options”

I really wanna get this to work on my iPhone :/

@jeroen1602
Copy link
Owner Author

@DerpNerb I have tried it for V2 lighthouses on Chrome for Android, Linux and Windows. I have not tried it using the BlueFy browser on an iPhone.

If you try this test site from the library are you able to get any information from your lighthouses?
https://jeroen1602.github.io/flutter_web_bluetooth.

@SockToy
Copy link

SockToy commented Jul 12, 2021 via email

@ghost
Copy link

ghost commented Jul 12, 2021

@jeroen1602 I can connect to the base stations via that site, but when connected the site won’t display anything. It’s just a slightly gray color. No errors this time around.
9301755A-2697-414B-B9D2-649CF0A03CB6

@jeroen1602
Copy link
Owner Author

@DerpNerb hmm I think that the browser may not be using the same version of the Bluetooth web spec.
It looks like it may be ignoring the optional services request and thus disallowing the site to communicate with these services.
But I'm not sure and it's hard for me to debug since I don't have an iOS device.

@ghost
Copy link

ghost commented Jul 28, 2021

Hmm yeah I don’t think the Bluefy browser support every function. Though I honestly believe it’s possible another way.

I went to this site:
https://googlechrome.github.io/samples/web-bluetooth/discover-services-and-characteristics.html

And connected to one of the base stations. The console shows I can read the characteristics.
3FF25C08-1222-4218-9794-F5E982DDBE44

lemme know if you want me to run more tests.

@kitlith
Copy link

kitlith commented Aug 6, 2021

fyi for easier sideloading on ios there's https://altstore.io/ so people don't need to compile it themselves

@HuJohner
Copy link

I built the app from the master branch on my iPhone and the app "works" but it won't find any base stations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants