Saturday, January 24, 2015

[AIR] How to build ANE 64-bit


How to build ANE 64-bit

TL;TR

http://easynativeextensions.com/making-your-ios-apps-universal/

Or try doing thing backward here ;)

  1. Open your Mac.
  2. Open Facebook check it fast and close it!
  3. Make sure Adobe AIR SDK is update to most recent by brew it. (or install if you don't have one)
  4. $ brew upgrade adobe-air-sdk
  5. Make sure AIR SDK path is set.
    $ export AIR_HOME=/usr/local/Cellar/adobe-air-sdk/16.0.0.272/libexec
  6. Clone my working ANE 64-bit ready https://github.com/katopz/ane-device-file-util
  7. Go to /ane-device-file-util/as3/bin
    $ cd /ane-device-file-util/as3/bin
    try
    $ bash build.sh
  8. Open your Twitter, tweet something and close it!
  9. Smile!
  10. That's it! 
You just build ANE from working static library "libDeviceFileUtil.a", now let's try make one your own! Follow this step below...

Thursday, January 8, 2015

[Cucumber] Hello Calabash Swift iOS

Behavior-driven development (BDD) Why?

  • why not?
  • it's fun
  • why not!?

Required

  1. http://brew.sh/
  2. $ brew install ruby
  3. $ gem install calabash-cucumber --no-ri --no-rdoc
  4. $ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
  5. $ sudo gem install bundler

Install


  1. $ git clone https://github.com/codingricky/todoSwift
  2. In Xcode : open SingleTodo.xcodeproj and set Build Active Architecture Only = No

  3. fix error as Xcode suggest, build and run once to make sure it work properly
  4. $ cd todoSwift
  5. $ calabash-ios setup
  6. if you get
    ._SingleTodo.xcodeproj
    We don't yet support this. Please setup calabash manually.
    do try delete it by...

    $ rm ._SingleTodo.xcodeproj

  7. In Xcode : switch to SingleTodo-cal scheme
  8. $ calabash-ios gen
  9. $ cucumber

Trouble?

  1. cry
  2. make sure all update https://github.com/calabash/calabash-ios/wiki/B1-Updating-your-Calabash-iOS-version#updating-calabash-ios and close then reopen terminal  
  3. try https://github.com/calabash/calabash-ios/wiki/Hot-Topics#1-when-targeting-a-simulator-the-app-launches-then-quits-several-times-in-rapid-succession
  4. Time out waiting for UIAutomation run-loop? try this

    $ DEVICE_TARGET="iPhone 6 (8.1 Simulator)" cucumber

  5. Unable to unzip calabash.framework.zip? try here for temporary workaround https://github.com/calabash/calabash-ios/issues/682

    ----------Info----------
    error:  cannot delete old ./calabash.framework/Headers
    error:  cannot delete old ./calabash.framework/Resources
    error:  cannot delete old ./calabash.framework/Versions/0.12.0
    error:  cannot delete old ./calabash.framework/Versions/Current
    caution: excluded filename not matched:  __MACOSX/*
    caution: excluded filename not matched:  calabash.framework/.DS_Store
    
    ----------Error----------
    Unable to unzip file: /usr/local/lib/ruby/gems/2.2.0/gems/calabash-cucumber-0.12.1/bin/../staticlib/calabash.framework.zip
    You must install manually.
    ---------------------------
  6. yelling for permission? gimme sudo!
  7. $ sudo chown -R replace_this_with_your_name /usr/local/lib/ruby/gems/2.2.0

Cached?

  1. $ calabash-ios sim reset

Next?

  1. Feature: Todo list application can add tasks
      As a user
      I want to add tasks
      So I can remember to do things
    Scenario: Add Task
      Given I am on the Welcome Screen
      When I touch "Add"
      Then I enter "listening to Taylor Swift" into input field number 1
      And I touch "Add task"
      Then I wait for "listening to Taylor Swift" to appear

Reference

Note to self

Happy Testing! :D


Thursday, December 18, 2014

[Jekyll] Ruby gem install jekyll certificate verify failed

That moment when gem install failed...

C:\>gem install jekyll
ERROR:  Could not find a valid gem 'jekyll' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
https://api.rubygems.org/latest_specs.4.8.gz)

All you have to do is...