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 iOS Simulator 6.0 #2

Open
marten-seemann opened this issue Jan 30, 2013 · 18 comments
Open

does not work with iOS Simulator 6.0 #2

marten-seemann opened this issue Jan 30, 2013 · 18 comments
Labels

Comments

@marten-seemann
Copy link

On Mountain Lion 10.8.2 and iOS Simulator 6.0 the app does not produce correct images. The only output is a video / image with a dimension of 21x21 or 22x22 pixels that are not related to the content shown in the simulator.

@zippy1978
Copy link
Owner

I have not tested the app on Mountain Lion / iOS SDK 6.0 Simulator.
I will do it soon. Thanks for the feedback !

@marten-seemann
Copy link
Author

Have you tested it on Lion? If you did so, I could install Xcode and WhazzerFinger in a VMware.

@zippy1978
Copy link
Owner

Hi,
I have just tested on Mountain Lion with latest XCode and iOS SDK (6.1): everything is working fine.
Could you tell me in which language you use the app (if it is not english or french, it does not work) ?

@marten-seemann
Copy link
Author

My system language is english.

@zippy1978
Copy link
Owner

Very strange... Could you show me:

  • a screenshot of your desktop
  • a screenshot taken with the app

So I can figure out why the wrong screen area is captured...

@marten-seemann
Copy link
Author

Here is a screenshot taken with the app:
screenshot-2013-02-03 20-58-37
Yes, it is really this small grey rectangle.

I recently upgrade my Xcode and now have the Simulator version 6.1, the behaviour of the bug did not change.

@zippy1978
Copy link
Owner

Ok, I have the same setup but without any problem...

The only difference is that my language is French.

This is pretty important because the app finds the simulator window according to its title... Maybe the name of the simulator window is wrong in english... It should be 'iOS Simulator' in order to work. Is that what you have ?

Another thing : you must enable accessibility in system preferences.

@jk
Copy link
Contributor

jk commented Mar 9, 2013

… for me it either does not work on german system.

@zippy1978
Copy link
Owner

Hi,
If you tell me the exact name of the simulator application in german, I can fix it.

@jk
Copy link
Contributor

jk commented Mar 12, 2013

Hi,
I further tested it with the system language changed to english and french and it also didn't work. The simulator is called »iOS-Simulator« when the language is changed to german. But I also think the iOS-Simulator doesn't bring a german localization - and it defaults back to english.

@trailblazr
Copy link

You guys should just exchange the following line 145 in AppDelegate.m:

if([application.localizedName isEqualToString:NSLocalizedString(@"iOS Simulator", @"iOS Simulator application name")])

The string "iOS Simulator" has to be named exactly the way your iOS Simulator window is labeled. Otherwise the app cannot find nothing to record. I just renamed it to have a hypen inbetween so it now looks like "iOS-Simulator", because thats how it is named in my version.

To be absoletely sure no localization issue is in the way, use:
if([application.localizedName isEqualToString:@"iOS-Simulator"])

UPDATE:
Okay to be more precise, you need to exchange the above mentioned string "iOS Simulator" by the name shown in the Menubar. For me that was "iOS-Simulator".
:-)

@jk
Copy link
Contributor

jk commented Mar 13, 2013

Does it have to be the exact string or just the prefix? I made you a screenshot, it has a couple of more information like the device the simulator simulates (here that's the german version):

ios_sim_de-DE

@trailblazr
Copy link

Okay to be more precise:
You need to exchange the above mentioned string "iOS Simulator" by the name shown in the Menubar. For me that was "iOS-Simulator".

@jk
Copy link
Contributor

jk commented Mar 13, 2013

I see, that's "iOS-Simulator" for the german version.

@zippy1978
Copy link
Owner

Hi,

I added the german application name to the code. It should work now !

To do that I added a german localization for the app, but only the application name is translated. If you want to translate the whole application, you only have to edit the german version of Localizable.strings file.

@jk
Copy link
Contributor

jk commented Mar 17, 2013

Hi,

I just tried your latest changes. And it finds the simulator and I was able to record, but the resulted clip was junk, I uploaded it: http://cl.ly/NcG5

I also saw a few things on the console:

2013-03-17 23:56:52.104 WhazzerFinger[45208:303] Bartender Loaded
2013-03-17 23:57:18.846 WhazzerFinger[45208:303] -[WFIEncodeWindowController loadWindow]: failed to load window nib file 'WFIEncodeWindowController'.
2013-03-17 23:57:18.846 WhazzerFinger[45208:303] *** Assertion failure in -[NSApplication _commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:], /SourceCache/AppKit/AppKit-1187.37/AppKit.subproj/NSApplication.m:3920
2013-03-17 23:57:18.847 WhazzerFinger[45208:303] An uncaught exception was raised
2013-03-17 23:57:18.847 WhazzerFinger[45208:303] Modal session requires modal window
2013-03-17 23:57:18.852 WhazzerFinger[45208:303] (
    0   CoreFoundation                      0x00007fff8bf49b06 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff8c1093f0 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8bf49948 +[NSException raise:format:arguments:] + 104
    3   Foundation                          0x00007fff8c89cc82 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
    4   AppKit                              0x00007fff90c77bd6 -[NSApplication _commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:] + 609
    5   AppKit                              0x00007fff90fc9d37 -[NSApplication beginModalSessionForWindow:] + 37
    6   AppKit                              0x00007fff90fc98ea -[NSApplication runModalForWindow:] + 100
    7   WhazzerFinger                       0x0000000100004d39 -[WFIAppDelegate recordingDidStop:] + 921
    8   WhazzerFinger                       0x0000000100007aa4 -[WFIScreenRecorder stop] + 212
    9   WhazzerFinger                       0x0000000100005a66 -[WFIAppDelegate record:] + 1254
    10  AppKit                              0x00007fff90e6f989 -[NSApplication sendAction:to:from:] + 342
    11  AppKit                              0x00007fff90fa537c -[NSMenuItem _corePerformAction] + 406
    12  AppKit                              0x00007fff90fa506a -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 133
    13  AppKit                              0x00007fff90c9228f -[NSMenu _internalPerformActionForItemAtIndex:] + 36
    14  AppKit                              0x00007fff90c92117 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 135
    15  AppKit                              0x00007fff90f9e175 NSSLMMenuEventHandler + 342
    16  HIToolbox                           0x00007fff89820d1a _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1206
    17  HIToolbox                           0x00007fff898201e9 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 410
    18  HIToolbox                           0x00007fff89835fc9 SendEventToEventTarget + 40
    19  HIToolbox                           0x00007fff8986cca9 _ZL18SendHICommandEventjPK9HICommandjjhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 443
    20  HIToolbox                           0x00007fff89811a21 SendMenuCommandWithContextAndModifiers + 59
    21  HIToolbox                           0x00007fff898119d3 SendMenuItemSelectedEvent + 254
    22  HIToolbox                           0x00007fff8981185f _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 94
    23  HIToolbox                           0x00007fff89987e79 _ZL19PopUpMenuSelectCoreP8MenuData5PointdS1_tjPK4RecttjS4_S4_PK10__CFStringPP13OpaqueMenuRefPt + 1673
    24  HIToolbox                           0x00007fff89987794 _HandlePopUpMenuSelection7 + 629
    25  AppKit                              0x00007fff9102154b _NSSLMPopUpCarbonMenu3 + 3916
    26  AppKit                              0x00007fff91382caa _NSPopUpCarbonMenu3 + 39
    27  AppKit                              0x00007fff9102050c -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:] + 346
    28  AppKit                              0x00007fff9124dbbf +[NSStatusBarButtonCell popupStatusBarMenu:inRect:ofView:withEvent:] + 708
    29  AppKit                              0x00007fff9124d644 -[NSStatusBarButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 159
    30  AppKit                              0x00007fff90e6cbcc -[NSControl mouseDown:] + 820
    31  AppKit                              0x00007fff90e6453e -[NSWindow sendEvent:] + 6853
    32  AppKit                              0x00007fff9124e28e -[NSStatusBarWindow sendEvent:] + 67
    33  AppKit                              0x00007fff90e60674 -[NSApplication sendEvent:] + 5761
    34  AppKit                              0x00007fff90d7624a -[NSApplication run] + 636
    35  AppKit                              0x00007fff90d1ac06 NSApplicationMain + 869
    36  WhazzerFinger                       0x0000000100001192 main + 34
    37  WhazzerFinger                       0x0000000100001164 start + 52
)
2013-03-17 23:57:20.506 WhazzerFinger[45208:303] -[WFIEncodeWindowController loadWindow]: failed to load window nib file 'WFIEncodeWindowController'.
2013-03-17 23:58:25.659 WhazzerFinger[45208:303] -[WFIEncodeWindowController loadWindow]: failed to load window nib file 'WFIEncodeWindowController'.
2013-03-17 23:58:25.661 WhazzerFinger[45208:303] *** Assertion failure in -[NSApplication _commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:], /SourceCache/AppKit/AppKit-1187.37/AppKit.subproj/NSApplication.m:3920
2013-03-17 23:58:25.663 WhazzerFinger[45208:303] An uncaught exception was raised
2013-03-17 23:58:25.664 WhazzerFinger[45208:303] Modal session requires modal window
2013-03-17 23:58:25.696 WhazzerFinger[45208:303] (
    0   CoreFoundation                      0x00007fff8bf49b06 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff8c1093f0 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8bf49948 +[NSException raise:format:arguments:] + 104
    3   Foundation                          0x00007fff8c89cc82 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
    4   AppKit                              0x00007fff90c77bd6 -[NSApplication _commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:] + 609
    5   AppKit                              0x00007fff90fc9d37 -[NSApplication beginModalSessionForWindow:] + 37
    6   AppKit                              0x00007fff90fc98ea -[NSApplication runModalForWindow:] + 100
    7   WhazzerFinger                       0x0000000100004d39 -[WFIAppDelegate recordingDidStop:] + 921
    8   WhazzerFinger                       0x0000000100007aa4 -[WFIScreenRecorder stop] + 212
    9   WhazzerFinger                       0x0000000100005a66 -[WFIAppDelegate record:] + 1254
    10  AppKit                              0x00007fff90e6f989 -[NSApplication sendAction:to:from:] + 342
    11  AppKit                              0x00007fff90fa537c -[NSMenuItem _corePerformAction] + 406
    12  AppKit                              0x00007fff90fa506a -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 133
    13  AppKit                              0x00007fff90c9228f -[NSMenu _internalPerformActionForItemAtIndex:] + 36
    14  AppKit                              0x00007fff90c92117 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 135
    15  AppKit                              0x00007fff90f9e175 NSSLMMenuEventHandler + 342
    16  HIToolbox                           0x00007fff89820d1a _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1206
    17  HIToolbox                           0x00007fff898201e9 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 410
    18  HIToolbox                           0x00007fff89835fc9 SendEventToEventTarget + 40
    19  HIToolbox                           0x00007fff8986cca9 _ZL18SendHICommandEventjPK9HICommandjjhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 443
    20  HIToolbox                           0x00007fff89811a21 SendMenuCommandWithContextAndModifiers + 59
    21  HIToolbox                           0x00007fff898119d3 SendMenuItemSelectedEvent + 254
    22  HIToolbox                           0x00007fff8981185f _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 94
    23  HIToolbox                           0x00007fff89987e79 _ZL19PopUpMenuSelectCoreP8MenuData5PointdS1_tjPK4RecttjS4_S4_PK10__CFStringPP13OpaqueMenuRefPt + 1673
    24  HIToolbox                           0x00007fff89987794 _HandlePopUpMenuSelection7 + 629
    25  AppKit                              0x00007fff9102154b _NSSLMPopUpCarbonMenu3 + 3916
    26  AppKit                              0x00007fff91382caa _NSPopUpCarbonMenu3 + 39
    27  AppKit                              0x00007fff9102050c -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:] + 346
    28  AppKit                              0x00007fff9124dbbf +[NSStatusBarButtonCell popupStatusBarMenu:inRect:ofView:withEvent:] + 708
    29  AppKit                              0x00007fff9124d644 -[NSStatusBarButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 159
    30  AppKit                              0x00007fff90e6cbcc -[NSControl mouseDown:] + 820
    31  AppKit                              0x00007fff90e6453e -[NSWindow sendEvent:] + 6853
    32  AppKit                              0x00007fff9124e28e -[NSStatusBarWindow sendEvent:] + 67
    33  AppKit                              0x00007fff90e60674 -[NSApplication sendEvent:] + 5761
    34  AppKit                              0x00007fff90d7624a -[NSApplication run] + 636
    35  AppKit                              0x00007fff90d1ac06 NSApplicationMain + 869
    36  WhazzerFinger                       0x0000000100001192 main + 34
    37  WhazzerFinger                       0x0000000100001164 start + 52
)

after that I noticed, that there was a problem when capturing the iPad version. So I just tested the non-retina iPhone simulator and it worked. By the way: I looked into the Localization.strings file - I think those console logs point out a problem with missing dialog boxes - I didn't see any.

And of course I made you a german localization:

/* About menu item title */
"About" = "Über";

/* Simulator not found message */
"Couldn't find iOS Simulator." = "Der iOS-Simulator wurde nicht gefunden.";

/* Simulator not found alert title */
"Couldn't find Simulator" = "Simulator nicht gefunden;

/* Encoding window title */
"Encoding movie..." = "Film wieder kodiert…";

/* iOS Simulator application name */
"iOS Simulator" = "iOS-Simulator";

/* Quit menu item title */
"Quit" = "Beenden";

/* Record menu item title */
"Record" = "Aufnahme starten";

/* Screenshot menu item title */
"Screenshot" = "Screenshot";

/* Stop recording menu item title */
"Stop recording" = "Aufnahme stoppen";

/* Universal Access alert title */
"Universal Access Disabled" = "Zugriff für Hilfsgeräte deaktiviert";

/* Universal Access disabled message */
"You must enable access for assistive devices in the System Preferences, under Universal Access." = "Sie müssen in den Systemeinstellungen unter Bedienungshilfen den Zugriff für Hilfsgeräte aktiviernen.";

but: after recompiling it with the german localization the app wasn't able to find the simulator anymore, but I didn't do anything to tos "iOS Simulator" key.

@jk
Copy link
Contributor

jk commented Mar 17, 2013

I just found a typo in my localization. It worked after fixing it. I will make you a pull request for that.

@zippy1978
Copy link
Owner

Hi,
I just fixed an issue caused by ly refactoring yesterday.

And you are right : the tool works only with iPhone Retina 3.5 inch... I will probably add other devices one of these days...

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

No branches or pull requests

4 participants