Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Cordova - initializeSDKs callbacks not executed #128

Open
ninaDeimos opened this issue Jul 24, 2024 · 5 comments
Open

iOS Cordova - initializeSDKs callbacks not executed #128

ninaDeimos opened this issue Jul 24, 2024 · 5 comments

Comments

@ninaDeimos
Copy link

ninaDeimos commented Jul 24, 2024

I am using the Cordova Plugins for iOS and followed the integration guide.
I am trying to initialize the SDKs like this

core.initializeSDKs(
    () => console.log('SDKs initialized'),
    () => console.log('SDKs failed to initialize'),
    localauth,
    containment,
    compliance,
    network
);

But neither the success callback nor the failure callback are ever executed.
I checked the Device Logs but I would like to help to interpret it.
devicelog.log

E.g. do logs like
CTXMAMCoreFramework, 10, 2, /Users/jenkins/jenkins/workspace/iossdk_ctxmamcore_Release_24.5.0/CTXMAMCore/DataStorage/CTXMAMKeychainInterface.m, -[CTXMAMKeychainInterface deleteData:accessGroup:serviceName:accessibleAttribute:error:], 1012, Status: -25300, error: The item cannot be found..
or
CTXMAMCoreFramework, 3, 1, /Users/jenkins/jenkins/workspace/iossdk_ctxmamcore_Release_24.5.0/CTXMAMCore/DataStorage/CTXMAMDataStorage.m, -[CTXMAMDataStorage p_deleteKeychainDataForHashedName:], 914, ConfigManagerAuthVault: Unable to delete data. BackgroundAccessError = Error Domain=Citrix Code=-25300 "The item cannot be found." UserInfo={NSLocalizedDescription=The item cannot be found.}; NoBackgroundAccessError = Error Domain=Citrix Code=-25300 "The item cannot be found." UserInfo={NSLocalizedDescription=The item cannot be found.}
or
[WSSLv0.5.0][V]: [DSv0.2.7] Vault: SZ3M2Z456W.com.citrix.mdx/MAMSDKSharedDataOUMDqbtNfhrjKfCGQ3MxahpyXiIlyZrwaN7UGGFJ0MI-yeKData, exists?1, accessible?1, data-loaded?1 (load-result:1), error:(null)
or
[WSSLv0.5.0][V]: [DSv0.2.7] Vault: SZ3M2Z456W.com.citrix.mdx/MAMSDKSharedData, exists?0, accessible?1, data-loaded?0 (load-result:1), error:Error Domain=Citrix Code=-25300 "The item cannot be found." UserInfo={NSLocalizedDescription=The item cannot be found.}

mean, there is a problem with my keychain access configuration?

But after these logs I still see

CTXMAMCore - Now initializing CTXMAMCore SDK
CTXMAMCore - Now initializing CTXMAMAnalytics SDK
CTXMAMCore - Now initializing CTXMAMCompliance SDK
CTXMAMCore - Now initializing CTXMAMContainment SDK
CTXMAMCore - Now initializing CTXMAMLocalAuth SDK
CTXMAMCore - Now initializing SmartNetwork SDK

so it looks like the initialization is triggered, but never finishes?

And after that I don't see any logs for Citrix anymore at all.
Can someone help my find the issue?

@ShawnInTibco
Copy link

Hi @ninaDeimos , codes seem fine. and serials "initializing" logs means that every sdk is initialized successfully.
log "CTXMAMCoreFramework, 3, 1, /Users/jenkins/jenkins/workspace/iossdk_ctxmamcore_Release_24.5.0/CTXMAMCore/DataStorage/CTXMAMDataStorage.m, -[CTXMAMDataStorage p_deleteKeychainDataForHashedName:], 914, ConfigManagerAuthVault: Unable to delete data. BackgroundAccessError = Error Domain=Citrix Code=-25300 "The item cannot be found." UserInfo={NSLocalizedDescription=The item cannot be found.}; NoBackgroundAccessError = Error Domain=Citrix Code=-25300 "The item cannot be found." UserInfo={NSLocalizedDescription=The item cannot be found.}
means nothing. just init logs.
and for success and fail callback function, it's deprecated for now, function won't be called anymore.

To check if mamsdk works fine, just configure some policy and check if it works as expected.

Such as "block camera", and if you try to open Camera when you configure it with "true", app will show a alert message

@ninaDeimos
Copy link
Author

Hi @ShawnInTibco , thank you for the answer.
I actually made the callbacks work with this solution from another ticket
But is the deprecation documented somewhere? Because in the guide that is packaged together with the Cordova iOS Plugins, it is not mentioned.

@ShawnInTibco
Copy link

happy to know you have find a way to make it work.
And at the same time you can see the way to call init is different.
try registerSdksInitializedAndReady

`core.registerSdksInitializedAndReady(()=>console.log('SDKs initialized'));`

@ninaDeimos
Copy link
Author

Actually I tried that (as I commented in the other ticket), but that didn't work. That callback was never called either.

@ShawnInTibco
Copy link

sorry for that.
double check the codes and just found that Cordova SDK doesn't support callback function yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants