AMSMB2 icon indicating copy to clipboard operation
AMSMB2 copied to clipboard

Header 'AMSMB2-Swift.h' not found

Open goolai opened this issue 4 years ago • 8 comments

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?

goolai avatar Oct 01 '19 02:10 goolai

Hi,

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

amosavian avatar Oct 18 '19 21:10 amosavian

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 avatar Oct 19 '19 00:10 brandonrains77

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

brandonrains77 avatar Oct 19 '19 04:10 brandonrains77

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.

amosavian avatar Oct 19 '19 07:10 amosavian

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 avatar Oct 19 '19 16:10 brandonrains77

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?

brandonrains77 avatar Oct 22 '19 14:10 brandonrains77

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.

goolai avatar Oct 29 '19 08:10 goolai

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 ...

Jeehut avatar Jun 07 '21 07:06 Jeehut

Please use version 3.0.0

amosavian avatar Nov 15 '23 17:11 amosavian