[iOS] sharedApplication is unavailable: not available on iOS (App Extension)

Ich habe aktuell ein Problem mit RestKit und weiteren Extensions in Verbindung mit einer Apple Watch Extension. Nach einem Update meiner CocoaPods Installation wurde ich mit folgendem Fehler konfrontiert:

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

Ich konnte mein Projekt nicht mehr bauen, doch dafür gibt es einen kleinen Kniff, den ich bei Stackoverflow entdeckt habe:

To remove sharedApplication issue from CocoaPods Libraries you just need to change Build Options within Build Settings for your pod.

Just type to search Require Only App-Extension-Safe API and then change the value to NO as it is on the image below:

Xcode Einstellungen

Propably you will need to do this for every of your pods.

Das hat bei mir jedenfalls geholfen, auch wenn das an sich keine schöne Lösung ist.

Quelle: Link