ios realm移动端数据库怎么看

ios realm移动端数据库怎么看,第1张

1、首先在 SQL Server 2008中选择单击Microsoft SQL Server 2008 Management Studio,会出现一个窗口。2、在服务器名称中选择本机的服务器名字。然后单击【连接】按钮。就进入Microsoft SQL Server 2008 Management Studio。3、右键单击【数据库】,选择【新建数据库】,会出来一个窗口,在这个窗口里可以输入你要建的数据库的名称,同时也可以修改数据库的文件类型。4、数据库的名称和类型都弄好后,点击下方的【确定】 按钮。数据库就建立了。5、要是想删除自己不想要的数据库也很简单。鼠标右键点击自己不想要的数据库,然后选择【删除】 ,那么该数据库就删除了。

https://stackoverflow.com/questions/40428923/realm-react-native-and-objective-c

1:yarn add realm --save

这时候,如果直接运行,会错误:红屏错误

Cannot read property 'debugHosts' of undefined

2:react-native link realm

链接原生

运行正常

1:pod ‘Realm’

这时候运行失败:

pod 集成的realm中的librealmcore-ios.a 和 rn 链接原生库libRealmReact.a 有字段重复定义

2:将pod集成的realm需要的静态库删除

这时候运行报错:

3:将rn链接原生库libRealmReact.a删除,报红屏错误:Cannot read property 'debugHosts' of undefined

问题演示

注: 很恶心,无法上传pdf,这个链接可能打开的草鸡慢,抱歉,下面官方沟通记录里也有

沟通记录

I did some research and found that the reason you may been running into issues is that Realm can't support two SDKs at the same time. When you begin working with realm objects there is no way to convert the format from framework to framework.

I'm sorry if this doesn't work your use case. Our engineering is aware of the problem and may work on it in the future.

跟官方沟通暂时不支持

1:Dynamic Framework

2:cocoapods

3:Static Framework(ios only)。后续验证

2:cocoapds方式集成依然不行,后续跟进删除一方的文件依赖试试。但是感觉不行,因为rn,native中关于realm的依赖方式不同。

3:环境可行

https://stackoverflow.com/questions/40428923/realm-react-native-and-objective-c

1:native 提供方法 共rn调用:RCTBridgeModule。在方法上更统一

2:各自独立访问,感觉在结构上更合理一些。

Access Control

指定路径:ios 》 rn

rn中:

realm中的对象属性总是可选的,不需要显式地指定,也不需要指定。默认optional

field:‘type’(required)

filed:‘type?’ (optional)

filed:{type:‘type’, optional:true/false}

native-ios:

复写requiredproperties方法,return @[@“filed”,@“filed”]指定字段是required的。需要显示指定required/optional

解决方式:保持两端permission一致即可

1:required

2:optional

个人rn相关专题


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/sjk/9411147.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-28
下一篇2023-04-28

发表评论

登录后才能评论

评论列表(0条)

    保存