-
Notifications
You must be signed in to change notification settings - Fork 117
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
Image assets for buttons aren't loaded #7
Comments
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. |
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:
Thanks! |
My PR did not actually fix this. I tested it in my own project using |
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:
which should pull the master branch from Github, and after running
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 |
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 👍 ❤️ |
I just tried creating a completely new iOS project, adding 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 |
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 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:
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:
Result:
If 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 |
Just pushed a new release but this didn't fix it. Difficult to test solutions without actually pushing new releases to CocoaPods. |
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 |
@meismyles I forgot to run |
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.
The text was updated successfully, but these errors were encountered: