On Feb 19, 2016, at 20:43 , Gerriet M. Denkmann <gerr...@mdenkmann.de> wrote: > > This: > UIDevice *theDevice = [UIDevice currentDevice]; > NSLog(@“%s NSUInteger %lu bytes on %@“,__FUNCTION__, > sizeof(NSUInteger), theDevice.localizedModel); > > prints: > -[AppDelegate application:didFinishLaunchingWithOptions:] NSUInteger 4 > bytes on iPhone (iPone 4s in Simulator) > -[AppDelegate application:didFinishLaunchingWithOptions:] NSUInteger 8 > bytes on iPad (iPad Air in Simulator)
I’m not sure what that proves. Yes, NSUInteger is different sizes for different iOS architectures. What I said was that if you could force NSUInteger to be 8 bytes instead of 4 bytes on iOS (using NS_BUILD_32_LIKE_64), then the app would crash on an architecture where system frameworks knew NSUInteger to be 4 bytes. (On Macs that support 32-bit and 64-bit apps, there are two versions of every framework, so this would only be a problem on iOS.) > With DNS_BUILD_32_LIKE_64 NSUInteger is long on all platforms, so %lu works > in all cases. Can you demonstrate NS_BUILD_32_LIKE_64 making NSUInteger 8 bytes for the iPhone 4s? You also need to be careful about demonstrating architectural claims on a simulator. It’s an iOS simulator, but it’s an OS X platform, which is why you can’t [legally] lipo together simulator and device dylibs into a single framework, to the annoyance of many 3rd-party framework developers. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com