Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with xCode 4.3 and newer #10

Open
dodikk opened this issue Apr 6, 2012 · 12 comments
Open

Does not work with xCode 4.3 and newer #10

dodikk opened this issue Apr 6, 2012 · 12 comments

Comments

@dodikk
Copy link

dodikk commented Apr 6, 2012

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

@sgadhvi
Copy link

sgadhvi commented Apr 16, 2012

dodikk : have you find any solution for this???

@dodikk
Copy link
Author

dodikk commented Apr 17, 2012

Take a look at UIAutomation based approach here :
https://github.com/farcaller/ios-tdd/tree/master/Tests/Jasmine

It works with gh-unit just fine.
Consider using OCUnit instead. At the moment it's capable of of being debugged and handling bundles.

@dodikk
Copy link
Author

dodikk commented Apr 17, 2012

Anyway, last commit in this repo is 2 years old.
The project looks abandoned.

In my opinion, there is no point to bring "iphonesim" back to life as approaches, mentioned above are good enough for most users ( including myself ).

@haemi
Copy link

haemi commented May 1, 2012

how did you solve this? I would like to try iphonesim, as I don't have success with ios-sim...

@dodikk
Copy link
Author

dodikk commented May 2, 2012

I have not solved this.
I used the other approach based on apple's UIAutomation. (consider the link above)

iphonesim does not work with "xCode 4.3" and newer.
And I don't think it will ever get fixed.

@oylbin
Copy link

oylbin commented May 3, 2012

hi, I got a idea from http://developer.appcelerator.com/question/132298/an-ios-sdk-is-missing and solved the problem on xcode 4.3 by setting the correct rpath in project settings.

  1. open iphonesim.xcodeproj in Xcode 4.3

  2. go to the project settings, select target "iphonesim"

  3. in "build phases", add the following framework to "Link Binary With Libraries"

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework

  4. in "build settings", remove all original setting in "Other Linker Flag" and set it as follow:

    -Wl,-rpath
    -Wl,$(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks
    -Wl,-rpath
    -Wl,$(DEVELOPER_DIR)/../OtherFrameworks

  5. build the project, it should be ok now.

@oylbin
Copy link

oylbin commented May 3, 2012

hi guys , i find a fork of this repo at https://github.com/Fingertips/ios-sim , it has additional features and support Xcode 4.3

@haemi
Copy link

haemi commented May 3, 2012

both doesn't work for me, unfortunately; ios-sim give a session-timeout (http://stackoverflow.com/questions/10408389/ios-sim-doesnt-start-app-correctly-in-simulator) and iphonesim can't build with the changes:

ld: in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks, can't map file, errno=22 for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@dodikk
Copy link
Author

dodikk commented May 4, 2012

oylbin, do you have a fork/pull request with your idea implementation?

P.S. When I fixed path to the iPhoneSimulatorRemoteClient.framework I was still getting a runtime crash.

@Ryandev
Copy link

Ryandev commented May 5, 2012

Was in the same boat as you guys.

Abit more digging shows
https://jira.appcelerator.org/browse/TISTUD-1196

Retrying with pegli's branch works:
https://github.com/pegli/ios-sim

git clone https://github.com/pegli/ios-sim.git

Good luck :D

@dodikk
Copy link
Author

dodikk commented May 7, 2012

I've finally got it working. https://github.com/EmbeddedSources/iphonesim/
The solution has been based on "moredip/iphonesim" work.

By default it does not wait for tests completion. I've fixed that in "EmbeddedSources/iphonesim" fork, which now has both "iphonesim launch" and "iphonesim launch-async" capabilities.

@dodikk
Copy link
Author

dodikk commented May 7, 2012

Summarizing the discussion above, we have the following working ways to launch an app in the simulator :

  1. "pegli/ios-sim" - checked by @mcCuppaT
  2. "moredip/iphonesim" --> "EmbeddedSources/iphonesim" - checked by @dodikk
  3. UIAutomation approach by @farcaller -- https://github.com/farcaller/ios-tdd/tree/master/Tests/Jasmine
  4. www.zucchiniframework.org

Thanks everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants