one_second_diary icon indicating copy to clipboard operation
one_second_diary copied to clipboard

IOS Version problems

Open michalzubkowicz opened this issue 5 months ago • 1 comments

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.

michalzubkowicz avatar Jan 12 '24 09:01 michalzubkowicz

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

KyleKun avatar Jan 15 '24 21:01 KyleKun