-
Notifications
You must be signed in to change notification settings - Fork 149
get example app working #68
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
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
894b4d1
add setter for ID
thebookins c53d90d
use id instead of ID
thebookins 2f344f0
call pod install
thebookins 552a72a
remove deprecated 'characters'
thebookins 36aee69
fix pod install errors
thebookins efc5616
set deployment target to 10.3
thebookins f2f5d1e
revert last commit
thebookins 88bce54
change iOS version in podspec
thebookins 567c27e
install pod
thebookins a5de112
fix 'UIWindow.rootViewController must be used from main thread only'
thebookins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a public setter to Transmitter.id isn’t the right solution, since additional state on Transmitter like activationDate need to be reset. I think it’s cleaner for clients to recreate Transmitter when the ID changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ps2, will do, much cleaner. I have changed the client code to recreate Transmitter; it just doesn't always start scanning reliably after a change to the transmitter ID. Once I've chased that down I'll push the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything I need to do in the client to tear down the old transmitter and replace it with a new one? When I try this, and change the ID in the client, the CBCentralManager state is sometimes
.poweredOn
, which is all good, but sometimes.unsupported
, in which case we can't scan. Does the central manager need to be a singleton or something?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we store the transmitter state (
activationDate
andlastTimeMessage
in the TransmitterID object, which gets renewed on a new ID). If we write the setter like thisthen we scan afresh when the user changes ID.
I'd be happy to replace the entire Transmitter object, but can't find a clean way for the old Transmitter object to release all bluetooth resources in time for the new object to use them (if that makes sense).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do need to reset the bluetooth peripheral if we're changing the transmitter id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #70; I've incorporated some of the things you've been pointing out there. I think this PR should just focus on getting the example app building. I.e. Removing cocoapods, and incorporating the example app into the project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks!