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

Fixed all iOS errors in example #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Aldaniee
Copy link
Collaborator

@Aldaniee Aldaniee commented Nov 7, 2022

No description provided.

Copy link
Collaborator

@MoralCode MoralCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. still haven't had a chance to test on iOS, although the example app seems to run on android so that's a plus.

id be curious if any of the changes to *.xcworkspace files can be safely gitignored. i think some of these folders may be storing configuration specific to your IDE that dont need to be in the repo, but im not familiar enough with iOS to know what those are offhand.

example/lib/main.dart Show resolved Hide resolved
example/ios/Runner/Info.plist Show resolved Hide resolved
Comment on lines +46 to +49
<key>NSBonjourServices</key>
<array>
<string>_dartobservatory._tcp</string>
</array>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont really understand this, but looks like some internal flutter thing. were these changes made by you or mostly automatic?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this and found it from a stack overflow response. Can't remember from where but it got rid of some error I was facing. Could probably try without to see what it was.

@MoralCode
Copy link
Collaborator

MoralCode commented Nov 10, 2022

Let me know once you get an iOS 16 device that can successfully run a test with a real piece. it works for me on Android and my iOS 15.7.1 device using the following procedure (in case anyone else is curious):

  1. open the app, ensure it has the correct permissions and observe that the screen says "Start scanning"
  2. turn on your erg and put it into connection mode so it begins advertising via bluetooth
  3. observe the app message inform you that the device is connecting. wait for the app to say "setting up streams"
  4. set up a piece on the erg (a single time 0:20 piece is the minimum and is fine for this purpose) and start rowing
  5. wait for the piece to end. the app should show you the average stroke rate, distance, and timestamp of your piece within a minute

Comment on lines +51 to +54
<string>The app uses bluetooth to find, connect and transfer data between different devices</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>The app uses bluetooth to find, connect and transfer data between different devices</string>
<key>UIBackgroundModes</key>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we edit these descriptons to be more specific to this example app?

@MoralCode
Copy link
Collaborator

Since this change is specific to FlutterBleLib it has been superseded by #17. many of these core changes to bring the example app up to date and avoid errors by waiting for things to fully connect/set up before starting to perform actions like scanning or reading data

@MoralCode MoralCode closed this Nov 16, 2022
@MoralCode
Copy link
Collaborator

well the other PR hasnt been merged yet and the ios plist changes probably would be helpful anyway, so this might still be useful. TBH i need to go back in and figure out what I was thinking with the reactive rewrite stuff

@MoralCode MoralCode reopened this Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS 16 needs restoreStateIdentifier specification and has Error 103 issue
2 participants