FAQ iOS

How to fix build error after adding PayU framework via pods?

dyld: Library not loaded: @rpath/SocketIO.framework/SocketIO
  Referenced from: /Users/umang.arya/Library/Developer/CoreSimulator/Devices/DE6170BD-7841-496B-B533-F22AE109FEB6/data/Containers/Bundle/Application/2540A914-43AA-45B4-A71E-5559942E3B94/app.app/Frameworks/PayUCheckoutProKit.framework/PayUCheckoutProKit
  Reason: image not found

Currently ours frameworks are dynamic framework. If you are not using 'use_frameworks!', then please add the following line at the end of your podfile.

  $dynamic_framework = ['PayUAssetLibraryKit', 'PayUBizCoreKit', 'PayUCheckoutProBaseKit', 'PayUCheckoutProKit', 'PayUCustomBrowser', 'PayULoggerKit', 'PayUNetworkingKit', 'PayUUPICoreKit', 'PayUUPIKit', 'Socket.IO-Client-Swift', 'Starscream', 'PayUOlaMoneySDK']
  pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
    installer.pod_targets.each do |pod|
      if $dynamic_framework.include?(pod.name)
        def pod.build_type;
        Pod::BuildType.dynamic_framework
      end
    end
  end
end

Compile time error while compiling PayU Frameworks like below:

Failed to build module 'XXXXXXX' from its module interface; 
the compiler that produced it, 'Apple Swift version 5.3 
(swiftlang-1200.0.29.2 clang-1200.0.30.1)', 
may have used features that aren't supported by this compiler, 
'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)'

There is a known problem which some of the developers are facing with Xcode 12's simulator(but works fine on real devices), use the below-mentioned link to know more

https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-object-file-built-for-ios

In general, we found that Excluded Architecture works for most of the developers who face this problem (although it's not a clean solution, for the time being you can use that to run on the simulator).

Facing compile time error like below

Use Xcode version 11.4 and above to solve these kind of issues.

UPI Transaction getting failed with below error message

Ask your Key Account manager to enable "txn_s2s_flow" flag from merchant panel setting.

App crash with following reason

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[****.AppDelegate-93491BB4-2FFA-4DF5-9DEC-8F510DA9306F window]: unrecognized selector sent to instance 0x600001574480

You might be using SceneDelegate in your app, use AppDelegate instead.

Last updated