You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/main/ios/spm.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,27 +124,29 @@ At this point you're done and can build and work as normal.
124
124
125
125
If your plugin only contains Swift aside from the required `[Name]Plugin.m` and `[Name]Plugin.h` you can use the [capacitor-plugin-converter](https://github.com/ionic-team/capacitor-plugin-converter).
126
126
127
-
This tool will add the following required things to your main swift plugin file, `[Name]Plugin.swift`:
128
-
129
-
- Add Conformance to the `CAPBridgedPlugin` protocol to your class
130
-
- Add 3 variables to your class. `identifier`, `jsName`, and `pluginMethods`
131
-
-`identifer` will correspond to the first argument to the `CAP_PLUGIN` macro
132
-
-`jsName` will correspond to the second argument to the `CAP_PLUGIN` macro
133
-
-`pluginMethods` will be an array of the methods passed to the `CAP_PLUGIN` macro
127
+
This tool will do the following changes:
128
+
129
+
- Add the following required things to your main swift plugin file, `[Name]Plugin.swift`:
130
+
- Add Conformance to the `CAPBridgedPlugin` protocol to your class.
131
+
- Add 3 variables to your class. `identifier`, `jsName`, and `pluginMethods`:
132
+
-`identifer` will correspond to the first argument to the `CAP_PLUGIN` macro.
133
+
-`jsName` will correspond to the second argument to the `CAP_PLUGIN` macro.
134
+
-`pluginMethods` will be an array of the methods passed to the `CAP_PLUGIN` macro.
135
+
- A `Package.swift` file will be created at the root of your plugin folder.
134
136
- The following files will be removed as they are no longer needed:
135
137
-`Plugin.xcodeproj`
136
138
-`Plugin.xcworkspace`
137
139
-`Plugin/Info.plist`
138
140
-`PluginTests/Info.plist`
139
141
-`Podfile`
140
-
- To fit SPM best practices, the Project files will be moved to `Sources` and `Tests` directories
141
-
- The plugins `package.json` will get the following fixes:
142
+
- To fit SPM best practices, the Project files will be moved to `Sources` and `Tests` directories.
143
+
- The plugins `package.json` will get the following changes:
142
144
- The files array will add these files or directories:
143
145
-`ios/Sources`
144
146
-`ios/Tests`
145
147
-`Package.swift`
146
148
-`verify:ios` will be changed to `xcodebuild -scheme YourPluginName -destination generic/platform=iOS` to allow it to continue to work as you expect.
147
-
- Your plugin podspec will be changed so that `s.source_files` now points to the `Sources` directory rather than the `Plugin` directory
149
+
- Your plugin podspec will be changed so that `s.source_files` now points to the `Sources` directory rather than the `Plugin` directory.
148
150
149
151
150
152
See the documentation in the repository at [capacitor-plugin-converter](https://github.com/ionic-team/capacitor-plugin-converter) for more.
0 commit comments