zeplin / cli-connect-swift-plugin Goto Github PK
View Code? Open in Web Editor NEWZeplin CLI plugin for Swift
License: MIT License
Zeplin CLI plugin for Swift
License: MIT License
Hello !
I tried to use this plugin for zeplin components but was not able to get a connection between code and zeplin project.
The installation of the tools was no problem and I managed to set the json configuration file up.
But when running
zeplin connect --verbose
I get the following output.
Error: Connecting components to Zeplin components failed.
Error occurred while processing ZeplinComponentsTest/Components/TestComponentButton.swift with @zeplin/cli-connect-swift-plugin:
Could not generate snippet on ZeplinComponentsTest/Components/TestComponentButton.swift
at /usr/local/lib/node_modules/@zeplin/cli/dist/src/commands/connect/plugin.js:187:19
at Generator.throw (<anonymous>)
at rejected (/usr/local/lib/node_modules/@zeplin/cli/dist/src/commands/connect/plugin.js:25:65)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
Details:
"TypeError: Cannot read property 'filter' of undefined\n at default_1.<anonymous> (/usr/local/lib/node_modules/@zeplin/cli-connect-swift-plugin/dist/index.js:75:22)\n at Generator.next (<anonymous>)\n at fulfilled (/usr/local/lib/node_modules/@zeplin/cli-connect-swift-plugin/dist/index.js:5:58)\n at processTicksAndRejections (node:internal/process/task_queues:94:5)"
My questions:
Is this plugin supposed to run with both: SwiftUI and UIKit ?
How do I have to prepare the reusable component in code ?
In the readme is a todo stating that documentation is missing.
Is this documentation provided anytime soon ?
Thanks for answers :-)
Hi,
I am getting this error after following the setup guide and running "zeplin connect":
Connecting components to Zeplin components failed.
Error occurred while processing MyApp/Views/Buttons/ActionButton.swift with @zeplin/cli-connect-swift-plugin:
Could not generate snippet on MyApp/Views/Buttons/ActionButton.swift
The logs look like this:
2020-02-28 14:28:43 - info - Zeplin CLI - v1.0.0
2020-02-28 14:28:43 - debug - connect options: {"configFiles":[".zeplin/components.json"],"devMode":false,"devModePort":9756,"devModeWatch":true,"plugins":[]}
2020-02-28 14:28:43 - debug - .zeplin/components.json content: {"plugins":[{"name":"@zeplin/cli-connect-swift-plugin"}],"projects":[],"styleguides":["5dadc5dbe0e5042c2d1974d5"],"components":[{"path”:”MyApp/Views/Buttons/ActionButton.swift","zeplinNames":["Controls / Button / Primary"]}]}
2020-02-28 14:28:43 - debug - component config files: [{"plugins":[{"name":"@zeplin/cli-connect-swift-plugin"}],"projects":[],"styleguides":["5dadc5dbe0e5042c2d1974d5"],"components":[{"path”:”MyApp/Views/Buttons/ActionButton.swift","zeplinNames":["Controls / Button / Primary"]}]}]
2020-02-28 14:28:43 - debug - Initializing @zeplin/cli-connect-swift-plugin.
2020-02-28 14:28:43 - debug - @zeplin/cli-connect-swift-plugin supports MyApp/Views/Buttons/ActionButton.swift. Processing…
2020-02-28 14:28:43 - error - Connecting components to Zeplin components failed. Error occurred while processing MyApp/Views/Buttons/ActionButton.swift with @zeplin/cli-connect-swift-plugin: Could not generate snippet on MyApp/Views/Buttons/ActionButton.swift
2020-02-28 14:28:43 - debug - Error: Connecting components to Zeplin components failed. Error occurred while processing MyApp/Views/Buttons/ActionButton.swift with @zeplin/cli-connect-swift-plugin: Could not generate snippet on MyApp/Views/Buttons/ActionButton.swift at /usr/local/lib/node_modules/@zeplin/cli/dist/src/commands/connect/plugin.js:137:19 at Generator.throw (<anonymous>) at rejected (/usr/local/lib/node_modules/@zeplin/cli/dist/src/commands/connect/plugin.js:6:65) at processTicksAndRejections (internal/process/task_queues.js:85:5)
2020-02-28 14:28:43 - debug - "Error: Command failed: sourcekitten structure --file \”MyApp/Views/Buttons/ActionButton.swift\"\nFatal error: Loading sourcekitd.framework/Versions/A/sourcekitd failed: file /private/tmp/sourcekitten-20200116-76916-rox7z0/Source/SourceKittenFramework/library_wrapper.swift, line 39\n\n at ChildProcess.exithandler (child_process.js:295:12)\n at ChildProcess.emit (events.js:203:13)\n at maybeClose (internal/child_process.js:1021:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)"
2020-02-28 14:28:43 - info - Please check ~/.zeplin/cli.log for details.
It's not clear to me what the issue is - any ideas? I'm on MacOS Catalina 10.15.3.
When I call zeplin connect
I get this result:
Zeplin CLI - v1.1.11
Connecting components to Zeplin components failed.
Error occurred while processing Panelist/Account/PlSecureField.swift with @zeplin/cli-connect-swift-plugin:
Could not generate snippet on Panelist/Account/PlSecureField.swift
Please check /Users/ralphbergmann/.zeplin/cli.log for details.
And this is the content of the log file:
2021-04-27 12:23:51 - info -
Zeplin CLI - v1.1.11
2021-04-27 12:23:51 - debug - connect options: {"configFiles":[],"devMode":false,"devModePort":9756,"devModeWatch":true,"plugins":[]}
2021-04-27 12:23:51 - debug - component config files: [{"plugins":[{"name":"@zeplin/cli-connect-swift-plugin"}],"projects":["xxx"],"styleguides":["xxx"],"components":[{"path":"Panelist/Account/PlSecureField.swift","zeplinIds":["xxx"]}]}]
2021-04-27 12:23:51 - debug - Initializing @zeplin/cli-connect-swift-plugin.
2021-04-27 12:23:51 - debug - @zeplin/cli-connect-swift-plugin supports Panelist/Account/PlSecureField.swift. Processing…
2021-04-27 12:23:51 - error -
Connecting components to Zeplin components failed.
Error occurred while processing Panelist/Account/PlSecureField.swift with @zeplin/cli-connect-swift-plugin:
Could not generate snippet on Panelist/Account/PlSecureField.swift
2021-04-27 12:23:51 - debug - Error: Connecting components to Zeplin components failed.
Error occurred while processing Panelist/Account/PlSecureField.swift with @zeplin/cli-connect-swift-plugin:
Could not generate snippet on Panelist/Account/PlSecureField.swift
at /usr/local/lib/node_modules/@zeplin/cli/dist/src/commands/connect/plugin.js:187:19
at Generator.throw (<anonymous>)
at rejected (/usr/local/lib/node_modules/@zeplin/cli/dist/src/commands/connect/plugin.js:25:65)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
2021-04-27 12:23:51 - debug - "TypeError: Cannot read property 'key.name' of undefined\n at default_1.<anonymous> (/usr/local/lib/node_modules/@zeplin/cli-connect-swift-plugin/dist/index.js:72:54)\n at Generator.next (<anonymous>)\n at fulfilled (/usr/local/lib/node_modules/@zeplin/cli-connect-swift-plugin/dist/index.js:5:58)\n at processTicksAndRejections (node:internal/process/task_queues:93:5)"
2021-04-27 12:23:51 - info -
Please check /Users/ralphbergmann/.zeplin/cli.log for details.
Do you have any idea how to fix this? Or am I doing something wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.