This error may occur when we try to build some third-party pods which are using [UIApplication sharedApplication]
According to Apple
Some APIs Are Unavailable to App Extensions
Because of its focused role in the system, an app extension is ineligible to participate in certain activities. An app extension cannot:
- Access a
sharedApplicationobject, and so cannot use any of the methods on that object
To temporarily get rid of this you can Set Require Only App-Extension-Safe API to “NO”. in build settings for that target and compile .