AngeloAvv / flutter_flavorizr

A flutter utility to easily create flavors in your flutter application
https://pub.dev/packages/flutter_flavorizr
MIT License
447 stars 80 forks source link

Error on ios:buildTargets task #274

Open maxiBon18 opened 1 month ago

maxiBon18 commented 1 month ago

Hi everyone, For a while now I have been unable to launch and successfully complete the “flutter pub run flutter_flavorizr” command as I constantly get this exception when I get to the ios:buildTargets task:

Executing task ios:buildTargets Running XcodeprojProcessor: Checking if xcodeproj is installed Running DarwinBuildConfigurationsProcessor Running ShellProcessor: Running script 'ruby' with arguments .tmp/scripts/darwin/add_build_configuration.rb, ios/Runner.xcodeproj, Flutter/devDebug.xcconfig, dev, com.enel.mobile.pltsnoopmobile.dev.dev, Debug, eyJBU1NFVENBVEFMT0dfQ09NUElMRVJfQVBQSUNPTl9OQU1FIjoiJChBU1NFVF9QUkVGSVgpQXBwSWNvbiIsIkxEX1JVTlBBVEhfU0VBUkNIX1BBVEhTIjoiJChpbmhlcml0ZWQpIEBleGVjdXRhYmxlX3BhdGgvRnJhbWV3b3JrcyIsIlNXSUZUX09CSkNfQlJJREdJTkdfSEVBREVSIjoiUnVubmVyL1J1bm5lci1CcmlkZ2luZy1IZWFkZXIuaCIsIlNXSUZUX1ZFUlNJT04iOiI1LjAiLCJGUkFNRVdPUktfU0VBUkNIX1BBVEhTIjpbIiQoaW5oZXJpdGVkKSIsIiQoUFJPSkVDVF9ESVIpL0ZsdXR0ZXIiXSwiTElCUkFSWV9TRUFSQ0hfUEFUSFMiOlsiJChpbmhlcml0ZWQpIiwiJChQUk9KRUNUX0RJUikvRmx1dHRlciJdLCJJTkZPUExJU1RfRklMRSI6IlJ1bm5lci9JbmZvLnBsaXN0IiwiUFJPRFVDVF9CVU5ETEVfSURFTlRJRklFUiI6ImNvbS5lbmVsLm1vYmlsZS5wbHRzbm9vcG1vYmlsZS5kZXYuZGV2In0= Running ShellProcessor: Running script 'ruby' with arguments .tmp/scripts/darwin/add_build_configuration.rb, ios/Runner.xcodeproj, Flutter/devProfile.xcconfig, dev, com.enel.mobile.pltsnoopmobile.dev.dev, Profile, eyJBU1NFVENBVEFMT0dfQ09NUElMRVJfQVBQSUNPTl9OQU1FIjoiJChBU1NFVF9QUkVGSVgpQXBwSWNvbiIsIkxEX1JVTlBBVEhfU0VBUkNIX1BBVEhTIjoiJChpbmhlcml0ZWQpIEBleGVjdXRhYmxlX3BhdGgvRnJhbWV3b3JrcyIsIlNXSUZUX09CSkNfQlJJREdJTkdfSEVBREVSIjoiUnVubmVyL1J1bm5lci1CcmlkZ2luZy1IZWFkZXIuaCIsIlNXSUZUX1ZFUlNJT04iOiI1LjAiLCJGUkFNRVdPUktfU0VBUkNIX1BBVEhTIjpbIiQoaW5oZXJpdGVkKSIsIiQoUFJPSkVDVF9ESVIpL0ZsdXR0ZXIiXSwiTElCUkFSWV9TRUFSQ0hfUEFUSFMiOlsiJChpbmhlcml0ZWQpIiwiJChQUk9KRUNUX0RJUikvRmx1dHRlciJdLCJJTkZPUExJU1RfRklMRSI6IlJ1bm5lci9JbmZvLnBsaXN0IiwiUFJPRFVDVF9CVU5ETEVfSURFTlRJRklFUiI6ImNvbS5lbmVsLm1vYmlsZS5wbHRzbm9vcG1vYmlsZS5kZXYuZGV2In0= Unhandled exception: Exception: .tmp/scripts/darwin/add_build_configuration.rb:23:in <main>': undefined methodbuild_settings' for nil:NilClass (NoMethodError)

0 ShellProcessor.execute (package:flutter_flavorizr/src/processors/commons/shell_processor.dart:51:7)

1 QueueProcessor.execute (package:flutter_flavorizr/src/processors/commons/queue_processor.dart:44:17)

2 QueueProcessor.execute (package:flutter_flavorizr/src/processors/commons/queue_processor.dart:44:17)

3 Processor.execute (package:flutter_flavorizr/src/processors/processor.dart:140:24)

I can't figure out why, below I put my flavorizr entered in pubspec.yaml flavorizr: app: android: flavorDimensions: "flavor-type" instructions: - assets:download - assets:extract - android:androidManifest - android:buildGradle - android:dummyAssets - android:icons - flutter:flavors - flutter:app - flutter:pages - flutter:main - flutter:targets - ios:podfile - ios:xcconfig - ios:buildTargets - ios:schema - ios:dummyAssets - ios:icons - ios:plist - ios:launchScreen - assets:clean - ide:config ide: vscode flavors: dev: app: name: "enelmobilesnooptest dev" android: applicationId: "com.enel.mobile.pltsnoopmobile.dev" ios: bundleId: "com.enel.mobile.pltsnoopmobile.dev.dev" qa: app: name: "enelmobilesnooptest qa" android: applicationId: "com.enel.mobile.pltsnoopmobile.qa" ios: bundleId: "com.enel.mobile.pltsnoopmobile.dev.qa" prod: app: name: "enelmobilesnooptest prod" android: applicationId: "com.enel.mobile.pltsnoopmobile.prod" ios: bundleId: "com.enel.mobile.pltsnoopmobile.dev.prod" Can you help me? Thanks, Massimo
maxiBon18 commented 1 month ago

flutter_flavorizr: ^2.2.3

oboard commented 1 month ago

same problem

abnerh69sparq commented 1 month ago

Same here!

AngeloAvv commented 4 weeks ago

Hello @maxiBon18 , according to your error message, looks like you're using an older version of flutter_flavorizr. Can you please try to update it to the latest version?

If the error persists, I suggest you try to reproduce it with a fresh and new Flutter project to see what happens. I strongly believe there's something wrong with your Darwin's project configuration and it would be simpler to recreate it and start over instead of looking for the needle in the haystack.