万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    資産運用ブログ アセマネ
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    PhoneGapをiOSで動かす

    Androidは今まで

    phonegap run android                                                                                                                                

    で動いたので、

    phonegap run iphone

    iPhoneを試したらだめで、

    phonegap run ios

    を行った。

    しかし、

    [phonegap] detecting iOS SDK environment...
    [phonegap] using the local environment
    [phonegap] adding the iOS platform...
    [phonegap] missing library cordova/ios/3.3.0
    [phonegap] downloading https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;a=snapshot;h=3.3.0;sf=tgz...
    [phonegap] compiling iOS...
    [phonegap] successfully compiled iOS app
    [phonegap] trying to install app onto device
    [phonegap] no device was found
    [phonegap] trying to install app onto emulator
     [warning] missing ios-sim
     [warning] install ios-sim from http://github.com/phonegap/ios-sim
       [error] An error occurred while emulating/deploying the ios project. Error: ios-sim was not found. Please download, build and install version 1.7 or greater from https://github.com/phonegap/ios-sim into your path. Or 'npm install -g ios-sim' using node.js: http://nodejs.org/

    のようにダメだった。

    調べるとbrewで入れるとよさ気なのがあったの

    brew install ios-sim

    を行った。

    Warning: No developer tools installed.
    You should install the Command Line Tools.
    Run `xcode-select --install` to install them.
    ==> Downloading https://github.com/phonegap/ios-sim/archive/1.8.2.tar.gz
    ######################################################################## 100.0%
    ==> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/rake install prefix=/usr/local/Cellar/ios-sim/1.8.2
    🍺  /usr/local/Cellar/ios-sim/1.8.2: 4 files, 100K, built in 9 seconds
    --- ~/my-app » phonegap run ios
    [phonegap] detecting iOS SDK environment...
    [phonegap] using the local environment
    [phonegap] compiling iOS...
    [phonegap] successfully compiled iOS app
    [phonegap] trying to install app onto device
    [phonegap] no device was found
    [phonegap] trying to install app onto emulator
    [phonegap] successfully installed onto emulator

    で起動した。

    さっきのエラーメッセージには

    npm install -g ios-sim

    とあったので、node.jsな人はこのコマンドのほうがいいかも?