Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift iphone app template #1870

Merged
merged 16 commits into from
Sep 1, 2023
Merged

Swift iphone app template #1870

merged 16 commits into from
Sep 1, 2023

Conversation

krisbitney
Copy link
Contributor

@krisbitney krisbitney commented Aug 29, 2023

Copy link
Contributor

@cbrzn cbrzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is awesome thank you for pushing all these changes :_)

packages/templates/app/ios/polywrap.graphql Outdated Show resolved Hide resolved
@@ -28,7 +28,7 @@ const urlStr = intlMsg.commands_create_options_t_url();

export const supportedLangs = {
wasm: ["assemblyscript", "rust", "golang", "interface"] as const,
app: ["typescript"] as const,
app: ["typescript", "ios"] as const,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should here be swift and not ios? btw idk why swift is not added in the plugin array below this line 🤔 we have support for plugins

Copy link
Contributor Author

@krisbitney krisbitney Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it "ios" and "android" for swift and Kotlin for clarity.

Swift is used for iOS, macOS, watchOS, and tvOS and I'm not sure what else.

Kotlin is used for Android, desktop, web back ends, multiplatform mobile apps, and more.

Do you think it makes more sense to do "swift" and "kotlin"? Maybe iOS and Android use cases are implied?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I lean toward the android/ios since the template specifically targets those. If it was a generic template then the language name would make more sense

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what you're saying make sense, but swift client supports iOS and macOS.

it still makes more sense to me to name this swift and kotlin rather than ios or android; this is codegen and from my perspective it should be agnostic of the OS (even tho I completely understand your point)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they're android/ios specific templates then IMO this should be "ios".
But, correct me if I'm wrong, it doesn't seem that is the case: https://github.com/polywrap/wrap-abi-bindgen/pull/55/files#diff-2539b6e33504cb7efe01bdb09121a3aaba4ba6023d13c460f34dcb161ca244de

Also, whatever we do, we should be consistent. In this thread there's a push for "ios" while in that link it's "app-swift"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The codegen bindings are not specific to ios, but the app template is a simple ios app

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS and Android are platforms, not languages. It's a bit weird to have "iOS, Golang, Android, Typescript, Interface"; as it seems there are 3, or at least 2, concepts mixed in there.

That said, the template you're talking about targets "iOS" in particular. If it was generic enough to be built to macOS or tvOS, then it should be swift; but it isn't. I think here the answer should be "ios"; but indeed a bit weird to have "ios" as a "supportedLang". Maybe it's just a variable naming change thing, but nvm.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This situation is VERY similar to when we had a "react" app template. So, based on how we handled that, I suggest we:

  1. Merge these android & ios templates now so they can be used
  2. Create new app templates that are "vanilla" kotlin & swift
  3. Move ios & android templates to their own repos

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also one detail to make sure we're all clear on: "android" and "ios" are ONLY used within the polywrap create command. All other places (codegen, manifest, etc) "kotlin" and "swift" are used.

packages/templates/app/ios/Template/PolywrapDemo.swift Outdated Show resolved Hide resolved
@dOrgJelli dOrgJelli merged commit ad96a24 into origin-dev Sep 1, 2023
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants