amosavian / AMSMB2

Swift framework to connect SMB2/3 shares
GNU Lesser General Public License v2.1
256 stars 79 forks source link

Header 'AMSMB2-Swift.h' not found #39

Closed goolai closed 12 months ago

goolai commented 5 years ago

There're issues with this library when run in Xcode 10 with Swift 4. Some of issues I could fix by myself, but there're issues I can't fix: Header 'AMSMB2-Swift.h' not found

Do you have idea how to fix this issue?

amosavian commented 5 years ago

Hi,

This library is using Swift 5. In case you need to maintain your main project in Swift4, please use package managers like Cocoapods

brandonrains77 commented 5 years ago

I Have just added your project via SPM and when I imported it into my project it says 'no such module AMSMB2' Any Idea what it could be ?

screenshotsmudged

brandonrains77 commented 5 years ago

Here is some more info on what will cause this problem:

STEPS TO REPRODUCE 1)Make a new project, Single view app 2) FIle > Swift packages > Add Package Dependancy > Paste this in search bar "https://github.com/amosavian/AMSMB2.git" Next > select Branch : master > Finish 3) Press build

Throws the swift compiler error: No such module "SMB2" AMSMB2.swift

amosavian commented 5 years ago

This library embeds pre-compiled binaries hence does not support SPM. That Package.swift is there to support Accio package manager.

I must remove that file in order to prevent such mistakes.

brandonrains77 commented 5 years ago

Thanks for the quick reply! I am new to all this, but if I can't use SPM to add your work to my project, what are the steps to add it? I am using xcode 11 and using swift 5

brandonrains77 commented 5 years ago

I am not using the SPM, But now a workspace added with AMSMB2 but when I build it says "No such module 'AMSMB2'

Any ideas how to get this to build?

goolai commented 5 years ago

Hi,

This library is using Swift 5. In case you need to maintain your main project in Swift4, please use package managers like Cocoapods

thanks for the support.

Jeehut commented 3 years ago

I believe this can be fixed now thanks to SE-0272, but I have no experience with C libraries so I would need to invest a lot of time to get this working (which I don't have right now). But I found this thread on the Swift forums which might help in case anybody wants to try. 😃

@amosavian With SE-0272, do you still think AMSMB2 can't support SwiftPM? I have no idea TBH but it sounds like it should work now ...

amosavian commented 12 months ago

Please use version 3.0.0