Ios dyld:未找到符号:_OBJC_CLASS_$_GTMMIMEDocument迁移到Swift 4.2和Firebase 5.8后

Ios dyld:未找到符号:_OBJC_CLASS_$_GTMMIMEDocument迁移到Swift 4.2和Firebase 5.8后,ios,objective-c,firebase,swift4.2,Ios,Objective C,Firebase,Swift4.2,这很难。 我将Firebase从3.x更新到5.8,并将我的项目从Swift 3迁移到Swift 4.2。 现在我得到了以下错误: dyld: Symbol not found: _OBJC_CLASS_$_GTMMIMEDocument Referenced from: /Users/jarosz/Library/Developer/CoreSimulator/Devices/102264AE-4116-4108-B004-CAE6A422DF01/data/Containers/Bund

这很难。 我将Firebase从3.x更新到5.8,并将我的项目从Swift 3迁移到Swift 4.2。 现在我得到了以下错误:

dyld: Symbol not found: _OBJC_CLASS_$_GTMMIMEDocument
  Referenced from: /Users/jarosz/Library/Developer/CoreSimulator/Devices/102264AE-4116-4108-B004-CAE6A422DF01/data/Containers/Bundle/Application/2E200B33-7FE4-4421-856E-3C1FE78A17B6/StarSnoopy DEV.app/Frameworks/GoogleAPIClientForREST.framework/GoogleAPIClientForREST
  Expected in: /Users/jarosz/Library/Developer/CoreSimulator/Devices/102264AE-4116-4108-B004-CAE6A422DF01/data/Containers/Bundle/Application/2E200B33-7FE4-4421-856E-3C1FE78A17B6/StarSnoopy DEV.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher
 in /Users/jarosz/Library/Developer/CoreSimulator/Devices/102264AE-4116-4108-B004-CAE6A422DF01/data/Containers/Bundle/Application/2E200B33-7FE4-4421-856E-3C1FE78A17B6/StarSnoopy DEV.app/Frameworks/GoogleAPIClientForREST.framework/GoogleAPIClientForREST
我尝试了
pod去集成
pod安装
,但没有成功

但这还不是全部。这个项目相当大和复杂。例如,我们有一个使用Firebase/Core、Firebase/Auth和Firebase/Database的共享扩展

以下是播客文件:

# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Uncomment this line if you're using Swift
use_frameworks!

source 'https://github.com/CocoaPods/Specs.git'
source 'https://www.x-root.info/gitlab/x-root/ios-libraries/xr-podspecs.git'

# ------------------ APP ------------------

def app_pods
    # Objc
    pod 'HockeySDK', '~> 5.1.2'
    pod 'SVProgressHUD', '~> 2.2.5'
    pod 'SDWebImage', '~> 4.4.2'
    pod 'TSMessages', '~> 0.9.12'
    pod 'MMDrawerController', '~> 0.6.0'
    pod 'iRate', '~> 1.12.2'

    #Swift
    pod 'SwiftyJSON', '~> 4.1.0'
    pod 'ReachabilitySwift', '~> 4.2.1'
    pod 'SwiftyUserDefaults', '~> 3.0.1'
    pod 'XRCore', '~> 4.2.0'
    pod 'FBSDKCoreKit', '= 4.36.0'
    pod 'FBSDKLoginKit', '= 4.36.0'
    pod 'Firebase/Core', '~> 5.8.0'
    pod 'Firebase/Auth', '~> 5.8.0'
    pod 'Firebase/Database', '~> 5.8.0'
    pod 'Firebase/Storage', '~> 5.8.0'
    pod 'Firebase/DynamicLinks', '~> 5.8.0'
    pod 'Firebase/Invites', '~> 5.8.0'
    pod 'Firebase/RemoteConfig', '~> 5.8.0'
    pod 'GoogleSignIn', '~> 4.2.0'
    pod 'Fabric', '~> 1.7.11'
    pod 'Crashlytics', '~> 3.10.7'
    pod 'KeychainAccess', '~> 3.1.1'
    pod 'TTGSnackbar', '~> 1.7.3'
    pod 'UIImageColors', '~> 2.0.1'
    pod 'MarqueeLabel/Swift', '~> 3.1.6'
    pod 'MTBBarcodeScanner', '~> 5.0.6'
    pod 'TGCameraViewController', '~> 2.2.8'
    pod 'MaterialComponents/FeatureHighlight', '~> 26.0'
    pod 'IQKeyboardManagerSwift', '~> 4.0.13'

end

    post_install do | installer |
        require 'fileutils'
        FileUtils.cp_r('Pods/Target Support Files/Pods-MyApp DEV/Pods-MyApp DEV-acknowledgements.plist', 'Wishlist/Settings.bundle/Acknowledgements.plist', :remove_destination => true)
        # avoid usage of UIApplication by GTMSessionFetcher in share extension
        installer.pods_project.targets.each do |target|
            target.build_configurations.each do |config|
                config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) GTM_BACKGROUND_UIAPPLICATION=0 $(inherited) GTM_BACKGROUND_TASK_FETCHING=0'
            end
        end
    end

target 'MyApp DEV' do
    app_pods
end

target 'MyApp' do
    app_pods
end

# ------------------ EXTENSION ------------------

def sharing_pods
    # Objc
    pod 'SDWebImage', '~> 4.4.2'

    #Swift
    pod 'SwiftyJSON', '~> 4.1.0'
    pod 'SwiftyUserDefaults', '~> 3.0.1'
    pod 'XRCore/Extension', '~> 4.2.0'
    pod 'Firebase/Core', '~> 5.8.0'
    pod 'Firebase/Auth', '~> 5.8.0'
    pod 'Firebase/Database', '~> 5.8.0'
    pod 'Fabric', '~> 1.7.11'
    pod 'Crashlytics', '~> 3.10.7'
    pod 'KeychainAccess', '~> 3.1.1'

end

target 'Sharing DEV' do
    sharing_pods
end

target 'Sharing' do
    sharing_pods
end

class ::Pod::Generator::Acknowledgements
def header_text
    if header_title.end_with?("Acknowledgements")
        "This app is using Open Source components which are provided under the following Open Source licence terms of the respective rights holder."
    else
        ""
    end
end

end
我知道这一定是搜索路径或模块配置的问题,但我无法找到解决方案


有什么线索吗?

已经有一段时间了,因为我们修复了它,忘了分享解决方案。查看存储库似乎简单明了。但为什么需要它,因为Swift 4.2或Xcode 10.1还不清楚

解决方案: 将此添加到pod文件:
pod'GTMSessionFetcher',“~>1.2”

@PaulBeusterien这有什么帮助?请确保该文件位于项目中,并且已内置到目标中。@cybergen是否能够解决此问题?我训练了这么多东西,什么都不管用。@drdrdr我想是的。我会把答案贴出来。