antoniusnaumann / cargo-swift

A cargo plugin to easily build Swift packages from Rust code
https://crates.io/crates/cargo-swift
Apache License 2.0
180 stars 22 forks source link

feat: prompt `xcframework_name` to avoid duplicate target names error in Xcode #66

Open setoelkahfi opened 2 months ago

setoelkahfi commented 2 months ago

Thanks for this crate!

I tried to generate multiple Swift packages and include them in one project, but Xcode complained about duplicate target names. This is because the generated xcframework names are all the same. Strangely, I didn't get the prompt to supply the xcframework name like the package name prompt. This PR adds that prompt, with the default name being CrateName+XCFramework.

antoniusnaumann commented 2 months ago

I would like to avoid prompting this. Most of the time, there is no need for seeing the xcframework name, so a command line flag is sufficient. For the same reason, I will not offer a short flag here.

I agree, however, that the default name should be crate specific, thanks for pointing this out!

setoelkahfi commented 2 months ago

Ok. Do you want me to close this PR? Or, I can remove the things you don't like and keep the xcframework default name change. What do you think @antoniusnaumann?