Ошибка сборки проекта XCode "Нет известного метода класса для селектора 'labelColor'" для модуля FirebaseUI после установки модуля - PullRequest
1 голос
/ 13 апреля 2020

Я только что установил модуль и обновил свои модули Firebase

enter image description here

Мне нужно обновление, чтобы использовать новую функцию из Firebase. Но я получаю следующую ошибку при сборке проекта:

- (void)awakeFromNib {
  [super awakeFromNib];

  if (@available(iOS 13.0, *)) {
    self.textField.textColor = [UIColor labelColor];
    self.label.textColor = [UIColor labelColor];
  }
}

//get the following error: 
No known class method for selector 'labelColor'

enter image description here

другая ошибка здесь:

  if (@available(iOS 13.0, *)) {
    attributedLinkText = [[NSMutableAttributedString alloc] initWithString:privacyPolicyAndTOSString
                                                                attributes:@{NSForegroundColorAttributeName: [UIColor labelColor]}];
  }
    //get the following error: 
No known class method for selector 'labelColor'

enter image description here

и последний здесь:

  if (@available(iOS 13, *)) {
    if (!self.authUI.interactiveDismissEnabled) {
      self.modalInPresentation = YES;
    }
  }
//get the following error: 
Property 'modalInPresentation' not found on object of type 'FUIAuthPickerViewController *'

enter image description here

если я закомментирую // эти ошибки, то проект будет собран без проблем.

Вот мой подфайл:

# Uncomment the next line to define a global platform for your project

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '11.0'

target 'changelater' do
  # Comment the next line if you don't want to use dynamic frameworks


use_frameworks!

  # Pods for changelater
    pod 'Firebase/Analytics'
    pod 'Firebase/Core'
    pod 'Firebase/Database'
    pod 'FirebaseUI/Auth'
    pod 'Firebase/Firestore'
    pod 'Firebase/Functions'
    pod 'ProgressHUD', '2.51'
    pod 'Kingfisher', '5.7.1'
    pod 'Stripe', '15.0.1'
    pod 'Alamofire', '4.8.2'
  pod 'GooglePlaces', '3.3.0'
  pod 'GoogleMaps', '3.3.0'
  pod 'GooglePlacesSearchController', '0.2.1'
#  pod 'GooglePlacePicker', '6.7.0'

end

, а вот мой podfile.lock:

PODS:
  - abseil/algorithm (0.20190808):
    - abseil/algorithm/algorithm (= 0.20190808)
    - abseil/algorithm/container (= 0.20190808)
  - abseil/algorithm/algorithm (0.20190808)
  - abseil/algorithm/container (0.20190808):
    - abseil/algorithm/algorithm
    - abseil/base/core_headers
    - abseil/meta/type_traits
  - abseil/base (0.20190808):
    - abseil/base/atomic_hook (= 0.20190808)
    - abseil/base/base (= 0.20190808)
    - abseil/base/base_internal (= 0.20190808)
    - abseil/base/bits (= 0.20190808)
    - abseil/base/config (= 0.20190808)
    - abseil/base/core_headers (= 0.20190808)
    - abseil/base/dynamic_annotations (= 0.20190808)
    - abseil/base/endian (= 0.20190808)
    - abseil/base/log_severity (= 0.20190808)
    - abseil/base/malloc_internal (= 0.20190808)
    - abseil/base/pretty_function (= 0.20190808)
    - abseil/base/spinlock_wait (= 0.20190808)
    - abseil/base/throw_delegate (= 0.20190808)
  - abseil/base/atomic_hook (0.20190808)
  - abseil/base/base (0.20190808):
    - abseil/base/atomic_hook
    - abseil/base/base_internal
    - abseil/base/config
    - abseil/base/core_headers
    - abseil/base/dynamic_annotations
    - abseil/base/log_severity
    - abseil/base/spinlock_wait
    - abseil/meta/type_traits
  - abseil/base/base_internal (0.20190808):
    - abseil/meta/type_traits
  - abseil/base/bits (0.20190808):
    - abseil/base/core_headers
  - abseil/base/config (0.20190808)
  - abseil/base/core_headers (0.20190808):
    - abseil/base/config
  - abseil/base/dynamic_annotations (0.20190808)
  - abseil/base/endian (0.20190808):
    - abseil/base/config
    - abseil/base/core_headers
  - abseil/base/log_severity (0.20190808):
    - abseil/base/core_headers
  - abseil/base/malloc_internal (0.20190808):
    - abseil/base/base
    - abseil/base/config
    - abseil/base/core_headers
    - abseil/base/dynamic_annotations
    - abseil/base/spinlock_wait
  - abseil/base/pretty_function (0.20190808)
  - abseil/base/spinlock_wait (0.20190808):
    - abseil/base/core_headers
  - abseil/base/throw_delegate (0.20190808):
    - abseil/base/base
    - abseil/base/config
  - abseil/memory (0.20190808):
    - abseil/memory/memory (= 0.20190808)
  - abseil/memory/memory (0.20190808):
    - abseil/base/core_headers
    - abseil/meta/type_traits
  - abseil/meta (0.20190808):
    - abseil/meta/type_traits (= 0.20190808)
  - abseil/meta/type_traits (0.20190808):
    - abseil/base/config
  - abseil/numeric/int128 (0.20190808):
    - abseil/base/config
    - abseil/base/core_headers
  - abseil/strings/internal (0.20190808):
    - abseil/base/core_headers
    - abseil/base/endian
    - abseil/meta/type_traits
  - abseil/strings/strings (0.20190808):
    - abseil/base/base
    - abseil/base/bits
    - abseil/base/config
    - abseil/base/core_headers
    - abseil/base/endian
    - abseil/base/throw_delegate
    - abseil/memory/memory
    - abseil/meta/type_traits
    - abseil/numeric/int128
    - abseil/strings/internal
  - abseil/time (0.20190808):
    - abseil/time/internal (= 0.20190808)
    - abseil/time/time (= 0.20190808)
  - abseil/time/internal (0.20190808):
    - abseil/time/internal/cctz (= 0.20190808)
  - abseil/time/internal/cctz (0.20190808):
    - abseil/time/internal/cctz/civil_time (= 0.20190808)
    - abseil/time/internal/cctz/includes (= 0.20190808)
    - abseil/time/internal/cctz/time_zone (= 0.20190808)
  - abseil/time/internal/cctz/civil_time (0.20190808)
  - abseil/time/internal/cctz/includes (0.20190808)
  - abseil/time/internal/cctz/time_zone (0.20190808):
    - abseil/time/internal/cctz/civil_time
  - abseil/time/time (0.20190808):
    - abseil/base/base
    - abseil/base/core_headers
    - abseil/numeric/int128
    - abseil/strings/strings
    - abseil/time/internal/cctz/civil_time
    - abseil/time/internal/cctz/time_zone
  - abseil/types (0.20190808):
    - abseil/types/any (= 0.20190808)
    - abseil/types/bad_any_cast (= 0.20190808)
    - abseil/types/bad_any_cast_impl (= 0.20190808)
    - abseil/types/bad_optional_access (= 0.20190808)
    - abseil/types/bad_variant_access (= 0.20190808)
    - abseil/types/compare (= 0.20190808)
    - abseil/types/optional (= 0.20190808)
    - abseil/types/span (= 0.20190808)
    - abseil/types/variant (= 0.20190808)
  - abseil/types/any (0.20190808):
    - abseil/base/config
    - abseil/base/core_headers
    - abseil/meta/type_traits
    - abseil/types/bad_any_cast
    - abseil/utility/utility
  - abseil/types/bad_any_cast (0.20190808):
    - abseil/base/config
    - abseil/types/bad_any_cast_impl
  - abseil/types/bad_any_cast_impl (0.20190808):
    - abseil/base/base
    - abseil/base/config
  - abseil/types/bad_optional_access (0.20190808):
    - abseil/base/base
    - abseil/base/config
  - abseil/types/bad_variant_access (0.20190808):
    - abseil/base/base
    - abseil/base/config
  - abseil/types/compare (0.20190808):
    - abseil/base/core_headers
    - abseil/meta/type_traits
  - abseil/types/optional (0.20190808):
    - abseil/base/base_internal
    - abseil/base/config
    - abseil/base/core_headers
    - abseil/memory/memory
    - abseil/meta/type_traits
    - abseil/types/bad_optional_access
    - abseil/utility/utility
  - abseil/types/span (0.20190808):
    - abseil/algorithm/algorithm
    - abseil/base/core_headers
    - abseil/base/throw_delegate
    - abseil/meta/type_traits
  - abseil/types/variant (0.20190808):
    - abseil/base/base_internal
    - abseil/base/config
    - abseil/base/core_headers
    - abseil/meta/type_traits
    - abseil/types/bad_variant_access
    - abseil/utility/utility
  - abseil/utility/utility (0.20190808):
    - abseil/base/base_internal
    - abseil/base/config
    - abseil/meta/type_traits
  - Alamofire (4.8.2)
  - BoringSSL-GRPC (0.0.3):
    - BoringSSL-GRPC/Implementation (= 0.0.3)
    - BoringSSL-GRPC/Interface (= 0.0.3)
  - BoringSSL-GRPC/Implementation (0.0.3):
    - BoringSSL-GRPC/Interface (= 0.0.3)
  - BoringSSL-GRPC/Interface (0.0.3)
  - Firebase/Analytics (6.22.0):
    - Firebase/Core
  - Firebase/Auth (6.22.0):
    - Firebase/CoreOnly
    - FirebaseAuth (~> 6.5.1)
  - Firebase/Core (6.22.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (= 6.4.1)
  - Firebase/CoreOnly (6.22.0):
    - FirebaseCore (= 6.6.6)
  - Firebase/Database (6.22.0):
    - Firebase/CoreOnly
    - FirebaseDatabase (~> 6.1.4)
  - Firebase/Firestore (6.22.0):
    - Firebase/CoreOnly
    - FirebaseFirestore (~> 1.12.0)
  - Firebase/Functions (6.22.0):
    - Firebase/CoreOnly
    - FirebaseFunctions (~> 2.5.1)
  - FirebaseAnalytics (6.4.1):
    - FirebaseCore (~> 6.6)
    - FirebaseInstallations (~> 1.1)
    - GoogleAppMeasurement (= 6.4.1)
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/MethodSwizzler (~> 6.0)
    - GoogleUtilities/Network (~> 6.0)
    - "GoogleUtilities/NSData+zlib (~> 6.0)"
    - nanopb (= 0.3.9011)
  - FirebaseAuth (6.5.1):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.6)
    - GoogleUtilities/AppDelegateSwizzler (~> 6.5)
    - GoogleUtilities/Environment (~> 6.5)
    - GTMSessionFetcher/Core (~> 1.1)
  - FirebaseAuthInterop (1.1.0)
  - FirebaseCore (6.6.6):
    - FirebaseCoreDiagnostics (~> 1.2)
    - FirebaseCoreDiagnosticsInterop (~> 1.2)
    - GoogleUtilities/Environment (~> 6.5)
    - GoogleUtilities/Logger (~> 6.5)
  - FirebaseCoreDiagnostics (1.2.3):
    - FirebaseCoreDiagnosticsInterop (~> 1.2)
    - GoogleDataTransportCCTSupport (~> 2.0)
    - GoogleUtilities/Environment (~> 6.5)
    - GoogleUtilities/Logger (~> 6.5)
    - nanopb (~> 0.3.901)
  - FirebaseCoreDiagnosticsInterop (1.2.0)
  - FirebaseDatabase (6.1.4):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.0)
    - leveldb-library (~> 1.22)
  - FirebaseFirestore (1.12.0):
    - abseil/algorithm (= 0.20190808)
    - abseil/base (= 0.20190808)
    - abseil/memory (= 0.20190808)
    - abseil/meta (= 0.20190808)
    - abseil/strings/strings (= 0.20190808)
    - abseil/time (= 0.20190808)
    - abseil/types (= 0.20190808)
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.2)
    - "gRPC-C++ (= 0.0.9)"
    - leveldb-library (~> 1.22)
    - nanopb (~> 0.3.901)
  - FirebaseFunctions (2.5.1):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.0)
    - GTMSessionFetcher/Core (~> 1.1)
  - FirebaseInstallations (1.1.1):
    - FirebaseCore (~> 6.6)
    - GoogleUtilities/UserDefaults (~> 6.5)
    - PromisesObjC (~> 1.2)
  - FirebaseUI/Auth (8.4.2):
    - Firebase/Auth (~> 6.0)
    - GoogleUtilities/UserDefaults
  - GoogleAppMeasurement (6.4.1):
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/MethodSwizzler (~> 6.0)
    - GoogleUtilities/Network (~> 6.0)
    - "GoogleUtilities/NSData+zlib (~> 6.0)"
    - nanopb (= 0.3.9011)
  - GoogleDataTransport (5.1.1)
  - GoogleDataTransportCCTSupport (2.0.2):
    - GoogleDataTransport (~> 5.1)
    - nanopb (~> 0.3.901)
  - GoogleMaps (3.3.0):
    - GoogleMaps/Maps (= 3.3.0)
  - GoogleMaps/Base (3.3.0)
  - GoogleMaps/Maps (3.3.0):
    - GoogleMaps/Base
  - GooglePlaces (3.3.0):
    - GoogleMaps/Base (= 3.3.0)
  - GooglePlacesSearchController (0.2.1)
  - GoogleUtilities/AppDelegateSwizzler (6.5.2):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
  - GoogleUtilities/Environment (6.5.2)
  - GoogleUtilities/Logger (6.5.2):
    - GoogleUtilities/Environment
  - GoogleUtilities/MethodSwizzler (6.5.2):
    - GoogleUtilities/Logger
  - GoogleUtilities/Network (6.5.2):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (6.5.2)"
  - GoogleUtilities/Reachability (6.5.2):
    - GoogleUtilities/Logger
  - GoogleUtilities/UserDefaults (6.5.2):
    - GoogleUtilities/Logger
  - "gRPC-C++ (0.0.9)":
    - "gRPC-C++/Implementation (= 0.0.9)"
    - "gRPC-C++/Interface (= 0.0.9)"
  - "gRPC-C++/Implementation (0.0.9)":
    - "gRPC-C++/Interface (= 0.0.9)"
    - gRPC-Core (= 1.21.0)
    - nanopb (~> 0.3)
  - "gRPC-C++/Interface (0.0.9)"
  - gRPC-Core (1.21.0):
    - gRPC-Core/Implementation (= 1.21.0)
    - gRPC-Core/Interface (= 1.21.0)
  - gRPC-Core/Implementation (1.21.0):
    - BoringSSL-GRPC (= 0.0.3)
    - gRPC-Core/Interface (= 1.21.0)
    - nanopb (~> 0.3)
  - gRPC-Core/Interface (1.21.0)
  - GTMSessionFetcher/Core (1.3.1)
  - Kingfisher (5.7.1)
  - leveldb-library (1.22)
  - nanopb (0.3.9011):
    - nanopb/decode (= 0.3.9011)
    - nanopb/encode (= 0.3.9011)
  - nanopb/decode (0.3.9011)
  - nanopb/encode (0.3.9011)
  - ProgressHUD (2.51)
  - PromisesObjC (1.2.8)
  - Stripe (15.0.1)

DEPENDENCIES:
  - Alamofire (= 4.8.2)
  - Firebase/Analytics
  - Firebase/Core
  - Firebase/Database
  - Firebase/Firestore
  - Firebase/Functions
  - FirebaseUI/Auth
  - GoogleMaps (= 3.3.0)
  - GooglePlaces (= 3.3.0)
  - GooglePlacesSearchController (= 0.2.1)
  - Kingfisher (= 5.7.1)
  - ProgressHUD (= 2.51)
  - Stripe (= 15.0.1)

SPEC REPOS:
  https://github.com/CocoaPods/Specs.git:
    - abseil
    - Alamofire
    - BoringSSL-GRPC
    - Firebase
    - FirebaseAnalytics
    - FirebaseAuth
    - FirebaseAuthInterop
    - FirebaseCore
    - FirebaseCoreDiagnostics
    - FirebaseCoreDiagnosticsInterop
    - FirebaseDatabase
    - FirebaseFirestore
    - FirebaseFunctions
    - FirebaseInstallations
    - FirebaseUI
    - GoogleAppMeasurement
    - GoogleDataTransport
    - GoogleDataTransportCCTSupport
    - GoogleMaps
    - GooglePlaces
    - GooglePlacesSearchController
    - GoogleUtilities
    - "gRPC-C++"
    - gRPC-Core
    - GTMSessionFetcher
    - Kingfisher
    - leveldb-library
    - nanopb
    - ProgressHUD
    - PromisesObjC
    - Stripe

SPEC CHECKSUMS:
  abseil: 18063d773f5366ff8736a050fe035a28f635fd27
  Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3
  BoringSSL-GRPC: db8764df3204ccea016e1c8dd15d9a9ad63ff318
  Firebase: 32f9520684e87c7af3f0704f7f88042626d6b536
  FirebaseAnalytics: 83f822fd0d33a46f49f89b8c3ab16ab4d89df08a
  FirebaseAuth: a6da11d78dfd956b7f7af3222a0f0b1c93ef8fc9
  FirebaseAuthInterop: a0f37ae05833af156e72028f648d313f7e7592e9
  FirebaseCore: 9aca0f1fffb405176ba15311a5621fcde4106fcf
  FirebaseCoreDiagnostics: 13a6564cd6d5375066bbc8940cc1753af24497f3
  FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850
  FirebaseDatabase: 0144e0706a4761f1b0e8679572eba8095ddb59be
  FirebaseFirestore: a750487e2019ac35464c78311dcf2fde9d817c52
  FirebaseFunctions: 5af7c35d1c5e41608fecbb667eb6c4e672e318d0
  FirebaseInstallations: acb3216eb9784d3b1d2d2d635ff74fa892cc0c44
  FirebaseUI: e57e9b9c4340631151fbe67a14206d23d0974f37
  GoogleAppMeasurement: e49be3954045b17d046f271b9cc1ec052bad9702
  GoogleDataTransport: 6ffa4dd0b6d547f8d27b91bd92fa9e197a3f5f1f
  GoogleDataTransportCCTSupport: 12f02e5c8f09c055615de90bcd5ba2c375546051
  GoogleMaps: cfee83da305b9aaeccf92c24ac79df11c3003492
  GooglePlaces: 1e2a87bd9efee9623ee65d44ecc35ebfecd7b13c
  GooglePlacesSearchController: e53b61b7497cf40cb18ec296b1d3314c11c0a1c0
  GoogleUtilities: ad0f3b691c67909d03a3327cc205222ab8f42e0e
  "gRPC-C++": 9dfe7b44821e7b3e44aacad2af29d2c21f7cde83
  gRPC-Core: c9aef9a261a1247e881b18059b84d597293c9947
  GTMSessionFetcher: cea130bbfe5a7edc8d06d3f0d17288c32ffe9925
  Kingfisher: 176d377ad339113c99ad4980cbae687f807e20fe
  leveldb-library: 55d93ee664b4007aac644a782d11da33fba316f7
  nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
  ProgressHUD: 54b4c2fa202bf3da7dddc1c698ae4e6376333bd9
  PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
  Stripe: 2c4d0a88817361a102886315ff452d90f65e898b

PODFILE CHECKSUM: a8be44df63a4bf0f79ac6c00c8c4a6073aa507c5

COCOAPODS: 1.9.1

Любой идея, почему я получаю эту ошибку при сборке? и как я могу это исправить? Я пробовал много вещей, таких как:

  1. команда + shift + k
  2. pod install --no-repo-update
  3. pod update

примечание: моя версия xcode - 10.3. Кажется, что я получаю эту ошибку, где она составляет if (@available(iOS 13.0, *)). В моем подфайле я должен был принудительно установить версию на других модулях, иначе это вызвало бы больше ошибок в любом месте, связанных с if (@available(iOS 13.0, *))

Ни одно из этих действий не работает ...

1 Ответ

1 голос
/ 13 апреля 2020

Некоторые iOS 13 функции доступны только в том случае, если вы используете Xcode 11 для сборки, а Xcode 10 их не понимает и не может собрать.

...