Skip to main content

Around2Me – Instantly Discover Nearby Essentials

In today’s fast-paced world, finding what you need — exactly when you need it — should be effortless. That’s where Around2Me comes in. Whether you're navigating a new city, running errands, or just looking for a bite nearby, Around2Me helps you instantly find nearby essentials like ATMs, restaurants, hospitals, gas stations , and much more. Around2Me 🚀 What Makes Around2Me Different? Unlike many location-based apps that are bloated with unnecessary features or force users to sign up, Around2Me is lightweight, private, and instant . Here's how: 📍 Location-Based Discovery The app instantly detects your current location and shows you relevant nearby places — from pharmacies to petrol pumps, cafes to banks. 🗺️ Map Integration Tap any place to view it on the map and get turn-by-turn directions in seconds. 🧩 Clean Categories Looking for something specific? Use quick-access filters like Hospitals , ATMs , Coffee Shops , or Parking . 🔐 No Signups, No Data Collection ...

Push Notifications Service - Local Push Notifications Swift 5

How to create local notifications in iOS using swift 5 on click a custom Button. Local notifications are most commonly used in apps like calendar alert, alarm app set event and more Alert with a customized message, a to do reminder etc. So let us start and learn how we can integrate local notification in iOS using swift language. Follow below steps, to integrate local notifications in swift. 

Push Notifications Service - Local Push Notifications Swift 5


Local and Remote Notification Programming Guide - Local notifications and remote notifications are ways to inform users when new data becomes available for your app - Local and Remote Notifications Overview


Local Notifications: Now Getting Started:- 


Step 1:  


import UserNotifications

 

Step 2:


    override func viewDidLoad() {

        super.viewDidLoad()

        // Configure User Notification Center

            UNUserNotificationCenter.current().delegate = self

    }


Step 3:


@IBAction func didLocalNotification(_ sender: Any) {

        // Request to notification settings

        UNUserNotificationCenter.current().getNotificationSettings { (notificationSettings) in

            switch notificationSettings.authorizationStatus {

                case .notDetermined:

                    self.requestAuthorization(completionHandler: { (success) in

                        guard success else { return }

                        self.getScheduleLocalNotification()  // Schedule Local Notification

                    })

                    // Request Authorization

                    break

                case .authorized:

                       self.getScheduleLocalNotification()  // Schedule Local Notification

                    break

                case .denied:

                    print(" Not Allowed to Display Notifications- Application")

                case .provisional:

                    break

                case .ephemeral:

                    break

                @unknown default:

                    break

            }

        }

    }

 

Step 4: // Request For Authorization

 

private func requestAuthorization(completionHandler: @escaping (_ success: Bool) -> ()) {

        // Request Authorization

        UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { (success, error) in

            if let error = error {

                print("Request Authorization Failed (\(error), \(error.localizedDescription))")

            }

            completionHandler(success)

        }

    }

 

Step 5:

 

    private func scheduleLocalNotification() {

        // Create Notification Content

        let notificationContent = UNMutableNotificationContent()

 

        // Configure Notification Content

        notificationContent.title = “iOS Developer live"

        notificationContent.subtitle = "Local Notifications"

        notificationContent.body = "this tutorial, local notifications with the User Notifications framework. & how to schedule "

 

        // Add Time Interval Trigger

        let notificationTrigger = UNTimeIntervalNotificationTrigger(timeInterval: 10.0, repeats: false)

 

        // Create Request for Notification

        let notificationRequest = UNNotificationRequest(identifier: "cocoacasts_local_notification", content: notificationContent, trigger: notificationTrigger)

 

        // Add Request to User Notification Center

        UNUserNotificationCenter.current().add(notificationRequest) { (error) in

            if let error = error {

                print("Unable to Add Notification Request (\(error), \(error.localizedDescription))")

            }

        }

    }

 

Step 6:

 

extension UIViewController: UNUserNotificationCenterDelegate {

 

    func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {

        completionHandler([.alert])

    }

 

}


Comments

Post a Comment