Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS Version problems #123

Open
michalzubkowicz opened this issue Jan 12, 2024 · 1 comment
Open

IOS Version problems #123

michalzubkowicz opened this issue Jan 12, 2024 · 1 comment

Comments

@michalzubkowicz
Copy link

michalzubkowicz commented Jan 12, 2024

To build application i had to remove this code from the Podfile

  # defined_in_file is set by CocoaPods and is a Pathname to the Podfile.
  application_path ||= File.dirname(defined_in_file.realpath) if self.respond_to?(:defined_in_file)
  raise 'Could not find application path' unless application_path

  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.

  symlink_dir = File.expand_path(relative_symlink_dir, application_path)
  system('rm', '-rf', symlink_dir) # Avoid the complication of dependencies like FileUtils.

  symlink_plugins_dir = File.expand_path('plugins', symlink_dir)
  system('mkdir', '-p', symlink_plugins_dir)

  plugins_file = File.join(application_path, '..', '.flutter-plugins-dependencies')
  plugin_pods = flutter_parse_plugins_file(plugins_file, platform)
  plugin_pods.each do |plugin_hash|
    plugin_name = plugin_hash['name']
    plugin_path = plugin_hash['path']
    if (plugin_name && plugin_path)
      symlink = File.join(symlink_plugins_dir, plugin_name)
      File.symlink(plugin_path, symlink)

      if plugin_name == 'flutter_ffmpeg'
        pod 'flutter_ffmpeg/min-lts', :path => File.join(relative_symlink_dir, 'plugins', plugin_name, platform)
      else
        pod plugin_name, :path => File.join(relative_symlink_dir, 'plugins', plugin_name, platform)
      end
    end
  end
end

I was able to run application but cannot create any video because of:

The following LateError was thrown building Builder(dirty):
LateInitializationError: Field '_cameraController@1289366773' has not been initialized.

The relevant error-causing widget was:
  Builder
  Builder:file:///Users/q/.pub-cache/hosted/pub.dev/native_device_orientation-1.2.1/lib/native_device_orientation.dart:128:20

When the exception was thrown, this was the stack:
#0      _RecordingPageState._cameraController (package:one_second_diary/pages/recording/recording_page.dart)
#1      _RecordingPageState.build.<anonymous closure> (package:one_second_diary/pages/recording/recording

I have newest dart & flutter.

@KyleKun
Copy link
Owner

KyleKun commented Jan 15, 2024

Hi @michalzubkowicz , there is no iOS version (I don't have a Mac). It would be super nice if you're looking to contribute and make it compile on iOS, but there's lots of things more that would need adjusts (storage, permissions, notifications, camera, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants