Hello, By using deepar_flutter: ^0.0.5, I have problem to run my app just in iOS emulator, it is working correct except in iOS emulator, please help me how can I skip this package for iOS emulator?
error now is:
Launching lib/main_vibonet.dart on iPhone 15 Plus in debug mode…
Running pod install…
Running Xcode build…
Xcode build done. 108.1s
Failed to build iOS app
Error (Xcode): Undefined symbol: OBJC_CLASS$_ARView
Error (Xcode): Undefined symbol: OBJC_CLASS$_CameraController
Error (Xcode): Undefined symbol: OBJC_CLASS$_DeepAR
Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)
Could not build the application for the simulator.
Error launching application on iPhone 15 Plus.
my pod file is:
platform :ios, ‘14.0’
use_frameworks!
ENV[‘COCOAPODS_DISABLE_STATS’] = ‘true’
project ‘Runner’, {
‘Debug-PVfans’ => :debug,
‘Profile-PVfans’ => :release,
‘Release-PVfans’ => :release,
‘Debug-Vibogram’ => :debug,
‘Profile-Vibogram’ => :release,
‘Release-Vibogram’ => :release,
‘Debug-Vibonet’ => :debug,
‘Profile-Vibonet’ => :release,
‘Release-Vibonet’ => :release,
‘Debug-Joopeg’ => :debug,
‘Profile-Joopeg’ => :release,
‘Release-Joopeg’ => :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
source ‘GitHub - CocoaPods/Specs: The CocoaPods Master Repo’
target ‘Runner’ do
use_frameworks! :linkage => :static
use_modular_headers!
pod 'FirebaseAppCheck'
pod 'FirebaseAnalytics'
pod 'HaishinKit', '~> 1.7.3'
pod "share_handler_ios_models", :path => ".symlinks/plugins/share_handler_ios/ios/Models"
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['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
'PERMISSION_CAMERA=1',
'PERMISSION_MICROPHONE=1',
'PERMISSION_MEDIA_LIBRARY=1',
'PERMISSION_NOTIFICATIONS=1',
'PERMISSION_PHOTOS=1',
'PERMISSION_LOCATION=1',
'PERMISSION_CONTACTS=1',
]
end
target.build_configurations.each do |config|
config.build_settings[‘EXCLUDED_ARCHS[sdk=iphonesimulator*]’] = ‘arm64’
if target.name == 'DeepAR' && config.name.include?('Debug') && config.name.include?('Vibonet')
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['DEFINES_MODULE'] = 'YES'
config.build_settings['OTHER_LDFLAGS[sdk=iphonesimulator*]'] = ''
config.build_settings['LIBRARY_SEARCH_PATHS'] = ''
config.build_settings['FRAMEWORK_SEARCH_PATHS'] = ''
end
end
end
end