Last active
August 20, 2023 16:39
-
-
Save npu3pak/108d8332a774289c08472d6fd85a1bbb to your computer and use it in GitHub Desktop.
This script fixes all TwitterKit related warnings in XCode 10.1. Add new run script build phase with this code:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
readonly MODULEMAP="${PODS_ROOT}/TwitterCore/iOS/TwitterCore.framework/Modules/module.private.modulemap" | |
readonly HEADER="${PODS_ROOT}/TwitterCore/iOS/TwitterCore.framework/Headers/TwitterCore.h" | |
if ! grep -q "TwitterCore_Private" "${MODULEMAP}"; then | |
cat >"${MODULEMAP}" <<EOL | |
module TwitterCore_Private { | |
} | |
EOL | |
fi | |
if ! grep -q "TWTRColorUtil.h" "${HEADER}"; then | |
cat >>"${HEADER}" <<EOL | |
#import "TWTRColorUtil.h" | |
EOL | |
fi |
@Headmast you should run it before "Compile Sources" phase.
@Headmast you should run it before "Compile Sources" phase.
Doesn't work too. Maybe it depends on 'TwitterKit', '3.4.2' and 'TwitterCore', '3.2.0' versions. Anyway, a working solution for me, add into podfile.
post_install do |installer|
installer.aggregate_targets.each do |aggregate_target|
aggregate_target.xcconfigs.each do |config_name, config_file|
config_file.other_linker_flags[:frameworks].delete("TwitterCore")
xcconfig_path = aggregate_target.xcconfig_path(config_name)
config_file.save_as(xcconfig_path)
end
end
end
Link from https://github.com/twitter-archive/twitter-kit-ios/issues/18#issuecomment-432633038
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It doesn't in Xcode 10.2 and 11.0 beta (11M336w). I add this script at last position in Build Phases. Do you have any suggestions?