acesso-io / unico-check-flutter

Plugin Flutter que possibilita uso das SDK Android e IOS UnicoCheck
MIT License
2 stars 4 forks source link

Error: Asset validation failed Invalid Executable. The executable 'Runner.app/Frameworks/UnicoSdkLogger.framework/UnicoSdkLogger' contains bitcode #135

Open LeonardoTacca opened 1 week ago

LeonardoTacca commented 1 week ago

Eu tenho uma pipeline no github actions e ao executala esta retornando esse erro do titulo. ja tentei colocar a flag de bitcode como sim e como não mas não tive nenhuma mudança, alguem sabe como resolver? mesmo com a flag de enable bitcode

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['IPHONEOS_DEPLOYMENT_TARGET'] = '15.5' config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' config.build_settings['ENABLE_BITCODE'] = 'NO' config.build_settings['ARCHS'] = '$(ARCHS_STANDARD)' config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ '$(inherited)', 'PERMISSION_CAMERA=1', 'PERMISSION_LOCATION=1', 'BYPASS_PERMISSION_LOCATION_ALWAYS=1', 'PERMISSION_LOCATION_WHENINUSE=0', ] end end end

rafampessoa commented 7 hours ago

No seu Podfile vc adiciona isso aqui dentro do post_install

  bitcode_strip_path = `xcrun --find bitcode_strip`.chop!

  def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
    framework_path = File.join(Dir.pwd, framework_relative_path)
    command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
    puts "Stripping bitcode: #{command}"
    system(command)
  end

  framework_paths = [
    "Pods/unicocheck-ios/DeviceProfiling.xcframework/ios-arm64/DeviceProfiling.framework/DeviceProfiling",
    "Pods/unicocheck-ios/DeviceProfiling.xcframework/ios-arm64_x86_64-simulator/DeviceProfiling.framework/DeviceProfiling",
    "Pods/unicocheck-ios/FaceTecSDK.xcframework/ios-arm64/FaceTecSDK.framework/FaceTecSDK",
    "Pods/unicocheck-ios/FaceTecSDK.xcframework/ios-arm64_x86_64-simulator/FaceTecSDK.framework/FaceTecSDK",
    "Pods/unicocheck-ios/UnicoSdkLogger.xcframework/ios-arm64/UnicoSdkLogger.framework/UnicoSdkLogger",
    "Pods/unicocheck-ios/UnicoSdkLogger.xcframework/ios-arm64_x86_64-simulator/UnicoSdkLogger.framework/UnicoSdkLogger"
  ]

  framework_paths.each do |framework_relative_path|
    strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
  end

vai ficar mais ou menos assim:

Screenshot 2024-09-27 at 21 28 04

Depois remove o Podfile.lock e roda um pod install