onegini 3.6.0 copy "onegini: ^3.6.0" to clipboard
onegini: ^3.6.0 copied to clipboard

The Onegini Flutter Plugin is a plugin that allows you to utilize the Onegini Mobile SDKs in your Flutter applications.

Flutter #

Getting started #

in pubspec.yaml add this:

dependencies:

onegini: 3.6.0

flutter clean

flutter pub get

The first time running you have to fetch flutter packages. Onegini class - main class for communication between flutter and Native platforms.

SDK Configuration #

  1. Get access to https://thalescpliam.jfrog.io/artifactory/onegini-sdk/
  2. Use https://github.com/ThalesGroup/sdk-configurator on your application (instructions can be found there)

Onegini Documentation #

  1. Android https://developer.onewelcome.com/android/sdk
  2. iOS https://developer.onewelcome.com/ios/sdk

App Configuration #

Android:

  1. Modify android/app/build.gradle:

    1.1. Add to android section:

    lintOptions { abortOnError false }

    1.2 Add to android -> defaultConfig section:

    minSdkVersion 24
    compileSdkVersion 36
    multiDexEnabled true
    
  2. Add to android/app/proguard-rules.pro:

    -keep class com.onegini.mobile.SecurityController { *; }

  3. Add to android/build.gradle[allprojects.repositories]:

    ext.kotlin_version = '2.1.0'
       
    dependencies {
        classpath 'com.android.tools.build:gradle:8.13.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
    
    mavenCentral()
            maven {
            /*
            Before the release please change the url below to: https://repo.onewelcome.com/artifactory/onegini-sdk
            Please change it back to https://repo.onewelcome.com/artifactory/public after the release
            */
            url "https://repo.onewelcome.com/artifactory/onegini-sdk"
            credentials {
                username "YOUR_USERNAME"
                password "YOUR_PASSWORD"
            }
    }
    
    
  4. Modify android/app/src/main/AndroidManifest.xml. Add <intent-filter> to your .MainActivity for listening browser redirects. !!! scheme="oneginiexample" should be changed to your(will be provided by onegini-sdk-configurator) schema:

iOS (>= 15.1):

Swift Package Manager

Before integrating SPM Package, please run pod install.

  1. Open terminal and run:

    swift package-registry set --global https://thalescpliam.jfrog.io/artifactory/api/swift/swift-public
    swift package-registry login
    
  2. Next, enter your artifactory token:

    Enter access token: {YOUR_TOKEN}
    Login successful.
    Credentials have been saved to the operating system's secure credential store.
    Registry configuration updated.
    
  3. Open ios project in Xcode and select Pods.xcodeproj. Right click and select Add Package Dependencies....

  4. In the search bar, enter the Onegini SDK repository: OneWelcome.SDKSPM.

  5. Choose the version 13.0.x with uptoNextMinorVersion of the SDK and click Add Package for target onegini.

  6. Repeat step 3 to 5 for Runner.xcodeproj for target Runner.

  7. Then go to the app's directory in terminal and run:

    xcodebuild -resolvePackageDependencies
    

    CocoaPods If you are using CocoaPods, you can continue to use the following instructions:

  8. The Onegini SDK is uploaded to the Onegini Artifactory repository. In order to let CocoaPods use an Artifactory repository you need to install a specific plugin.

    gem install cocoapods-art
    
  9. The Onegini SDK repository is not a public repository. You must provide credentials in order to access the repo. Create a file named .netrc in your Home folder (~/) and add the following contents to it:

    machine thalescpliam.jfrog.io
    login <username>
    password <password>
    

    Replace the

  10. The Onegini CocoaPods repository must be added to your local machine using the following command:

    pod repo-art add onegini https://thalescpliam.jfrog.io/artifactory/api/pods/cocoapods-public
    
  11. In order to update the Repository you must manually perform an update:

    pod repo-art update onegini
    
  12. In the pod file has to be added at the beginning this part ios/Podfile:

       
    source 'https://github.com/artsy/Specs.git'
    source 'https://github.com/CocoaPods/Specs.git'
    platform :ios, '15.1'
    
    plugin 'cocoapods-art', :sources => [
        'onegini'
    ]
    
    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['ENABLE_BITCODE'] = 'NO'
                config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.1'
            end
        end
    end
    
  13. Run pod install

  14. Add SecurityController.h and SecurityController.m as described HERE to native's part of code.

4
likes
150
points
1.2k
downloads

Publisher

verified publisheronegini.com

Weekly Downloads

The Onegini Flutter Plugin is a plugin that allows you to utilize the Onegini Mobile SDKs in your Flutter applications.

Homepage

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on onegini

Packages that implement onegini