|
UIKeyCommand. Finally. So excited about this iOS 7 addition. I use my iPad with a Bluetooth keyboard all the time in coffee shops and it's going to be great to have real keyboard shortcuts in apps.
|
# ? Jun 20, 2013 22:29 |
|
|
# ? May 21, 2024 02:53 |
|
Is there any way to produce an armv6 binary with Xcode 4.6? I've found some old code I want to play with but it depends on a library that I don't have the source for and is only present as an armv6 binary and it won't link under 7.
|
# ? Jun 21, 2013 05:33 |
|
You can change the set of target architectures in the build settings to only include armv6.
|
# ? Jun 21, 2013 09:08 |
|
I thought you couldn't target armv6 anymore?
|
# ? Jun 21, 2013 13:55 |
|
Here's a Stack Overflow answer about it that combines Xcode 4.4 and Xcode 4.5+ to build an executable that includes v6, v7, and v7s: http://stackoverflow.com/questions/12619124/how-to-support-both-armv6-and-armv7s-for-release-build-in-xcode-4-5 There's another answer elsewhere that has you copy the iOS 5.0 SDK from Xcode 4.4 to your Xcode 4.5+ and from there you can build v6 and v7 but not v7s, and you can't build against the 6.0 SDK. http://stackoverflow.com/questions/12463195/xcode-4-5-and-ios-4-2-1-incompatibility/13061562 I have tried neither myself, but that's a good place to start I think.
|
# ? Jun 21, 2013 14:48 |
|
I have a save, load and delete method in my game, and it seems just because I now want to use NSNumbers as keys in a dictionary, it fails to perform the save/load/delete. I'm starting out by fixing my delete method:code:
-If I comment out my seed amounts for loop and the stuff inside it,the correct respawnMap object gets set. -If I replace the [NSNumber numberWithInt:9999] key with a string like @"test", the correct respawnMap object gets set. Otherwise, if I use as it is, none of the other data setObjects fail to get set. The key is supposed to be [seed_keys objectAtIndex:i], an NSNumber object, (which is in the comment) but I tried a regular NSNumber instead of an NSArray object index just in case I was doing anything wrong there, because [seed_keys objectAtIndex:i] makes it fail too.
|
# ? Jun 21, 2013 21:34 |
|
NSNumbers should be fine in a dictionary. By the way, you can do shorthand like @1 instead of [NSNumber numberWithInt:1] - look into literals. Try logging your data dict both when it works and when it doesn't. Compare that the values are as expected.
|
# ? Jun 21, 2013 21:43 |
|
Carthag posted:NSNumbers should be fine in a dictionary. By the way, you can do shorthand like @1 instead of [NSNumber numberWithInt:1] - look into literals. Thanks for the shorthand tip! I like that. I did not use the shorthand in the example but: quote:
It logs "object value is 5", but fails to set the map to amnesia and make all the seed values 5. All because of what's inside this for loop it doesn't seem to do writeToFile.
|
# ? Jun 21, 2013 22:48 |
|
Try this:Objective-C code:
|
# ? Jun 21, 2013 22:59 |
|
Assuming his game is targeting iOS 6+. Otherwise object subscripting isn't available. edit: and aren't all they keys in a dictionary supposed to be the same type of object?
|
# ? Jun 21, 2013 23:56 |
|
Carthag posted:Try this: It works like it did last time, but I like the way you setup the loop. Still not writing to the file when running the loop. Doc Block posted:Assuming his game is targeting iOS 6+. Otherwise object subscripting isn't available. It's set to 6. Oh, the keys have to be all the same type of object?
|
# ? Jun 22, 2013 00:00 |
|
The keys can be whatever, they just gotta conform to the NSCopying protocol. There's plenty of use cases for using heterogenous keys.
|
# ? Jun 22, 2013 00:09 |
|
Try spitting the entire data object out in your log, also your path. Check that you're indeed looking at the same file as you're writing to. Also check the return value of writeToFile:atomically:, it'll return YES or NO depending if the write succeeded. You presumably have something in your dictionary that is not a valid object. quote:This method recursively validates that all the contained objects are property list objects (instances of NSData, NSDate, NSNumber, NSString, NSArray, or NSDictionary) before writing out the file, and returns NO if all the objects are not property list objects, since the resultant file would not be a valid property list. Carthag Tuek fucked around with this message at 00:12 on Jun 22, 2013 |
# ? Jun 22, 2013 00:10 |
|
Yeah, I forgot that if you're serializing out to a property list then the array/dictionary you're serializing can only contain property list objects. Maybe that's his problem. If you want to serialize non-property list objects then you need to use NSKeyedArchiver and make sure all the objects you're serializing conform to the NSCoding protocol. Doc Block fucked around with this message at 04:46 on Jun 22, 2013 |
# ? Jun 22, 2013 00:30 |
|
Doc Block posted:A 2011 MBP should be fine (add as much RAM as you can, assuming the 2011 models didn't have the whole soldered-on RAM thing yet). Thanks for the advice, the MBP is working well and I upgraded the RAM to 16 GB last year. I bought some books on iOS/Objective-C development in 2012 and it looks like they're still not out-of-date, so I have a road map at least. I'll pay attention to the status bar issue when testing, I wouldn't have know of it!
|
# ? Jun 22, 2013 08:30 |
|
E: never mind figured out my problem myself.
Papes fucked around with this message at 02:06 on Jun 23, 2013 |
# ? Jun 23, 2013 01:47 |
|
SpriteKit thoughts: needs support for texture atlas formats besides just PNG. The Adventure demo takes 5-6 seconds to load on my iPhone 5 (over 10 seconds on my iPhone 4). zlib-compressed PVR images take up less disk space, load faster, and if you use the RGBA8888 format you get the same lossless image quality as a PNG. Custom shaders, please. Core Image effects are slow and very limited, especially on iOS. Real tile map support would be nice. "Just do a big grid of sprites" seems like a waste of memory, especially if you've got large levels. Yes, the sprites can all be drawn in one draw call if they're all on the same texture atlas, and SpriteKit won't draw any of the tile sprites that aren't on screen, but a real tile map seems like it'd be more memory efficient. Also seems like a real tile map would be faster to draw simply because figuring out what tiles to draw would simply be a matter of running through a 2D array. I chuckled watching the SpriteKit videos, because the SpriteKit API is very similar to the Cocos2D API, to the point of pretty much just being Cocos2D-lite (which I'm sure was the whole idea). SKSprite, SKAction, SKScene, etc., instead of CCSprite, CCAction, and CCScene. I like that they rolled all the actions into one class so you just do [SKAction moveAction] or whatever instead of having to hunt through Cocos2D's docs to find out that you need to do [CCMoveTo moveAction] or whatever. Definitely going to use it for a simple little game I've got in mind. My biggest SpriteKit wish is that I didn't have to join the Mac developer program to get access OS X 10.9. I'll need to make a simple little level editor, and it'd be way easier to just have the editor also use SpriteKit, but to get SpriteKit on OS X you need OS X 10.9. Like, I understand that generally you need to be a member of whatever developer program to get early access to that program's beta software, but given that I can't even make the tools to make my iOS SpriteKit game, it'd be nice if they made an exception Just This Once. Doc Block fucked around with this message at 23:46 on Jun 23, 2013 |
# ? Jun 23, 2013 22:43 |
|
Doc Block posted:Yeah, I forgot that if you're serializing out to a property list then the array/dictionary you're serializing can only contain property list objects. Maybe that's his problem. I am if NSNumber is a property list object. If I take out: code:
edit: This Stack Overflow mentions "expects the array to contain only objects which can be written into a plist file. " and " Only objects of type NSArray, NSDictionary, NSData, and NSString are permitted, and any array or dictionary values will be recursively examined by the same criteria." Does this mean that an NSNumber object is not accepted? LP0 ON FIRE fucked around with this message at 17:27 on Jun 24, 2013 |
# ? Jun 24, 2013 17:04 |
|
I have an issue with NSLocalizedString returning strings in the wrong language. Even this stupid little test fails:code:
pre:2013-06-24 18:39:04.045 DeliciousDongs[1247:907] language: it 2013-06-24 18:39:04.050 DeliciousDongs[1247:907] language: en 2013-06-24 18:39:04.052 DeliciousDongs[1247:907] language: fr ... etc. 2013-06-24 18:39:04.105 DeliciousDongs[1247:907] localization: English 2013-06-24 18:39:04.107 DeliciousDongs[1247:907] localization: Italian 2013-06-24 18:39:04.108 DeliciousDongs[1247:907] localization: en 2013-06-24 18:39:04.110 DeliciousDongs[1247:907] localization: it 2013-06-24 18:39:04.112 DeliciousDongs[1247:907] preferred localization: it 2013-06-24 18:39:04.115 DeliciousDongs[1247:907] development localization: English 2013-06-24 18:39:04.131 DeliciousDongs[1247:907] test: DeliciousDongs detected a possible security breach. You must call again and check the authentication string with your partner. e: our Localizable.strings files are generated by a (lovely) tool, I suspect the one for Italian may be malformed. Any way to verify? hackbunny fucked around with this message at 17:58 on Jun 24, 2013 |
# ? Jun 24, 2013 17:41 |
|
Nope, the string table is alright, I tried this:code:
|
# ? Jun 24, 2013 18:39 |
|
what's it do in the simulator if you've changed the whole thing over into italian via the settings app? same thing?
|
# ? Jun 24, 2013 18:56 |
|
LP0 ON FIRE posted:I am if NSNumber is a property list object. If I take out: I would trust the Apple documentation over a Stack Overflow post. What about your seed_keys, are you positive they are plist-compatible objects? Dictionary keys need to be too, not just the values.
|
# ? Jun 24, 2013 18:58 |
|
Carthag posted:I would trust the Apple documentation over a Stack Overflow post. What about your seed_keys, are you positive they are plist-compatible objects? Dictionary keys need to be too, not just the values. Both the key and object are NSNumber, which I think are supported according to: http://developer.apple.com/library/.../Reference.html So far I came up with an alternate solution. I had a int-to-string method in class that was used for filenames anyway, so I just used that string value for the key for deleting, saving and loading methods.
|
# ? Jun 24, 2013 20:24 |
|
hackbunny posted:Nope, the string table is alright, I tried this: You have to set the simulator to the target language and relaunch the app. You can also override by setting AppleLanguages in NSUserDefaults, but that won't take effect until the app restarts.
|
# ? Jun 24, 2013 22:52 |
|
Mystery solved: I renamed all English.lproj bundles to en.lproj and Italian.lproj to it.lproj, and now everything works. I wonder if the old way ever worked? Yay for outsourced apps
|
# ? Jun 25, 2013 09:46 |
|
LP0 ON FIRE posted:Both the key and object are NSNumber, which I think are supported according to: Yeah. Some more doc reading, and I found the cause: "And although NSDictionary and CFDictionary objects allow their keys to be objects of any type, if the keys are not string objects, the collections are not property-list objects." http://developer.apple.com/library/...000048i-CH3-SW2
|
# ? Jun 25, 2013 09:58 |
|
Froist posted:
Just another note on this, it seems like iOS 7 beta 2 has broken the ability to deploy from Xcode 4.6 even if you skipped the Xcode update last week. Froist fucked around with this message at 12:34 on Jun 25, 2013 |
# ? Jun 25, 2013 11:13 |
|
quote:
Good thing I didn't update yet
|
# ? Jun 25, 2013 12:27 |
|
Not really a question, but can I just say how awesome it is that all of the fancy OS X features are so easily accessible? I'm following a book and over the course of two chapters and about 100 lines if code (plus autogenerated IDE stuff) I've got an application autosaving AND doing versioning. Maybe it's just the space background, but seeing an application behave like that with so little effort is great. Of course most of my experience is with Java where it's an uphill battle with LookAndFeelManagerHelperSetterFactories to get an application to look only somewhat like the rest of the system. I imagine there are tons of frustrations elsewhere in Cocoa but this part was great.
|
# ? Jun 26, 2013 04:59 |
|
Does anyone have any experience in localizing apps to RTL languages, specifically Arabic? It looks like auto layout can handle swapping the interface direction around, but are there any other hurdles that I need to be aware of?
|
# ? Jun 26, 2013 15:01 |
|
Looks like this could be useful, so I'm posting it here: DB5, a system to let designers specify all kinds of UI stuff, without having to use Interface Builder. So you can do your UI (or parts of it) in code without making your designers do their tweaks in code.
|
# ? Jun 27, 2013 20:27 |
|
Is there a good way to resolve the conflicts in project.pbxproj when merging another branch? Right now I am pretty much checking out the branch and manually adding my files to it which sucks a lot.
|
# ? Jun 27, 2013 20:36 |
|
THC posted:Is there a good way to resolve the conflicts in project.pbxproj when merging another branch? Right now I am pretty much checking out the branch and manually adding my files to it which sucks a lot. I know of two choices: 1. Eyeball it. The pbxproj format isn't very complicated, and it's actually an old-style plist so you can use any plist reading/writing tools to help. The downside here is your fuckup means Xcode stops opening the xcodeproj. 2. Regenerate it. You can store the relevant data in a more merge-friendly format, then simply regenerate the xcodeproj as needed. (Ditto for plist libraries.) The downside here is effectively maintaining build system metadata by hand. And I share your pain, it sucks.
|
# ? Jun 27, 2013 20:39 |
|
According to one of the WWDC vids, Xcode 5 is supposed to fix this, at least for XIBs. Hopefully they'll extend that to Xcode projects.
|
# ? Jun 27, 2013 20:44 |
|
pokeyman posted:I know of two choices:
|
# ? Jun 27, 2013 20:52 |
|
THC posted:Is there a good way to resolve the conflicts in project.pbxproj when merging another branch? Right now I am pretty much checking out the branch and manually adding my files to it which sucks a lot. You guys make it sound like there's no magic wand to make it all better. But actually, there is! ...If you're willing to bind yourself to a canonical order of things in your project file (alphabetical): sort-Xcode-project-file. Then your conflicts are almost exclusively logical and easily resolvable, barring some voodoo black magic on your project. Speaking of black magic and voodoo, I wish I could talk about the stuff I'm using at work. There'll probably be a talk on it at some point. Seriously, there is some real magical (useful magic) poo poo in this codebase and it is amazing. Cocoa touch still has so much room to grow. Doctor w-rw-rw- fucked around with this message at 09:57 on Jun 28, 2013 |
# ? Jun 28, 2013 09:53 |
|
Doc Block posted:According to one of the WWDC vids, Xcode 5 is supposed to fix this, at least for XIBs. Hopefully they'll extend that to Xcode projects. I'll believe that when I see it. 5 still rewrites the XIB file just from the insult of opening it in IB.
|
# ? Jun 28, 2013 14:22 |
|
They said in the video that it'll be a new format that isn't backwards compatible and is supposed to be diff-able. I don't know if it's in the current betas or if they're saving it for the actual Xcode 5 release.
|
# ? Jun 28, 2013 14:58 |
|
Anyone know the proper way to prevent a TabBarController from automatically cropping its child view controllers frame sizes? In iOS 7, you can set the 'extended edges' of the view controller to go beneath the tab bar. But if you run on an iOS 6 device, it still crops the frame. The old way to hack this was to go through the TabBarController's subviews and resize the transition view: Objective-C code:
|
# ? Jun 28, 2013 16:40 |
|
|
# ? May 21, 2024 02:53 |
|
Can't you check what iOS version the app is running on and then behave accordingly? Not the most elegant solution, but still.
|
# ? Jun 28, 2013 17:56 |