From a3dc49ebd27631bce78c632d9ce6d67a474b768d Mon Sep 17 00:00:00 2001 From: Michiel Vrins Date: Thu, 25 May 2023 11:22:37 +0200 Subject: [PATCH 1/6] Don't expose internal api to end users We use an internal api generated by Pigeon to communicate with the native side. This api should not be directly exposed to our users as we might want to do some extra processing. This commit makes that api private. --- lib/onegini.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/onegini.dart b/lib/onegini.dart index 27dfc597..dc284442 100644 --- a/lib/onegini.dart +++ b/lib/onegini.dart @@ -11,7 +11,7 @@ import 'package:onegini/onegini.gen.dart'; class Onegini { // UserClientApi is the flutter to native api created by the Pigeon package, see /pigeons/README.md /// User client methods. - final UserClientApi api = UserClientApi(); + final UserClientApi _api = UserClientApi(); late final UserClient userClient; @@ -24,7 +24,7 @@ class Onegini { Finalizer((owEventStreamController) => owEventStreamController.close()); Onegini._internal() { - userClient = UserClient(api); + userClient = UserClient(_api); } static final Onegini instance = Onegini._internal(); @@ -51,7 +51,7 @@ class Onegini { List? additionalResourceUrls, }) async { NativeCallFlutterApi.setup(OneginiEventListener(owEventStreamController)); - await api.startApplication( + await _api.startApplication( securityControllerClassName, configModelClassName, customIdentityProviderConfigs, From 4f71899550eda4393ec033aa980f4e170851f8c2 Mon Sep 17 00:00:00 2001 From: Michiel Vrins Date: Thu, 25 May 2023 11:35:47 +0200 Subject: [PATCH 2/6] Bump minimum version of flutter sdk to 2.17.0 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 79ec54e5..c76a20f3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ version: 3.0.0 homepage: https://www.onegini.com environment: - sdk: ">=2.12.0 <4.0.0" + sdk: ">=2.17.0 <4.0.0" flutter: ">=1.12.0" dependencies: From f64c4404a8e921358af40477937351358023d256 Mon Sep 17 00:00:00 2001 From: Michiel Vrins Date: Thu, 25 May 2023 11:39:29 +0200 Subject: [PATCH 3/6] Fix Flutter Linter problems for new Flutter cli version --- example/android/build.gradle | 124 +++++++++++++------------- example/lib/screens/login_screen.dart | 9 +- example/lib/screens/pin_screen.dart | 4 +- 3 files changed, 68 insertions(+), 69 deletions(-) diff --git a/example/android/build.gradle b/example/android/build.gradle index b8f7cd2c..302ffed1 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,62 +1,62 @@ -buildscript { - ext.kotlin_version = '1.8.0' - repositories { - mavenCentral() - google() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.2.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - def (artifactoryUser, artifactoryPassword) = getArtifactoryCredentials() - if (artifactoryUser?.trim() && artifactoryPassword?.trim()) { - maven { - url "https://repo.onewelcome.com/artifactory/onegini-sdk" - credentials { - username artifactoryUser.trim() - password artifactoryPassword.trim() - } - } - } else { - throw new InvalidUserDataException("You must configure the 'ARTIFACTORY_USER' and 'ARTIFACTORY_PASSWORD' environment variables before you can " + - "build the project.") - } - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} - -def getArtifactoryCredentials() { - // Leave onegini_ property for backwards compatibility - if (project.hasProperty('onegini_artifactory_user') && project.hasProperty('onegini_artifactory_password')) { - return [onegini_artifactory_user, onegini_artifactory_password] - } else if (project.hasProperty('artifactory_user') && project.hasProperty('artifactory_password')) { - return [artifactory_user, artifactory_password] - } else if (System.env.ARTIFACTORY_USER && System.env.ARTIFACTORY_PASSWORD) { - return [System.env.ARTIFACTORY_USER, System.env.ARTIFACTORY_PASSWORD] - } else { - def artifactoryFile = file("${project.rootDir}/artifactory.properties") - if (artifactoryFile.exists()) { - def props = new Properties() - artifactoryFile.withInputStream { props.load(it) } - return [props.getProperty("artifactoryUser"), props.getProperty("artifactoryPassword")] - } - } - return ["", ""] -} +buildscript { + ext.kotlin_version = '1.8.0' + repositories { + mavenCentral() + google() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.2.2' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + def (artifactoryUser, artifactoryPassword) = getArtifactoryCredentials() + if (artifactoryUser?.trim() && artifactoryPassword?.trim()) { + maven { + url "https://repo.onewelcome.com/artifactory/onegini-sdk" + credentials { + username artifactoryUser.trim() + password artifactoryPassword.trim() + } + } + } else { + throw new InvalidUserDataException("You must configure the 'ARTIFACTORY_USER' and 'ARTIFACTORY_PASSWORD' environment variables before you can " + + "build the project.") + } + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} + +def getArtifactoryCredentials() { + // Leave onegini_ property for backwards compatibility + if (project.hasProperty('onegini_artifactory_user') && project.hasProperty('onegini_artifactory_password')) { + return [onegini_artifactory_user, onegini_artifactory_password] + } else if (project.hasProperty('artifactory_user') && project.hasProperty('artifactory_password')) { + return [artifactory_user, artifactory_password] + } else if (System.env.ARTIFACTORY_USER && System.env.ARTIFACTORY_PASSWORD) { + return [System.env.ARTIFACTORY_USER, System.env.ARTIFACTORY_PASSWORD] + } else { + def artifactoryFile = file("${project.rootDir}/artifactory.properties") + if (artifactoryFile.exists()) { + def props = new Properties() + artifactoryFile.withInputStream { props.load(it) } + return [props.getProperty("artifactoryUser"), props.getProperty("artifactoryPassword")] + } + } + return ["", ""] +} diff --git a/example/lib/screens/login_screen.dart b/example/lib/screens/login_screen.dart index cbe4729c..4fd74a61 100644 --- a/example/lib/screens/login_screen.dart +++ b/example/lib/screens/login_screen.dart @@ -48,7 +48,7 @@ class _LoginScreenState extends State { openWeb() async { /// Start registration - setState(() => {isLoading = true}); + setState(() => isLoading = true); try { var registrationResponse = await Onegini.instance.userClient.registerUser( @@ -72,7 +72,7 @@ class _LoginScreenState extends State { } registrationWithIdentityProvider(String identityProviderId) async { - setState(() => {isLoading = true}); + setState(() => isLoading = true); try { var registrationResponse = await Onegini.instance.userClient.registerUser( identityProviderId, @@ -253,9 +253,8 @@ class _LoginScreenState extends State { .map((e) => DropdownMenuItem(value: e.profileId, child: Text(e.profileId))) .toList(), - onChanged: (profileId) => { - setState(() => {selectedProfileId = profileId}) - }); + onChanged: (profileId) => + {setState(() => selectedProfileId = profileId)}); } Column _buildRegisterWidget() { diff --git a/example/lib/screens/pin_screen.dart b/example/lib/screens/pin_screen.dart index 26aa471e..9166ef20 100644 --- a/example/lib/screens/pin_screen.dart +++ b/example/lib/screens/pin_screen.dart @@ -59,7 +59,7 @@ class _PinScreenState extends State { } submit() { - setState(() => {isLoading = true}); + setState(() => isLoading = true); String pin = ""; pinCode.forEach((element) { pin += element; @@ -68,7 +68,7 @@ class _PinScreenState extends State { .acceptAuthenticationRequest(pin) .catchError((error) { if (error is PlatformException) { - setState(() => {isLoading = false}); + setState(() => isLoading = false); showFlutterToast(error.message); } }); From 802238df0441ac598fb8076472c459f32298d9d3 Mon Sep 17 00:00:00 2001 From: Michiel Vrins Date: Wed, 24 May 2023 16:22:37 +0200 Subject: [PATCH 4/6] FP-89: Android: Use new 'access' tokenserver --- .../mobile/onegini_example/OneginiConfig.kt | 55 ----------- .../onegini_example/OneginiConfigModel.java | 93 ++++++++++++++++++ .../onegini_example/SecurityController.java | 7 ++ .../onegini_example/SecurityController.kt | 7 -- .../android/app/src/main/res/raw/keystore.bks | Bin 1063 -> 2679 bytes 5 files changed, 100 insertions(+), 62 deletions(-) delete mode 100644 example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/OneginiConfig.kt create mode 100755 example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/OneginiConfigModel.java create mode 100755 example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.java delete mode 100644 example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.kt diff --git a/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/OneginiConfig.kt b/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/OneginiConfig.kt deleted file mode 100644 index 663474f6..00000000 --- a/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/OneginiConfig.kt +++ /dev/null @@ -1,55 +0,0 @@ -package com.onegini.mobile.onegini_example - -import android.os.Build -import com.onegini.mobile.sdk.android.model.OneginiClientConfigModel - - -class OneginiConfigModel : OneginiClientConfigModel { - - private val appIdentifier = "FlutterExampleApp" - private val appPlatform = "android" - private val redirectionUri = "oneginiexample://loginsuccess" - private val appVersion = "1.0.2" - private val baseURL = "https://token-mobile.test.onegini.com" - private val resourceBaseURL = "https://token-mobile.test.onegini.com/resources/" - private val keystoreHash = "ebbcab87e2d16b9441559767a7c85fbaea9a3feef94451990423019a31e5bf1f" - override fun getAppIdentifier(): String { - return appIdentifier - } - - override fun getAppPlatform(): String { - return appPlatform - } - - override fun getRedirectUri(): String { - return redirectionUri - } - - override fun getAppVersion(): String { - return appVersion - } - - override fun getBaseUrl(): String { - return baseURL - } - - override fun getResourceBaseUrl(): String { - return resourceBaseURL - } - - override fun getCertificatePinningKeyStore(): Int { - return R.raw.keystore - } - - override fun getKeyStoreHash(): String { - return keystoreHash - } - - override fun getDeviceName(): String { - return Build.BRAND + " " + Build.MODEL - } - - override fun getServerPublicKey(): String? { - return null - } -} \ No newline at end of file diff --git a/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/OneginiConfigModel.java b/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/OneginiConfigModel.java new file mode 100755 index 00000000..deef60a0 --- /dev/null +++ b/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/OneginiConfigModel.java @@ -0,0 +1,93 @@ +package com.onegini.mobile.onegini_example; + +import android.os.Build; +import com.onegini.mobile.onegini_example.R; +import com.onegini.mobile.sdk.android.model.OneginiClientConfigModel; + +public class OneginiConfigModel implements OneginiClientConfigModel { + + /* Config model generated by SDK Configurator version: v5.1.0 */ + + private final String appIdentifier = "FlutterExampleApp"; + private final String appPlatform = "android"; + private final String redirectionUri = "oneginiexample://loginsuccess"; + private final String appVersion = "1.0.2"; + private final String baseURL = "https://mobile-security-proxy.test.onegini.com"; + private final String resourceBaseURL = "https://mobile-security-proxy.test.onegini.com/resources/"; + private final String keystoreHash = "90cf65bea23977e84dcddfb38b8cecb5469d8ca43aa6b01575864ef2ca6eaa48"; + private final int maxPinFailures = 3; + private final String serverPublicKey = "17DDB4086A1D3FA37950CBDDC6F1173A0C5902A3B71DAD261290CEFEE13CC9CA"; + + public String getAppIdentifier() { + return appIdentifier; + } + + public String getAppPlatform() { + return appPlatform; + } + + public String getRedirectUri() { + return redirectionUri; + } + + public String getAppVersion() { + return appVersion; + } + + public String getBaseUrl() { + return baseURL; + } + + public String getResourceBaseUrl() { + return resourceBaseURL; + } + + public int getCertificatePinningKeyStore() { + return R.raw.keystore; + } + + public String getKeyStoreHash() { + return keystoreHash; + } + + public String getDeviceName() { + return Build.BRAND + " " + Build.MODEL; + } + + public String getServerPublicKey() { + return serverPublicKey; + } + + /** + * @Deprecated Since Android SDK 8.0.0 this attribute is not required. + */ + public boolean shouldGetIdToken() { + return false; + } + + /** + * Get the max PIN failures. This attribute is just used for visual representation towards the end-user. + * + * @Deprecated Since Android SDK 6.01.00 this attribute is fetched from the Device config. + * + * @return The max PIN failures + */ + public int getMaxPinFailures() { + return maxPinFailures; + } + + @Override + public String toString() { + return "ConfigModel{" + + " appIdentifier='" + appIdentifier + "'" + + ", appPlatform='" + appPlatform + "'" + + ", redirectionUri='" + redirectionUri + "'" + + ", appVersion='" + appVersion + "'" + + ", baseURL='" + baseURL + "'" + + ", maxPinFailures='" + maxPinFailures + "'" + + ", resourceBaseURL='" + resourceBaseURL + "'" + + ", keyStoreHash='" + getKeyStoreHash() + "'" + + ", serverPublicKey='" + serverPublicKey + "'" + + "}"; + } +} diff --git a/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.java b/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.java new file mode 100755 index 00000000..a8b259d7 --- /dev/null +++ b/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.java @@ -0,0 +1,7 @@ +package com.onegini.mobile.onegini_example; + +@SuppressWarnings({ "unused", "WeakerAccess" }) +public final class SecurityController { + public static final boolean rootDetection = false; + public static final boolean debugDetection = false; +} \ No newline at end of file diff --git a/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.kt b/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.kt deleted file mode 100644 index 9169d324..00000000 --- a/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.onegini.mobile.onegini_example - -object SecurityController { - const val debugDetection = false - const val rootDetection = false - const val debugLogs = true -} diff --git a/example/android/app/src/main/res/raw/keystore.bks b/example/android/app/src/main/res/raw/keystore.bks index bfcdf1b19c4af3596199a1826a984c9c8bfb1976..9abf5941273e71cb633b269522a6de203f5eb8ad 100644 GIT binary patch delta 1682 zcmaJ=c~BEq9NtaB62eU)DGIX6p`gaM0fblzgvhCa5I_p88k1n6K%8X}@d^Y89tEwD ziXg`bEuf;Hhr8pLg<5jT*K^<{C@BkUEZa^9Rr#tgz-}`>Q_q}hw_iY({h~)u6 z5KImhl<#2tPu4g@3BH4Fqrrkj{ zmgd#mZmN=O5lY2`e1jq&o{-{kQi)tdNT*t6j+5jNq!Y<;0Xzso*g%Cafr>g(Or^jS zipkFC5c`@f7fl}#=K7a~hGoDI(Q{P$tA`9>*gyvYskDCg<)urlt@zG zn=lSosI60(c9S(cF@Zosg?v;X#R++gTr48wig=WtNXQg8$p>b$4KX(i16(lqM6nH> z0LFDvlEa1P!ixf_`@a(F=Z(z*7E@x){BS90368E5#fxRq1agX*0HZ0*xmLnO|is9+enm*8~ozB_sw>SX)W-Sf~r=Gn%7%>_5AV#hud-89QJ zUgVjz5;jm7vz6;PFY5f0N6gcLD(`dcH0O02F0AsbSka{Pa(uy?c$nI5ZO-NYonn8% zW?LpYyLST3bI)0($V@~Ic-3$<=6WV{8;{P%nZ}BrLs%Ob@|Iv2mv`LJtcar(m&{V_ zs?NLcs->{Sb!$-`-FYN}6WOe1gh-+30qs}msO)afct z;kJUttKLe>CzQAS-GQBN4j9!mdYQjfWOxTkhDt&4cmtMG8xp+z@qqL10H%O3#D* zs|D}QP-AWaD{X@j&78){`ejXXSmoXxkn|#dIA5oy4$czwOkS#$F$_=8Xk^0GlfkrN zYS(mtkS_`hY5HMQIZMlf(#Yfj1fh{r2+$E^L#hExfx#+m(V7+j{D4ofpqQ`rlo7<{ zrHdDf@mNk`0+~;3SUF-v+~Vozl8N{xxYN1ikek33guVcQb#!!Ln6?qffYS2|04Qpw zX?Eg&*!dDknD$r!pJXI}-82ELw)jk-5GQQ@mf`F0k^eJQMSefGL3BlFVa@|+v~GSepL_h zLK=JWl1|; z_e_)yFL9#_dB@V7k6OI1H#&LO*7c=L`PSQap1(QhCt1&%`=)isw0>?zYs@lR`)m_# z)^*J(-NH1F#Se!+`euvk8=uv5{c&qfxtfvlkdt9Qb8NJ_cC~k0&RIO$7lCF-Q$|=U^t4f2i?4k zy!*_Mk?rqWO=au z``R5te7RrzQ%y5>zBp6RSH<;U+*#gWlh1PCFUX@=YZeW(@%-H@qs){upzHIy|D5*@ TPv4u}Id1zygl#zI^y~is-gtY} delta 81 zcmew^vYf++fq{V$h()$!ZQt*#`B+v#WHZ<298Vp;lcC=k7}(kv8Q6Uz9eq3 Date: Mon, 22 May 2023 13:39:11 +0200 Subject: [PATCH 5/6] FP-89: Use a different tokenserver --- example/ios/Configuration/OneginiConfigModel.m | 10 +++++----- example/ios/Runner.xcodeproj/project.pbxproj | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/example/ios/Configuration/OneginiConfigModel.m b/example/ios/Configuration/OneginiConfigModel.m index 486e4e1c..4175b2ae 100755 --- a/example/ios/Configuration/OneginiConfigModel.m +++ b/example/ios/Configuration/OneginiConfigModel.m @@ -6,7 +6,7 @@ @implementation OneginiConfigModel + (NSArray *)certificates { - return @[@"MIIDzTCCArWgAwIBAgIQCjeHZF5ftIwiTv0b7RQMPDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTIwMDEyNzEyNDgwOFoXDTI0MTIzMTIzNTk1OVowSjELMAkGA1UEBhMCVVMxGTAXBgNVBAoTEENsb3VkZmxhcmUsIEluYy4xIDAeBgNVBAMTF0Nsb3VkZmxhcmUgSW5jIEVDQyBDQS0zMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEua1NZpkUC0bsH4HRKlAenQMVLzQSfS2WuIg4m4Vfj7+7Te9hRsTJc9QkT+DuHM5ss1FxL2ruTAUJd9NyYqSb16OCAWgwggFkMB0GA1UdDgQWBBSlzjfq67B1DpRniLRF+tkkEIeWHzAfBgNVHSMEGDAWgBTlnVkwgkdYzKz6CFQ2hns6tQRN8DAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYBAf8CAQAwNAYIKwYBBQUHAQEEKDAmMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDovL2NybDMuZGlnaWNlcnQuY29tL09tbmlyb290MjAyNS5jcmwwbQYDVR0gBGYwZDA3BglghkgBhv1sAQEwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzALBglghkgBhv1sAQIwCAYGZ4EMAQIBMAgGBmeBDAECAjAIBgZngQw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R0cDovL2NybDMuZGlnaWNlcnQuY29tL09tbmlyb290MjAyNS5jcmwwbQYDVR0gBGYwZDA3BglghkgBhv1sAQEwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzALBglghkgBhv1sAQIwCAYGZ4EMAQIBMAgGBmeBDAECAjAIBgZngQwBAgMwDQYJKoZIhvcNAQELBQADggEBAAUkHd0bsCrrmNaF4zlNXmtXnYJX/OvoMaJXkGUFvhZEOFp3ArnPEELG4ZKk40Un+ABHLGioVplTVI+tnkDB0A+21w0LOEhsUCxJkAZbZB2LzEgwLt4I4ptJIsCSDBFelpKU1fwg3FZs5ZKTv3ocwDfjhUkV+ivhdDkYD7fa86JXWGBPzI6UAPxGezQxPk1HgoE6y/SJXQ7vTQ1unBuCJN0yJV0ReFEQPaA1IwQvZW+cwdFD19Ae8zFnWSfda9J1CZMRJCQUzym+5iPDuI9yP+kHyCREU3qzuWFloUwOxkgAyXVjBYdwRVKD05WdRerw6DEdfgkfCv4+3ao8XnTSrLE="]; //Base64Certificates } + (NSDictionary *)configuration @@ -14,16 +14,16 @@ + (NSDictionary *)configuration return @{ @"ONGAppIdentifier" : @"FlutterExampleApp", @"ONGAppPlatform" : @"ios", - @"ONGAppVersion" : @"1.0.3", - @"ONGAppBaseURL" : @"https://token-mobile.test.onegini.com", - @"ONGResourceBaseURL" : @"https://token-mobile.test.onegini.com/resources/", + @"ONGAppVersion" : @"1.0.0", + @"ONGAppBaseURL" : @"https://mobile-security-proxy.test.onegini.com", + @"ONGResourceBaseURL" : @"https://mobile-security-proxy.test.onegini.com/resources/", @"ONGRedirectURL" : @"oneginiexample://loginsuccess", }; } + (NSString *)serverPublicKey { - return @"4B8E698FEAA9F0A1E99644E77E1AB9EF5F63FBBFBA5EE52D881AADB2C0373336"; + return @"E23EDEC22396C17B204D9996295ED0045E5500B3281F0D00F242D71B5A4F3EC9"; } @end \ No newline at end of file diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 6b9ecbf2..e8b5841d 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -423,6 +423,7 @@ files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( From aea528d79f1c308150ab9ee6fe199c3af831b9ee Mon Sep 17 00:00:00 2001 From: Michiel Vrins Date: Thu, 25 May 2023 13:39:13 +0200 Subject: [PATCH 6/6] Enable dubug logs for android --- .../com/onegini/mobile/onegini_example/SecurityController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.java b/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.java index a8b259d7..f937a8ae 100755 --- a/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.java +++ b/example/android/app/src/main/kotlin/com/onegini/mobile/onegini_example/SecurityController.java @@ -4,4 +4,5 @@ public final class SecurityController { public static final boolean rootDetection = false; public static final boolean debugDetection = false; -} \ No newline at end of file + public static final boolean debugLogs = true; +}