-
Notifications
You must be signed in to change notification settings - Fork 27
Home
If you did not select swift in Platform channel language, you will see one of the following errors.
=== BUILD TARGET image_downloader OF PROJECT Pods WITH CONFIGURATION Debug ===
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 3.0, 4.0, 4.2. This setting can be set in the build settings editor.
=== BUILD TARGET image_downloader OF PROJECT Pods WITH CONFIGURATION Debug ===
~/.pub-cache/hosted/pub.dartlang.org/flutter_google_ad_manager-0.7.0/ios/Classes/FlutterGoogleAdManagerPlugin.m:2:9: fatal error: 'flutter_google_ad_manager/flutter_google_ad_manager-Swift.h' file not found
#import <flutter_google_ad_manager/flutter_google_ad_manager-Swift.h>
[!] Unable to determine Swift version for the following pods:
- `image_downloader` does not specify a Swift version and none of the targets (`Runner`) integrating it has the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
This problem is on the flutter side, so all plugins created with swift have the same problem. https://github.com/flutter/flutter/issues/25676#issuecomment-449543241
You need to make some settings to solve this.
- Bridging Header must be created.
Open the project with XCode.
Then chooseFile -> New -> File -> Swift File
onRunner
holder.
Create the swift file(), then also create Bridging Header, click it on a dialog.
This will set SWIFT_VERSION
, SWIFT_OBJC_BRIDGING_HEADER
and so on in XCode -> Build Settings
.
- Make sure you have
use_frameworks!
in the Runner block, inios/Podfile
.
target 'Runner' do
use_frameworks!
Basically, this is just OK, but if it doesn't work it's better to do the following
- Execute
flutter clean
- Go to your ios folder, delete
Podfile.lock
andPods
folder and then executepod install --repo-update
'flutter_google_ad_manager/flutter_google_ad_manager-Swift.h' file not found
, though AppDelegate is Swift
Probably commented out use_frameworks!
.
Please don't do that.
If you have to comment out, most of the library lacks support. For Example, flutter_twitter_login.
In this case, it is better to use here because there is a Pull Request.
If there is an application that is not supported, let's put out a Pull Request.
The resource could not be loaded because the App Transport Security policy requires the use of a secure connection."
This happens when the URL is HTTP.
It is the specification that is App Transport Security policy(ATS) of ios.
Please refer to here.
Most of the questions on Android are for older versions.
For example, I get the following error
error: resource android:attr/fontVariationSettings not found.
error: resource android:attr/ttcIndex not found.
Please update your app's version on build.gradle
.