datatheorem / TrustKit

Easy SSL pinning validation and reporting for iOS, macOS, tvOS and watchOS.
MIT License
2.02k stars 364 forks source link

Error when installing this as a dependency for the example iOS app. #331

Closed obayit closed 4 days ago

obayit commented 4 months ago

I was trying to build the Example app from here. But when I run carthage update --platform ios --use-xcframeworks I get an error:

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -ivfsstatcache /Users/mohsuliman/Library/Caches/org.carthage.CarthageKit/DerivedData/15.4_15F31d/TrustKit/1.6.4/SDKStatCaches.noindex/iphoneos17.5-21F77-f6b513226ab75d8b6e514a3d72c62b80.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/mohsuliman/Library/Caches/org.carthage.CarthageKit/DerivedData/15.4_15F31d/TrustKit/1.6.4/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -Werror -Wmissing-field-initializers -Wmissing-prototypes -Werror\=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wunknown-pragmas -Wshadow -Wfour-char-constants -Wconversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wfloat-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wassign-enum -Wsign-compare -Wshorten-64-to-32 -Wpointer-sign -Wnewline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-implicit-fallthrough -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Wsign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body @/Users/mohsuliman/Library/Caches/org.carthage.CarthageKit/DerivedData/15.4_15F31d/TrustKit/1.6.4/Build/Intermediates.noindex/ArchiveIntermediates/TrustKit/IntermediateBuildFilesPath/TrustKit.build/Release-iphoneos/TrustKit.build/Objects-normal/arm64/e6072d4f65d7061329687fe24e3d63a7-common-args.resp -Wno-sign-conversion -Wno-sign-compare -MMD -MT dependencies -MF /Users/mohsuliman/Library/Caches/org.carthage.CarthageKit/DerivedData/15.4_15F31d/TrustKit/1.6.4/Build/Intermediates.noindex/ArchiveIntermediates/TrustKit/IntermediateBuildFilesPath/TrustKit.build/Release-iphoneos/TrustKit.build/Objects-normal/arm64/RSSwizzle.d --serialize-diagnostics /Users/mohsuliman/Library/Caches/org.carthage.CarthageKit/DerivedData/15.4_15F31d/TrustKit/1.6.4/Build/Intermediates.noindex/ArchiveIntermediates/TrustKit/IntermediateBuildFilesPath/TrustKit.build/Release-iphoneos/TrustKit.build/Objects-normal/arm64/RSSwizzle.dia -c /Users/mohsuliman/src/trust/ios/Carthage/Checkouts/TrustKit/TrustKit/Dependencies/RSSwizzle/RSSwizzle.m -o /Users/mohsuliman/Library/Caches/org.carthage.CarthageKit/DerivedData/15.4_15F31d/TrustKit/1.6.4/Build/Intermediates.noindex/ArchiveIntermediates/TrustKit/IntermediateBuildFilesPath/TrustKit.build/Release-iphoneos/TrustKit.build/Objects-normal/arm64/RSSwizzle.o
/Users/mohsuliman/src/trust/ios/Carthage/Checkouts/TrustKit/TrustKit/Dependencies/RSSwizzle/RSSwizzle.m:270:54: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
static NSMutableDictionary *swizzledClassesDictionary(){
                                                     ^
                                                      void

complete log file: carthage-xcodebuild.vNriq9.log

I managed to fix this by disabling the strict prototype check from xcode.

uroboro commented 4 days ago

This was fixed on 734fe1df1e7de59af69e713b1f34d2d02aec9c96