Podspec dependency installation - frameworks

I want to add SwiftLint to my framework. In my framework's .podspec file, I have added:
s.dependency `SwiftLint`
What is the next step to see the dependency at work? Is there some sort of command I need to run in the command line to "install" the dependency?

In the project that uses your framework, do pod update or just pod update MyFramework .

Related

Automating .net framework package installation: resolving package dependency on other packages

Long story short: I am trying to automate package .net framework nuget updates in a solution via VS2019 package manager console and i can't get a package dependencies on other packages (Though i know the data is available because you can see it in the UI).
Long story long: I am trying to automate nuget installation for .net framework and i chose to use the package manager console in visual studio (If there is a preferred option i would love to hear about it). The problem i am trying to solve is this:
Problem input: Package A: version 1, has dependency on package B version > 1. version 2 has a dependency on package B version > 2. Package B: version 1. version 2 has a breaking change. Package C: version 1, has dependency on package B version > 1.
Problem I am trying to solve: I have these 3 packages referenced by the same project. I want to upgrade package A to version 2. Its dependency is package B version > 2. Running package A update to version 2 (via package manager UI or console) will update package B to version 2. Boom! - package C will detect it is missing a method it requires from B version 1 only at runtime!
What i am trying to do - Scripting the installation process prompting the user for these type of dependencies.
My problem - For that i want to get a package dependencies and i can't find the way to do it using the package manager console.
Appreciate some help :)
For that i want to get a package dependencies and i can't find the way
to do it using the package manager console.
We cannot use nuget manage console to get the package dependencies.In addition to UI viewing nuget package dependencies, we can get the dependencies from csproj file in the nuget project A. This is the related content in A.csproj file:
<ItemGroup>
<PackageReference Include="Antlr">
<Version>3.5.0.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging">
<Version>3.0.0</Version>
</PackageReference>
</ItemGroup>
Another is that you can view package dependencies is through the nuspec file which is created by command nuget spec (if you use nuspec files to enforce dependencies), which are the documentation you use before packaging the project.
Scripting the installation process prompting the user for these type
of dependencies.
Note: In view of your situation, you cannot use two versions of the nuget package in the same project which will cause version conflict.
Suggestions:
I wonder why you deleted the method required by C when you upgrade B. Basically, when we upgrade and modify the package, we will new features to it without removing the original data and methods to prevent references to other dependent packages in the project from using the corresponding methods.
So you could restore the methods required by the C package in the Package B version two.
If you make a major change to package B version2 and the steps of restoring the method are a bit complicated, I suggest you can make a copy of package B specifically for C packages.
Just rename the Package B version 1 and referenced by Package C to distinguish it from the second version of the B package.
Hope it could help you.

Cocoapods SwiftWebSocket in Xcode project - library is not found

I'm experimenting with SwiftWebSocket in Swift using Xcode 10.1.
I've added the pod via this podfile:
platform :osx, '10.14'
target 'ViewWebSocketLearning' do
use_frameworks!
pod 'SwiftWebSocket', '~> 2.7'
end
and I've loaded the pod as follows:
$ pod install
Analyzing dependencies
Downloading dependencies
Using SwiftWebSocket (2.7.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
which produces a workspace with the SwiftWebSocket project included in it. I compiled the projects and you can see that it is correctly compiling both my empty project and the SwiftWebSocket project properly. Everything is looking good so far.
However as soon as I try to include a reference to the SwiftWebSocket project in my project's unit tests, Xcode chokes. Here's a snip of my code:
import SwiftWebSocket
...
let ws = WebSocket("wss://echo.websocket.org")
I get "No such module 'SwiftWebSocket'". If I take out the import, I get "Use of unresolved identifier 'WebSocket'". So something isn't linking properly by the looks of it.
I've tried adding the compiled framework from the SwiftWebSocket project to mine in the project organizer on the left, no change. I've added it to the Linked Frameworks and Libraries in the target settings, again no change.
What am I missing?
I'm a relative novice to Xcode so apologies but I really would like to get past this point so your help is much appreciated! Thank you.
It's not exactly the solution I was shooting for, but I solved this by building a class in my project which contains the logic to control the SwiftWebSocket, then called that class from inside the unit tests.
Architecturally this is probably cleaner but I remain unclear on why I couldn't access the SwitfWebSocket directly from the unit tests.

Upgraded to 0.6.13 and now node can't find module moment

I have a Play project that uses scala.js. Tests all ran fine until I upgraded the scala.js plugin to 0.6.13. Now I get "Error: Cannot find module '../moment'".
I read on the 0.6.13 release notes that run and test now use node.js by default; I'm sure that change is the root of my problem.
I see the note to install jsdom using "npm install jsdom" either locally or globally. I first tried installing the moment library globally (npm install -g moment). No change, so I tried installing in the project's root directory. Still no change.
Suggestions?
I updated the moment.js facade from "io.github.widok" %%% "scala-js-momentjs" % "0.2.0" to "ru.pavkin" %%% "scala-js-momentjs" % "0.4.1". Changed relevant import statements and recompiled. Tests passed.
Removed the node_modules directory from the app's root directory. Tests failed with the earlier error. Reinstalled the moment library (npm install moment) and tests pass again.

How to a dependency to my custom cocoapod?

I'm creating a cocoapods which is doing some crypto stuff. I've a dependency in my podspec file (mean another cocoapods library).
My spec file is:
...
s.dependency 'BigInt', '~> 1.3.0'
end
And it can pass pod verification successfully but I cannot see this library in my class, I cannot import! How I can import this library without any error?
Actually I got the idea! While working on your cocoapod you need to create another test project with your cocoapod's dependencies. So you won't see any error.
Also when you add your cocoapods to a project, It'll download automatically its dependency and add them to pods project's frameworks.

Using region digraph bundle of equinox project

I'm trying to use region digraph bundle of equinox in my project. As first step, I'm trying to test the bundle org.eclipse.equinox.region using org.eclipse.equinox.region.tests bundle exists in equinox project.
When I import the relevant bundles to Eclipse IDE, I get error in loading org.eclipse.core.tests.harness.PerformanceTestRunner package in RegionPerformanceTests class. This caused because I couldn't import the above package in the manifest file. When I try to add it as dependency in manifest file, This package is not there to be added. I couldn't find any packages given in this link when I add dependencies given in this link
It will be really helpful if I can get some help regarding this issue.