flutter_record_mp3 icon indicating copy to clipboard operation
flutter_record_mp3 copied to clipboard

Not working on iOS

Open muhammad-hassan-shakeel opened this issue 3 years ago • 4 comments

flutter_record_mp3-100379fe5af482f1f42c957e3d18a9d973fc8991/ios/Classes/Fat-Lame/lib/libmp3lame.a(lame.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

muhammad-hassan-shakeel avatar Jun 05 '22 11:06 muhammad-hassan-shakeel

Hi! Did you solve this some how?

EricKhoury avatar Sep 17 '22 18:09 EricKhoury

In your Podfile you have to replace

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

with

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['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
        config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64 i386"
    end
  end
end

🎉 🙂

cs-nuuk avatar Oct 10 '22 12:10 cs-nuuk

In your Podfile you have to replace

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

with

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['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
        config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64 i386"
    end
  end
end

🎉 🙂

Thanks, this works, but can it cause problems in the process of running the application on real devices?

lovibuilder avatar Jun 08 '23 17:06 lovibuilder

I update the package and the readme in the following https://pub.dev/packages/record_mp3_plus

amorenew avatar May 26 '24 22:05 amorenew