|
Monkeyseesaw posted:I've just started getting into iOS development over the last couple months and Autolayout is by far the biggest wtf I've come across. I *still* don't understand it and trying to get a view to scale how I want comes down to deleting random constraints until both IB is happy and I get the behavior I want. Honestly, it's getting to the point where (assuming your view isn't very complex) it's probably better just to do it in code. I wrote 5 lines of code to replace what I'd been trying unsuccessfully to do in IB with AutoLayout for a loving hour. Not to mention the fact that it'll put constraints in automatically, so occasionally your views will hop around if you need to do something unthinkably rare like, oh, hide a view at runtime or something. I remember getting pissed off at Android's layout tools, but they are a loving dream compared to what Apple's done. To be fair, dealing with iOS 7 and IB is less of a complete pain in the rear end if you're working with storyboards, but there's now so many important things in the controller itself that working with XIBs is drat near impossible. PT6A fucked around with this message at 01:02 on Sep 18, 2013 |
# ? Sep 18, 2013 00:54 |
|
|
# ? Jun 8, 2024 08:25 |
|
Does anyone have any experience with iCloud? I'm trying to handle losing/gaining connection to iCloud in my app, which, according to the documentation, should be able to be done by registering for NSUbiquityIdentityDidChangeNotification and checking the ubiquityIdentityToken. But whenever I turn on/off Documents and Data storage for my app in the system preferences, the notification never fires, and the values of ubiquityIdentityToken and the ubiquity container URL never change. So basically I have no way of testing changes in iCloud connectivity. Any thoughts? This is on OS X, by the way.
|
# ? Sep 18, 2013 03:36 |
|
Try disconnecting your network connection or using an app like Little Snitch.
|
# ? Sep 18, 2013 04:40 |
|
Turning off wifi weirdly seems to have no effect aside from the fact that changes to iCloud documents won't be synced until it gets turned back on. I can still get an identity token, and I still have access to the ubiquity container. It would be nice if there was a "toggle iCloud connection" option in the debug menu of Xcode.
|
# ? Sep 18, 2013 05:24 |
|
Monkeyseesaw posted:I've just started getting into iOS development over the last couple months and Autolayout is by far the biggest wtf I've come across. I *still* don't understand it and trying to get a view to scale how I want comes down to deleting random constraints until both IB is happy and I get the behavior I want. PT6A posted:Honestly, it's getting to the point where (assuming your view isn't very complex) it's probably better just to do it in code. I wrote 5 lines of code to replace what I'd been trying unsuccessfully to do in IB with AutoLayout for a loving hour. Not to mention the fact that it'll put constraints in automatically, so occasionally your views will hop around if you need to do something unthinkably rare like, oh, hide a view at runtime or something. Also note that storyboards impose a time-to-interaction tax on app startup (that is, they delay startup, slightly) . Loading a nib is fine, but loading tons of them will have a noticeable impact on startup times. Gordon Cole posted:Does anyone have any experience with iCloud? I'm trying to handle losing/gaining connection to iCloud in my app, which, according to the documentation, should be able to be done by registering for NSUbiquityIdentityDidChangeNotification and checking the ubiquityIdentityToken. But whenever I turn on/off Documents and Data storage for my app in the system preferences, the notification never fires, and the values of ubiquityIdentityToken and the ubiquity container URL never change. So basically I have no way of testing changes in iCloud connectivity. An alternative to turning your network off is using Network Link Conditioner at a very high (or 100%) packet loss. But then that also means you don't have a useful test for connectivity, either. Doctor w-rw-rw- fucked around with this message at 18:03 on Sep 18, 2013 |
# ? Sep 18, 2013 17:51 |
|
PT6A posted:Honestly, it's getting to the point where (assuming your view isn't very complex) it's probably better just to do it in code. I wrote 5 lines of code to replace what I'd been trying unsuccessfully to do in IB with AutoLayout for a loving hour. I only started with Auto Layout a couple weeks ago and have used it only from code, and it's been a good experience. Between the visual format language and a couple handy snippets, it's pretty easy. That said, Auto Layout is entirely opt-in. If it doesn't get the job done for you, or if you already have a working solution, go back to springs and struts or -layoutSubviews. There's no shame in it.
|
# ? Sep 18, 2013 18:31 |
|
When I'm using UIKit's state preservation and restoration, how do I deal with my view controllers' delegates? For example, given Objective-C code:
Objective-C code:
Should I be storing the delegate in -[ComposeViewController encodeRestorableStateWithCoder:]? It feels wrong to store the value of a weak property. Plus there's no guarantee it's state preservable/restorable anyway. Should I store the presented view controller as part of my table view's state preservation? Then I need to do that everywhere I present the view controller. And I'm working around UIKit's built-in preservation of presented view controllers. Or is this a stupid use of a delegate and I'm just doing it wrong? What have others done to solve this? I'm leaning towards storing the presented view controller and re-presenting it on state restore. But then why does UIKit bother preserving presented view controllers automatically? edit: change example to something less trivial than simple dismissal. pokeyman fucked around with this message at 18:50 on Sep 18, 2013 |
# ? Sep 18, 2013 18:44 |
|
Fun fact time! nil not the same thing as '((void *)0)' in C++11, where it is defined instead as nullptr. Where does this matter? Returning nil from Objective-C blocks with implicit return types returns 'void *', not 'id'.
|
# ? Sep 18, 2013 19:02 |
|
Doctor w-rw-rw- posted:Fun fact time! I don't C++ enough to understand why that does matter, can you explain?
|
# ? Sep 18, 2013 20:13 |
|
pokeyman posted:I don't C++ enough to understand why that does matter, can you explain? So because returning nil in C++ is defined differently, the signature of the block can be different as a result of an implicit return type when using Objective-C++.
|
# ? Sep 18, 2013 20:58 |
|
This is kind of a long shot, but do any of you guys have any experience with AVVideoCompositionCoreAnimationTool? I'm using in my app and it was working great in iOS 6, but as soon as I updated to 7 it just stopped working for no apparent reason. I still get an output video just like I did before but it's missing all of the animations that are supposed to be on top of it. From what I can tell it isn't used much so there isn't a ton of information about it, but I thought maybe someone here would know something.
|
# ? Sep 18, 2013 21:17 |
|
Doctor w-rw-rw- posted:C's casting is notably weaker than C++'s, which puts more effort into type safety. nullptr is a keyword rather than a value of 0 or a defined constant such as NULL, so a block in C++ code would more correctly return 'nullptr' when the value being represented is null, as opposed to 0 or whatever the NULL macro resolves to (obviously, usually 0). So the block gets the signature Objective-C code:
|
# ? Sep 18, 2013 21:55 |
|
quote:Previous versions of your apps are now available for re‑download by users who have already purchased them, allowing customers to use your apps with older devices which may no longer be supported by the current version of your app. If you do not wish to make these versions available, you can manage the availability of your apps' previous versions in the Rights and Pricing section of the Manage Your Apps module in iTunes Connect. Thank you Jesus. This whole legacy apps thing was kinda terrifying if there's a server involved.
|
# ? Sep 19, 2013 14:26 |
|
ultramiraculous posted:Thank you Jesus. Not really, you should always have had versioning info and drop connection on anything too old since you never know when someone may restore form a backup from the first day your app was out.
|
# ? Sep 19, 2013 14:42 |
|
Hughlander posted:Not really, you should always have had versioning info and drop connection on anything too old since you never know when someone may restore form a backup from the first day your app was out. Yeah, unless you use anything third party. Since Urban Airship dropped their IAP platform, the old versions of Storm Sim can't restore or make new purchases. I may end up just leaving it out there and dealing with the inevitable support requests. Of course it's a valuable lesson and even if I wanted to use Urban Airship's push platform there is no way I'd rely on a third party again.
|
# ? Sep 19, 2013 15:16 |
|
Hughlander posted:Not really, you should always have had versioning info and drop connection on anything too old since you never know when someone may restore form a backup from the first day your app was out. Yeah, it's never been possible to atomically throw a switch somewhere and guarantee that all client connections after that point are from the new version. But it was easier to have a flat "this is unsupported and you need to update" policy if Apple doesn't offer to help people get into that state. There are already vocal users who refuse to install system updates because e.g. it will undo their jailbreak.
|
# ? Sep 19, 2013 15:17 |
|
Hughlander posted:Not really, you should always have had versioning info and drop connection on anything too old since you never know when someone may restore form a backup from the first day your app was out. Yeah, definitely. I mean I'm not expecting the server to blow up, but the app being non-functional is not great from a customer service perspective. I'd just much rather that some guy who brought his 4.3 iPad 1 to the meeting not be able to download anything, than let him get an Apple-vetted-ish download of a two year old version of the app. Neither case is good, but the second option feels way worse, potentially because the version delivered is/was completely out of our control.
|
# ? Sep 19, 2013 15:25 |
|
ultramiraculous posted:Yeah, definitely. I mean I'm not expecting the server to blow up, but the app being non-functional is not great from a customer service perspective. I'd just much rather that some guy who brought his 4.3 iPad 1 to the meeting not be able to download anything, than let him get an Apple-vetted-ish download of a two year old version of the app. Neither case is good, but the second option feels way worse, potentially because the version delivered is/was completely out of our control. I feel the opposite. I'm excited that those millions of iPad 2 models that people pick up second hand will be able to see the old version of my apps. And I will have no shame if they complain about a bug or misaligned feature: it's available as-is.
|
# ? Sep 19, 2013 16:14 |
|
lord funk posted:I feel the opposite. I'm excited that those millions of iPad 2 models that people pick up second hand will be able to see the old version of my apps. And I will have no shame if they complain about a bug or misaligned feature: it's available as-is. Does your app talk to a server?
|
# ? Sep 19, 2013 16:55 |
|
haveblue posted:Does your app talk to a server? No, and I totally get why this would piss developers off. I'm lucky in that my app is standalone.
|
# ? Sep 19, 2013 17:19 |
|
lord funk posted:No, and I totally get why this would piss developers off. I'm lucky in that my app is standalone. Ok, yeah. That's totally different. Old versions of standalone apps are still as functional as they ever were, and that's why I agree with Apple's decision in general. My big issue with the change was the original lack of an opt-out in cases where server communication issues would break/severely impact the usability of the app.
|
# ? Sep 19, 2013 18:59 |
|
ultramiraculous posted:Ok, yeah. That's totally different. Old versions of standalone apps are still as functional as they ever were, and that's why I agree with Apple's decision in general. My big issue with the change was the original lack of an opt-out in cases where server communication issues would break/severely impact the usability of the app. Unless the old version's server communication issues actively cause damage, what's the harm? I'd rather have a broken app on my iPad 1 than nothing at all.
|
# ? Sep 19, 2013 19:10 |
|
I'm sure there are lots of people with ancient .ipas in iTunes on their computers and they could sync those apps back to their iPhone 3G at any time. They'd get overwritten if the user took advantage of the update functionality in iTunes, but who uses that? I don't even do that, I apparently have 137 updates pending in iTunes. So it's not like this is a totally new problem, where someone has an old version that wants to talk to an API you're not supporting anymore. At least now you can make the call yourself as to whether to offer someone the opportunity to download the old one, if you think it will still work. It would be nice though if you could submit an update targeted at that old release. Maybe to fix a minor bug or just add a "hey, here's whats broken on this old version" message.
|
# ? Sep 19, 2013 19:27 |
|
Does anybody know if Apple allows apps to "expire" their content? For example, say you download an app and have to sign up for a trial account in order to use it, and that trial expires in 30 days after which the app is completely useless unless you pay up. Is that not allowed or do people do this?
DreadCthulhu fucked around with this message at 23:23 on Sep 19, 2013 |
# ? Sep 19, 2013 23:20 |
|
You can disable a portion of the functionality, but the app cannot become entirely useless.
|
# ? Sep 20, 2013 00:21 |
|
Plorkyeran posted:You can disable a portion of the functionality, but the app cannot become entirely useless. That doesn't sound quite right. There are plenty of apps that are useless without an account at some third party service (Facebook, Twitter). You may have to be careful with wording (unless you offer an account purchase through in-app purchase) but I can't imagine a problem with the app kicking you out to a login screen at the end of the trial. Same as if the account was deleted.
|
# ? Sep 20, 2013 00:26 |
|
Facebook/twitter/etc. are quite different since they don't start out functional without an account only to force you to register a month later, and the accounts are free. Requiring registration is fine; offering an iAP-based subscription with a free trial for additional functionality is fine; requiring iAPs to do anything at all is not. 11.9 is the overly-vague rule relevant here ("Apps containing "rental" content or services that expire after a limited time will be rejected").
|
# ? Sep 20, 2013 01:36 |
|
transactionReceipt got deprecated in StoreKit, totally not obvious what to do now. This for reference
DreadCthulhu fucked around with this message at 01:46 on Sep 20, 2013 |
# ? Sep 20, 2013 01:41 |
|
Plorkyeran posted:Facebook/twitter/etc. are quite different since they don't start out functional without an account only to force you to register a month later, and the accounts are free. Requiring registration is fine; offering an iAP-based subscription with a free trial for additional functionality is fine; requiring iAPs to do anything at all is not. 11.9 is the overly-vague rule relevant here ("Apps containing "rental" content or services that expire after a limited time will be rejected"). Unless I'm missing something, or you know something I don't, DreadCthulhu's app is entirely doable following those criteria.
|
# ? Sep 20, 2013 02:05 |
|
DreadCthulhu posted:transactionReceipt got deprecated in StoreKit, totally not obvious what to do now. This for reference For iOS 7, they want you to use their new app receipt system for verifying transactions. See Receipt Validation Programming Guide. transactionReceipt is left in for backward compatibility.
|
# ? Sep 20, 2013 03:44 |
|
Has something with sprite scaling changed in SpriteKit as of DP5? I've been waiting since then for the official release to restart work on a project of mine since my developer account was terminated a while ago. I had perfectly working code uploaded as of DP5 but now anywhere I'm stretching a sprite with a modified centerRect it's completely broken and stretches the full image rect as if its unmodified... Very frustrating since everything in the docs seems exactly the same.
|
# ? Sep 20, 2013 19:51 |
|
SpriteKit has been really buggy in my experience. I'll probably scrap my little SpriteKit game and do it in Cocos2D instead.
Doc Block fucked around with this message at 05:36 on Sep 21, 2013 |
# ? Sep 21, 2013 03:24 |
|
That is disappointing to say the least. I've been looking forward to SpriteKit, sad to see it's acting up now of all times.
|
# ? Sep 21, 2013 03:33 |
|
SpriteKit is too feature incomplete and too buggy to be the easy alternative to Cocos2D that Apple is marketing it as. It's pretty obvious that they created it to counter Zynga making Cocos2D more cross-platform friendly. The main reasons I was even interested in SpriteKit in the first place was being able to use CGPaths for sprites (with hardware-accelerated drawing of the path) and because of the automatic sprite batching. But SpriteKit's CGPath drawing sucks (hope you wanted them all drawn with a thick, black stroke), and the automatic sprite batching hasn't worked well for me (still have to load the texture atlas manually, pick the textures out manually, and assign them to sprites manually to get "automatic" sprite batching to work). And don't get me started on the physics engine...
|
# ? Sep 21, 2013 06:08 |
|
If I only have non-renewing subscriptions in my app, do I need to provide the user with a Restore transactions button/flow? It sounds like that would make no sense, since your purchases are tied to your login account in the non-renewing case, but I'm wondering if there's anything in the rules that states that.
|
# ? Sep 21, 2013 06:27 |
|
Is there a way to get xcode to display current objects in scope when it throws an exception like visual studio does? i make lots of dumb stupid errors and it usually helps me find them e: i should clarify it sorta does show stuff in scope except for an exception it's just "argv" and throws from main as opposed to a breakpoint that u insert which works just fine Mr SuperAwesome fucked around with this message at 14:28 on Sep 21, 2013 |
# ? Sep 21, 2013 14:23 |
|
Mr SuperAwesome posted:Is there a way to get xcode to display current objects in scope when it throws an exception like visual studio does? I've never understood why this isn't on as default, but you have to add an exception breakpoint. Go to the breakpoints tab in the left hand view, click the plus at the bottom, add exception breakpoint, "break: on throw" (default). You have to do this for every project, it's not a global setting.
|
# ? Sep 21, 2013 14:44 |
|
lmao that's terrible default behaviour. Thank you!
|
# ? Sep 21, 2013 14:58 |
|
Doc Block posted:The main reasons I was even interested in SpriteKit in the first place was being able to use CGPaths for sprites (with hardware-accelerated drawing of the path) and because of the automatic sprite batching. Ditto! I couldn't believe how bad the drawing was. Actually I've never understood why drawing a few simple CGPaths causes the frame rate to plummet, but I was hoping SpriteKit would be the answer. Also, no transparent SpriteKit views meant dropping if from my current app.
|
# ? Sep 21, 2013 15:57 |
|
|
# ? Jun 8, 2024 08:25 |
|
Froist posted:I've never understood why this isn't on as default, but you have to add an exception breakpoint.
|
# ? Sep 21, 2013 16:08 |