QuickBlox / quickblox-flutter-sdk

quickblox-flutter-sdk
Other
8 stars 0 forks source link

Unable to run in iOS. #53

Closed AgnelSelvan closed 2 years ago

AgnelSelvan commented 2 years ago

I'm trying to run in iOS Simulator it's giving me some big errors. Logs after build failed in iOS

Launching lib[/main.dart]() on iPhone 12 Pro in debug mode...
lib/main.dart:1
Xcode build done.                                           31.2s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    Writing result bundle at path:
        [/var/folders/50/rbmpckwj3sqb46fjkmky9vl40000gp/T/flutter_tools.2wQ9sA/flutter_ios_build_temp_dirHxgRuK/temporary_xcresult_bundle]()
While building module 'Quickblox' imported from [/Users/.pub-cache/hosted/pub.dartlang.org/quickblox_sdk-0.6.5-beta/ios/Classes/QBPlatformCore/Extentions/QBResponse]()+Helper.h:9:
    In file included from <module-includes>:1:
    In file included from [/Users/Documents/Flutter/app/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/QuickBlox/Quickblox.framework/Headers/Quickblox.h:24]():
    [/Users/Documents/Flutter/app/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/QuickBlox/QuickBlox.framework/Headers/QBContactList.h:42:13](): warning: empty paragraph passed to '@param' command [-Wdocumentation]
     @param state @see QBPresenseSubscriptionState
     ~~~~~~~~~~~^
While building module 'Quickblox' imported from [/Users/.pub-cache/hosted/pub.dartlang.org/quickblox_sdk-0.6.5-beta/ios/Classes/QBPlatformCore/Extentions/QBResponse]()+Helper.h:9:
    In file included from <module-includes>:1:
    In file included from [/Users/Documents/Flutter/app/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/QuickBlox/Quickblox.framework/Headers/Quickblox.h:49]():

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBRTCClient

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBUpdateUserParameters

Error (Xcode): Undefined symbol: _QuickbloxFrameworkVersion

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBRTCSession

Error (Xcode): Undefined symbol: _OBJC_METACLASS_$_QBRTCRemoteVideoView

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBRTCConferenceSession

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBRTCConfig

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBResponse

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBRTCAudioSession

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBSettings

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBRTCCameraCapture

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBCOCustomObject

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBCOPermissions

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBUUser

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBResponsePage

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBChat

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBRTCVideoFormat

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBGeneralResponsePage

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBChatMessage

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBRTCRemoteVideoView

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBCBlob

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBRTCConferenceClient

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBMSubscription

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBASession

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBRTCAudioSessionConfiguration

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBChatDialog

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBRequest

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBChatAttachment

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBSession

Error (Xcode): Undefined symbol: _OBJC_CLASS_$_QBMEvent

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro.
Exited (sigterm)

Flutter and Dart version

Flutter 2.10.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision db747aa133 (5 weeks ago) • 2022-02-09 13:57:35 -0600
Engine • revision ab46186b24
Tools • Dart 2.16.1 • DevTools 2.9.2

Changes done in PodFile

platform :ios, '13.0'

Software Version in iOS is 15.0

AgnelSelvan commented 2 years ago

Solved this issue by adding some lines in PodFile

post_install do |installer|
    installer.pods_project.targets.each do |target|
      flutter_additional_ios_build_settings(target)
      target.build_configurations.each do |config|
            config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
            config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
      end
    end
end