abbas
abbas

Reputation: 1

Newly Generated capacitor plugin and podfile

I am developing an Ionic Capacitor plugin on the macOS operating system. When I use the command:

npm init @capacitor/plugin plg-download-manager

to create the plugin, only the Sources and Tests folders are created in the ios folder for the plugin, and the Podfile is not generated. This prevents me from adding libraries like Network to the plugin.

/Users/macvps/prj/plg-download-manager-ios

├── CONTRIBUTING.md

├── Package.resolved

├── Package.swift

├── PlgDownloadManagerIos.podspec

├── README.md

├── _PlgDownloadManagerIos.podspec_

├── android

│   ├── build.gradle

│   ├── gradle

│   ├── gradle.properties

│   ├── gradlew

│   ├── gradlew.bat

│   ├── proguard-rules.pro

│   ├── settings.gradle

│   └── src

├── dist

│   ├── docs.json

│   ├── esm

│   ├── plugin.cjs.js

│   ├── plugin.cjs.js.map

│   ├── plugin.js

│   └── plugin.js.map

├── example-app

│   ├── README.md

│   ├── capacitor.config.json

│   ├── dist

│   ├── ios

│   ├── node_modules

│   ├── package.json

│   ├── src

│   └── vite.config.ts

├── ios

│   ├── Sources

│   └── Tests

├── node_modules

│   .

│   .

│   .

├── package-lock.json

├── package.json

├── rollup.config.js

├── src

│   ├── definitions.ts

│   ├── index.ts

│   └── web.ts

└── tsconfig.json

node version 22.8.0

capacitor version 6.1.2

ionic version 7.2.0

Please help me.

I tried to create Podfile manually but didn't work

Upvotes: -1

Views: 55

Answers (1)

RGe
RGe

Reputation: 1859

You need to use an older version of the @capacitor/plugin package if you want to create a plugin with support for Cocoapods:

npm init @capacitor/[email protected] [<path>] [options]

SPM support was added in version 0.13.0.

Upvotes: -1

Related Questions