Git Product home page Git Product logo

opensim's Introduction

OpenSim Travis

OpenSim is an open source alternative to SimPholders, written in Swift 4.

You can visit the latest release to grab a compiled version. (Warning: It's not code-signed.)

Install with Homebrew Cask

  1. Install Homebrew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Install Cask: brew install cask
  3. Install OpenSim: brew cask install opensim

TODO

  • Parsing results from xcrun command rather than device_set.plist file (thank @bradvandyk)
  • Watch for changes from simulators directory and reload dynamically
  • Filter out empty simulators
  • Better UI
  • Other functionalities like uninstalling apps or resetting data

opensim's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opensim's Issues

Crashed in Application.calcSize after running a long time

Hi, I found that OpenSim's menubar icon disappeared sometimes after running a long time. Here is one example crash report:

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to set posix_spawn_file_actions for fd -1 at index 0 with errno 9'
abort() called
terminating with uncaught exception of type NSException

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fffb6a8948b __exceptionPreprocess + 171
1   libobjc.A.dylib                     0x00007fffcb388cad objc_exception_throw + 48
2   CoreFoundation                      0x00007fffb6b0796d +[NSException raise:format:] + 205
3   Foundation                          0x00007fffb849ca16 -[NSConcreteTask launchWithDictionary:] + 2518
4   OpenSim                             0x000000010e76f0c7 OpenSim + 135367
5   OpenSim                             0x000000010e76ef89 OpenSim + 135049
6   OpenSim                             0x000000010e74f86f OpenSim + 6255
7   OpenSim                             0x000000010e76a1d6 OpenSim + 115158
8   OpenSim                             0x000000010e766ad9 OpenSim + 101081
9   OpenSim                             0x000000010e7684cb OpenSim + 107723
10  libswiftDispatch.dylib              0x000000010ed7dde4 _TPA__TTRXFdCb___XFo___ + 36
11  libdispatch.dylib                   0x00007fffcbc39f5f _dispatch_call_block_and_release + 12
12  libdispatch.dylib                   0x00007fffcbc31128 _dispatch_client_callout + 8
13  libdispatch.dylib                   0x00007fffcbc3ebb3 _dispatch_main_queue_callback_4CF + 925
14  CoreFoundation                      0x00007fffb6a3ebe9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
15  CoreFoundation                      0x00007fffb6a0000d __CFRunLoopRun + 2205
16  CoreFoundation                      0x00007fffb69ff514 CFRunLoopRunSpecific + 420
17  HIToolbox                           0x00007fffb5f902ac RunCurrentEventLoopInMode + 240
18  HIToolbox                           0x00007fffb5f900e1 ReceiveNextEventCommon + 432
19  HIToolbox                           0x00007fffb5f8ff16 _BlockUntilNextEventMatchingListInModeWithFilter + 71
20  AppKit                              0x00007fffb45926cd _DPSNextEvent + 1093
21  AppKit                              0x00007fffb4d09830 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2730
22  AppKit                              0x00007fffb458706d -[NSApplication run] + 926
23  AppKit                              0x00007fffb4551983 NSApplicationMain + 1237
24  OpenSim                             0x000000010e76ac79 OpenSim + 117881
25  libdyld.dylib                       0x00007fffcbc67255 start + 1
26  ???                                 0x0000000000000002 0x0 + 2

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fffcbd95dda __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fffcbe81787 pthread_kill + 90
2   libsystem_c.dylib             	0x00007fffcbcfb420 abort + 129
3   libc++abi.dylib               	0x00007fffca85a85a abort_message + 266
4   libc++abi.dylib               	0x00007fffca87fc4f default_terminate_handler() + 267
5   libobjc.A.dylib               	0x00007fffcb38af1e _objc_terminate() + 103
6   libc++abi.dylib               	0x00007fffca87cd69 std::__terminate(void (*)()) + 8
7   libc++abi.dylib               	0x00007fffca87cde3 std::terminate() + 51
8   libdispatch.dylib             	0x00007fffcbc3113c _dispatch_client_callout + 28
9   libdispatch.dylib             	0x00007fffcbc3ebb3 _dispatch_main_queue_callback_4CF + 925
10  com.apple.CoreFoundation      	0x00007fffb6a3ebe9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
11  com.apple.CoreFoundation      	0x00007fffb6a0000d __CFRunLoopRun + 2205
12  com.apple.CoreFoundation      	0x00007fffb69ff514 CFRunLoopRunSpecific + 420
13  com.apple.HIToolbox           	0x00007fffb5f902ac RunCurrentEventLoopInMode + 240
14  com.apple.HIToolbox           	0x00007fffb5f900e1 ReceiveNextEventCommon + 432
15  com.apple.HIToolbox           	0x00007fffb5f8ff16 _BlockUntilNextEventMatchingListInModeWithFilter + 71
16  com.apple.AppKit              	0x00007fffb45926cd _DPSNextEvent + 1093
17  com.apple.AppKit              	0x00007fffb4d09830 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2730
18  com.apple.AppKit              	0x00007fffb458706d -[NSApplication run] + 926
19  com.apple.AppKit              	0x00007fffb4551983 NSApplicationMain + 1237
20  com.pop-tap.OpenSim           	0x000000010e76ac79 0x10e74e000 + 117881
21  libdyld.dylib                 	0x00007fffcbc67255 start + 1

In order to locate this issue, I built and run OpenSim from Xcode. It also crashed:

Crashed Thread:        35  Dispatch queue: com.pop-tap.size

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [0]

External Modification Warnings:
Debugger attached to process.

Thread 35 Crashed:: Dispatch queue: com.pop-tap.size
0   libswiftFoundation.dylib      	0x000000010074d195 _TZFV10Foundation14DateComponents36_unconditionallyBridgeFromObjectiveCfGSqCSo16NSDateComponents_S0__merged + 85
1   com.pop-tap.OpenSim           	0x000000010000a00b _TTRXFo_oV10Foundation3URLoPs5Error__dSb_XFdCb_dCSo5NSURLdCSo7NSError_dV10ObjectiveC8ObjCBool_ + 59
2   com.apple.Foundation          	0x00007fffb8450c82 -[NSURLDirectoryEnumerator nextObject] + 101
3   com.pop-tap.OpenSim           	0x00000001000098c1 _TFFC7OpenSim11Application8calcSizeFT5blockFVs6UInt64T__T_U_FT_T_ + 881 (Application.swift:60)
4   com.pop-tap.OpenSim           	0x000000010000a077 _TTRXFo___XFdCb___ + 39
5   libdispatch.dylib             	0x0000000100a0674d _dispatch_call_block_and_release + 12
6   libdispatch.dylib             	0x00000001009fcfcc _dispatch_client_callout + 8
7   libdispatch.dylib             	0x0000000100a13bca _dispatch_continuation_pop + 1025
8   libdispatch.dylib             	0x0000000100a0aeda _dispatch_async_redirect_invoke + 777
9   libdispatch.dylib             	0x00000001009ff247 _dispatch_root_queue_drain + 671
10  libdispatch.dylib             	0x00000001009fef58 _dispatch_worker_thread3 + 114
11  libsystem_pthread.dylib       	0x0000000100a748c2 _pthread_wqthread + 1299
12  libsystem_pthread.dylib       	0x0000000100a7439d start_wqthread + 13

Hope this helps.

BTW, It seems the size calculation consumed too many threads.

XCode 11

It seems to be broken on XCode 11

Licensing terms

Thanks for all your efforts for this project. It's a nice job and a great alternative to SimPholders.

I am planning on creating a similar tool that is command line based, rather than graphical and I was wondering what re-use terms you had in mind for the project. Was your intention for the code to be GPLed or available under an MIT-style license or something else entirely?

Thanks.

ios11 模拟器的问题

首先十分感谢您开发出了开源好用的工具,提高了我的工作效率!
现在我升级前到了xcode9 Version 9.0 beta 6 (9M214v) 移除了之前xcode8,发现xcode9下 OpenSim 不能预览到 ios11 模拟器中的应用,希望您能抽出宝贵的时间修复一下该问题,再次感谢。

Missing menu background when "Reduce transparency" is ON

I can see that in the "draw" method of AppMenuView you're setting the background color to clear, which seems to be the problem. When I replace "clear" with a different color, it works, but I'm struggling to find a NSColor constant for the exact shade of white.

screen shot 2016-12-15 at 19 52 45

screen shot 2016-12-15 at 19 54 24

High CPU and Memory usage

Did anyone try OpenSim with Xcode v8.1
It works ok until I start Xcode. Then it suddenly starts eating memory and cpu until everything crashes. Anybody else?

Latest version binary download crashes when launching with "unexpectedly found nil while unwrapping an Optional value"

steps to repro:

  • system specs:
    image

  • ios simulator NOT open

  • xcode open. Version 8.3.2 (8E2002)

Here's a copy of the error when launching via xcode:

fatal error: unexpectedly found nil while unwrapping an Optional value
2017-05-15 15:38:51.864995-1000 OpenSim[4041:1975961] fatal error: unexpectedly found nil while unwrapping an Optional value
Current stack trace:
0    libswiftCore.dylib                 0x0000000100388130 swift_reportError + 129
1    libswiftCore.dylib                 0x00000001003a4b50 _swift_stdlib_reportFatalError + 60
2    libswiftCore.dylib                 0x0000000100195250 specialized specialized StaticString.withUTF8Buffer<A> ((UnsafeBufferPointer<UInt8>) -> A) -> A + 342
3    libswiftCore.dylib                 0x000000010030fe90 partial apply for (_fatalErrorMessage(StaticString, StaticString, file : StaticString, line : UInt, flags : UInt32) -> Never).(closure #2) + 109
4    libswiftCore.dylib                 0x0000000100195250 specialized specialized StaticString.withUTF8Buffer<A> ((UnsafeBufferPointer<UInt8>) -> A) -> A + 342
5    libswiftCore.dylib                 0x00000001002c29a0 specialized _fatalErrorMessage(StaticString, StaticString, file : StaticString, line : UInt, flags : UInt32) -> Never + 96
6    OpenSim                            0x000000010001f9d0 existingItem(itemUrl : URL) -> LSSharedFileListItem? + 680
7    OpenSim                            0x000000010001b250 MenuManager.buildMenu() -> () + 1994
8    OpenSim                            0x000000010001ac80 MenuManager.init() -> MenuManager + 1145
9    OpenSim                            0x000000010001b160 MenuManager.__allocating_init() -> MenuManager + 33
10   OpenSim                            0x0000000100022cc0 AppDelegate.applicationDidFinishLaunching(Notification) -> () + 40
11   OpenSim                            0x0000000100023180 @objc AppDelegate.applicationDidFinishLaunching(Notification) -> () + 71
12   CoreFoundation                     0x00007fff77c63500 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
13   CoreFoundation                     0x00007fff77c63260 _CFXRegistrationPost + 427
14   CoreFoundation                     0x00007fff77c63140 ___CFXNotificationPost_block_invoke + 50
15   CoreFoundation                     0x00007fff77c1fe80 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1827
16   CoreFoundation                     0x00007fff77c1f380 _CFXNotificationPost + 604
17   Foundation                         0x00007fff79643955 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
18   AppKit                             0x00007fff7588b9f6 -[NSApplication _postDidFinishNotification] + 297
19   AppKit                             0x00007fff7588b7b4 -[NSApplication _sendFinishLaunchingNotification] + 208
20   AppKit                             0x00007fff7574e9c1 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 552
21   AppKit                             0x00007fff7574e5a6 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 661
22   Foundation                         0x00007fff7968ecfb -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 290
23   Foundation                         0x00007fff7968ec31 _NSAppleEventManagerGenericHandler + 102
24   AE                                 0x00007fff78a93d06 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 544
25   AE                                 0x00007fff78a93c76 dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 39
26   AE                                 0x00007fff78a93a71 aeProcessAppleEvent + 312
27   HIToolbox                          0x00007fff771bfda8 AEProcessAppleEvent + 55
28   AppKit                             0x00007fff757499c4 _DPSNextEvent + 1833
29   AppKit                             0x00007fff75ec4d72 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
30   AppKit                             0x00007fff7573e40d -[NSApplication run] + 926
31   AppKit                             0x00007fff75708d09 NSApplicationMain + 1237
32   OpenSim                            0x00000001000235c0 main + 13
33   libdyld.dylib                      0x00007fff8d3b0234 start + 1
(lldb) 

Ver 0.4.1 uses too much CPU

Just install new version of OpenSim (v 0.4.1) and I see that it uses too much CPU. You can a look at the image below.

screen shot 2018-11-18 at 7 33 36 pm

hi, 能不能加个小功能呢?

如果 可能的话 , 能不能加个 最近列表, 就是 最近 在模拟器 打开的 app的列表, 每次都去找一遍 , 感觉不是 很智能

Crashes when running two Xcode instances

2016-07-06 23:46:50.133 simctl[12925:1840495] CoreSimulator is attempting to unload a stale CoreSimulatorService job.  Detected Xcode.app relocation or CoreSimulatorService version change.  Framework path (/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework) and version (209.19) does not match existing job path (/Users/luosheng/Downloads/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService) and version (278).
2016-07-06 23:46:50.396 simctl[12925:1840495] Failed to locate a valid instance of CoreSimulatorService in the bootstrap.  Adding it now.
2016-07-06 23:46:50.410 simctl[12925:1840495] *** Assertion failure in -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreSimulator/CoreSimulator-209.19/CoreSimulator/SimServiceContext.m:536
2016-07-06 23:46:50.414 simctl[12925:1840495] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The loaded com.apple.CoreSimulator.CoreSimulatorService job does not match our expectations: pathOfLoadedJob: /Users/luosheng/Downloads/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService, our frameworkPath: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff92fb44f2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff8a5e7f7e objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff92fb91ca +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff955b7856 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
    4   CoreSimulator                       0x00000001000153e9 -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid] + 1313
    5   CoreSimulator                       0x0000000100015d01 -[SimServiceContext connect] + 41
    6   CoreSimulator                       0x00000001000147a6 -[SimServiceContext initWithDeveloperDir:connectionType:] + 1108
    7   CoreSimulator                       0x0000000100014071 __63+[SimServiceContext sharedServiceContextForDeveloperDir:error:]_block_invoke_2 + 127
    8   libdispatch.dylib                   0x000000010008fcc5 _dispatch_client_callout + 8
    9   libdispatch.dylib                   0x00000001000913db _dispatch_barrier_sync_f_invoke + 375
    10  CoreSimulator                       0x0000000100013ea6 +[SimServiceContext sharedServiceContextForDeveloperDir:error:] + 226
    11  CoreSimulator                       0x00000001000141ee +[SimServiceContext sharedServiceContext] + 51
    12  simctl                              0x0000000100007a71 simctl + 31345
    13  libdyld.dylib                       0x00007fff953885ad start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Error Domain=NSCocoaErrorDomain Code=3840 "No value." UserInfo={NSDebugDescription=No value.}
2016-07-06 23:46:51.848 OpenSim[12918:1840398] Bartender: Loaded BartenderHelperTwoSeven

groupContainer folder

In addition to sandbox folder, I need to find groupContainer folder. That created by 'App Groups' capabilities.

App crashes on startup

Console output

29/06/16 08:48:20,539 OpenSim[74905]: fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=256 "The file “FIREBASE_LAST_TIMESTAMP” couldn’t be opened." UserInfo={NSURL=file:///Users/eaigner/Library/Developer/CoreSimulator/Devices/40420B2D-FF16-4BE0-8024-F7DF2963A47E/data/Containers/Bundle/Application/FIREBASE_LAST_TIMESTAMP, NSFilePath=/Users/eaigner/Library/Developer/CoreSimulator/Devices/40420B2D-FF16-4BE0-8024-F7DF2963A47E/data/Containers/Bundle/Application/FIREBASE_LAST_TIMESTAMP, NSUnderlyingError=0x7fe883433ab0 {Error Domain=NSPOSIXErrorDomain Code=20 "Not a directory"}}: file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-800.0.30/src/swift/stdlib/public/core/ErrorType.swift, line 149

You cant't install OpenSim

Install OpenSim: brew cask install OpenSim

You may modify command to brew cask install opensim

➜ brew cask install OpenSim
Error: Cask 'OpenSim' definition is invalid: Bad header line: 'opensim' does not match file name

➜ brew cask search opensim
==> Exact match
opensim

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.