segmentio / analytics-ios

The hassle-free way to integrate analytics into any iOS application.
https://segment.com/libraries/ios
MIT License
398 stars 331 forks source link

Consuming analytics-ios framework using Cartfile results in Pod warnings #774

Open willemfrishert opened 6 years ago

willemfrishert commented 6 years ago

My team is consuming this framework using Carthage and we end up with the following warning inside our Xcode:

Is it possible for these two files to be created on the repo with a blank entry and overwritten for those team that consume the framework via CocoaPods?

Thanks in advance for your consideration. Will

f2prateek commented 6 years ago

Thanks for the report! Have you seen examples of other libraries do the same?

willemfrishert commented 6 years ago

Thanks for getting back to me @f2prateek. I haven't seen any project solving it in this way as most of the frameworks my team uses either:

I was basing my idea on the latter type of configuration where the file is kept on the repository with an empty contents and can still be automatically generated. However, honestly, I'm not well aware if CocoaPods likes the idea of files already being present on disk and properly overwrites the files.

Alternatively, I could suggest to have a look at how Swinject has its configuration set up. Having a quick look at this project, it shows that the project do not rely on automatically generated xcconfig files and is fully compatible with Carthage and CocoaPods. This change requires more work but would allow developers who are using Carthage to also run the AnalyticsTests-target with the intended xcconfig files present.

f2prateek commented 6 years ago

Thanks for the details. I've triaged this internally in our JIRA, and we'll take a look at this in more detail in our upcoming sprints!