Skip to content

Why not use Pod instead? #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leocaseiro opened this issue Jun 14, 2016 · 7 comments
Closed

Why not use Pod instead? #2

leocaseiro opened this issue Jun 14, 2016 · 7 comments

Comments

@leocaseiro
Copy link
Contributor

leocaseiro commented Jun 14, 2016

Hi, thanks for this amazing plugin.

I'm trying to implement with Angular.
Anyway. I've got the follow error:

sd_setImageWithURLCompleted is not a function

So I used Pod to install and it seems working great.

How about replace it to implement using Pod? Isn't a better way to maintain this repo?

@bathejasumeet
Copy link
Contributor

Hi, do you mean using . Podfile file instead of .framework file? only reason I didn't use a pod and instead used a static library is because pod didn't work well with NativeScript versions below 2.0, and tns build always failed, throwing errors for Target not specified, which is a requirement for latest pod and is revamped in 2.0 . I'll look into this and get back at you. If possible, can you provide a link to sample project so I can reproduce the issue?

@leocaseiro
Copy link
Contributor Author

Hi @bathejasumeet,

I removed the platform ios and added it again, so I couldn't reproduce the error again. I really tried.

Anyway!

Instead of having the platforms/ios/WebImage.framework, that would much easier with platforms/ios/Podfile which would be the simple code bellow and nothing else:

Podfile

pod 'SDWebImageCache'

Reference: IQKeyboardManager/platforms/ios/Podfile

@bathejasumeet
Copy link
Contributor

I completely understand it is simple and a norm to use podfile instead of static libraries, I agree with you, when you build it on 2.0 it works perfectly, but when using NativeScript 1.7.2 or 1.6 , the build fails with podfile. It throws a Target not specified exception. The cocoa pods package manager pod specs changed in between NS 1.7.2 and 2.0 , and to adapt to the latest pod spec changes were made in 2.0. .Framework file is used for backward compatibility and it is build from same repo using Carthage. Does the problem still persist after adding and removing platform?

@bathejasumeet
Copy link
Contributor

Sorry I mean removing and adding platform?

@leocaseiro
Copy link
Contributor Author

It seems working fine for me. We can close the issue.

How about leave the Podfile in a version 2.x for who is using {n} 2.x?

up to you, anyway.


PS: I also have a question about the Native image-cache library from {N}. Is your library doing a totally different job? Have you used it the {N} one?

I'm sorry asking in the same issue. I'm happy to open another one for this question.

@bathejasumeet
Copy link
Contributor

@leocaseiro ,
I would be happy to leave the podfile in N 2.0, will release a new version 2.0 with other upgrades that I wish to work on .
Regarding image-cache library from N - yes , I tried using it, it is cumbersome to cache the images yourself and request for them and write handlers, it essentially is lot of boilerplate as compared to easy solutions available out there. The second important point is that you can't write multi-threaded code on nativescript currently ( NativeScript/NativeScript#85 ), so you can't create a separate thread and download images in that thread and when complete provide the paths to the original one handling UI, this can be done by native libraries. Please let me know if anything else.

Thanks,
Sumeet.

@bathejasumeet
Copy link
Contributor

bathejasumeet commented Jun 19, 2016

@leocaseiro ,
Hi,
as promised I have added Podfile along with other changes to the plugin (though the changes are breaking to support common markup for android),
thanks,
Sumeet

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

No branches or pull requests

2 participants