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

Include of non-modular header inside framework module 'OnePasswordExtension' #289

Closed
mperovic opened this issue Jan 2, 2016 · 9 comments · Fixed by #302
Closed

Include of non-modular header inside framework module 'OnePasswordExtension' #289

mperovic opened this issue Jan 2, 2016 · 9 comments · Fixed by #302
Assignees

Comments

@mperovic
Copy link

mperovic commented Jan 2, 2016

During compilation 1PasswordExtension-umbrella.h I'm receiving next error: Include of non-modular header inside framework module 'OnePasswordExtension'

Platform OS X 10.11.2
Version 7.2 (7C68)

@radazzouz
Copy link
Contributor

Hi @mperovic,

Thanks for taking the time to report this issue 👍

Are you referring to the OnePasswordExtension framework from the add-framework-support branch?

If so, can you please send us more details about your issue? Such as a sample project or detailed steps to reproduce the compilation error that you're seeing.

I ran all the four demo app apps from the aforementioned branch and did not encounter any warnings or compilation errors. Here's my setup:

  • Xcode 7.2 (7C68) from the Mac App Store.
  • OS X 10.10.2 stable.
  • I ran the apps in the Simulator, iPhone 6s Plus and iPad mini 3.

I look forward to your reply.

Have an amazing weekend!

@mperovic
Copy link
Author

mperovic commented Jan 3, 2016

Hi @radazzouz,

I'm using OnePasswordExtension as cocoa pod. Problem was in the latest CocoaPods (1.0.0.beta.1). Returning to the previous stable version fixed my problem.

@radazzouz
Copy link
Contributor

Thanks so much for letting us know what the problem was, @mperovic 👍

I am really thrilled to hear that reverting back to the stable version of CocoaPods helped in solving it. We'll be keeping a close eye on the CocoaPods betas, but I think it may be worth reporting the issue to CocoaPods as well.

Enjoy the rest of the weekend!

@radazzouz
Copy link
Contributor

Update:

I was able to reproduce this issue.

  • cocoapods-1.0.0.beta.2
  • Xcode 7.2 from the Mac App Store
  • My Podfile was using use_frameworks!

My project was working fine with cocoapods-0.39.0 (stable). After updating to the beta, I ran pod update and got the same error as above.

I then deleted the xcworksapce, the Podfile.lock file and the Pods directory and ran pod install. The issue persisted.

Finally, I deleted the aforementioned files again and ran pod install and this time it (semi-)worked:

I had to delete the import OnePasswordExtension (Swift project) from my Login View Controller and add #import "OnePasswordExtension.h" in my project's bridging header.

Conclusion:

It seems that cocoapods-1.0.0.beta.2 has an issue with use_frameworks!.

Workaround:

  1. If you absolutely want to use cocoapods-1.0.0.beta.2 do not use use_frameworks!.
  2. If you absolutely want to use use_frameworks! revert back to the stable version 0.39.0.

@radazzouz
Copy link
Contributor

This issue has been reported in the CocoaPods repo too as issue 4884. Reopening this issue for now. Will update this issue as we get more info.

@radazzouz
Copy link
Contributor

Hi @mperovic,

We believe that we found a fix for CocoaPods 1.0.0 beta 3 while using the use_frameworks! attribute in Swift projects. The patch is in the improvement/improved-compatibility-with-cocoapods-1.0.0 branch.

Could you please update your Podfile as seen below, so that it points to the new branch rather than to master or the latest tag and confirm that it works for you?

Podfile example

platform :ios, '7.0'

use_frameworks!

pod '1PasswordExtension', :git => 'https://github.com/AgileBits/onepassword-app-extension.git', :branch => 'improvement/improved-compatibility-with-cocoapods-1.0.0'

target 'ACME Swift' do

end

If it does work for you, I will PR this change.

I look forward to your reply 👍

Cheers!

@radazzouz
Copy link
Contributor

PR'd #302, which will be merged once we confirm that it fixes this issue.

@mperovic
Copy link
Author

It works perfectly

@radazzouz
Copy link
Contributor

Thanks so much for testing and for confirming that all is good for you, @mperovic 👍

I will shortly merge the PR.

Have an amazing weekend!

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

Successfully merging a pull request may close this issue.

2 participants