Giter Site home page Giter Site logo

iphonesim's Introduction

WARNING: This project is no longer supported. Please check out http://github.com/appcelerator/ioslib for replacement that works with the latest XCode.

ios-sim

The ios-sim tool is a command-line utility that launches an iOS application on the iOS Simulator. This allows for niceties such as automated testing without having to open XCode.

This fork fixes a dynamic loading problem when running Xcode 4.3. To use:

  1. Download the ios-sim-xcode43.tar.gz file from the Download section above.
  2. Extract the ios-sim executable and copy it to TITANIUM_HOME/mobilesdk/osx/1.8.1/iphone/ios-sim.
  3. Make sure you have run "sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer" to set the new path to the developer tools.

Clean your build directory and rebuild!

Features

  • Choose the device family to simulate, i.e. iPhone or iPad.
  • Setup environment variables.
  • Pass arguments to the application.
  • See the stdout and stderr, or redirect them to files.

See the --help option for more info.

Installation

Through homebrew:

$ brew install ios-sim

Download an archive:

$ curl -L https://github.com/Fingertips/ios-sim/zipball/1.3 -o ios-sim-1.3.zip
$ unzip ios-sim-1.3.zip

Or from a git clone:

$ git clone git://github.com/Fingertips/ios-sim.git

Then build and install from the source root:

$ rake install prefix=/usr/local/

License

Original author: Landon Fuller [email protected] Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc. All rights reserved.

This project is available under the MIT license. See LICENSE.

iphonesim's People

Contributors

alloy avatar cb1kenobi avatar darkk avatar jhaynie avatar mschulkind avatar pegli avatar sptramer avatar srahim avatar vishalduggal avatar whichkatiedid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iphonesim's Issues

Does this support iOS 9 simulator

I am getting below error.

2015-06-22 13:40:31.990 iphonesim_6[9194:88451] +[SimDeviceType supportedDeviceTypesByName]: unrecognized selector sent to class 0x108b7bd60
2015-06-22 13:40:31.990 iphonesim_6[9194:88451] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[SimDeviceType supportedDeviceTypesByName]: unrecognized selector sent to class 0x108b7bd60'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff9148203c exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff8862776e objc_exception_throw + 43
2 CoreFoundation 0x00007fff91484fad +[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff913cae24 __forwarding
+ 1028
4 CoreFoundation 0x00007fff913ca998 _CF_forwarding_prep_0 + 120
5 iphonesim_6 0x000000010837666b iossim_main + 1323
6 iphonesim_6 0x0000000108378af3 -[iPhoneSimulator runWithArgc:argv:] + 35
7 iphonesim_6 0x000000010837868d main + 141
8 libdyld.dylib 0x00007fff951da5c9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

Unable to unzip ios-sim-1.3.zip

I am using Mac OS X 10.9.2


kellyfj@/usr/local/ios-sim$ curl -L https://github.com/Fingertips/ios-sim/zipball/1.3 -o ios-sim-1.3.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  221k  100  221k    0     0   231k      0 --:--:-- --:--:-- --:--:--  231k
kellyfj@/usr/local/ios-sim$ unzip ios-sim-1.3.zip 
Archive:  ios-sim-1.3.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of ios-sim-1.3.zip or
        ios-sim-1.3.zip.zip, and cannot find ios-sim-1.3.zip.ZIP, period.
kellyfj@/usr/local/ios-sim$ zip --version
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.

77

你好,我想了解下iPhone越狱代码

stderr redirection?

is there a way to redirect stderr? for instance to see the output of NSLog & friends? This is how I tried starting iphonesime to redirect stderr (pseudocode):

fork do

we're in child

stderr = "some file"
exec "iphonesim launch myapp.app"

this does not work... well, it works for the iphonesim executable (stderr for iphonesim is correctly redirected to the file), but not for myapp.app... so I can't see the output of NSLog on the console. I have to check system.log (using Console.app) to see the debug output...

Session could not be started

This might very well be because I'm using the 4.0 SDK, but until I've been able to figure it out myself, I thought I'd file a ticket. I'm using the current HEAD version of iphonesim. This is the output:

% ./vendor/iphonesim launch ./build/Debug-iphonesimulator/UISpecs.app
[DEBUG] App Spec:  specified by path ./build/Debug-iphonesimulator/UISpecs.app
[DEBUG] SDK Root:  path=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk version=4.0 name=Simulator - iPhone OS 4.0
[DEBUG] using device family iphone
[DEBUG] Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 UserInfo=0x10021a230 "Unknown error."

Does not work with xCode 4.3 and newer

Since xCode 4.3 Apple has changed its location to /Applications/Xcode.app
Due to those changes I'm unable to use the "iphonesim" tool (see the log below).

Please update your code base to keep up with the latest xCode.

Oleksandrs-Mac-mini:Release-iphonesimulator dodikk$ ls
CoreDataBooks.app CoreDataBooks.app.dSYM

Oleksandrs-Mac-mini:Release-iphonesimulator dodikk$ iphonesim launch "/Users/dodikk/projects/research/zucchini/CoreDataBooks/build/Release-iphonesimulator/CoreDataBooks.app" 5.0 iphone
dyld: Library not loaded: @rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation
Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
Reason: image not found
Trace/BPT trap: 5

Overwrite previous resouces while installing

If I install same application second time with additional resources in it then the new resources are merged in the resulting app file.
I dont want to merge but overwrite the resources.

Is there any arguments that I can specify in setSimulatedApplicationLaunchArgs or other methods , which would allow me to do so?
Or is there any provision in "iPhoneSimulatorRemoteClient" framework?
Thanks in advance.

Can't get iphonesim to report failure

I'm calling exit(1) from my iPhone app but session:didEndWithError: always has a null NSError? I need to have a non-zero exit code from my app return EXIT_FAILURE from iphonesim.

[ios-sim 2.0] The application does not launch for xCode 5.1.1 simulator

Environment

dodikk$ pwd
/Users/dodikk/projects/tools/ios-sim-main/build/Release
OSX-C07GR028DJD1:Release dodikk$ ls -1
Dashboard.app
Dashboard.zip
configs
ios-sim
ios-sim.dSYM
dodikk$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer/
dodikk$ xcodebuild -version
Xcode 5.1.1
Build version 5B1008
dodikk$ ./ios-sim --version
2.0

Application Executable

dodikk$ file Dashboard.app/Dashboard
Dashboard.app/Dashboard: Mach-O 64-bit executable x86_64

Launch

dodikk$ /Users/dodikk/projects/tools/ios-sim-main/build/Release/ios-sim \
    launch /Users/dodikk/projects/tools/ios-sim-main/build/Release/Dashboard.app

[DEBUG] Failed to find class DTiPhoneSimulatorSystemRoot at runtime.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.