twitter-archive / twitter-kit-ios

Twitter Kit is a native SDK to include Twitter content inside mobile apps.
Apache License 2.0
688 stars 449 forks source link

XCode 10 GM and Swift 4.2 Compiler Warning #95

Closed jlaws closed 5 years ago

jlaws commented 6 years ago

Building the TwitterCore cocoapod shows compiler warnings.

Expected behavior

The cocoapod should build with no warnings.

Actual behavior

/Users/joelaws/Workspace/kratos/Pods/TwitterCore/iOS/TwitterCore.framework/Modules/module.private.modulemap:1:29: Private submodule 'TwitterCore.Private' in private module map, expected top-level module
/Users/joelaws/Workspace/kratos/Pods/TwitterCore/iOS/TwitterCore.framework/Modules/module.private.modulemap:1:29: Rename 'TwitterCore.Private' to ensure it can be found by name

Steps to reproduce the behavior

  1. Download XCode 10 GM
  2. Setup a project and Podfile that depends on TwitterCore
  3. Compile the main target and the TwitterCore cocoapod
  4. see the build warnings
AlexGingell commented 5 years ago

Has anyone managed to obtain a version of TwitterKit v3.4.0 that is error free? I have checked many forks and branches and cannot see any versions which compile and run error-free / produce no issues. If it is not this private submodule problem it is

Umbrella header for module 'TwitterCore' does not include header 'TWTRColorUtil.h'

JacobJT commented 5 years ago

@rajul-arora @evansobkowicz

I don't have any experience working with frameworks or I'd make my own PR, but I wouldn't even know how to confirm it works or not,

Any chance we can get implementations to fix this error (and subsequent TWTRColor.h issue) similar to these commits from one of the forks?

Remove the private module: cb75d55a7b8d42e107658250d3417bd64678e973

Add TWTRColor.h to the public module map: dc4b422d5b196e4aa420e6b28aad051afac2974b

Dunno if this one is required, but was done right after the others, unlink libTwitterCore in TwitterKit.framework: de5674fe5162eb3f541389be1cda64a83551a20f

Been lookin' forward to the day we have a warning free project to compile for years, and this is one of the last couple things preventing that.

jlaws commented 5 years ago

Posted on the twitter dev forum here and posted a request to @twitterdev on Twitter here.

jlaws commented 5 years ago

I removed the Twitter SDK from my cocoapods and no longer have this issue

https://blog.twitter.com/developer/en_us/topics/tools/2018/discontinuing-support-for-twitter-kit-sdk.html

npu3pak commented 5 years ago

Got some working solution. It fixed all TwitterCore related warnings for me. https://gist.github.com/npu3pak/108d8332a774289c08472d6fd85a1bbb