iOS project build failed when importing "ADAL/ADAuthenticationContext.h"

547 Views Asked by At

I have a react-native project and I am trying to add Adal-iOS to that. I am trying to use the official plugin from Microsoft.

I am finally able to build the project after importing the library via CocoPods. However, now, when I am trying to use the build fails when I import "ADAL/ADAuthenticationContext.h". Error message is : /ADAL/ADAuthenticationContext.h:127:12: Unknown type name 'WebViewType'.

Looking more into that file, I see the following:

#if __has_feature(objc_arc)
    __weak WebViewType* _webView;
#else 
    WebViewType* _webView;
#endif
}

looking deeper into WebViewType, I found:

#if TARGET_OS_IPHONE
//iOS:
typedef UIWebView WebViewType;
#else
//OS X:
#   include <WebKit/WebKit.h>
typedef WebView   WebViewType;
#endif

I am not sure what exactly is happening and any help is welcome !

1

There are 1 best solutions below

0
On

Use #import ADAL/ADAL.h where you are defining completionBlock.