守望者--AIR技术交流

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
热搜: ANE FlasCC 炼金术
查看: 1074|回复: 0

IOS解压缩ANE工具

[复制链接]
  • TA的每日心情
    擦汗
    2018-4-10 15:18
  • 签到天数: 447 天

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

    Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18

    威望
    562
    贡献
    29
    金币
    51756
    钢镚
    1422

    开源英雄守望者

    发表于 2015-1-22 11:47:47 | 显示全部楼层 |阅读模式
    应用下载
    应用名称: iOSNativeUtilities
    支持64位:
    当前版本: 未知
    运行平台: IOS 
    开发语言: ActionScript 3 Object-C 
    应用类别: ANE-C/C++
    应用简介: Set of native utilities (in form of Adobe Air Native Extension) for iOS: currently unzip, access to settings bundle and nslog
    Native Utils - iOS Air Native Extension

    author: Paweł Meller

    This extension currently provides access to:

    • Settings Bundle
    • Unzipping a .zip file to specified location (using SSZipArchive)
    • NSLog
    Settings Bundle


    docs on developer.apple.com

    Usage:

    1. //Add Settings.bundle (yes, on windows it is a directory) to your application and include it in building options
    2. if(NativeUtils.isSupported)
    3. {
    4.     var nativeUtils:NativeUtils=new NativeUtils();
    5. //you should alwas load defaults before accesing the values, this will not override any values, that are already set
    6. //if you don't load the defaults the application may crash when trying to access a value, that was not set
    7.     nativeUtils.settings.loadSettingsDefaults();
    8. //if you want to retrieve a string:
    9.     var mySetting:String=nativeUtils.settings.getStringValue("settingKeyFromBundle");
    10. //if you want to retrieve a number:
    11.     var mySetting:Number=nativeUtils.settings.getNumberValue("settingKeyFromBundle");
    12. //if you want to retrieve an int:
    13.     var mySetting:Int=nativeUtils.settings.getIntValue("settingKeyFromBundle");
    14. //if you want to retrieve a Boolean:
    15.     var mySetting:Number=nativeUtils.settings.getBooleanValue("settingKeyFromBundle");
    16. //you can also set the values by using
    17.     nativeUtils.settings.setStringValue("settingKeyFromBundle","my value");
    18.     nativeUtils.settings.setNumberValue("settingKeyFromBundle",.52);
    19.     nativeUtils.settings.setIntValue("settingKeyFromBundle",134);
    20.     nativeUtils.settings.setBooleanValue("settingKeyFromBundle",true);
    21. //in iOS >5 synchronize should be called automatically, but you can also do this manually to commit the changes
    22.     nativeUtils.settings.synchronize()
    23. }
    复制代码
    UnzipA simple unzipping function - had to do this, because all of the zip libraries for as3 that i found had problems with unpacking large files on iPad 1 source: githubUsage:
    1. var _nativeUtils:NativeUtils;
    2. if(NativeUtils.isSupported)
    3. {
    4. if(!_nativeUtils)
    5. _nativeUtils=new NativeUtils();
    6. _nativeUtils.addEventListener(NativeUtilsZipEvent.PROGRESS,unpackProgress);
    7. _nativeUtils.addEventListener(NativeUtilsZipEvent.COMPLETE,unpackComplete);
    8. _nativeUtils.unzipFile(path,File.applicationStorageDirectory.nativePath);
    9. }
    复制代码

    Progress And Complete:
    1. //Event Listeners:
    2. private function unpackProgress(e:NativeUtilsZipEvent)
    3. {
    4. //gives progress of unzipping (0-100)
    5. trace(e.percentage);
    6. }
    7. private function unpackComplete(e:NativeUtilsZipEvent):void
    8. {
    9. _nativeUtils.removeEventListener(NativeUtilsZipEvent.PROGRESS,unpackProgress);
    10. _nativeUtils.removeEventListener(NativeUtilsZipEvent.COMPLETE,unpackComplete);
    11. }
    复制代码
    Ever wanted to do trace on iOS without connecting to debugger? Now you can, install a system console (i'm using this one) and see every trace from your application.Usage:
    1. var nativeUtils:NativeUtils=new NativeUtils();
    2. nativeUtils.nslog("Your message");
    复制代码

    相关链接:https://github.com/memeller/iOSNativeUtilities

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    守望者AIR技术交流社区(www.airmyth.com)
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    
    关闭

    站长推荐上一条 /4 下一条

    QQ|手机版|Archiver|网站地图|小黑屋|守望者 ( 京ICP备14061876号

    GMT+8, 2019-10-22 06:18 , Processed in 0.041008 second(s), 34 queries .

    守望者AIR

    守望者AIR技术交流社区

    本站成立于 2014年12月31日

    快速回复 返回顶部 返回列表