ios - How to include CoreMl model into the cocoa pod framework?
问题描述
I'm trying to create a framework which will be reused across couple of the apps we're currently developing and this framework will include two things:
- CoreMl model
- Some amount of code written around this model which will make the work with the model easier
The obstacle I'm currently struggling with is that I can not figure out how to make sure XCode generates the interface class for this model. The thing is, if I'm trying to build the pod itself, I can clearly see that the interface class is being generated. But, if I switch over to the test project I created in order to use this pod, the framework classes start complaining about the use of the unresolved identifier MyModel
.
Is there anything I'm missing in my podspec or something like that? I'm new to iOS development (was working on Android solely), so pardon me if I accidentally omitted some important parts of my description.
解决方案
The solution I ended up with was to disable the code generation and add the Model class along with ModelInput and ModelOutput which were generated before into the project. After that the test project seems to work just fine with the pod framework containing the model.
推荐阅读
- php - Lumen:上传文件/磁盘没有配置驱动
- mongodb - 如何在 MongoDB 中使用 find 查找对象的嵌套对象
- android-studio - Android Studio 中不同的文件夹符号是什么意思?
- sql - SQL语句选择所有死人
- amazon-web-services - 如何从 terraform 中的所有可用区域中选择不同的子网
- python - 创建显示缺失值计数的新列
- python - 如何将具有形状 (None, 512) 的张量转换为具有形状 (None, 12, 12, 512) 的张量
- git - git:提交对象可以没有作者/提交者吗?
- python - 使用 boto3 启用存储桶日志记录
- soap - 使用 WSDL 的 Azure 逻辑应用自定义连接器 SOAP 端点