Skip to content

'sharedApplication' is unavailable: not available on iOS (App Extension) #163

@onebigdoor

Description

@onebigdoor

We've recently updated our One Signal installation which requires nesting the Notification Service Extension target inside the app target within the Podfile. This results in the following build errors from the Rollbar lib:

.../ios/Pods/Rollbar/KSCrash/Source/KSCrash/Reporting/Sinks/KSCrashReportSinkEMail.m:140:41: error build: 'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead.

.../ios/Pods/Rollbar/KSCrash/Source/KSCrash/Reporting/Sinks/KSCrashReportSinkEMail.m:250:31: error build: 'initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles:' is unavailable: not available on iOS (App Extension) - Use UIAlertController instead.

After contacting OneSignal, they've suggested that these errors could/should be warnings, and the installation is correct. We can get around the error by adding config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO' to our post-install scripts in the Podfile.
Posting here in case anyone else needs this work-around, or Rollbar wants to consider this update to SDK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions