Hello,
Is there a way with the Swift client to know if a request is a POST or a GET?
It would be great if you could add the IPost and IGet protocols on the requests of the Swift client as you did for the Java client.
Hello,
Is there a way with the Swift client to know if a request is a POST or a GET?
It would be great if you could add the IPost and IGet protocols on the requests of the Swift client as you did for the Java client.
The IGet
interfaces aren’t available in Swift yet. Xcode 7 with Swift 2.0 was only just released today, but will take some time to upgrade the library to support Swift 2.0. Check the release notes to see when Xcode 7 / Swift 2.0 is supported. You can also submit a feature request to get notified when features are added.
Any chance you could update https://github.com/ServiceStackApps/TechStacksApp to the new Swift 2.0 syntax (at least the codebase, not the app in the app store), it’s a good baseline for us to work against, as we’re migrating a project right now to 2.0 and are running into similar conversion issues as would be faced in migrating this project
Yeah will be slowly upgrading all iOS/Android apps in time, but I’m still playing catch up to sort out this release, polish docs and handle incoming support issues.
Awesome, and no problem, thanks!
I posted an update to TechStacksApp to Swift 2.0 as a fork on my personal github (wanted to see for myself): https://github.com/mattjcowan/TechStacksApp/commit/540e1477ee7bc62f841d9c9a12279e017ddb7da4
Seems to work (from cursory testing)… Main thing I ran into during this quick update was with the AutoQueryViewer DTOs, so for now I just made some manual changes to get it working in the auto-generated dto file (for the 2 types FindTechStacks and FindTechnologies) … See here: https://github.com/mattjcowan/TechStacksApp/blob/540e1477ee7bc62f841d9c9a12279e017ddb7da4/src/TechStacks/TechStacks.dtos.swift#L178
I basically just flattened the 2 DTOs (instead of using the generic version of the classes, but there’s probably a better way to do it).
Just in case it’s of interest …
Awesome thx Matt, feel free to send a PR if you want to get this merged.
Yeah AutoQuery DTO’s are still an issue as they inherit from the generic QueryBase<T>
base class that Swift along the way dropped support of generic extension inheritance that Swift 1.0 originally shipped with. It’s why we’re automatically excluding them from the generated DTO’s by default with:
//ExcludeGenericBaseTypes: True
Hopefully it’s just a matter of time before they’re able to add it back in, but yeah in the meantime flattening the DTO’s should work.