Classes not found in third party iOS framework - appcelerator-hyperloop

I am using Appcelerator Hyperloop in the hopes of integrating a third party iOS framework called KolorEyes into my Titanium app.
Here is my appc.js file:
module.exports = {
hyperloop: {
ios: {
xcodebuild: {
flags: {
FRAMEWORK_SEARCH_PATHS: '../../src',
LD_RUNPATH_SEARCH_PATHS: '#executable_path'
},
frameworks: [
'KolorEyes'
]
},
thirdparty: {
'KolorEyes': {
source: ['src'],
header: 'src',
resource: 'src'
}
}
}
}
};
I have my KolorEyes.framework folder in my src folder at the root of my project.
What I'm doing looks like it should work:
index.js
var KolorEyes = require('KolorEyes/KolorEyes');
var KolorEyesSessionParams = require('KolorEyes/KolorEyesSessionParams');
var KolorEyesRenderViewParams = require('KolorEyes/KolorEyesRenderViewParams');
console.log('CLASS: ' + KolorEyes);
console.log('CLASS: ' + KolorEyesSessionParams);
console.log('CLASS: ' + KolorEyesRenderViewParams);
And here is the output:
[INFO] : CLASS: [class KolorEyes]
[INFO] : CLASS: [class KolorEyesSessionParams]
[INFO] : CLASS: [class KolorEyesRenderViewParams]
But when I try to do this:
var params = KolorEyesSessionParams.alloc().init();
It tells me it cannot find the class KolorEyesSessionParams:
[ERROR] : Cannot find class with name: KolorEyesSessionParams
[ERROR] : Script Error {
[ERROR] : column = 32;
[ERROR] : description = "Cannot find class with name: KolorEyesSessionParams";
[ERROR] : line = 108;
[ERROR] : message = "Cannot find class with name: KolorEyesSessionParams";
[ERROR] : name = ClassNotFound;
[ERROR] : nativeStack = "1 libobjc.A.dylib 0x23a6ae17 objc_exception_throw + 38\n2 kolor_test 0x0019ce0b kolor_test + 1515019\n3 kolor_test 0x00195d05 kolor_test + 1486085\n4 JavaScriptCore 0x275f77cd <redacted> + 364\n5 JavaScriptCore 0x273c7dfb <redacted> + 314\n6 JavaScriptCore 0x273c6629 <redacted> + 120\n7 JavaScriptCore 0x2768302f <redacted> + 20366\n8 JavaScriptCore 0x27683039 <redacted> + 20376\n9 JavaScriptCore 0x2767de91 <redacted> + 336\n10 JavaScriptCore 0x275d87db <redacted> + 102\n11 JavaScriptCore 0x273caa09 <redacted> + 344\n12 JavaScriptCore 0x273ca8ad _ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 52\n13 JavaScriptCore 0x275887a3 <redacted> + 126\n14 JavaScriptCore 0x276dc183 _ZNK3JSC12PropertySlot14functionGetterEPNS_9ExecStateE + 42\n15 JavaScriptCore 0x273c220b <redacted> + 1406\n16 JavaScriptCore 0x276804ed <redacted> + 9292\n17 JavaScriptCore 0x27683039 <redacted> + 20376\n18 JavaScriptCore 0x27683135 <redacted> + 20628\n19 JavaScriptCore 0x27683039 <redacted> + 20376\n20 JavaScriptCore 0x2767de91 <redacted> + 336\n21 JavaScriptCore 0x275d87db <redacted> + 102\n22 JavaScriptCore 0x273b8d0d <redacted> + 7292\n23 JavaScriptCore 0x274c839b _ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueERN3WTF8NakedPtrINS_9ExceptionEEE + 354\n24 JavaScriptCore 0x275f6ba5 JSEvaluateScript + 268\n25 kolor_test 0x0003c91d kolor_test + 71965\n26 kolor_test 0x00042fa7 kolor_test + 98215\n27 kolor_test 0x00044741 kolor_test + 104257\n28 kolor_test 0x00044b81 kolor_test + 105345\n29 kolor_test 0x0003caf3 kolor_test + 72435\n30 kolor_test 0x0003da83 kolor_test + 76419\n31 kolor_test 0x00045589 kolor_test + 107913\n32 kolor_test 0x00044521 kolor_test + 103713\n33 libdispatch.dylib 0x23e3d823 <redacted> + 10\n34 libdispatch.dylib 0x23e3d80f <redacted> + 22\n35 libdispatch.dylib 0x23e4bba9 <redacted> + 1524\n36 CoreFoundation 0x24291b6d <redacted> + 8\n37 CoreFoundation 0x24290067 <redacted> + 1574\n38 CoreFoundation 0x241df229 CFRunLoopRunSpecific + 520\n39 CoreFoundation 0x241df015 CFRunLoopRunInMode + 108\n40 GraphicsServices 0x257cfac9 GSEventRunModal + 160\n41 UIKit 0x288b3189 UIApplicationMain + 144\n42 kolor_test 0x00030747 kolor_test + 22343\n43 libdyld.dylib 0x23e87873 <redacted> + 2";
[ERROR] : sourceURL = "file:///var/containers/Bundle/Application/1536D545-76AB-48FA-BDF7-C2729A175F82/kolor_test.app/hyperloop/koloreyes/koloreyessessionparams.js";
[ERROR] : }
I have no issue using UIKit stuff, but these third party classes are just not seen. Even though Hyperloop says it's generating classes for them:
[INFO] : [Hyperloop] Generating class GLKit/GLKView
[INFO] : [Hyperloop] Generating class GLKit/GLKViewController
[INFO] : [Hyperloop] Generating class KolorEyes/KolorEyes
[INFO] : [Hyperloop] Generating class KolorEyes/KolorEyesRenderViewParams
[INFO] : [Hyperloop] Generating class KolorEyes/KolorEyesSessionParams
[INFO] : [Hyperloop] Generating class ModelIO/MDLCamera
[INFO] : [Hyperloop] Generating class ModelIO/MDLLight
Any ideas?

I am having this same issue. According to this response, the issue is that a framework is being used on a platform earlier than what the framework was created for.
Can confirm that once I rebuilt the framework (needed to build against iOS 12 instead of iOS 13) with an older version of the SDK that this issue was resolved for me.
This is a general issue where you cannot run version-specific code on
older devices. Will move and rename it, thanks for reporting this!
Jan Vennemann That's what we discussed a few days ago. I have no final
plan for this, yet, but as the error occurs with referencing the iOS
framework (not the actual API) that's only available in a certain
version and higher (in this case: "Speech.framework", iOS 10+), we may
be able to solve this by guarding the frameworks with their iOS
version if their version is higher then the default one (e.g. 8.1 in
our case).
I could even think of a workaround: If we pass link the framework via
the appc.js, we can pass linker-flags as well, so something like I've
done in my ARKit module maybe. Btw, this could eventually be a
module-related issue as well, as we don't need the module.xcconfig
there anymore and frameworks are linked automatically. If we can
ensure to pass them to the correct architecture and version, we should
be fine!
Source:
https://jira.appcelerator.org/browse/TIMOB-25440?focusedCommentId=429553&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-429553

Related

How to Mass Change with Regex

Before
Live! => [ cambax83#gmail.com:xxxxx ] + [Name: Cameron - Following: 225 - Follower: 2 - Bio: GAFY - Location: Australia - URL: Empty - Translator: No - Verified: No (Joined At Wed Oct 12 21:54:04 +0000 2011 [1256 Days])]
Live! => [ kingrozny#hotmail.com:xxxxx ] + [Name: Edgar - Following: 236 - Follower: 9 - Bio: Empty - Location: Empty - URL: Empty - Translator: No - Verified: No (Joined At Sun Jan 15 07:45:52 +0000 2012 [1162 Days])]
Live! => [ voonshin#gmail.com:xxxxx ] + [Name: Voonshin - Following: 381 - Follower: 1 - Bio: Empty - Location: Empty - URL: Empty - Translator: No - Verified: No (Joined At Thu Sep 20 04:14:04 +0000 2012 [913 Days])]
Live! => [ y0ng4n#gmail.com:xxxxx ] + [Name: Surabaya Jaya - Following: 539 - Follower: 0 - Bio: Surabaya Jaya merupakan Distributor Peralatan Safety, Sarung tangan, Terpal, dsb. Distributor kita berpusat di kota Surabaya dan memiliki cabang di Balikpapan. - Location: Balikpapan - URL: Empty - Translator: No - Verified: No (Joined At Fri Aug 01 11:38:33 +0000 2014 [233 Days])]
Live! => [ Honeybee104#hotmail.com:xxxxx ] + [Name: Diane - Following: 84 - Follower: 1 - Bio: Empty - Location: Empty - URL: Empty - Translator: No - Verified: No (Joined At Fri Jul 25 23:03:26 +0000 2014 [239 Days])]
After :
cambax83#gmail.com:xxxxx
kingrozny#hotmail.com:com:xxxxx
voonshin#gmail.com:com:xxxxx
y0ng4n#gmail.com:com:xxxxx
Honeybee104#hotmail.com:com:xxxxx
How to mass Clean with Regex, please with demo on https://regex101.com/ ! :)
see demo here https://regex101.com/r/cN7vT8/1
/(\w+#\w+\.\w{2,4}:xxxxx)/gm
and for replace demo here https://regex101.com/r/cN7vT8/2
var re = /.*\[ (\w+#\w+\.\w{2,4}:xxxxx).*/gm;
var subst = '$1';
var result = str.replace(re, subst);
According the poor spec, i'll do https://regex101.com/r/mI4mJ6/1
\[\s*(.*xxxx) \]
Find : ^[^\[]*\[\s*|\s*\].*$
Replace:Empty string.
Try this.See demo.
https://regex101.com/r/pT4tM5/32
http://regexr.com/3alde

Cocos2D V3.0 crash CCLabelTTF

I am converting my project from using Cocos2D v2.1 to V3.0. It's a UIKit project with Cocos2D added as a sub-project and the director loaded lazily in a couple of viewcontrollers.
I managed to get rid of all the compiler warnings, it runs fine and seems to load the director fine, but then crashes as follows:
-[NSConcreteMutableAttributedString hasAttribute:]: unrecognized selector sent to instance 0xc4f8ff0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteMutableAttributedString hasAttribute:]: unrecognized selector sent to instance 0xc4f8ff0'
*** First throw call stack:
(
0 CoreFoundation 0x0291a1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x026998e5 objc_exception_throw + 44
2 CoreFoundation 0x029b7243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0290a50b ___forwarding___ + 1019
4 CoreFoundation 0x0290a0ee _CF_forwarding_prep_0 + 14
5 0x0019d7d0 -[CCLabelTTF updateTexture] + 544
6 0x0019d546 -[CCLabelTTF visit] + 70
7 0x00181c86 -[CCNode visit] + 566
8 0x00181c86 -[CCNode visit] + 566
9 0x00202b9d -[CCDirectorIOS drawScene] + 381
10 0x00203fdc -[CCDirectorDisplayLink mainLoop:] + 92
The breakpoint stops in the CCLabelTTF function - (BOOL) updateTexture at
#ifdef __CC_PLATFORM_IOS
// Font color
if (![formattedAttributedString hasAttribute:NSForegroundColorAttributeName])
There is only one CCLabelTTF in the code, and I create it like so:
self.scoreLabel = [CCLabelTTF labelWithString:NSLocalizedString(#"Score", #"") fontName:#"Marker Felt" fontSize:20 dimensions:CGSizeMake(100, 50)];
self.scoreLabel.horizontalAlignment = (CCTextAlignment)NSTextAlignmentRight;
scoreLabel.position = ccp(250,70);
[self addChild:scoreLabel z:1];
Any help much appreciated. I've searched Cocos2D forums and here and can't find anything similar to this issue.
Ahh... just solved it. Since Cocos2d is a sub-project, I had to include the -ObjC flag under Other Linker Flags for the target. This wasn't necessary with v2.1, but then that version didn't use the NSAttributedString+CCAdditions category.

App crashes running the .ipa installed on my device but not running it from xcode. IOS project generated with Cmake

I´m working on an iPad app for architects. The core is written in c++ and the UI is written in Objective c. It is a cross-platform app so we are generating the xCode project for all the static libs with CMake. When we run the app from xcode it works but if we do an archive build and generate the .IPA, the app crashes immediately after starts. Someone knows any solution for this?, Which are the differences between a build to run in xcode and to archive?
The crash is produced when a destructor of a string is invoked. For this reason I think that may be the problem is a incompatible link with different version of the c++ std library. I mean, some .a libs are using a std lib version and the others a different one.
I attached the crash.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3a11c1fc __pthread_kill + 8
1 libsystem_pthread.dylib 0x3a183a4e pthread_kill + 54
2 libsystem_c.dylib 0x3a0cd028 abort + 72
3 libsystem_malloc.dylib 0x3a143d2c free + 376
4 libc++.1.dylib 0x3950e5dc std::__1::basic_string<char,std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string() + 16
5 MyApp 0x00398766 ___lldb_unnamed_function13969$$MyApp + 586
6 MyApp 0x0038abd4 ___lldb_unnamed_function13727$$MyApp + 504
7 MyApp 0x0039d158 ___lldb_unnamed_function14078$$MyApp + 8
8 MyApp 0x0039d0d6 ___lldb_unnamed_function14077$$MyApp + 318
9 MyApp 0x002f6494 ___lldb_unnamed_function9919$$MyApp + 112
10 MyApp 0x0012346c -[XMAppDelegate application:didFinishLaunchingWithOptions:] (XMAppDelegate.mm:113)
11 UIKit 0x31cb7aa8 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
12 UIKit 0x31cb74ee -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1386
13 UIKit 0x31cb1b3c -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 716
14 UIKit 0x31c4ca02 -[UIApplication handleEvent:withNewEvent:] + 3138
15 UIKit 0x31c4bcf8 -[UIApplication sendEvent:] + 68
16 UIKit 0x31cb131c _UIApplicationHandleEvent + 660
17 GraphicsServices 0x340fe76a _PurpleEventCallback + 606
18 GraphicsServices 0x340fe352 PurpleEventCallback + 30
19 CoreFoundation 0x2f48d774 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
20 CoreFoundation 0x2f48d70e __CFRunLoopDoSource1 + 342
21 CoreFoundation 0x2f48beda __CFRunLoopRun + 1402
22 CoreFoundation 0x2f3f646c CFRunLoopRunSpecific + 520
23 CoreFoundation 0x2f3f624e CFRunLoopRunInMode + 102
24 UIKit 0x31cb05be -[UIApplication _run] + 758
25 UIKit 0x31cab840 UIApplicationMain + 1132
26 MyApp 0x00142e72 main (main.mm:16)
27 libdyld.dylib 0x3a065ab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x3a109838 kevent64 + 24
1 libdispatch.dylib 0x3a0580d0 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x3a05261e _dispatch_mgr_thread + 34
Thread 2:
0 libsystem_kernel.dylib 0x3a11cc7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x3a180e06 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x3a180cc0 start_wqthread + 4
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x27d2567f
r4: 0x00000006 r5: 0x3bf8b18c r6: 0x00000003 r7: 0x27d256e8
r8: 0x00000003 r9: 0x00000001 r10: 0x0081f000 r11: 0x00000000
ip: 0x00000148 sp: 0x27d256dc lr: 0x3a183a53 pc: 0x3a11c1fc
cpsr: 0x00000010
Binary Images:
0xdc000 - 0x62bfff MyApp armv7 <decdc2825793321eb6b5d80bdd45262c> /var/mobile/Applications/98586072-893F-4999-9CD1-04DC92189EF5/MyApp.app/MyApp
0x2bebc000 - 0x2bedffff dyld armv7s <fd7cb81f388f39cbac4f71338b669c24> /usr/lib/dyld
0x2e352000 - 0x2e453fff AVFoundation armv7s <759b362f09e53f37a2ec82372a95d1de> /System/Library/Frameworks/AVFoundation.framework/AVFoundation
0x2e454000 - 0x2e47cfff libAVFAudio.dylib armv7s <0925efab4dd338e382aa5b10cdbed33f> /System/Library/Frameworks/AVFoundation.framework/libAVFAudio.dylib
0x2e47d000 - 0x2e47dfff Accelerate armv7s <9340338f3cdf347abe4a88c2f59b5b12> /System/Library/Frameworks/Accelerate.framework/Accelerate
0x2e487000 - 0x2e654fff vImage armv7s <479b5c4701833284ab587a1d2fdb5627> /System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/vImage
0x2e655000 - 0x2e737fff libBLAS.dylib armv7s <da4fa367557d3028b02458e2cdf6d84d> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
0x2e738000 - 0x2e9f3fff libLAPACK.dylib armv7s <066ea8372dd23f6d89011f9a4a872d6f> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib
0x2e9f4000 - 0x2ea62fff libvDSP.dylib armv7s <a5dcfe68199839b989c7be120c14ccb4> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x2ea63000 - 0x2ea75fff libvMisc.dylib armv7s <ea636bbda5ee33119a4e731aed02fa31> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvMisc.dylib
0x2ea76000 - 0x2ea76fff vecLib armv7s <663aefa25bc5367baa72ca144ac26d18> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
0x2ea77000 - 0x2ea96fff Accounts armv7s <811f7e5dcd353c57af6d6de859848774> /System/Library/Frameworks/Accounts.framework/Accounts
0x2ea98000 - 0x2eafdfff AddressBook armv7s <cc733c2c249e3161a9af19a44aeb1577> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x2eafe000 - 0x2ec0ffff AddressBookUI armv7s <8f681556d73d3ee5b9bfead2a124927c> /System/Library/Frameworks/AddressBookUI.framework/AddressBookUI
0x2ed66000 - 0x2f082fff AudioToolbox armv7s <f49f28790aa036c08e5573071a7e2870> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
0x2f083000 - 0x2f188fff CFNetwork armv7s <36562cff956f38a09956da9218198ccf> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x2f189000 - 0x2f1e4fff CoreAudio armv7s <34f47ad0c4d530249298888a1217316f> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
0x2f1e5000 - 0x2f1fbfff CoreBluetooth armv7s <0211d5169d0d3838a9cbb9dd5086a312> /System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth
0x2f1fc000 - 0x2f3edfff CoreData armv7s <4ed490c5fd693fefac89d75a47eab553> /System/Library/Frameworks/CoreData.framework/CoreData
0x2f3ee000 - 0x2f531ff0 CoreFoundation armv7s <37c6b3b7abca3774bec8fecf79f07013> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x2f532000 - 0x2f656fff CoreGraphics armv7s <e13cbd4115dc3113b875de88b92744f8> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x2f89f000 - 0x2f977fff CoreImage armv7s <5cb9106c864730e8b36ba1f7f14d9c7f> /System/Library/Frameworks/CoreImage.framework/CoreImage
0x2f978000 - 0x2f9c5fff CoreLocation armv7s <bc1a8b9c9f5d3b9db79e345d4c3a361a> /System/Library/Frameworks/CoreLocation.framework/CoreLocation
0x2f9fd000 - 0x2fa74fff CoreMedia armv7s <7a5f55d144f73dc594127c6469e49587> /System/Library/Frameworks/CoreMedia.framework/CoreMedia
0x2fa75000 - 0x2fb1dfff CoreMotion armv7s <ee2294341f253fefba6317b85a34eef6> /System/Library/Frameworks/CoreMotion.framework/CoreMotion
0x2fb1e000 - 0x2fb76fff CoreTelephony armv7s <8e3ecc13fe8c367fb19a442197fc04f2> /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony
0x2fb77000 - 0x2fc06fff CoreText armv7s <7eaf2f4eaadf382daff13c72e6f1f3b6> /System/Library/Frameworks/CoreText.framework/CoreText
0x2fc07000 - 0x2fc16fff CoreVideo armv7s <cff4151001e439739cf0cc00e83bc254> /System/Library/Frameworks/CoreVideo.framework/CoreVideo
0x2fc17000 - 0x2fcd5fff EventKit armv7s <7bd8adb87a313533958c9c56ff251fe8> /System/Library/Frameworks/EventKit.framework/EventKit
0x2fdd9000 - 0x2ffc3fff Foundation armv7s <19e2d0f6233d3765adecfb5ba59d9b7e> /System/Library/Frameworks/Foundation.framework/Foundation
0x301a1000 - 0x301f7fff IOKit armv7s <2c6e904057f13394b4008615454063b7> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x301f8000 - 0x30408fff ImageIO armv7s <a913973d7cc33c0fb4cfdb479caccb66> /System/Library/Frameworks/ImageIO.framework/ImageIO
0x30409000 - 0x30651fff JavaScriptCore armv7s <54f2231ea9e43666befddcdc18a910eb> /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore
0x30652000 - 0x306f5fff MapKit armv7s <934c186ad02e3012801b8aad1984e5e0> /System/Library/Frameworks/MapKit.framework/MapKit
0x306f6000 - 0x306fafff MediaAccessibility armv7s <6b18e226cdae3e4dbfb3b6b826e26f8f> /System/Library/Frameworks/MediaAccessibility.framework/MediaAccessibility
0x306fb000 - 0x308e0fff MediaPlayer armv7s <00c5c4487727301f93968f4861ed71f7> /System/Library/Frameworks/MediaPlayer.framework/MediaPlayer
0x308e1000 - 0x30b9afff MediaToolbox armv7s <80730d8eae0338d0a992404f584240bf> /System/Library/Frameworks/MediaToolbox.framework/MediaToolbox
0x30b9b000 - 0x30c36fff MessageUI armv7s <59211a0f56ac39a79543d01429ea88e2> /System/Library/Frameworks/MessageUI.framework/MessageUI
0x30c37000 - 0x30c9afff MobileCoreServices armv7s <4e4cc0e2dc763d5f8f9c5ed5cbc704fb> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x316ce000 - 0x316d6fff OpenGLES armv7s <cba26f9f5c9134c98bfc1b2953bf8b66> /System/Library/Frameworks/OpenGLES.framework/OpenGLES
0x316d8000 - 0x316d8fff libCVMSPluginSupport.dylib armv7s <5c255052c907399eb0201ea98dd2855a> /System/Library/Frameworks/OpenGLES.framework/libCVMSPluginSupport.dylib
0x316dc000 - 0x316dffff libCoreVMClient.dylib armv7s <0a471be053a43e1ca78e79defaa47ad1> /System/Library/Frameworks/OpenGLES.framework/libCoreVMClient.dylib
0x316e0000 - 0x316e7fff libGFXShared.dylib armv7s <61521d6895eb360b9587478aa39a149d> /System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib
0x316e8000 - 0x31728fff libGLImage.dylib armv7s <cd3aca6ff56c330ab7032d420e0017ca> /System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib
0x318c1000 - 0x31a06fff QuartzCore armv7s <723bf8706f6f3fe28a714ed9466c54aa> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x31a07000 - 0x31a5dfff QuickLook armv7s <68ed4805c8b536109fcc1683e01bb5a6> /System/Library/Frameworks/QuickLook.framework/QuickLook
0x31a60000 - 0x31aa1fff Security armv7s <91812425bce038bf9c835977a27ebdf6> /System/Library/Frameworks/Security.framework/Security
0x31bea000 - 0x31c39fff SystemConfiguration armv7s <ee18863e6fb3310b8f9dbca4f6ba6483> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x31c3c000 - 0x3235dfff UIKit armv7s <baf6a06bf43d38b6a5cd265571b38343> /System/Library/Frameworks/UIKit.framework/UIKit
0x3235e000 - 0x323acfff VideoToolbox armv7s <d492aa96c2943eac8778e41f740527aa> /System/Library/Frameworks/VideoToolbox.framework/VideoToolbox
0x325ed000 - 0x325f6fff AOSNotification armv7s <e046709c9dcf397baf74853c24016e3d> /System/Library/PrivateFrameworks/AOSNotification.framework/AOSNotification
0x32718000 - 0x3271cfff AggregateDictionary armv7s <d271b13eb5c03c8dacb154bb867e39f7> /System/Library/PrivateFrameworks/AggregateDictionary.framework/AggregateDictionary
0x3291a000 - 0x3292efff AirTraffic armv7s <802751bb2f21301aaa846b7af966a257> /System/Library/PrivateFrameworks/AirTraffic.framework/AirTraffic
0x3292f000 - 0x32c6afff Altitude armv7s <078611587d1f3e61bab83ee96f53e909> /System/Library/PrivateFrameworks/Altitude.framework/Altitude
0x32c9f000 - 0x32cdcfff AppSupport armv7s <f085b254be9c37d8ac8529e677ec6f73> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
0x32cdd000 - 0x32d14fff AppleAccount armv7s <2c7dff573d623d5fad64d1218a6d3d45> /System/Library/PrivateFrameworks/AppleAccount.framework/AppleAccount
0x32db4000 - 0x32dc4fff ApplePushService armv7s <f773ba9a776e3551b2ff49f656afc9ec> /System/Library/PrivateFrameworks/ApplePushService.framework/ApplePushService
0x32dfc000 - 0x32e09fff AssetsLibraryServices armv7s <b1da50d989d83bc58e0a932471d82c1d> /System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices
0x32e46000 - 0x32e49fff BTLEAudioController armv7s <616f9b31be713911a95796404a700035> /System/Library/PrivateFrameworks/BTLEAudioController.framework/BTLEAudioController
0x32e4a000 - 0x32e6dfff BackBoardServices armv7s <851e6a2fca27396a901cadb1dd564305> /System/Library/PrivateFrameworks/BackBoardServices.framework/BackBoardServices
0x32e70000 - 0x32e75fff BluetoothManager armv7s <c3ed062e34c03ec299d5779a97d2df24> /System/Library/PrivateFrameworks/BluetoothManager.framework/BluetoothManager
0x32e76000 - 0x32e9afff Bom armv7s <f94bbc499d1a3c13a96614a0dc2a8e62> /System/Library/PrivateFrameworks/Bom.framework/Bom
0x32f39000 - 0x32f41fff CaptiveNetwork armv7s <d1b431c5e918342b95e6f89cae386684> /System/Library/PrivateFrameworks/CaptiveNetwork.framework/CaptiveNetwork
0x32f42000 - 0x3301cfff Celestial armv7s <e21cabfecf2d32c6a1bb6dc116b23481> /System/Library/PrivateFrameworks/Celestial.framework/Celestial
0x33029000 - 0x3302efff CertUI armv7s <da95bee5fff13f049a1d5ca4c137f6e6> /System/Library/PrivateFrameworks/CertUI.framework/CertUI
0x330f7000 - 0x33117fff ChunkingLibrary armv7s <9c0f1f682d4f38e5904eb1309f522e53> /System/Library/PrivateFrameworks/ChunkingLibrary.framework/ChunkingLibrary
0x33168000 - 0x33173fff CommonUtilities armv7s <38e170cdcb583bc7b0918a9fd2d56189> /System/Library/PrivateFrameworks/CommonUtilities.framework/CommonUtilities
0x33174000 - 0x33178fff CommunicationsFilter armv7s <aa60717294d63ce8b3d6ce3e62350308> /System/Library/PrivateFrameworks/CommunicationsFilter.framework/CommunicationsFilter
0x3320f000 - 0x3323ffff ContentIndex armv7s <5022d05f42f33597847379f7669774b4> /System/Library/PrivateFrameworks/ContentIndex.framework/ContentIndex
0x33240000 - 0x33242fff CoreAUC armv7s <be171f81db453c5680ee38b862362f83> /System/Library/PrivateFrameworks/CoreAUC.framework/CoreAUC
0x3324f000 - 0x332a3fff CoreDAV armv7s <096f501a43b23126bccb0154954e66da> /System/Library/PrivateFrameworks/CoreDAV.framework/CoreDAV
0x3347c000 - 0x33486fff CoreRecents armv7s <42095bc33bc8335a9398ff3cef2d3340> /System/Library/PrivateFrameworks/CoreRecents.framework/CoreRecents
0x334f3000 - 0x334f4fff CoreSurface armv7s <c9312d9c3c473019835a71b356145c9a> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface
0x3359b000 - 0x335f5fff CoreUI armv7s <40d696324564353e981f4f8ba480586f> /System/Library/PrivateFrameworks/CoreUI.framework/CoreUI
0x335f6000 - 0x33643fff CoreUtils armv7s <d07e0341714e369fba980e2e16702831> /System/Library/PrivateFrameworks/CoreUtils.framework/CoreUtils
0x33644000 - 0x33649fff CrashReporterSupport armv7s <bc6c1698be993d0b9be9016cf2a89a8a> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport
0x3364a000 - 0x33680fff DataAccess armv7s <c5260f7d4eac39f88bdcf08e06e8646c> /System/Library/PrivateFrameworks/DataAccess.framework/DataAccess
0x33812000 - 0x33827fff DataAccessExpress armv7s <16e4c6b2b55e3644b4bcc9ef328153a8> /System/Library/PrivateFrameworks/DataAccessExpress.framework/DataAccessExpress
0x33862000 - 0x33865fff DataMigration armv7s <167a3e3059a4355ab50f4b6f6cfa06a3> /System/Library/PrivateFrameworks/DataMigration.framework/DataMigration
0x3386a000 - 0x3386bfff DiagnosticLogCollection armv7s <bd1b516e30aa337b92cb086936b93d6a> /System/Library/PrivateFrameworks/DiagnosticLogCollection.framework/DiagnosticLogCollection
0x3386c000 - 0x33886fff DictionaryServices armv7s <f74a317e4672339babc6103959df3472> /System/Library/PrivateFrameworks/DictionaryServices.framework/DictionaryServices
0x338a2000 - 0x338bffff EAP8021X armv7s <460bfb71241d33ea9d9e191ec0cb69c7> /System/Library/PrivateFrameworks/EAP8021X.framework/EAP8021X
0x338c8000 - 0x338d3fff ExFAT armv7s <0f2de9eb7f6139de8a51ba3eccbec8d2> /System/Library/PrivateFrameworks/ExFAT.framework/ExFAT
0x338e5000 - 0x338e7fff FTClientServices armv7s <dc622c6e65533d199f7b20494596c202> /System/Library/PrivateFrameworks/FTClientServices.framework/FTClientServices
0x338e8000 - 0x33911fff FTServices armv7s <e1835ecd46eb3fc8945374ba7d5997aa> /System/Library/PrivateFrameworks/FTServices.framework/FTServices
0x33912000 - 0x33d2dfff FaceCore armv7s <e767863dac8a3d798877de0a07624ba9> /System/Library/PrivateFrameworks/FaceCore.framework/FaceCore
0x33f50000 - 0x33f5cfff GenerationalStorage armv7s <02b0c943f582373cbca3c0881d9b172c> /System/Library/PrivateFrameworks/GenerationalStorage.framework/GenerationalStorage
0x33f5d000 - 0x340f5fff GeoServices armv7s <84b62d5c98ac3914bf90cb356d0fe875> /System/Library/PrivateFrameworks/GeoServices.framework/GeoServices
0x340f6000 - 0x34104fff GraphicsServices armv7s <963e9b456da7301cb752303a69f27d10> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x34193000 - 0x34219fff HomeSharing armv7s <deb893f5c4d93457aae2a2da054dbd35> /System/Library/PrivateFrameworks/HomeSharing.framework/HomeSharing
0x3421a000 - 0x34226fff IAP armv7s <45b9fd8abac334e7adc617a75acbedb3> /System/Library/PrivateFrameworks/IAP.framework/IAP
0x3428c000 - 0x342c0fff IDS armv7s <b0e8f70f8cc135d3a964e505323c8481> /System/Library/PrivateFrameworks/IDS.framework/IDS
0x3432d000 - 0x3433efff IDSFoundation armv7s <4802c0e94fa2345195b318824bf0fbae> /System/Library/PrivateFrameworks/IDSFoundation.framework/IDSFoundation
0x343a4000 - 0x34430fff IMCore armv7s <dafc2e13a75630178d29cbef36104aa3> /System/Library/PrivateFrameworks/IMCore.framework/IMCore
0x344b0000 - 0x3450afff IMFoundation armv7s <2e56e96350c733ed8fc9eb2dc065d718> /System/Library/PrivateFrameworks/IMFoundation.framework/IMFoundation
0x34514000 - 0x3451bfff IOMobileFramebuffer armv7s <c66dabcbbc533cfd9b28f2544b71b8cd> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer
0x3451c000 - 0x34521fff IOSurface armv7s <c734ca27e347327ba351c6c6deab91f7> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface
0x34593000 - 0x3459ffff Librarian armv7s <83cb00b6af823b69b66fef04a2b921bb> /System/Library/PrivateFrameworks/Librarian.framework/Librarian
0x345a0000 - 0x345d9fff MIME armv7s <95be12e7eeb63d12a06c3726fa32bc60> /System/Library/PrivateFrameworks/MIME.framework/MIME
0x34620000 - 0x3462bfff MailServices armv7s <e89b7abc027c3994b956836330d4e709> /System/Library/PrivateFrameworks/MailServices.framework/MailServices
0x3465f000 - 0x346d8fff ManagedConfiguration armv7s <bfa7a99d236d3196b7adc1d9fda6c48e> /System/Library/PrivateFrameworks/ManagedConfiguration.framework/ManagedConfiguration
0x346d9000 - 0x346dafff Marco armv7s <b76d261fa68b3008bf161559012e8a9a> /System/Library/PrivateFrameworks/Marco.framework/Marco
0x346db000 - 0x34753fff MediaControlSender armv7s <ff3941956263313fbba34757305dbcb0> /System/Library/PrivateFrameworks/MediaControlSender.framework/MediaControlSender
0x3478b000 - 0x34795fff MediaRemote armv7s <5f6dc798e39b32c1ab4cf554668ce7ea> /System/Library/PrivateFrameworks/MediaRemote.framework/MediaRemote
0x34813000 - 0x348e5fff Message armv7s <27616c0cfe2c37abb470339564f221f8> /System/Library/PrivateFrameworks/Message.framework/Message
0x348ea000 - 0x348ecfff MessageSupport armv7s <d23da1866a543eec82065617c4bccad2> /System/Library/PrivateFrameworks/MessageSupport.framework/MessageSupport
0x348f8000 - 0x34903fff MobileAsset armv7s <5129443f89f937238576308808e62124> /System/Library/PrivateFrameworks/MobileAsset.framework/MobileAsset
0x34927000 - 0x3492ffff MobileBluetooth armv7s <4d8e6011aca13a058fe6a7988ab3e1d4> /System/Library/PrivateFrameworks/MobileBluetooth.framework/MobileBluetooth
0x3494a000 - 0x3494dfff MobileInstallation armv7s <a81c3c35bce5399d9f1308ff85aeaa73> /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation
0x3494e000 - 0x34956fff MobileKeyBag armv7s <6a7ed5c70f603339bb2b7fe8d3446d0c> /System/Library/PrivateFrameworks/MobileKeyBag.framework/MobileKeyBag
0x3497e000 - 0x34981fff MobileSystemServices armv7s <708039aee4ec32899e4bbf817407798f> /System/Library/PrivateFrameworks/MobileSystemServices.framework/MobileSystemServices
0x349a0000 - 0x349abfff MobileWiFi armv7s <59c298c093e63ac8ade746aa2ad0fe44> /System/Library/PrivateFrameworks/MobileWiFi.framework/MobileWiFi
0x349e2000 - 0x34b65fff MusicLibrary armv7s <d32405f16040365e9fa95fc9c38d9014> /System/Library/PrivateFrameworks/MusicLibrary.framework/MusicLibrary
0x34c1a000 - 0x34c1ffff Netrb armv7s <d5383e33b9c33ce39ed248c251c65848> /System/Library/PrivateFrameworks/Netrb.framework/Netrb
0x34c20000 - 0x34c25fff NetworkStatistics armv7s <28a54cc525333d80a2d0e882a8e63243> /System/Library/PrivateFrameworks/NetworkStatistics.framework/NetworkStatistics
0x34c26000 - 0x34c43fff Notes armv7s <edd5bd4898d23bb7bb64c93c41a36ec4> /System/Library/PrivateFrameworks/Notes.framework/Notes
0x34c44000 - 0x34c46fff OAuth armv7s <4726833fd7d9357a8bbdd3487dcfa9c9> /System/Library/PrivateFrameworks/OAuth.framework/OAuth
0x3539e000 - 0x353d9fff OpenCL armv7s <d7ea5f75fc103fe28436f1180ffa98a6> /System/Library/PrivateFrameworks/OpenCL.framework/OpenCL
0x3597f000 - 0x359a5fff PersistentConnection armv7s <1137f9d6610337be8d208465d7caea23> /System/Library/PrivateFrameworks/PersistentConnection.framework/PersistentConnection
0x35dc0000 - 0x35dedfff PhysicsKit armv7s <8fa2fcdc554d387fa59ea688840048d0> /System/Library/PrivateFrameworks/PhysicsKit.framework/PhysicsKit
0x35dee000 - 0x35df1fff PowerLog armv7s <fd8a01d8756038d786cecf1bb73d8881> /System/Library/PrivateFrameworks/PowerLog.framework/PowerLog
0x35edc000 - 0x35f13fff PrintKit armv7s <6bc12fe7b63739e79d7dba91a4f2560c> /System/Library/PrivateFrameworks/PrintKit.framework/PrintKit
0x35f17000 - 0x35f9efff ProofReader armv7s <fb8e397448fe3cf7b6559afd96572cb2> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader
0x35f9f000 - 0x35fa9fff ProtocolBuffer armv7s <5b4e6b3fda35338582564205c2124948> /System/Library/PrivateFrameworks/ProtocolBuffer.framework/ProtocolBuffer
0x35fdb000 - 0x3604ffff Quagga armv7s <f8c175157b1f3e598ea6036cb4e0fd97> /System/Library/PrivateFrameworks/Quagga.framework/Quagga
0x36050000 - 0x360f0fff Radio armv7s <38a2966e2ae4324681fbbfc0b8ee7af4> /System/Library/PrivateFrameworks/Radio.framework/Radio
0x3617a000 - 0x361fafff SAObjects armv7s <4e06485d6c523afba3f2ffdb43ccff75> /System/Library/PrivateFrameworks/SAObjects.framework/SAObjects
0x36324000 - 0x36338fff SpringBoardServices armv7s <07b50ddb252a3670ae27c994e345d32d> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices
0x3654f000 - 0x36667fff StoreServices armv7s <64f930de40553f1b941468839bb35795> /System/Library/PrivateFrameworks/StoreServices.framework/StoreServices
0x36668000 - 0x36677fff StreamingZip armv7s <51f10d7de8d33ac5af35f1dfdbe3be42> /System/Library/PrivateFrameworks/StreamingZip.framework/StreamingZip
0x36716000 - 0x36718fff TCC armv7s <b14719f4f9213db6bf035e9dd349691c> /System/Library/PrivateFrameworks/TCC.framework/TCC
0x36762000 - 0x36783fff TelephonyUtilities armv7s <452c156104483fc3aea85ebaf9f5c734> /System/Library/PrivateFrameworks/TelephonyUtilities.framework/TelephonyUtilities
0x36d85000 - 0x36da9fff TextInput armv7s <abdd894319ef3742b7d8c75764e2279c> /System/Library/PrivateFrameworks/TextInput.framework/TextInput
0x37004000 - 0x370c4fff UIFoundation armv7s <b4d1d18af2023e42b8bc5bf94e134dd1> /System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation
0x370c5000 - 0x370dbfff Ubiquity armv7s <b898e996d6d637b38398e5345c0bb7d4> /System/Library/PrivateFrameworks/Ubiquity.framework/Ubiquity
0x370dc000 - 0x370dffff UserFS armv7s <8cadaf260e5c331a98f0cbc94efbc6a6> /System/Library/PrivateFrameworks/UserFS.framework/UserFS
0x370f5000 - 0x37344fff VectorKit armv7s <16fa240357ab3113a02f6971195cce29> /System/Library/PrivateFrameworks/VectorKit.framework/VectorKit
0x37524000 - 0x37549fff WebBookmarks armv7s <4d200a2b0c84314f91326a90d439470c> /System/Library/PrivateFrameworks/WebBookmarks.framework/WebBookmarks
0x3755f000 - 0x3800dfff WebCore armv7s <7df88f9af79231758f97431994ad6be8> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
0x3800e000 - 0x380cefff WebKit armv7s <2d9a513d87bd3c2d8de0098df694485c> /System/Library/PrivateFrameworks/WebKit.framework/WebKit
0x38215000 - 0x3821dfff XPCObjects armv7s <e7759ab9bb643390af3c2ac7ad96619d> /System/Library/PrivateFrameworks/XPCObjects.framework/XPCObjects
0x383c1000 - 0x383e4fff iCalendar armv7s <25c772fc08cd33528e38dc8f845d53c4> /System/Library/PrivateFrameworks/iCalendar.framework/iCalendar
0x385c0000 - 0x38601fff iTunesStore armv7s <889c8d35142a3839b8f9f6fff0c28c42> /System/Library/PrivateFrameworks/iTunesStore.framework/iTunesStore
0x39168000 - 0x3916ffff libAccessibility.dylib armv7s <652deeº07b3fe371fb8230aee2c9537b4> /usr/lib/libAccessibility.dylib

C++/MFC fail to login websit using HTTPS

i use fiddler capture the POST message ,the different between normal login(firefox)
and mine is only the content-length:
(fireFox)Content-Length: 164
(mine) Content-Length: 165
i dont think it's the problem.
Then,i find that HTTPS connection to(Tunnel to Packet) server is more different.
i just show the difference.
Here is the message:
1. fireFox:
- Headers: ;
* CONNECT account.xiaomi.com:443 HTTP/1.1;
* Host: account.xiaomi.com ;
- CONTENT:
* Version: 3.2 (TLS/1.1)
* Ciphers: have more than 30 items;
2. mine):
- Headers:;
* CONNECT account.xiaomi.com:443 HTTP/1.0;
* Host: account.xiaomi.com:443;
- CONTENT:
* Version: 3.1 (TLS/1.0)
* Ciphers: have 12 items
i use CHttpFile to post

Checking IBOutlet connection with OCMock

I want to verify with unit tests that all the IBoutlets in my controller class are correctly hooked up in the NIB file. I'd like to do this with OCMock - even though I know I could simply assert the controllers variables are not nil after loading the NIB. This is more a matter of general understanding of how the process works - as far as I understand it, this should be working, too.
The NIB OnOffSwitchCell has as its File's Owner OnOffSwitchCellController.
This is my test method:
- (void) testIBOutletCellIsWiredToXib {
id mockController = [OCMockObject mockForClass:[OnOffSwitchCellController class]];
[[mockController expect] awakeAfterUsingCoder:OCMOCK_ANY];
[[mockController expect] setValue:OCMOCK_ANY forKey:#"cell"];
[[mockController expect] setValue:OCMOCK_ANY forKey:#"thelabel"];
[[mockController expect] setValue:OCMOCK_ANY forKey:#"theswitch"];
NSArray* nibContents = [guiBundle loadNibNamed:#"OnOffSwitchCell"
owner:mockController
options:nil];
assertThat(nibContents, isNot(nil));
assertThatInt([nibContents count], is(equalToInt(1)));
assertThat([nibContents objectAtIndex:0], is(instanceOf([OnOffSwitchCell class])));
[mockController verify];
}
guiBundle exists and is verified to be a valid NSBundle object.
From what I understand loadNibNamed:owner:options: will deserialize the objects in the NIB, call awakeAfterUsingCoder: and then set the outlets by calling setValue:forKey: for each one.
I put in three more asserts to make sure the loaded NIB actually contains the correct objects - these pass OK when I put in an instance of the real controller. But when I use the mock as shown above, it does not even get this far. Instead, the test crashes with this:
Test Case '-[OnOffSwitchCellControllerTestCase testIBOutletCellIsWiredToXib]' started.
2011-01-14 10:48:35.364 GTMTest[67797:903] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'OCMockObject[OnOffSwitchCellController]:
unexpected method invoked: awakeAfterUsingCoder:<UINibDecoder: 0x500e800>
expected: setValue:<OCMAnyConstraint: 0x4c718e0> forKey:#"cell"
expected: setValue:<OCMAnyConstraint: 0x4c71ce0> forKey:#"thelabel"
expected: setValue:<OCMAnyConstraint: 0x4c71ed0> forKey:#"theswitch"'
*** Call stack at first throw:
(
0 CoreFoundation 0x00e3dbe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f925c2 objc_exception_throw + 47
2 CoreFoundation 0x00e3db21 -[NSException raise] + 17
3 GTMTest 0x0001a049 -[OCMockObject handleUnRecordedInvocation:] + 322
4 GTMTest 0x00019aca -[OCMockObject forwardInvocation:] + 77
5 CoreFoundation 0x00daf404 ___forwarding___ + 1124
6 CoreFoundation 0x00daef22 _CF_forwarding_prep_0 + 50
7 UIKit 0x0062394a UINibDecoderDecodeObjectForValue + 2438
8 UIKit 0x00624693 -[UINibDecoder decodeObjectForKey:] + 398
9 UIKit 0x0053cf43 -[UIRuntimeConnection initWithCoder:] + 212
10 UIKit 0x0053d4b1 -[UIRuntimeEventConnection initWithCoder:] + 64
11 UIKit 0x006239e4 UINibDecoderDecodeObjectForValue + 2592
12 UIKit 0x006232dc UINibDecoderDecodeObjectForValue + 792
13 UIKit 0x00624693 -[UINibDecoder decodeObjectForKey:] + 398
14 UIKit 0x0053c200 -[UINib instantiateWithOwner:options:] + 804
15 UIKit 0x0053e081 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
16 GTMTest 0x000140dc -[OnOffSwitchCellControllerTestCase testIBOutletCellIsWiredToXib] + 503
17 GTMTest 0x000041f3 -[SenTestCase invokeTest] + 163
18 GTMTest 0x0000479a -[GTMTestCase invokeTest] + 146
19 GTMTest 0x00003e90 -[SenTestCase performTest] + 37
20 GTMTest 0x00002f3d -[GTMIPhoneUnitTestDelegate runTests] + 1413
21 GTMTest 0x000028fb -[GTMIPhoneUnitTestDelegate applicationDidFinishLaunching:] + 197
22 UIKit 0x00347253 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1252
23 UIKit 0x0034955e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
24 UIKit 0x00348ef0 -[UIApplication _run] + 452
25 UIKit 0x0035542e UIApplicationMain + 1160
26 GTMTest 0x00003500 main + 104
27 GTMTest 0x0000273d start + 53
28 ??? 0x00000002 0x0 + 2
)
terminate called after throwing an instance of 'NSException'
So it is complaining the call to awakeAfterUsingCoder: as being unexpected, even though I clearly expected it.
I also tried removing that expectation and replacing the mock with a nice mock that will not report superfluous method calls, but then it still aborts and reports the setValue:forKey: not being called.
What am I missing here?
Have you tried running this on the main system thread? You cannot instance UIKit classes off the main thread. Not sure how GTM does it, but with GHUnit you can put the following into your test case class:
- (BOOL)shouldRunOnMainThread {
/* Tell GHUnit to run on a separate thread */
return YES;
}
you cant actually do any visual stuff in unit tests. The views are never actually loaded. Also, you dont need to test that awakeAfterUsingCoder is invoked. Thats Apple's stuff. Typically your unit tests must only test your logic. You can safely assume that awakeAfterUsingCoder is invoked from init, because it's Apple's code. You just need to make sure your methods are invoked