sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

Problem with SPM #156

Closed MoveUpwardsDev closed 3 years ago

MoveUpwardsDev commented 4 years ago

When using SPM to add the library, it crashes even if the xcconfig file has been correctly added and use to configure the project. Perhaps due to the fact that with SPM the complete SPPermissions library is added.

When using Pod with only the 2 modules i need, it works fine.

ivanvorobei commented 4 years ago

I will test it in 1-2 hours, thanks.

ivanvorobei commented 4 years ago

Yes, true. But I now know how pass flags in SPM. I don't understand why SPM ignore project flags. Need wait.

MoveUpwardsDev commented 4 years ago

No problem for the wait. i’ll use Pod. I’ll try to find a way to tackle that problem with SPM.

Great lib and more over clean code.

husbig commented 4 years ago

Is there any update for SPM ? It still crash.

ivanvorobei commented 4 years ago

@huseyinbagana for now I not found any solution. Recommend install via pods now.

pkasson commented 4 years ago

Same problem - @MoveUpwardsDev and @ivanvorobei - has anyone solved this ?

pkasson commented 4 years ago

Other option would be to just copy the project into another and use it directly ... SPM much cleaner than PODs

ivanvorobei commented 4 years ago

@pkasson please, read issue For now no solution for SPM support, if you know how it fix - please, share with me

furiosFast commented 4 years ago

any news?

ivanvorobei commented 4 years ago

Now not work still, can't resolve it

pkasson commented 4 years ago

@pkasson please, read issue For now no solution for SPM support, if you know how it fix - please, share with me

Maybe I overlooked it before - I see a Package.swift - isn't that for SPM ?

pkasson commented 4 years ago

So no one has gotten SPM to work with this ? I have not setup a project yet with Package.swift, but it cant be that difficult, right ? I can take a crack at it - if I get it working, will submit PR.

pkasson commented 4 years ago

Was able to add the SPM to XCode (12), using master branch. It pulled it down and built without issue.

Looks to me like this is working ! If not, what issues are you having ?

ivanvorobei commented 4 years ago

@pkasson you simple install, now need set config for import only valid permissions. now it not work - that problem. You can't request permission

pkasson commented 4 years ago

Right - I see that it appears the xcconfig tags are not referenced in code - will research a bit - SPM better than pods !

pkasson commented 4 years ago

So, using a conditional check, from the xcconfig variables ...

<#if SPPERMISSION_CAMERA>

fails in the app cant find that variable, but it is in the User-Defined block under build settings.

Is there any other project settings that need to support these xcconfig conditional variable ? (sorry, new to some of this, but willing to help)

ivanvorobei commented 4 years ago

I tried different things. There is no way to configure SPM with flags yet

pkasson commented 4 years ago

yep - just cloned the project inside my app - looks great ! hopefully Apple will support this

ivanvorobei commented 3 years ago

Hi there!

I doing new version 6.0 with support SPM and many other features. Soon I publish it.