File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -565,6 +565,13 @@ export class AppWrapper implements IChaynsReact {
565565 key,
566566 accessMode,
567567 } ) ;
568+ if ( [ 'iOS' , 'Mac OS' ] . includes ( this . values . device . os ) && typeof result ?. object === 'string' ) {
569+ try {
570+ return JSON . parse ( result . object ) ;
571+ } catch {
572+ console . warn ( '[chayns-api] could not parse result from storageGetItem' , result . object )
573+ }
574+ }
568575 return result ?. object ;
569576 } ,
570577 storageRemoveItem : async ( key , accessMode ) => {
@@ -574,9 +581,13 @@ export class AppWrapper implements IChaynsReact {
574581 } , { awaitResult : false } ) ;
575582 } ,
576583 storageSetItem : async ( key , value , accessMode , tappIds ) => {
584+ let object : T = value ;
585+ if ( [ 'iOS' , 'Mac OS' ] . includes ( this . values . device . os ) ) {
586+ object = JSON . stringify ( value ) ;
587+ }
577588 this . appCall ( 73 , {
578589 key,
579- object : value as unknown ,
590+ object,
580591 accessMode,
581592 tappIDs : tappIds ,
582593 } , {
You can’t perform that action at this time.
0 commit comments