Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
onebigdoor opened this issue Sep 16, 2022 · 0 comments
Open

Comments

@onebigdoor
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant