Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

xcode 7.3.1 Swift Bridge Header cannot find #import <MSGraphSDK-NXOAuth2Adapter/MSGraphSDKNXOAuth2.h> #6

Open
ArEnSc opened this issue Sep 16, 2016 · 3 comments

Comments

@ArEnSc
Copy link

ArEnSc commented Sep 16, 2016

Hi I have installed the latest version of this pod and put together a bridging header and it is telling me that this header is not found, I have cleaned by project and tried multiple things no progress, can you check this out ?

@ArEnSc ArEnSc changed the title xcode 7.1 Swift Bridge Header cannot find #import <MSGraphSDK-NXOAuth2Adapter/MSGraphSDKNXOAuth2.h> xcode 7.3.1 Swift Bridge Header cannot find #import <MSGraphSDK-NXOAuth2Adapter/MSGraphSDKNXOAuth2.h> Sep 16, 2016
@wesley-dynamicowl
Copy link

I had the same problem for you. I'm working on a Swift project with CocoaPods.

Initially, I was able to get things working by setting User Header Search Paths to Pods/**. I believe this tells the compiler to recursively search the "Pods" directory.

This worked, but ended up cause problems when I installed "Realm".

It seems that the problem is an incorrect import statement.

For me, I've pretty much removed the bridging header entirely and used this approach instead.

In this pod, find NXOAuth2AuthenticationProvider.h file and change

#import "MSAuthenticationProvider.h" to #import "MSGraphSDK/MSAuthenticationProvider.h"

This tells the compiler to look in MSGraphSDK module for MSAuthenticationProvider.

In Swift, use import MSGraphSDK_NXOAuth2Adapter to import the library directly into files where you need it.

Also, User Header Search Paths should ideally be empty

If I get an opportunity, I'll try to submit a PR to properly fix it. Right now, I just track my pods.

rafaelsrocha added a commit to rafaelsrocha/msgraph-sdk-ios-nxoauth2-adapter that referenced this issue Jul 23, 2018
@ianwhite2
Copy link

Well instead of #import <MSGraphSDK-NXOAuth2Adapter/MSGraphSDKNXOAuth2.h> just use @import MSGraphSDK_NXOAuth2Adapter; and it will work

@dorjeozer
Copy link

A way solve this now is to create a bridging header and import required headers in it:

#import "MSGraphSDK.h"
#import "MSGraphSDKNXOAuth2.h"

Though, this exposing the libraries globally to every Swift class in the project...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants