Comments (46)
It is fixed greater than 0.12.0
Please use latest version
from urlembeddedview.
Carthage pulls 0.12.0. I am new to Carthage so I haven't found a way to specify the version. I just found this info: "Carthage does not support prerelease versions." Is this a prerelease version? Thanks.
from urlembeddedview.
Can you possibly push the next version after 0.12.0 to Carthage?
from urlembeddedview.
I am using 0.12.0 and this is where I have been getting this error.
from urlembeddedview.
This is Objective-C sample project's screen capture.
It works fine with Carthage update.
Version number is 0.12.0
If you can not launch app, please try to add Dummy.swift(this is empty swift file) and bridging-header.h(this is created by xcode).
from urlembeddedview.
I'm not trying to be difficult, but I do think your sample project is a different case. In your sample project, you are importing Objective-C into a Swift Project. In my project, I am importing Swift into an Objective-C project.
from urlembeddedview.
Bridging-header.h is what is used in a Swift project to import objective-c code. So unfortunately, that makes the sample you have above a Swift project. I am so sorry to bother you, I am just so excited about this code and really want to get it to work in my objective-c app. I wish I knew Swift, but this is an old app and I don't know Swift yet.
from urlembeddedview.
I think your understanding is wrong.
This comment is new Objective-C base project.
This is not uploaded example.
First of all, libswiftCore.dylib is needed to use Swift.
Objective-C base project dose not contain libswiftCore.dylib, therefore you need to add Dummy.swift(this is empty swift file) to your Objective-C project.
In addition, I've uploaded URLEmbeddedViewSampleObjc.zip which is Objective-C base URLEmbeddedVIew project.
To read this project, you will notice your wrong understanding.
from urlembeddedview.
Thanks for the sample project. I can't get it to run even though it does build. It crashes each time with this error:
dyld: Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib
Referenced from: /Users/home/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/URLEmbeddedView.framework/URLEmbeddedView
Reason: image not found
from urlembeddedview.
What is your Carthage version?
from urlembeddedview.
0.26.2
from urlembeddedview.
Does that library require cocoapods?
from urlembeddedview.
It's cutting out the name of the library! I can't get it to show up right here in GitHub editor!
from urlembeddedview.
dyld: Library not loaded: @rpath / libswiftSwiftOnoneSupport . dylib
Referenced from: /Users/home/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/URLEmbeddedView.framework/URLEmbeddedView
Reason: image not found
(lldb)
from urlembeddedview.
That sample is work perfectly in my environment with Carthage 0.26.2
Xcode version is 9.0
from urlembeddedview.
The libswiftSwiftOnoneSupport library seems to be the issue. I ran your code as is and I get the above error. Crazy!
from urlembeddedview.
I am using Version 9.0.1 (9A1004) of XCode by the way
from urlembeddedview.
And running this in iPhone X Simulator
from urlembeddedview.
Please try carthage update
.
from urlembeddedview.
Yes, I had done that already. Still get the libswiftSwiftOnoneSupport error. Ugh.
from urlembeddedview.
Dose it work your environment?
URLEmbeddedViewSampleObjc2.zip
Please build with URLEmbeddedViewSampleObjc2.xcworkspace
from urlembeddedview.
So odd. Once I deleted the bad (missing) framework at the top it does build. But the same error when it runs:
dyld: Library not loaded: @rpath / libswiftCoreData . dylib
Referenced from: /Users/home/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/URLEmbeddedView.framework/URLEmbeddedView
Reason: image not found
from urlembeddedview.
Even when I replace that 'bad' library at the top by dragging the Carthage/Build/iOS library there, I still get the same error
from urlembeddedview.
I've updated xcode 9.0.1 and try to run that sample. It works fine.
from urlembeddedview.
I think this is the issue I am having:
Carthage/Carthage#1394 (comment)
from urlembeddedview.
Do you try to make "Always Embed Swift Standard library" to "Yes"?
from urlembeddedview.
I can't get the swift libraries to show up in my project
from urlembeddedview.
Yes, I have tried that and it doesn't help unfortunately : (
from urlembeddedview.
I feel like maybe I need to add it as an embedded library
from urlembeddedview.
Embedded library sample project is already in this comment.
Carthage is not used that project, but It references URLEmbeddedView.xcproject.
from urlembeddedview.
Can you tell me the steps you took to embed it in the sample project?
from urlembeddedview.
Now I'm back to the original error - a crash on
let fetchedList = (try? managedObjectContext.fetch(fetchRequest))
in the
fetchOGData
method. Banging my head on the wall.
from urlembeddedview.
OK - getting there. It's a multithreading violation. I have something turned on in my code which crashes on multithreading violations. Don't know how to fix it though. Tried running in the background but I get the feeling the violation may possibly be in the project itself - is this possible?
from urlembeddedview.
CoreData`+[NSManagedObjectContext Multithreading_Violation_AllThatIsLeftToUsIsHonor]:
from urlembeddedview.
This is what I have turned on:
https://oleb.net/blog/2014/06/core-data-concurrency-debugging/
from urlembeddedview.
Yup! That was it! When I turn off that setting it works. When I turn on that setting in the sample project it crashes. So the issue is a multithreading violation in URLEmbeddedView.
from urlembeddedview.
So I have continued to test and ultimately I do think your Carthage installation is fine. "Always Embed Swift Standard Libraries" does not have to be set to YES (it is NO in your sample project and I find I do not need it to be set to YES either). The error is a multithreading violation in URLEmbeddedView. Mystery solved - although the problem still remains! I don't know Swift (obviously) or I would try to help you debug. I suspect maybe a missing performBlock
? https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CoreData/Concurrency.html
from urlembeddedview.
Thank you for your investigation!
Let me make sure one thing, this code is crashed in your project?
NSURL *url = ...
[[OGDataProvider sharedInstance] fetchOGDataWithUrlString: url.absoluteString, completion: ^(OGData *ogData, NSError *error) {
NSLog(@"ogData = %@", ogData);
NSLog(@"any error = %@", error);
}];
This code can get OGData directly from CoreData without URLEmbeddedView instance.
from urlembeddedview.
Yes - that is actually what I am using. That crashes in the project. Were you able to reproduce by changing that setting in the sample project?
https://oleb.net/blog/2014/06/core-data-concurrency-debugging/
from urlembeddedview.
And thank you for your patience in working through things with me!
from urlembeddedview.
Do you think you will have any time to work on a fix for this? I understand time is limited. Again, I wish I knew Swift so I could help!
from urlembeddedview.
I've released 0.13.0!
Please try itπ
from urlembeddedview.
Yay! Latest version in Carthage is 0.12.0 though, so I can't update until it has been changed to 0.13.0 unfortunately...
from urlembeddedview.
I look forward to updating. I also had a couple of other thoughts. 1) Have you ever thought of searching for the Twitter: share tag as well as the og: ? 2) Have you considered creating a non-core-data cache (more of a short term cache)? When I shut down my project with this code in it in the simulator, it also crashes upon next startup (which I think might be related to the issue you are solving). But I use Core Data in my project and I would rather not utilize it in a library - too much room for error if contexts get out of sync. Is there more of a short-term way to cache the links without using Core Data? Thanks again for this great library and I look forward to trying the fix when Carthage gets updated.
from urlembeddedview.
I could update via Cartahge.
URLEmbeddedView creates another SQLite file (CoreData uses SQLite inside) that does not affect your project's SQLite file.
So I think another caching system is not needed.
from urlembeddedview.
Hi Marty! I couldn't come back to this because I was busy, but I am back now! I am nervous about adding anything core data because it is SO touchy (as we have seen) and just prone-to error. If I install the repository in my app, is there any way to do it without a core data database being installed in the app?
from urlembeddedview.
Related Issues (20)
- Value of type 'Any' has no member '1' HOT 1
- OpenGraphData fields are not visible in ObjC HOT 12
- OG data is not fully parsed HOT 6
- Page description is not available HOT 3
- Unreadable characters in link title.
- Error with addPersistentStoreWithType
- Support Swift 4.2 HOT 1
- Not able to show thumbnails of youtube links. HOT 1
- Google maps thumbnail missing
- OG data not read properly on certain sites HOT 6
- redirect
- Crash on fetch HOT 7
- Swift 5 support HOT 4
- README.md typo in Swift
- Crashes on load frequently
- Does not load imageURL or title for basic websites HOT 2
- Pod install fails on macOS 10.15 HOT 1
- pod fixes HOT 1
- Can you provide steps to install pod for objective c project?
- Add - SPM Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from urlembeddedview.