phrase / ios-sdk

Phrase Over the Air iOS SDK
https://phrase.com
Other
14 stars 3 forks source link

Misleading Package Reference Name #32

Closed tonnihyldgaard closed 3 years ago

tonnihyldgaard commented 3 years ago

/* XCRemoteSwiftPackageReference "ios-sdk" */,

We have noticed that the Phrase SDK for iOS is named ios-sdk in the XCRemoteSwiftPackageReference, this could potentially lead to package conflicts if another framework uses the same name for their SDK.

It's a minor thing, but I suggest changing the reference name to reduce risk of conflicts :)

winkelsdorf commented 3 years ago

Hello @tonnihyldgaard,

yes, excellent catch, we already noticed the same!

As to my knowledge there is sadly no way to override the Package Reference Name Xcode picks as of now. If you look at our Package file, we already set the Package Name to PhraseSDK accordingly (in https://github.com/phrase/ios-sdk/blob/master/Package.swift) but Xcode uses the Repository Name as Reference Name.

From what I know the internal Package resolution is tied to the Repository, so beside this misleading display name no conflicts should occur, even if another Repo is named ios-sdk, too.

hth!

winkelsdorf commented 3 years ago

@tonnihyldgaard Without any change to our Package, starting with Xcode 12.5 this seems to work correctly:

Screen Shot 2021-05-27 at 09 11 38 Screen Shot 2021-05-27 at 09 11 23

Xcode now takes not only the Repo url into account but correctly displays the Package name from the Package manifest.

Let me know if this works for you now, too. Going to close this issue soon.