Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

Titanium 1.8.0.1 でZipFile 0.1.21 モジュールを使う際の注意点

More than 5 years have passed since last update.

2012/1/23日現在
ZipFile githubのReadme内のHow to useでtiapp.xml へ設定するモジュールのバージョンが 0.1.20 になっているので下記のように設定する

tiapp.xml
...
<modules>
  <module platform="iphone" version="0.1.21">zipfile</module>
</modules>

Titanium 1.7 以降パスがURI形式になり、Ti.FileSystem.applicationDataDirectoryの指す場所も変更された様だが、ZipFile モジュールは新しいパスの仕様に初期の状態では対応していないため

app.coffee
applicationDataDirectory =
    ((Ti.Network.decodeURIComponent Ti.Filesystem.applicationDataDirectory)
        .replace 'file://localhost', '')
        .replace '/Documents/', ''
...

の様に変数を作り利用すると良い

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away