-
Notifications
You must be signed in to change notification settings - Fork 125
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
Failed to reproduce "Generating a client in an Xcode project" example #57
Comments
Hi @AliakseiM, can you also share the message of the build failure, please? |
Hi @czechboy0, sure.
|
Btw, this worked fine for me:
It might not be related to this issue, but it looks like here |
On the linker issue, does it reproduce after you clean your project? On the second, can you please file that as a separate issue? Thanks! 🙏 |
@AliakseiM thanks for trying out the tutorial and sorry it didn't work for you. I just followed the tutorial and I think there's a missing step. Can you navigate to the target settings and in the If this resolves your issue, I will open a PR to the documentation. It's also worth noting that, in section 3, the code is built up over multiple steps and requires you to get to the end of the section before the function is complete and the code compiles. This will be much more obvious though: at Step 3 of Section 3 we're not returning a string from the function yet. @czechboy0 I think this step might have been missed because the tutorial didn't initially generate into a separate framework target, and it didn't seem to be a necessary step when we did everything in the single target project. |
Thanks for getting to the bottom of this, @simonjbeaumont. Let's fix the docs, once @AliakseiM confirms that it works with that step added. 🙂 |
Hi @simonjbeaumont, it worked for me. Thank you, guys for your help and your work! |
Actually @AliakseiM I just went through the tutorial again and I think there's a subtlety you potentially missed in this step:
Did you select the right target when adding the OpenAPIRuntime and OpenAPIURL libraries to your project? The default won't be that target so needs manually changing. When I manually change them I am able to get away without updating the linking settings manually. If that's the issue, it's pretty subtle (even I missed it when trying to reproduce your issue 😁)—we'll see if we can call it out clearer. Could you confirm it resolves your issue 🙏 |
### Motivation In our Xcode tutorial we outline the steps to enable Swift OpenAPI Generator on a separate framework. When you come to add the package dependencies on the runtime and transport libraries the default target Xcode offers to add them to is not this new framework. Failing to add them to the framework target causes linker issues. This is implied in our guide but it's pretty subtle and a user tripped up over this. ### Modifications - Emphasize which target the libraries need to be added to in the Xcode tutorial. ### Result Hopefully clearer step in the tutorial. ### Test Plan Ran through the steps manually and confirmed this generates a building app. ### Resolves Resolves #57. Signed-off-by: Si Beaumont <[email protected]>
Oops @AliakseiM I didn't mean to close this issue without confirming with you, but I merged the PR that referenced it. Let us know if you have any issues or if the above clarification resolved things for you. |
@simonjbeaumont @czechboy0 I can confirm, that it works now. Sorry for my inattention. |
Commit hash: 37255b7
Context: I just wanted to try example, but build fails.
Steps to reproduce:
XCode Version 14.3 (14E222b)
The text was updated successfully, but these errors were encountered: