我有在swift 3上开发的本机代码.基本上这段代码生成一个带有.framework扩展名的库.我想在apache cordova应用程序中使用此库作为插件,但我无法使其工作.我查看了互联网并且有一些帖子包括这个(Custom Cordova Plugin:Add framework to"Embedded Binaries")但是这个选项不适用于最新版本的cordova(6+).
如果我将.swift文件单独放在我的cordova项目上,我可以使用它,所以我认为在cordova和.framework库之间进行正确的通信存在问题.
有谁知道怎么做到这一点?
谢谢
我有一点问题,我会试着详细解释一下.
在我的系统上,我有一个使用EF 4.1的通用存储库.一切都很棒,但我在某种情况下遇到问题我需要通过一些查询来做动态排序.
我通过参数接收一个表示我班级字段的"字符串"来执行orderBy(如"id"或"description")
部分代码:
public class SomeClass
{
public int id { get; set; }
public string description { get; set; }
}
// First we define the parameter that we are going to use
// in our OrderBy clause. This is the same as "(parameter =>"
// in the example above.
var param = Expression.Parameter(typeof(SomeClass), "parameter");
// Now we'll make our lambda function that returns the
// request.SortingName property by it's name.
var expression = Expression.Lambda<Func<SomeClass, int>>(Expression.Property(param, request.SortingName), …Run Code Online (Sandbox Code Playgroud)