I started making my first app, which basically is all about getting certain notifications when being close to a beacon. I wanted a notification to show when the beacon proximity was '.near'. And all what be fine, if not for the notification showing over and over again, even though I tried to regulate it with a boolean to show it just once. I know the code might be much, for which I apologize, but I digged through StackOverflow and haven't managed to find the solution, you guys are all I have now :D
Most of the code is taken from an iBeacon sample app. I believe it was written in Swift 3 or 4, as when I launched the project, Xcode suggested migrating the code to Swift 5, which I did. I also changed some deprecated commands to the valid ones.
Anyway, here's the code (please don't mind the table view etc., all I care about now is just the notification issue):
SPONSORED Use Paw to build, test and describe web APIs. Paw has a lightning fast native macOS interface to compose requests, collaborate in real-time on API specs, and generate client code for your applications. You can import and export API definitions.
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.