Search code examples
iosazurepush-notificationazure-api-apps

Issue with setting up iOS push notifications because AppDelegate.h isn't finding a needed header


I'm following instructions for push notification setup for iOS. Instructions can be found here:

https://azure.microsoft.com/en-us/documentation/articles/notification-hubs-ios-get-started/

I am at the step where I must:

Open your AppDelegate.h file add the following import directives:

     #import <WindowsAzureMessaging/WindowsAzureMessaging.h> 
     #import "HubInfo.h"

However, I get the following error: https://i.sstatic.net/Shl6U.jpg

Here is my file outline: https://i.sstatic.net/02DU2.jpg

Any idea what I am doing wrong? The mistake is probably very simple. Obviously the Azure header file is present in the header folder, but possibly my syntax is off in some way


Solution

  • After you've downloaded your frameworks, you should place it in your project folder.

    enter image description here

    After that you should go to Build Settings -> Runpath Search Paths and add $(PROJECT_DIR)

    It shows Xcode, where to search for these frameworks

    enter image description here

    After all of that you just add them to the Xcode project itself

    enter image description here

    Btw, you can place these frameworks anywhere you want, but you should provide a valid search path for Xcode to find them.