Coder Social home page Coder Social logo

Comments (46)

marty-suzuki avatar marty-suzuki commented on May 18, 2024

It is fixed greater than 0.12.0
Please use latest version

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

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.

inPhilly avatar inPhilly commented on May 18, 2024

Can you possibly push the next version after 0.12.0 to Carthage?

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

I am using 0.12.0 and this is where I have been getting this error.

from urlembeddedview.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

This is Objective-C sample project's screen capture.
It works fine with Carthage update.
Version number is 0.12.0

objc-sc

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.

inPhilly avatar inPhilly commented on May 18, 2024

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.

inPhilly avatar inPhilly commented on May 18, 2024

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.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

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.

inPhilly avatar inPhilly commented on May 18, 2024

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.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

What is your Carthage version?

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

0.26.2

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

Does that library require cocoapods?

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

It's cutting out the name of the library! I can't get it to show up right here in GitHub editor!

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

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.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

That sample is work perfectly in my environment with Carthage 0.26.2
Xcode version is 9.0

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

The libswiftSwiftOnoneSupport library seems to be the issue. I ran your code as is and I get the above error. Crazy!

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

I am using Version 9.0.1 (9A1004) of XCode by the way

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

And running this in iPhone X Simulator

from urlembeddedview.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

Please try carthage update.

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

Yes, I had done that already. Still get the libswiftSwiftOnoneSupport error. Ugh.

from urlembeddedview.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

Dose it work your environment?
URLEmbeddedViewSampleObjc2.zip
Please build with URLEmbeddedViewSampleObjc2.xcworkspace

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

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.

inPhilly avatar inPhilly commented on May 18, 2024

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.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

I've updated xcode 9.0.1 and try to run that sample. It works fine.

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

I think this is the issue I am having:
Carthage/Carthage#1394 (comment)

from urlembeddedview.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

Do you try to make "Always Embed Swift Standard library" to "Yes"?
2017-10-19 2 30 03

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

I can't get the swift libraries to show up in my project

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

Yes, I have tried that and it doesn't help unfortunately : (

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

I feel like maybe I need to add it as an embedded library

from urlembeddedview.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

Embedded library sample project is already in this comment.
Carthage is not used that project, but It references URLEmbeddedView.xcproject.

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

Can you tell me the steps you took to embed it in the sample project?

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

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.

inPhilly avatar inPhilly commented on May 18, 2024

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.

inPhilly avatar inPhilly commented on May 18, 2024

CoreData`+[NSManagedObjectContext Multithreading_Violation_AllThatIsLeftToUsIsHonor]:

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

This is what I have turned on:
https://oleb.net/blog/2014/06/core-data-concurrency-debugging/

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

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.

inPhilly avatar inPhilly commented on May 18, 2024

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.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

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.

inPhilly avatar inPhilly commented on May 18, 2024

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.

inPhilly avatar inPhilly commented on May 18, 2024

And thank you for your patience in working through things with me!

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

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.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

I've released 0.13.0!
Please try itπŸ˜€

from urlembeddedview.

inPhilly avatar inPhilly commented on May 18, 2024

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.

inPhilly avatar inPhilly commented on May 18, 2024

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.

marty-suzuki avatar marty-suzuki commented on May 18, 2024

I could update via Cartahge.
2017-10-22 17 50 42
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.

inPhilly avatar inPhilly commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.