flutter-braintree icon indicating copy to clipboard operation
flutter-braintree copied to clipboard

Unable to build on iOS 13.0 due to deprecations

Open shelpert opened this issue 1 year ago • 12 comments

Hi, I am trying to use this package on iOS 13.0, but am facing deprecation warnings that are causing the build to fail:

Deprecations (Xcode): 'setNetworkActivityIndicatorVisible:' is deprecated: first deprecated in iOS 13.0 - Provide a custom network activity UI in your app if desired.
/Users/builder/clone/ios/Pods/BraintreeDropIn/Sources/BraintreeDropIn/BTVaultManagementViewController.m:95:37

Deprecations (Xcode): 'setNetworkActivityIndicatorVisible:' is deprecated: first deprecated in iOS 13.0 - Provide a custom network activity UI in your app if desired.
/Users/builder/clone/ios/Pods/BraintreeDropIn/Sources/BraintreeDropIn/BTVaultManagementViewController.m:98:41

shelpert avatar May 23 '23 19:05 shelpert

Same Do you have find a solution??

adialloo avatar May 29 '23 13:05 adialloo

Any news? I have same error

FetFrumos avatar Jun 03 '23 07:06 FetFrumos

Any news? I have same error

Not yet

adialloo avatar Jun 03 '23 16:06 adialloo

@adialloo I tried build with Flutter 3.7.12 - working, I get error with Flutter 3.10

also I updated my pod

platform :ios, '12.0'

remove this


installer.generated_projects.each do |project|
            project.targets.each do |target|
                target.build_configurations.each do |config|
                    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
                 end
            end
  end

Xcode - minimum deployment -12.1

FetFrumos avatar Jun 03 '23 19:06 FetFrumos

@adialloo I tried build with Flutter 3.7.12 - working, I get error with Flutter 3.10

also I updated my pod

platform :ios, '12.0'

remove this


installer.generated_projects.each do |project|
            project.targets.each do |target|
                target.build_configurations.each do |config|
                    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
                 end
            end
  end

Xcode - minimum deployment -12.1

I use it in flutterflow. The version of flutter in flutterflow at this time is 3.7.12 and is still not working for ios.

adialloo avatar Jun 17 '23 17:06 adialloo

having the same problem. My project depends on IOS 13 due to other package requirements. Now I can not build anymore due to this bug in flutter_braintree

Kuhno92 avatar Jun 21 '23 09:06 Kuhno92

Hello there @pikaju we really need your help. We cannot build for ios and on android there are issues.

nicolasvahidzein avatar Feb 16 '24 04:02 nicolasvahidzein

same error here

DavidAriza avatar Apr 11 '24 15:04 DavidAriza

same

ahmedtanjim avatar Apr 20 '24 15:04 ahmedtanjim

Hey all,

This is a little aged now and the new level of depreciation is now 14.1 for devices now. The only way I could get this to work is to link up GitHub to your ff and push to that, change the pod file from 13.0 to 14.1 and than change this in the other Xcode files. Just search for 13.0 and replace all to 14.1. After this configure you Xcode properties name, devices, launch page icons ect and once done do a final sub to your GitHub. Use that repo and signup for a free code magic account. Integrate it into it and it should push successfully.

MyTechAgent avatar Apr 25 '24 23:04 MyTechAgent

No way i am doing any of this. Thanks for your input though.

nicolasvahidzein avatar Apr 28 '24 08:04 nicolasvahidzein

I have the same issue with Flutter 3.22.2.

As a workaround. I did the following

  1. Fork this repo
  2. Modify the ios/flutter_braintree.podspec
  3. The diff shows below. Please replace the URL for your own repo (HomePage might be not necessary to change)

--- a/ios/flutter_braintree.podspec +++ b/ios/flutter_braintree.podspec @@ -8,16 +8,16 @@ Pod::Spec.new do |s| s.description = <<-DESC A Flutter plugin that wraps the native Braintree Drop-In UI SDKs. DESC

  • s.homepage = 'https://github.com/Pikaju/FlutterBraintree'
  • s.homepage = 'https://github.com/<YourGitHubName>/flutter-braintree.git' s.license = { :file => '../LICENSE' } s.author = { 'Julien Scholz' => '' } s.source = { :path => '.' } s.source_files = 'Classes//*' s.public_header_files = 'Classes//*.h' s.dependency 'Flutter'
  • s.dependency 'BraintreeDropIn', '9.4.0'
  • s.dependency 'Braintree/PayPal', '~> 5.6.3'
  • s.dependency 'Braintree/ApplePay', '~> 5.6.3'
  • s.ios.deployment_target = '12.0'
  • s.dependency 'BraintreeDropIn', '9.12.2'
  • s.dependency 'Braintree/PayPal', '~> 5.25.0'
  • s.dependency 'Braintree/ApplePay', '~> 5.25.0'
  • s.ios.deployment_target = '13.0'
  1. Push this change to main branch.
  2. Edit your project pub.yaml. Don't forget to replace the URL for your own.

flutter_braintree: git: url: https://github.com/<YourGithubName>/flutter-braintree.git ref: main

  1. Run commands

pod cache clean --all rm -rf Pods
rm Podfile.lock pod repo update pod install cd .. flutter run

Note that every I make a change to the repo. I noticed I have to change the flutter_braintree: ^4.0.0, run 'flutter clean && flutter pub get'. Then changed the dependency back to my repo. run 'flutter clean && flutter pub get' to make the flutter re-pull the latest change. I couldn't find a better way, if you do, please let me know. Hope this helps others who like to use this plugin.

lishengfeng avatar Jun 24 '24 22:06 lishengfeng