KyleKun / one_second_diary

Minimalist video diary app.
MIT License
288 stars 59 forks source link

IOS Version problems #123

Open michalzubkowicz opened 8 months ago

michalzubkowicz commented 8 months ago

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 commented 7 months ago

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.)