dyld: Library not loaded: #rpath/RxSwift.framework/RxSwift - swift

I created a custom framework that uses RxSwift, RxCocoa and others third-party frameworks. The custom framework compile correctly but when I added to the application it crash with this error :
dyld: Library not loaded: #rpath/RxSwift.framework/RxSwift
Referenced from: /private/var/containers/Bundle/Application/49800223-0217-4591-A8D1-
I tried to use module map to expose the third-party but without success :(
Any help please because I didn't found a solution since two days and I'm blocked.
Thank you

You need to copy framework dependencies to application. Process depends on way you add dependencies in framework.
For CocoaPods you can check my answer here: Xcode/Cocoapods: I can't access a dependency that's in a framework linked to my project

Related

Link SDK only + Entity Framework = System.ComponentModel build error

With linking set to SDK Only, I have an error on iOS like this:
MTOUCH : error MT2101: Can't resolve the reference 'System.Void
System.ComponentModel.DataAnnotations.AssociatedMetadataTypeTypeDescriptionProvider::.ctor(System.Type)',
referenced from the method
'System.ComponentModel.ICustomTypeDescriptor
System.Data.Entity.ModelConfiguration.Utilities.AttributeProvider::GetTypeDescriptor(System.Type)'
in 'System.ComponentModel.Annotations, Version=4.3.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
I use Entity Framework and a number of other 3rd party libraries that integrate with Entity Framework, and in the past I have needed to add a --linkskip argument for System.Core or a .Init call in my Appdelegate file for Sqlite, but these techniques havent helped me with this ComponentModel issue. I assume it's because of Entity Framework or one of the related 3rd party libraries I'm using since I know they use a lot of reflection. Has anyone run into this before?
EntityFrameworkCore.Triggers 1.2.2
LinqKit 1.1.17
Microsoft.Data.Sqlite.Core 3.1.6
Microsoft.EntityFrameworkCore 3.1.2
Microsoft.EntityFrameworkCore.Design 3.1.3
Microsoft.EntityFrameworkCore.Relational 3.1.2
Microsoft.EntityFrameworkCore.Sqlite 3.1.2
Microsoft.EntityFrameworkCore.Tools 3.1.3
Z.EntityFramework.Plus.EFCore 3.0.69
The projects using entity framework are class libraries that target .netstandard 2.0, and my main application uses xamarin forms 4.5 (have tried updating to 5.0 with no success)
I solved this problem manually referencing System.ComponentModel.Annotations.dll in .netstandard2.1 in nuget folder. You can try first to install the Annotations Nuget e if doesn't work you can try to manually reference.

error: unresolved reference: mongodb in Kotlin

I am new to Kotlin. I want to perform basic CRUD operations with Mongo DB and I get the following error:
error: unresolved reference: mongodb
for this line of code:
import com.mongodb.BasicDBObject
I have added the following dependency in the build of the module in Android Studio (Intellij IDE).
implementation 'org.mongodb:mongodb-driver-sync:3.11.0'
What am I missing?
EDIT
This is the project hierarchy. I work with DBOps.kts
I think you are using legacy code.
Here is the correct one for that.
dependencies {
compile 'org.mongodb:mongo-java-driver:2.13.3'
}
Reference : https://mongodb.github.io/mongo-java-driver/2.13/getting-started/installation-guide/
EDIT
I have tried myself, and it works, so I guess there is another issue.
After importing library via Gradle, you could check it is imported correctly from Project -> External Libraries(Check below image)
If you cannot see the MongoDB library from there, there is a possibility that IDE has some problems. So I would recommend reset caches(File -> Invalidate Caches / Restart), clean build, and rebuild the project.

Satisfying a framework's dependencies while within another project

I am working on an iOS framework. My development environment is an iOS application project with the framework project within it, the framework's product is then added to the "Embedded binaries" and "Linked Frameworks and Libraries" sections of the application.
The previous setup works fine, but this particular framework I'm working on requires one other framework to function. I have installed this framework via Carthage and added it to the base application's project ("Embedded binaries" and "Linked Frameworks and Libraries") and then also the framework's project "Linked Frameworks and Libraries".
However when I run the application I get the following two errors (FrameworkOne is the framework I'm working on in a project, FrameworkTwo is the dependency):
dyld: lazy symbol binding failed: Symbol not found:
[symbol here]
Referenced from:
[path to iOS sim]/FrameworkOne.framework/FrameworkOne
Expected in:
[path to application]/Frameworks/FrameworkTwo.framework/FrameworkTwo
...and...
dyld: Symbol not found:
[symbol here]
...the same paths as above...
What am I doing wrong here?
The answer is simple and frustrating in hindsight: the version of the framework used within my application project and my framework project didn't match.
If you're having similar issues check that your application and framework are using the same version!

Karaf unresolved constraint JDBC

I am trying to get a Scala library using H2 database loading in Karaf 3.0.0-RC1 and I got this error
Unresolved constraint in bundle org.h2 [86]: Unable to resolve 86.0: missing requirement
[86.0] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.jdbc)(version>=1.0.0)
Does anyone know what I need to add to POM and / or feature.xml to get this working?
Thanks,
Bob
You need that jar that contains the package. To get it:
go to http://search.maven.org
Push Advanced search
To the Classname, type "org.osgi.service.jdbc"
You will get a list of dependencies that contain the package. For example, the first one will be good for you: http://search.maven.org/#artifactdetails|org.ow2.spec.osgi|ow2-jdbc-service-1.0-spec|1.0.13|bundle
Btw.: The package originally comes from the OSGi enterprise spec (or compendium, do not remember). As much as I saw all of the OSGi spec packages are available in ow2 dependencies that separated logically.
In Karaf, there might be other ways to get the dependency you need but I did not use Karaf in the past.

Intellij idea unresolved symbol in grails + gwt project

I have a grails project and I use the gwt plugin 0.6.1. GWT version is configured using ivy.
I have a strange unresolved symbol error when I try to use a class in package com.google.web.*. When I use the complete class names inline idea reports that it cannot resolve the web package. If I import the same class no error ocurres.
I already tried to run grails clean and removed the idea system directory as well - nothing works.
Idea usally import the class when I use smart complete but in this case idea insert the complete classname instead of importing the class.
The web package is found in the gwt-users-2.4.0.jar and gwt-servlet-2.4.0.jar. Both jars are in the classpath but this how the grails gwt plugin organizes gwt dependency.
Error when using full inline claasnames:
No error when using same class in import statement:
Does anyone have an idea?
Fixed already http://youtrack.jetbrains.net/issue/IDEA-81056
Fix is included in the next IDEA 11.1 EAP
http://confluence.jetbrains.com/display/IDEADEV/IDEA+11.1+EAP
I also had similar issue with IntelliJ IDEA, I solved problem by invalidating the idea cache. After invalidating the cache it will reindex all your library and other files. check this answer as well. Grails and IntelliJ Cache Issues