fix: mapping fails when bundle product name differs from target name#146
fix: mapping fails when bundle product name differs from target name#146
Conversation
|
@KaiOelfke would you have time to test out these changes by pointing to this branch in |
There was one more issue. But that was not by Tuist, but an seemingly invalid pbxproj configuration on our side. E.g. a native target with name TargetA had as product name in the native target section in the pbx TargetB. In the build setting it still showed up as product name TargetA. So I don't even know how to fix this native target section from Xcode. But fixing it in a text editor resulted finally in a graph output by tuist graph. Not sure if Tuist can lint against such things. @fortmarek Thanks for your perseverance. |
Resolves issue raised here.
In Pods projects, the resource bundle added as a dependency uses the product name. However, the target name can be different such
Alamofire-iOS-Alamofirebundle's product name isAlamofire. When creating theprojectNativeTargetsmap, we use the product name as the key, so we don't throw here.Note this can cause a mismatch when the targets have a different name but the same product name. I couldn't figure out a good way to match the bundle product name with a specific target when there are multiple targets with the same product. I'd think this is quite rare outside of the Cocoapods context, so I'm leaning to living with that for now and reconsider this if it causes issues down the line.