Flutter ios build error caused from deprecated libraries

1,225

You needn't delete these packages, just follow these commands and try in your terminal;

First Method for fix the issue:

flutter clean
flutter pub get
flutter run

if isn't work you can try this: Second Solution:

flutter pub get 
cd ios
pod install

Or you can remove Podfile.lock and after try this:

cd ios
pod install
Share:
1,225
Emir Kutlugün
Author by

Emir Kutlugün

Updated on December 12, 2022

Comments

  • Emir Kutlugün
    Emir Kutlugün over 1 year

    I'm using cloud mac server for releasing in ios. And before changing my mac, i succesfully finished build of my ios app, but then i changed my mac server, now when i try to build, getting error below, what can i do to fix this issue, as i understand it's about deprecated libraries, but i can't delete them all because im using them in my app.

    /Users/user191346/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-7.0.1/ios/Classes/FLTFirebaseAnalytic
        sPlugin.m:49:19: warning: 'setScreenName:screenClass:' is deprecated: Use +[FIRAnalytics logEventWithName:kFIREventScreenView
        parameters:] instead. [-Wdeprecated-declarations]
            [FIRAnalytics setScreenName:screenName screenClass:screenClassOverride];
                          ^
        In module 'FirebaseAnalytics' imported from
        /Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/Headers/Public/Firebase/Firebase.h:22:
        /Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnal
        ytics.h:128:5: note: 'setScreenName:screenClass:' has been explicitly marked deprecated here
            DEPRECATED_MSG_ATTRIBUTE(
            ^
        In module 'UIKit' imported from /Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/Target Support
        Files/firebase_analytics/firebase_analytics-prefix.pch:2:
        In module 'Foundation' imported from
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
        s/UIKit.framework/Headers/UIKit.h:8:
        In module 'CoreFoundation' imported from
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
        s/Foundation.framework/Headers/Foundation.h:6:
        In module 'Darwin' imported from
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
        s/CoreFoundation.framework/Headers/CoreFoundation.h:16:
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/Availability
        Macros.h:183:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
                    #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
                                                                       ^
        1 warning generated.
        /Users/user191346/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-7.0.1/ios/Classes/FLTFirebaseAnalytic
        sPlugin.m:49:19: warning: 'setScreenName:screenClass:' is deprecated: Use +[FIRAnalytics logEventWithName:kFIREventScreenView
        parameters:] instead. [-Wdeprecated-declarations]
            [FIRAnalytics setScreenName:screenName screenClass:screenClassOverride];
                          ^
        In module 'FirebaseAnalytics' imported from
        /Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/Headers/Public/Firebase/Firebase.h:22:
        /Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnal
        ytics.h:128:5: note: 'setScreenName:screenClass:' has been explicitly marked deprecated here
            DEPRECATED_MSG_ATTRIBUTE(
            ^
        In module 'UIKit' imported from /Users/user191346/Desktop/rate_prof/rate_prof/ios/Pods/Target Support
        Files/firebase_analytics/firebase_analytics-prefix.pch:2:
        In module 'Foundation' imported from
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
        s/UIKit.framework/Headers/UIKit.h:8:
        In module 'CoreFoundation' imported from
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
        s/Foundation.framework/Headers/Foundation.h:6:
        In module 'Darwin' imported from
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Framework
        s/CoreFoundation.framework/Headers/CoreFoundation.h:16:
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/Availability
        Macros.h:183:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
                    #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
                                                                       ^
        1 warning generated.
        building file list ... rsync: link_stat "/Users/user191346/Desktop/rate_prof/rate_prof/ios/Flutter/App.framework" failed: No
        such file or directory (2)
        done
    
  • Emir Kutlugün
    Emir Kutlugün about 3 years
    Second solution is worked but having another issue, will open seperate question for it, thanks again.
  • Emir Kutlugün
    Emir Kutlugün about 3 years
    stackoverflow.com/questions/66203670/… Here's the other issue, be really glad if you can take a look.