ошибка: переопределение typedef с различными типами (NSInteger (он же long) или enum ACAccountCredentialRenewResult ') - PullRequest
1 голос
/ 16 мая 2019

Я попытался установить react-native-fbsdk в свое приложение React Native и следовал инструкциям, указанным в руководствах библиотеки README.MD и Getting Started with Facebook SDK .

Я получаю некоторые ошибки, следуя пути, поэтому вместо использования pod 'Reaction-native-fbsdk', который перенаправляет в библиотеку в node_modules, я удалил его и добавил

  pod 'FBSDKCoreKit'
  pod 'FBSDKLoginKit'
  pod 'FBSDKShareKit'

Теперь я получаюследующая ошибка, которая приводит к сбою моей сборки.Не удалось выяснить, в чем проблема.

error: typedef redefinition with different types ('NSInteger' (aka 'long') vs 'enum ACAccountCredentialRenewResult')

ПОЛНАЯ ОШИБКА:

CompileC /Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKLoginKit.build/Objects-normal/x86_64/_FBSDKLoginRecoveryAttempter.o FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/admin/MyApp/ios/Pods
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -fmodules-cache-path=/Users/admin/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/admin/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -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 -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Index/DataStore -iquote /Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKLoginKit.build/FBSDKLoginKit-generated-files.hmap -I/Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKLoginKit.build/FBSDKLoginKit-own-target-headers.hmap -I/Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKLoginKit.build/FBSDKLoginKit-all-non-framework-target-headers.hmap -ivfsoverlay /Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Intermediates.noindex/Pods.build/all-product-headers.yaml -iquote /Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKLoginKit.build/FBSDKLoginKit-project-headers.hmap -I/Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Products/Debug-iphonesimulator/FBSDKLoginKit/include -I/Users/admin/MyApp/ios/Pods/Headers/Private -I/Users/admin/MyApp/ios/Pods/Headers/Private/FBSDKLoginKit -I/Users/admin/MyApp/ios/Pods/Headers/Public -I/Users/admin/MyApp/ios/Pods/Headers/Public/Bolts -I/Users/admin/MyApp/ios/Pods/Headers/Public/FBSDKCoreKit -I/Users/admin/MyApp/ios/Pods/Headers/Public/FBSDKLoginKit -I/Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKLoginKit.build/DerivedSources/x86_64 -I/Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKLoginKit.build/DerivedSources -F/Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Products/Debug-iphonesimulator/FBSDKLoginKit -include /Users/admin/MyApp/ios/Pods/Target\ Support\ Files/FBSDKLoginKit/FBSDKLoginKit-prefix.pch -MMD -MT dependencies -MF /Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKLoginKit.build/Objects-normal/x86_64/_FBSDKLoginRecoveryAttempter.d --serialize-diagnostics /Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKLoginKit.build/Objects-normal/x86_64/_FBSDKLoginRecoveryAttempter.dia -c /Users/admin/MyApp/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.m -o /Users/admin/Library/Developer/Xcode/DerivedData/MyApp-drouqzftczwubqdkbisqdreewdmi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKLoginKit.build/Objects-normal/x86_64/_FBSDKLoginRecoveryAttempter.o

In file included from /Users/admin/MyApp/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.m:21:
In file included from /Users/admin/MyApp/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginKit+Internal.h:19:
In file included from /Users/admin/MyApp/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit.h:27:
In file included from /Users/admin/MyApp/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h:23:
/Users/admin/MyApp/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.h:23:19: error: typedef redefinition with different types ('NSInteger' (aka 'long') vs 'enum ACAccountCredentialRenewResult')
typedef NSInteger ACAccountCredentialRenewResult;
                  ^
In module 'Accounts' imported from /Users/admin/MyApp/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSystemAccountStoreAdapter.h:19:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h:11:28: note: previous definition is here
typedef NS_ENUM(NSInteger, ACAccountCredentialRenewResult) {
                           ^
1 error generated.

Среда

Среда: ОС: macOS 10.14 Узел: 12.1.0 Пряжа: 1.16.0 npm: 6.9.0 Сторож: 4.9.0 Xcode: Xcode 10.1 Версия сборки 10B61 Android Studio: 3.1 AI-173.4819257

Пакеты: (wanted => установлен)) реакция: 16.2.0 => 16.2.0 реакция нативная: 0.53.3 => 0.53.3

1 Ответ

1 голос
/ 21 мая 2019

как объяснено в отчете об ошибках github

Podspec для этого репо использует новейшую версию FBSDKLoginKit, которую он может найти.

Эта зависимость была изменена, чтобы исключить все значения перечисления LoginBehavior , кроме Браузера в прошедший день.

Предлагаемое решение

Длямомент, когда вы можете поместить рабочую версию в podfile для этого.Пока не будет исправлено реагирование-нативное-fbsdk.

pod 'Bolts',         '~> 1.9'
pod 'FBSDKCoreKit',  '~> 4.42.0'
pod 'FBSDKLoginKit',  '~> 4.42.0'
pod 'FBSDKShareKit' , '~> 4.42.0'

Используйте более старые версии тех зависимостей, у которых нет запроса на разрыв.

...