Issue with implementation in iOS

Hi, i am trying to integrate DeepAR in a flutter with https://pub.dev/packages/deepar_flutter. But i am facing some issues with the implementation, as i am not able to build the app itself. I am getting Undefined symbol Error.

Launching lib/main_development.dart on iPhone 13 Pro Max in debug mode...
main_development.dart:1
Xcode build done.                                           48.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

Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.

I have opened an issue in the GitHub Here

1 Like

Hi, thanks for reporting the issue on GitHub, our flutter team will have a look.
Best
Jelena

1 Like

I have updated my findings in the github issue. It builds in physical device, but just keeps showing loading, that is the ar controller is stuck initializing. its not even building for Simulator.
I am using

  • Xcode Version 14.2 (14C18)
  • Flutter 3.7.4
  • deepar_flutter: ^0.0.5
1 Like

Hi @jelena , is there any update on this one?
Thanks

Hi sorry, you should watch GitHub for flutter updates.

Hi @jelena is it still being updated? or this already supports Flutter when running on iOS devices

Sorry, but no. Try using our native SDKs

I am facing same error is this issue resolved???

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