I am getting issue like "The following resource is malformed" for ios
I am using
Flutter version 3.27.3
Dart Version 3.6.1
I run cmd fvm flutter pub run flutter_flavorizr
Logs:
// START LOGS
(base) my@Mac demo_flutter_app % fvm flutter pub run flutter_flavorizr Deprecated. Use
dart runinstead.Executing task assets:download
Executing task assets:extract
Executing task android:androidManifest
Executing task android:flavorizrGradle
Executing task android:buildGradle
Executing task android:dummyAssets Running DummyAssetProcessor: Copying folder from .tmp/android/res to android/app/src/newapp/res Running DummyAssetProcessor: Copying folder from .tmp/android/res to android/app/src/remoteapp/res
Executing task android:icons Running AndroidIconProcessor Running ImageResizerProcessor: Resizing image to Size{width: 48, height: 48} from assets/konnect_logo.png to android/app/src/newapp/res/mipmap-mdpi/ic_launcher.png Running ImageResizerProcessor: Resizing image to Size{width: 72, height: 72} from assets/konnect_logo.png to android/app/src/newapp/res/mipmap-hdpi/ic_launcher.png Running ImageResizerProcessor: Resizing image to Size{width: 96, height: 96} from assets/konnect_logo.png to android/app/src/newapp/res/mipmap-xhdpi/ic_launcher.png Running ImageResizerProcessor: Resizing image to Size{width: 144, height: 144} from assets/konnect_logo.png to android/app/src/newapp/res/mipmap-xxhdpi/ic_launcher.png Running ImageResizerProcessor: Resizing image to Size{width: 192, height: 192} from assets/konnect_logo.png to android/app/src/newapp/res/mipmap-xxxhdpi/ic_launcher.png Running AndroidIconProcessor Running ImageResizerProcessor: Resizing image to Size{width: 48, height: 48} from assets/testapp.png to android/app/src/remoteapp/res/mipmap-mdpi/ic_launcher.png Running ImageResizerProcessor: Resizing image to Size{width: 72, height: 72} from assets/testapp.png to android/app/src/remoteapp/res/mipmap-hdpi/ic_launcher.png Running ImageResizerProcessor: Resizing image to Size{width: 96, height: 96} from assets/testapp.png to android/app/src/remoteapp/res/mipmap-xhdpi/ic_launcher.png Running ImageResizerProcessor: Resizing image to Size{width: 144, height: 144} from assets/testapp.png to android/app/src/remoteapp/res/mipmap-xxhdpi/ic_launcher.png Running ImageResizerProcessor: Resizing image to Size{width: 192, height: 192} from assets/testapp.png to android/app/src/remoteapp/res/mipmap-xxxhdpi/ic_launcher.png
Executing task android:adaptiveIcons Cannot execute processor android:adaptiveIcons
Executing task flutter:flavors
Executing task flutter:app
Executing task flutter:pages
Executing task flutter:main
Executing task ios:podfile Unhandled exception: The following resource is malformed: # Uncomment the next line to define a global platform for your project platform :ios, '12.0'
target 'Runner' do // comment Comment the next line if you don't want to use dynamic frameworks use_frameworks!
// comment Pods for Runner
target 'RunnerTests' do inherit! :search_paths // comment Pods for testing end
end
#0 PodfileProcessor.execute (package:flutter_flavorizr/src/processors/darwin/podfile_processor.dart:49:7) #1 AbstractFileStringProcessor.execute (package:flutter_flavorizr/src/processors/commons/abstract_file_string_processor.dart:40:31) #2 DynamicFileStringProcessor.execute (package:flutter_flavorizr/src/processors/commons/dynamic_file_string_processor.dart:43:11) #3 Processor.execute (package:flutter_flavorizr/src/processors/processor.dart:148:24)
Failed to update packages.
// END LOGS
My flavorizr.yaml file
flavors: newapp: app: name: "Test App"
android: applicationId: "com.example.newapp" icon: "assets/konnect_logo.png" ios: bundleId: "com.example.newapp" icon: "assets/konnect_logo.png"remoteapp: app: name: "Remote App"
android: applicationId: "com.example.remoteapp" icon: "assets/testapp.png" ios: bundleId: "com.example.remoteapp" icon: "assets/testapp.png"ide: idea
Hello @ankit-maniya , can you please attach your Podfile? Looks like project 'Runner' section is missing.
@AngeloAvv I created new project and this is the podfile the flutter cmd generated.
My podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
target 'Runner' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Runner
target 'RunnerTests' do
inherit! :search_paths
# Pods for testing
end
end
Apologies for the ping, @AngeloAvv. Just checking in to see if there are any updates—I’m looking to add this to my app.
Your Podfile project declaration is missing, that's why flutter_flavorizr is reporting resource malformed.
See here: https://docs.flutter.dev/deployment/flavors-ios#update-podfiles