'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead.

See original GitHub issue

I added the Notification Service Extension as specified in the Remote Notification Support page for iOS, and all of a sudden builds fail and I get

'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead.

error on react-native-safe-area-context.

I rolled back the installation steps for notifee and the build succeeds.

Any idea what is causing this error ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
mikehardycommented, Nov 19, 2021

I’ve seen this. You can “fix” it temporarily with a Podfile workaround turning off a specific compiler flag

Here’s firebase-ios-sdk dealing with the same thing, that might shed light on a strategy to make the library more extension compatible https://github.com/firebase/firebase-ios-sdk/issues/1357

I think adding this config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'

In a Podfile stanza like this (but you don’t have to use our other settings of course) would get you building https://github.com/invertase/notifee/blob/4a720dc8ac52506b302f6d9252a99cefc1d8cb28/tests_react_native/ios/Podfile#L48-L56

1reaction
helenafordcommented, Nov 19, 2021

Hi, sorry you faced this. Would you be able to provide some more details, code snippets or a reproducible app by cloning our example app?

Read more comments on GitHub >

github_iconTop Results From Across the Web

'sharedApplication' is unavailable… | Apple Developer Forums
My app has been running good 20mins ago. But when I build it again just after I removed and updated some pods, my...
Read more >
'sharedApplication' is unavailable: not available on iOS (App ...
'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead.
Read more >
'sharedApplication' is unavailable: not available on iOS (App ...
Description: I'm trying to configure OneSignal for iOS however I'm ... Use view controller based solutions where appropriate instead.
Read more >
not available on iOS (App Extension) - Use view controller ...
[Solved]-'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead-swift.
Read more >
'sharedApplication' is unavailable: not available on iOS (App ...
iOS : WatchKit : ' sharedApplication ' is unavailable : not available on iOS ( App Extension ) - Use view controller based...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found