Closed srstanic closed 7 years ago
Same problem here
Will try and get this sorted tomorrow evening when I'm back home.
@meismyles There is the same problem in SVWebViewController Repository, look this: TransitApp/SVWebViewController#156
@meismyles just wanted to check if you are going to be able to review the pull request by @bchrobot sometime soon? It seems to contain a fix for this issue.
@bchrobot @srstanic Sorry about the delay in reviewing this. Thanks for the PR @bchrobot 👍
Thanks for the Swift port!
@meismyles sorry to bug you about it, but wanted to ask if you could release the fix and I guess the tag needs to be pushed to the cocoapods repo so that everyone can get the update?
I'm aware we can use this form to link master directly:
pod 'SwiftWebVC', :git => 'https://github.com/meismyles/SwiftWebVC.git'
Thanks!
My PR did not actually fix this. I tested it in my own project using :path
as well as :git
referencing the feature branch on my fork of this. Apparently some cache was not cleared completely and images are still not being referenced correctly.
That's weird, I pulled your feature branch as well and it seemed to be working using it :/
@bchrobot, @meismyles I've changed my Podfile to include the SwiftWebVC module like this:
pod 'SwiftWebVC', :git => 'https://github.com/meismyles/SwiftWebVC.git'
which should pull the master branch from Github, and after running
pod install
it works as expected on my machine. I can see the missing buttons now.
Here is a screenshot:
Herm, maybe the caching problem was actually the other direction. Glad that it is working for @srstanic - I will try again
EDIT: This was the resource bundle - I just didn't realize it at first...
I'm still having problems with it and cannot figure out why. I'm seeing this Pods target, which is unexpected:
It is listed as a dependency for the SwiftWebVC
pod:
My problem appears to have been due to confusion about which bundle the resources were accessible from. This SO post details how the resource bundle must sourced from within the pod bundle.
My PR was looking for the resources in the pod bundle rather than the resource bundle (within the pod bundle). Not very well documented by Cocoapods
Thanks for this @bchrobot. Will review and pull it asap.
Sweet 👍
Images still don't work in the example app and I'm not sure why. There are a few stale SO posts about Cocoapods not compiling assets outside of the Podfile's directory correctly, but again they were a year or so old supposedly fixed in Cocoapods 1.x
This PR seems to be working for me. I can't find a way to make it break (but then again, the last one seemed to work for me as well), except for the images not showing in the example project currently which I will try and look at next chance I get. Not got much time to play with this at the moment unfortunately. Let me know if there are issues arising with this build. Thanks 👍
Infact, I'm not going to make a new release for CocoaPods just yet. I'm going to review the WKWebView PR in the morning and bring that in, then will make a new release.
You're able to run the example app without problems? I wish I knew what was so special about my setup... 😢
No I'm not 😭 I'm gunna try and straighten this whole thing out first thing tomorrow morning. Had a major lack of time to look at it recently and I need to figure out why they aren't working in the example app, swap everything over to WKWebView and then make a new release. I'm going to try and get this all boxed off tomorrow morning as it's frustrating me it not working correctly.
Any ideas as to why the example project isn't loading images? Especially now loading them from the bundle
@bchrobot @srstanic Hey guys, I have made a new release that hopefully resolves the image issue. I've also refactored the example project to remove the unused Pods framework and replaced UIWebView with WKWebView to bring this more up to date. I've also pushed a new build to CocoaPods so that should all be working correctly again now. Apologies for not sorting this sooner, just not had the time.
As far as I can tell it seems to be working correctly now, but I wondered if you could take a quick look and see if the issues are resolved you. Thanks very much for all your help and contributions. It is much appreciated.
Cheers 👍 ❤️
pod 'SwiftWebVC', '~> 0.2.0'
Gets me the following:
What in the? Did you run definitely run pod update
after updating your Podfile
? I've just re-tried pod 'SwiftWebVC', '~> 0.2.0'
and it's working fine:
I just tried creating a completely new iOS project, adding SwiftWebVC
, and both presenting a SwiftModalWebVC
modally as well as pushing a SwiftWebVC
to the navigation stack. Both were missing the icons.
I thought that maybe it was a setting in the original I was working on. I haven't tried on another computer but might be able to over the holidays. Really hoping it isn't a system config problem on my dev machine...
@bchrobot This is bizarre. I've tested it on 2 different machines and it's working successfully on both. Will have to give this a test on a few other machines in work tomorrow and see if they work.
Out of interest, if you try pod try 'SwiftWebVC'
and open the example project that way does it work?
wtf - That does work...
I will compare project settings more thoroughly
At least we know this is a problem between the keyboard and the chair and not a problem with the pod. Probably okay to close the issue.
Weird, ok I'll close this for now and will test myself again tomorrow. Let me know if you figure out why.
Hey guys, sorry for not responding earlier. This still doesn't work for me either.
When I try pod try SwiftWebVC
, the issue is not present. But when I update the pod in the test project I've created, the issue is still present. I've also noticed that the structure of the pod is different in those two contexts, although I've double checked that the version 0.3.0 is installed in my test project.
Even looking at the code of SwiftWebVC.swift itself, I can see the changes from the latest commit where the SwiftWebVCDelegate protocol was added. So it looks like the code is up to date, but the pod structure is not.
cc @meismyles
I just wanted to add that version 0.1.2 is working for me. I'm referencing it like this:
pod 'SwiftWebVC', :git => 'https://github.com/meismyles/SwiftWebVC.git', :commit => 'b8c1a51f7915f8d8fe9e0cc6137dcb737f10dd37'
I think that's pretty much the same code that I've referenced before directly from the master branch. It worked for me before and it still works.
Hey @srstanic. Thanks for getting back. This is really confusing haha. The pod is definitely up to date and this shows on the CocoaPods website.
I can't seem to make this not display the images with the current version. I'm not sure how else to try and reproduce this - got any ideas?
@meismyles here is what I did:
pod init
pod 'SwiftWebVC'
to itpod install
Result:
pod try SwiftWebVC
. The difference is visible in the screenshot I've attached to the previous commentIf you follow the same steps, what are your results? How does your pod structure look like? Is it up to date with the latest commit?
Ok now I'm getting the issue again. This is so confusing. 😭
Must be to do with the structure as you suggest. The resources location is specified as SwiftWebVC/Assets/Media.xcassets
in the Podspec. Doing pod try
seems to retain this structure, but installing it normally as just a plain old pod moves the files around and puts the Media.xcassets
group in a folder called Resources
. 😕
Just pushed a new release but this didn't fix it. Difficult to test solutions without actually pushing new releases to CocoaPods.
Hey @srstanic and @bchrobot, the latest fix in version 0.3.3 seems to have fixed this for me (again haha 😂 ). If you guys could check with this version and let me know I would be eternally grateful. Thanks very much.
It is indeed very strange, not to mention frustrating. It would be nice if CocoaPods provided documentation about best practices around asset management as I'm sure this is not an uncommon feature.
Thank you for working on the new version! I will try it out tonight or tomorrow and let you know
@meismyles I've tested 0.3.3 by referencing the master branch from the Podfile and it is working for me! 👏 🎉 Thanks for fixing this!
@srstanic Wooo 😄 0.3.3 should be the live version in CocoaPods, was there a specific reason why you needed to reference the master branch?
Confirmed that 0.3.3
works when referencing CocoaPods!
@meismyles I forgot to run pod repo update
so referencing 0.3.3 didn't work. My bad. :)
Hi, I've tried adding SwiftWebVC to an empty project via CocoaPods but there is an issue with image assets in the bundle. It looks like once the pod is installed, image assets are not a part of the bundle anymore (although if you look on the filesystem, they are). The result is that the images aren't loaded when the browser view is displayed. Attached screenshot shows the issue.
If you need more information, please let me know.