fluttercandies / flutter_record_mp3

flutter record mp3 using the native api
Other
34 stars 33 forks source link

Not working on iOS #15

Open muhammad-hassan-shakeel opened 2 years ago

muhammad-hassan-shakeel commented 2 years ago

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

EricKhoury commented 2 years ago

Hi! Did you solve this some how?

cs-nuuk commented 1 year ago

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

🎉 🙂

lovibuilder commented 1 year ago

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?

amorenew commented 4 months ago

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