pusher/libPusher

add objective c documentation for Beam integration

Closed this issue · 1 comments

Hi,
I want to integrate Beam to my iOS app but the documentation is only for swift and I don't know how to convert it for objective c:

let pushNotifications = PushNotifications.shared

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    self.pushNotifications.start(instanceId: "446f5eef-3a44-47d0-b6ca-ba2e678be77b")
    self.pushNotifications.registerForRemoteNotifications()
    try? self.pushNotifications.addDeviceInterest(interest: "hello")
    return true
}

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    self.pushNotifications.registerDeviceToken(deviceToken)
}

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
    self.pushNotifications.handleNotification(userInfo: userInfo)
}

it would be great that if the documentation is available for both swift and objective c

I believe you have opened this issue on the wrong library. In the swift Beams library you can find example code, including some Objective C sample code, as detailed at https://github.com/pusher/push-notifications-swift#example-code.

I'll close this as it is on the wrong library as explained - if you need further support please contact us at https://support.pusher.com/hc/en-us/requests/new