Troubleshooting

In this section, you will find solutions to some common issues encountered during the integration of the Unico IDCloud SDK into your iOS applications


Code Obfuscation


The obfuscation guide aims to help developers handle obfuscation issues in their applications. The client's obfuscator may affect the SDK's functionality, and it is necessary that it does not obfuscate the SDK's code. Unico is not responsible for any obfuscation conflicts with the SDK.

Obfuscation is the process of transforming bytecode into a less human-readable form, thus making reverse engineering more difficult. This process involves removing debug information, such as variable tables and line numbers, and renaming packages, classes, and methods. When embedding the Android SDK in an application, errors may occur.

Obfuscation via iXGuard


When using the iXGuard tool for obfuscation, we recommend version 4.11.0 or later.

Shadow at the End of Flow after Updating to Version 2.4.0


The responsibility for flow control is delegated to the caller of the SDK. Therefore, if a shadow appears or the screen does not close after successful capture, it is suggested to implement a way to release this screen. The release may vary according to the implemented navigation stack. To implement this, add the release method preferably within the delegate method onSuccessSelfie. Here are some release examples that can be used:

- (void)onSuccessSelfie:(SelfieResult *)result {
    [self dismissViewControllerAnimated:YES completion:nil];
    // your code
} 

Bitcode Error in App Distribution using Xcode 16


After the official release of Xcode 16 on September 17, 2024, we identified an issue when using the SDK on the App Store that flags the use of bitcode in two internal dependencies when using CocoaPods as the dependency manager. These are DeviceProfiling and UnicoSdkLogger. To avoid blocking new releases, you can follow the steps below until a permanent fix is provided in a future SDK release:

  1. Open the Podfile file.

  2. Add the following lines after the post_install command (do |installer|) and before the last end:

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/UnicoSdkLogger.xcframework/ios-arm64/UnicoSdkLogger.framework/UnicoSdkLogger"
  ]

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

2.1. If there is existing code, insert this snippet before it;

2.2. f bitcode removal is already done manually, explicitly add the paths listed in framework_paths;

  1. If there is no post_install do |installer| command in the Podfile, add it as follows before the last end:

post_install do |installer|
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/UnicoSdkLogger.xcframework/ios-arm64/UnicoSdkLogger.framework/UnicoSdkLogger"
  ]

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

Source: Bitrise, Xcode 16 release notes, Stackoverflow.


Still need help?

Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.

Atualizado

Institucional

Sobre nós

Copyright © 2024 unico. All rights reserved