Closed mduruisseau closed 3 years ago
I need to investigate about that. I will try to setup a new project and check if everything works fine. It's possible that something has changed during the default Xcode project creation process in the last months.
Ok so I tried by flavorizing a new Flutter project starting from scratch, and it works out of the box in both Android and iOS configurations.
I need you to be a little more patient with that, because I have to create a new project and add some pods, but I need more of your intel to understand what's going on. Did you flavorized your project before or after the creation of the dependencies from cocoapods?
Maybe the files that you say are available exist in the file system but are not referenced in the project so they don't get build?
I ran into this same issue. Here were my steps:
flutter create test_project
flavorizr:
app:
android:
flavorDimensions: "app"
ios:
flavors:
production:
app:
name: "Test"
android:
applicationId: "com.mytest.river"
ios:
bundleId: "com.mytest.river"
development:
app:
name: "Test Dev"
android:
applicationId: "com.mytest.riverdev"
ios:
bundleId: "com.mytest.riverdev"
dev_dependencies:
flutter_flavorizr: ^1.0.9
flutter pub get
flutter run --flavor development -t lib/main-development.dart
. It works and opens the app fine.google_fonts
to dependency list (or possibly any other library that adds native code)flutter run --flavor development -t lib/main-development.dart
and get previous mentioned errorIn case anyone else stumbles on this, I got it working by following this comment and then fixing where the configuration files pointed to
@mduruisseau add this into Flutter/Debug.xcconfig
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
and this into Flutter/Releasr.xcconfig
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
@mduruisseau add this into Flutter/Debug.xcconfig
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
and this into Flutter/Releasr.xcconfig
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
This was actually there on the Flutter/Debug.xconfig and it actually doesn't fix the problem for me. Any solution? Using flutter_flavorizr: 1.0.10 and Flutter 1.20.0
Can anyone please tell me if something has changed with flutter_flavorizr 1.0.11 ?
Can anyone please tell me if something has changed with flutter_flavorizr 1.0.11 ?
The error persists with flutter_flavorizr 1.0.11 and 2.0.0
@GianlucaDaur can you please provide a sample project where this problem occurs?
Please add xcconfig files in ios>flutter manually. It solved my problem.
Don't forget this line on the top
Note, it might be plugin issue, But I'm able to solve this issue by manually adding xcconfig files. Coz I have already worked with falvors without any plugin. So i tried this one and it worked like a charm .
Please add xcconfig files in ios>flutter manually. It solved my problem.
Don't forget this line on the top
include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug_dev.xcconfig"
Note, it might be plugin issue, But I'm able to solve this issue by manually adding xcconfig files. Coz I have already worked with falvors without any plugin. So i tried this one and it worked like a charm .
If flutter_flavorizr didn't add a reference in the project, it means only one thing: there's something wrong with ruby or xcodeproj dependency, or simply you forgot to install them as mentioned in the README.
Is there any workarounds or news about this issue ?
Is there any workarounds or news about this issue ?
I cannot reproduce it. If someone could provide a gist or a pubspec config with some steps on how to reproduce it, it would be great. The issue has been opened before Flutter 2, and once the library got migrated, a lot of stuff changed and got fixed.
Update minimum target and run pod install.
Works for me. Hope it helps.
This answer worked for me. https://stackoverflow.com/a/56966495/1547738
I noticed one thing,
lib/main-development.dart
to lib/env/main_development.dart
This change require fixes in all *.xcconfig
files in /ios/Flutter folder
In my case, FLUTTER_TARGET=lib/main-development.dart
to FLUTTER_TARGET=lib/env/main_development.dart
Is there any workarounds or news about this issue ?
I cannot reproduce it. If someone could provide a gist or a pubspec config with some steps on how to reproduce it, it would be great. The issue has been opened before Flutter 2, and once the library got migrated, a lot of stuff changed and got fixed.
Create new flutter project, add flutter_flavorizr, and run app everything will work,
Then add connectivity_plus flutter plugins This error will come,
Is there any workarounds or news about this issue ?
I cannot reproduce it. If someone could provide a gist or a pubspec config with some steps on how to reproduce it, it would be great. The issue has been opened before Flutter 2, and once the library got migrated, a lot of stuff changed and got fixed.
Create new flutter project, add flutter_flavorizr, and run app everything will work,
Then add connectivity_plus flutter plugins This error will come,
Thanks @atik7 , I reproduced the issue.
Some of you already answered the question, it seems like an XCode build problem. In order to solve I updated the minimum target version to 12 and then I commented out the platform target version in the Podfile.
I don't know if this should be considered solved, but I can't see any other workarounds. I also think it's almost useless to reference target versions before 12: targeting 12 or above will cause 99% of the users to be fully covered.
This answer worked for me. https://stackoverflow.com/a/56966495/1547738
I noticed one thing,
- I renamed the generated flavors dart file. Example,
lib/main-development.dart
tolib/env/main_development.dart
This change require fixes in all*.xcconfig
files in /ios/Flutter folder In my case,FLUTTER_TARGET=lib/main-development.dart
toFLUTTER_TARGET=lib/env/main_development.dart
the stackoverflow answer worked for me too, thank you!
Thanks, @atik7 its works now 🎉
Came across the same problem and solved it by configuring PODS_CONFIGURATION_BUILD_DIR
to ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
and PODS_XCFRAMEWORKS_BUILD_DIR
to $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
manually on XCode > Runner > Build Settings. Basically, pay attention to any settings related to path of Pods directories. I'm using flutter_flavorizr: ^2.1.3.
Is there any workarounds or news about this issue ?
I cannot reproduce it. If someone could provide a gist or a pubspec config with some steps on how to reproduce it, it would be great. The issue has been opened before Flutter 2, and once the library got migrated, a lot of stuff changed and got fixed.
Create new flutter project, add flutter_flavorizr, and run app everything will work, Then add connectivity_plus flutter plugins This error will come,
Thanks @atik7 , I reproduced the issue.
Some of you already answered the question, it seems like an XCode build problem. In order to solve I updated the minimum target version to 12 and then I commented out the platform target version in the Podfile.
I don't know if this should be considered solved, but I can't see any other workarounds. I also think it's almost useless to reference target versions before 12: targeting 12 or above will cause 99% of the users to be fully covered.
This actually helped
In Xcode 13 Go to General => builds phases => Bundle React Native code and images, delete every file in input files and input files lists and also in output files and output files list. as shown in the following screenshot.
then uncheck Run script "Based on dependency analysis
Is there any workarounds or news about this issue ?
I cannot reproduce it. If someone could provide a gist or a pubspec config with some steps on how to reproduce it, it would be great. The issue has been opened before Flutter 2, and once the library got migrated, a lot of stuff changed and got fixed.
Create new flutter project, add flutter_flavorizr, and run app everything will work, Then add connectivity_plus flutter plugins This error will come,
Thanks @atik7 , I reproduced the issue.
Some of you already answered the question, it seems like an XCode build problem. In order to solve I updated the minimum target version to 12 and then I commented out the platform target version in the Podfile.
I don't know if this should be considered solved, but I can't see any other workarounds. I also think it's almost useless to reference target versions before 12: targeting 12 or above will cause 99% of the users to be fully covered.
Hi, I created application in windows then pull the code in mac, in order to run ios. I have to" flutter pub run flavorizer" command again which is bringing my changes to default. how can I keep the same code? If I run directly after calling flutter pub get, it gives me following error "Launching lib/main_turkfatura.dart on iPhone 12 in debug mode... lib/main_turkfatura.dart:1 Exception: The Xcode project does not define custom schemes. You cannot use the --flavor option."
Also getting this error, Error (Xcode): Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug-turkfatura-input-files.xcfilelist'
Error (Xcode): Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug-turkfatura-output-files.xcfilelist'
Could not build the application for the simulator. Error launching application on iPhone 12.
please try this one
Came across the same problem and solved it by configuring
PODS_CONFIGURATION_BUILD_DIR
to${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
andPODS_XCFRAMEWORKS_BUILD_DIR
to$(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
manually on XCode > Runner > Build Settings. Basically, pay attention to any settings related to path of Pods directories. I'm using flutter_flavorizr: ^2.1.3.
this solution worked ~
please try this one
Came across the same problem and solved it by configuring
PODS_CONFIGURATION_BUILD_DIR
to${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
andPODS_XCFRAMEWORKS_BUILD_DIR
to$(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
manually on XCode > Runner > Build Settings. Basically, pay attention to any settings related to path of Pods directories. I'm using flutter_flavorizr: ^2.1.3.this solution worked ~
Actually, this solution is working. Thanks
Came across the same problem and solved it by configuring
PODS_CONFIGURATION_BUILD_DIR
to${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
andPODS_XCFRAMEWORKS_BUILD_DIR
to$(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
manually on XCode > Runner > Build Settings. Basically, pay attention to any settings related to path of Pods directories. I'm using flutter_flavorizr: ^2.1.3.
This solution worked. Thanks.
Is there any workarounds or news about this issue ?
I cannot reproduce it. If someone could provide a gist or a pubspec config with some steps on how to reproduce it, it would be great. The issue has been opened before Flutter 2, and once the library got migrated, a lot of stuff changed and got fixed.
Create new flutter project, add flutter_flavorizr, and run app everything will work, Then add connectivity_plus flutter plugins This error will come,
Thanks @atik7 , I reproduced the issue.
Some of you already answered the question, it seems like an XCode build problem. In order to solve I updated the minimum target version to 12 and then I commented out the platform target version in the Podfile.
I don't know if this should be considered solved, but I can't see any other workarounds. I also think it's almost useless to reference target versions before 12: targeting 12 or above will cause 99% of the users to be fully covered.
Upgrading/downgrading might not be necessary. By deleting Podfile.lock file, and .symlinks and Pods folder and running pub get again should fix the problem.
I am having this same issue still on macOS with xcode 15.0 and flutter version 13.13.0, I tested also the issue occures in the example app just by adding one package to it and building it for mac.
@AngeloAvv
I encounter the same problem
error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug-dev-output-files.xcfilelist' (in target 'Runner' from project 'Runner')
The solution is always the same guys. If you don't fix your cocoapods dependencies it will always fail. It's not something related with flutter_flavorizr.
@AngeloAvv the problem exists in the example app from your package, do you have any suggestions how to fix it ?
By deleting Podfile.lock file, and .symlinks and Pods folder and running pub get again fixes the problem.
Hello !
I tried to flavorize a small flutter project with two flavors, everything seems to work for Android, but I am unable to launch the app in the iOS Emulator.
I am getting these errors :
error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug *TARGET*-input-files.xcfilelist' (in target 'Runner' from project 'Runner')
error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug *TARGET*-output-files.xcfilelist' (in target 'Runner' from project 'Runner')
I tried to clean the project, the pods and to rebuild everything without success. The file
/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug *TARGET*-input-files.xcfilelist
seems to exists as I can see its content.I didn't find any issue related to this kind of problem, could you help me understand what is going on ?
I am using Flutter 1.20.1, on macOS. Ruby, Gem and Xcodeproj are all up to date.