Cordova Troubleshooting

  1. Smallcase SDK keeps loading after successful login
  2. Facing issue with other pods while installing SCGateway
  3. Unable to add a source with url https://cdn.cocoapods.org

1) After the broker login/ order placement, the SDK is not returning back to our app.

  • Please ensure that the following activities along with your unique gateway name for the key android:host are added in the config.xml file and post a cordova android build, are available in the AndroidManifest.xml file as well:
<config-file target="AndroidManifest.xml" parent="/manifest/application">
   
<activity android:name="com.smallcase.gateway.screens.transaction.activity.TransactionProcessActivity"
          android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.BROWSABLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data
            android:host="<YOUR_GATEWAY_NAME>"
            android:scheme="scgateway"
        />
    </intent-filter>
</activity>

<activity android:name="com.smallcase.gateway.screens.common.RedirectActivity"
          android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.BROWSABLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data
            android:host="<YOUR_GATEWAY_NAME>"
            android:scheme="scgatewayredirect"
        />
    </intent-filter>
</activity>
</config-file>
<activity android:name="com.smallcase.gateway.screens.transaction.activity.TransactionProcessActivity">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data
                    android:host="{YOUR_GATEWAY_NAME}"
                    android:scheme="scgateway" />
            </intent-filter>
</activity>

<activity android:name="com.smallcase.gateway.screens.common.RedirectActivity">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />

                <data
                    android:host="{YOUR_GATEWAY_NAME}"
                    android:scheme="scgatewayredirect"
                    />
            </intent-filter>
</activity>

If the issue still persists, please mail us at [email protected] with a screen recording of the event. This will help us investigate the issue on our end.

2) After adding the podspec source of SCGateway, we are facing issues installing other libraries

  • Please ensure that the respective podspec source of the dependency is also added in the Podfile. For example, to install both razorpay-pod and SCGateway, the podfile should be similar to this:
# Uncomment the next line to define a global platform for your project
 platform :ios, '11.0'

# private source for SCGateway
source 'https://github.com/smallcase/cocoapodspecs.git'

# default source for all other pods
source 'https://cdn.cocoapods.org'

target 'Runner' do
  use_frameworks!

  pod 'razorpay-pod', '1.1.16'

  pod 'SCGateway' , '3.1.11'


  target 'RunnerTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'RunnerUITests' do
    inherit! :search_paths
    # Pods for testing
  end
  
end

Note: SCGateway library (and its source) is mutually exclusive of any other library (and its podspec source) available in your Podfile, adding the source of one library will not break the installation of another.

3) After adding the source https://cdn.cocoapods.org, we are getting an error: [!] Unable to add a source with url https://cdn.cocoapods.org named xyz

  • Since this is a CDN issue, please follow these steps in your terminal:
  1. remove the existing pod repo (with url: https:cdn.cocoapods.org) using your terminal.
pod repo remove xyz
  1. Add the alternate source https://github.com/CocoaPods/Specs.git in your Podfile.
# default source for all other pods
# source 'https://cdn.cocoapods.org'
source 'https://github.com/CocoaPods/Specs.git'

# private source for SCGateway
source 'https://github.com/smallcase/cocoapodspecs.git'

For more details, please refer to: https://github.com/CocoaPods/CocoaPods/issues/10078

4) We are facing an issue with installreferrer library version 2.2:

Duplicate class a.a.a found in modules jetified-installreferrer-2.2-runtime 
(com.android.installreferrer:installreferrer:2.2) and jetified-sdk-3.1.15-runtime 
(com.smallcase.gateway:sdk:3.1.15)
  • Downgrading the installreferrer library version to 2.1 would resolve this issue without impacting any major functionality of the library.
  • Alternatively, force a resolution for installreferrer library to be installed with version 2.1
configurations.all() {
  resolutionStrategy.force "com.android.installreferrer:installreferrer:2.1"
}