urbanairship / ios-library

Urban Airship iOS SDK
http://urbanairship.com
Apache License 2.0
478 stars 265 forks source link

Which documentation is correct? #401

Closed paulsUsername closed 5 months ago

paulsUsername commented 5 months ago

The documentation on airship:

Screenshot 2024-04-11 at 21 52 30

The actual SDK in Airship.push:

/// Called when APNS registration completes.
///
/// - Parameters:
///   - authorizedSettings: The settings that were authorized at the time of registration.
///   - status: The authorization status.
@objc
optional func notificationRegistrationFinished(
    withAuthorizedSettings authorizedSettings:
        UAAuthorizedNotificationSettings,
    status: UAAuthorizationStatus
)

/// Called when notification authentication changes with the new authorized settings.
///
/// - Parameter authorizedSettings: UAAuthorizedNotificationSettings The newly changed authorized settings.
@objc optional func notificationAuthorizedSettingsDidChange(
    _ authorizedSettings: UAAuthorizedNotificationSettings
)

/// Called when the UIApplicationDelegate's application:didRegisterForRemoteNotificationsWithDeviceToken:
/// delegate method is called.
///
/// - Parameter deviceToken: The APNS device token.
@objc optional func apnsRegistrationSucceeded(
    withDeviceToken deviceToken: Data
)

Which is correct and which should be called when?

Even the docuemtation on your trouble shooting is wrong!

Screenshot 2024-04-11 at 21 53 38

This method is actually called:

config.isAutomaticSetupEnabled = false

This is my first 5-6 hours of using airship. How out of line is the documentation?

rlepinski commented 5 months ago

It should be isAutomaticSetupEnabled not automaticSetupEnabled. That changed during the swift migration but you can use either key in the airshipconfig.plist.

You are not calling through to AirshipPush, instead you are calling through to AppIntegration class. The documentation looks correct to me other than isAutomaticSetupEnabled key