apivideo / api.video-flutter-live-stream

Flutter RTMP live stream client. Made with ♥ by api.video
MIT License
70 stars 41 forks source link

[Bug]: iOS is crashing as soon as startStreaming is invoked #40

Closed TheFe91 closed 1 year ago

TheFe91 commented 1 year ago

Version

v1.1.1

Which operating systems have you used?

Environment that reproduces the issue

Is it reproducible in the example application?

Yes

RTMP Server

rtmps://global-live.mux.com:443/app

Reproduction steps

  1. Configure your streaming with url and key
  2. Press start (or generically invoke the startStreaming method)

Expected result

Stream starts

Actual result

App crashes due to a hashinkit error (see logs below)

Additional context

PLEASE NOTE

Library version I am using is 1.1.2 but it's not selectable above (current maximum is 1.1.1)

▶ flutter --version Flutter 3.13.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision 12fccda598 (6 days ago) • 2023-09-19 13:56:11 -0700 Engine • revision bd986c5ed2 Tools • Dart 3.1.2 • DevTools 2.25.0

▶ pod --version 1.13.0

XCode version 15.0 (15A240d)

Relevant logs output

* thread #1, queue = 'com.haishinkit.HaishinKit.NetStream.lock', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000000000000
error: memory read failed for 0x0
Target 0: (Runner) stopped.
TheFe91 commented 1 year ago

I solved the problem. For some reason with the new XCode15 you can't target any iOS < 13 while using HashinKit, so in the Podfile we must add config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' in the post_install phase

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['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
        # Other target build configs
    end

    # Other configs
  end
end

This makes the plugin work.

Closing