You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After declaring :linkage => :static in Podfile as required by another third-party library, I encountered an issue with GoogleUtilities when running a Flutter application:
flutter run lib/main_development.dart --flavor Runner --debug
Output:
/{flutter_proj}/ios/Runner.xcodeproj: warning: Multiple targets match implicit dependency for linker flags '-framework GoogleUtilities'. Consider adding an explicit dependency on the intended target to resolve this ambiguity. (in target 'ImageNotification' from project 'Runner')
note: Target 'GoogleUtilities-1fb9575f' (in project 'Pods')
note: Target 'GoogleUtilities-54d832b6' (in project 'Pods')
Result bundle written to path:
/var/folders/q8/zhslst2s5zjbd7q45y13wqvc0000gn/T/flutter_tools.FIKvOe/flutter_ios_build_temp_direBvQTp/temporary_xcresult_bundle
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:F3BB9235-14DD-4979-8DB2-C76ECEC0BFBE, OS:17.0.1, name:iPhone 15 Pro }
2024-04-25 11:45:12.941 xcodebuild[31837:2023202] [MT] DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot11/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-22269/IDEFoundation/Provisioning/Capabilities Infrastructure/IDECapabilityQuerySelection.swift:103
Details: createItemModels creation requirements should not create capability item model for a capability item model that already exists.
Function: createItemModels(for:itemModelSource:)
Thread: <_NSMainThread: 0x158e09a50>{number = 1, name = main}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
platform :ios, '14.0'
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks! :linkage => :static
pod 'GTMSessionFetcher'
pod 'GoogleUtilities'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
'PERMISSION_CAMERA=1',
'PERMISSION_PHOTOS=1',
'PERMISSION_NOTIFICATIONS=1',
]
end
end
end
target 'ImageNotification' do
use_frameworks! :linkage => :static
pod 'Firebase/Messaging'
end
Additional Notes:
I also tried using use_modular_headers and explicitly declaring pod 'YandexMobileAds', :linkage => :static (although such declaration does not exist in CocoaPods) without success. However, the production build through Xcode on a real device works fine. The issue lies in not being able to run the debug build on an emulator/device.
Please feel free to provide any insights or suggestions on how to resolve this issue. Thank you!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Problem
After declaring :linkage => :static in Podfile as required by another third-party library, I encountered an issue with GoogleUtilities when running a Flutter application:
flutter run lib/main_development.dart --flavor Runner --debug
Output:
Package Versions in pubspec.yaml:
Podfile:
Additional Notes:
I also tried using use_modular_headers and explicitly declaring pod 'YandexMobileAds', :linkage => :static (although such declaration does not exist in CocoaPods) without success. However, the production build through Xcode on a real device works fine. The issue lies in not being able to run the debug build on an emulator/device.
Please feel free to provide any insights or suggestions on how to resolve this issue. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions