ios - How can I access realm data saved on iPhone from Apple Watch -


i saved data realm on iphone, , in appdelegate, wrote

        var config = realm.configuration()         let container = filemanager.default.containerurl(forsecurityapplicationgroupidentifier: "group.xxxxxxxx")         let realmurl = container!.appendingpathcomponent("default.realm")         config.fileurl = realmurl         realm.configuration.defaultconfiguration = config 

also, in extensiondelegate, wrote same.
when tried access data watch, shows nothing.
printed url , found iphone saves data in

"developer/coresimulator/devices/21b1330f-3b9d-4a45-9ee4-0d06f9a48866/data/containers/shared/appgroup/3697965e-9a56-447e-b0eb-bc1722db0bd0/default.realm"

but watch saves in

"developer/coresimulator/devices/b190d8c9-a6d8-4be1-ad8d-7d2805bfa739/data/containers/shared/appgroup/3e621ff7-86fa-4c49-9ac1-20c6c198cb2f/default.realm"

i'm wondering how access realm data saved in phone watch

now solved transfering whole realm file watchconnectivity


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -