driftboat/flutter_zoom

Swift Compiler Error (Xcode): No such module 'MobileRTC'

Opened this issue · 11 comments

Hello.

I am facing with error

Swift Compiler Error (Xcode): No such module 'MobileRTC' /Users/komnata/.pub-cache/hosted/pub.dartlang.org/zoom-1.0.3+5/ios/Classes/SwiftZoomPlugin.swift:2:7

when i try to run debugger for IOS.

on my pubspec.yaml: zoom: ^1.0.3+5

the command flutter build ios runs without any problem with a result:
flutter build ios Running "flutter pub get" in zoom_flutter... 3,3s Building com.komnata.zoomFlutter for device (ios-release)... Automatically signing iOS for device deployment using specified development team in Xcode project: 8G82HYG22F Running pod install... 3,3s Running Xcode build... └─Compiling, linking and signing... 19,8s Xcode build done. 91,5s Built /Users/komnata/myPATHhere/flutter zoom/zoom_flutter/build/ios/iphoneos/Runner.app.

is there anybody faced with this issue, or am I missing something?

Thanks in advance

I've added to pubspec
Run flutter pub get
unzipped the SDK flutter pub run zoom:unzip_zoom_sdk dev
Run the app

I got the same error

Please make sure "MobileRTC" exists at /Users/komnata/.pub-cache/hosted/pub.dartlang.org/zoom-1.0.3+5/ios/MobileRTC.xcframework/ios-i386_x86_64-simulator/MobileRTC.framework/

Run "flutter pub run zoom:unzip_zoom_sdk" to download this file, or just download it and place it to that folder #16 (comment)

![Ekran Resmi 2022-03-23 18 32 11 (2)](https://user-images.githubusercontent.com/44510636/159736990-858b0430-6242-422d-9fe1-6421a1f89
Ekran Resmi 2022-03-23 18 36 01 (2)
d04.png)

@driftboat as seen in attachments, i have downloaded MobileRTC file, and i have run flutter pub run zoom:unzip_zoom_sdk

I have version zoom: ^1.0.3+5 Maybe could it be related with that?

Facing the same issue with iOS Simulator

Any luck people? Zoom SDK + M1 + iOS Simulator seems like a no show.

I fixed it with running the following commands in the terminal:
cd ios
pod deintegrate
pod setup
pod install

I fixed it with update the file 'zoom.podspec' and 'Podfile':

  • File 'zoom/ios/zoom.podspect':
    '''
    Pod::Spec.new do |s|
    s.name = 'zoom'
    s.version = '0.0.1'
    s.summary = 'A new flutter plugin project.'
    s.description = <<-DESC
    A new flutter plugin project.
    DESC
    s.homepage = 'http://example.com'
    s.license = { :file => '../LICENSE' }
    s.author = { 'Your Company' => 'email@example.com' }
    s.source = { :path => '.' }
    s.source_files = 'Classes/**/*'
    s.dependency 'Flutter'
    s.platform = :ios, '8.0'

    s.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '-framework MobileRTC', 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386, arm64' }
    s.swift_version = '5.0'
    s.preserve_paths = 'MobileRTC.xcframework', 'MobileRTCResources.bundle'
    s.vendored_frameworks = 'MobileRTC.xcframework'
    s.resource = 'MobileRTCResources.bundle'
    end

'''

  • File 'ios/Podfile':
    '''
    post_install do |installer|
    installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    ....

    if target.name == "zoom"
    puts("Found target membership zoom.")
    all_filerefs = installer.pods_project.files
    all_filerefs.each do |fileref|
    if fileref.path.end_with? "MobileRTC.xcframework"
    puts("Found MobileRTC.xcframework fileref.")
    build_phase = target.frameworks_build_phase
    puts("Determining if zoom build phase needs correction.")
    unless build_phase.files_references.include?(fileref)
    puts("Adding MobileRTC.xcframework to zoom target")
    build_phase.add_file_reference(fileref)
    end
    end
    end
    end

    end

    installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
    end

'''

Hope to help you !