【问题标题】:Appcelerator - Sqlite on windows phoneAppcelerator - Windows 手机上的 Sqlite
【发布时间】:2016-02-23 17:02:04
【问题描述】:

我正在尝试制作一个带有集合和模型的基本 Appcelerator 应用程序在 Windows 手机上工作,但我无法在集合上使用“获取”方法,应用程序崩溃。 我读过 SQLite 在 Windows Phone 上不可用,对吗? 如果是,我怎样才能使它与 Appcelerator 一起工作? 我已经看到有一个可用的 SQLite 库,它必须包含在 Visual Studio 中,对我来说没用。

有人遇到过这个问题吗?

非常感谢您的帮助!

【问题讨论】:

  • SQLite 适用于 windows phone。这是一个博客:codeproject.com/Articles/826602/…
  • 您可以将 sqlite 用于 windows phone silverlight 8 应用程序、windows phone 8.1 应用程序、UWP(通用 Windows 平台)和 Windows 10 / Windows 10 Mobile 应用程序。 Google 对启动您的应用非常有帮助。
  • 如果我错了,请纠正我,但这仅适用于 Visual Studio,对吧?我正在使用 Appcelerator Titanium 框架及其专用的 IDE(Appcelerator Studio),那么如何集成 SQLite(如有必要)?我是移动应用开发新手...

标签: sqlite windows-phone-8 windows-phone-8.1 appcelerator appcelerator-titanium


【解决方案1】:

Titanium for Windows 通过Ti.Database 支持 SQLite。

【讨论】:

    【解决方案2】:

    是的,它也支持 windowsphone 中的 SQLITE..

    要获取单个记录,请使用

    var oUser =  Alloy.createModel('user');
    
    oUser.fetch({UserId : uId});
    

    要获取记录集合,请使用

    var _speaker = Alloy.Collections.speaker;
    
    _speaker.fetch(); 
    
    var _speaker = Alloy.Collections.speaker;
    _speaker.fetch();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-08
      • 2014-10-19
      • 1970-01-01
      相关资源
      最近更新 更多