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


Obfuscation is a process of transforming the bytecode into a form that is less readable by humans, thus making reverse engineering more difficult.

This process involves removing debugging-related information, such as variable tables, line numbers, and renaming packages, classes, and methods.

When embedding the Android SDK into the application, issues may occur.

Obfuscation via iXGuard


When obfuscation is performed using the iXGuard tool, we recommend using version 4.12.6 or higher.

Shadow at the End of Flow after Updating to Version 2.4.0


The responsibility for controlling the flow is delegated to the caller of the SDK. Therefore, if any form of shadow appears or the screen does not close after successfully completing the capture, it is recommended to implement a way to release this screen. This release may vary depending on the navigation stack implemented. For this implementation, add the appropriate release method preferably within the onSuccessSelfie delegate method. Below are some examples of releases 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, and its use for distributing apps on the App Store, we encountered a block when using the iOS SDK, signaling the use of bitcode in two internal dependencies when using Cocoapods as the dependency manager. These dependencies are DeviceProfiling and UnicoSdkLogger. In order to avoid blocking new releases, it is possible to apply the following steps until the issue is fully resolved in a future iOS 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 already some code, insert the following before the existing code;

2.2. If you are already manually removing bitcode, explicitly add the paths mentioned in framework_paths.

  1. If the post_install do |installer| command is not present in the Podfile, insert 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.

Last updated

Was this helpful?