Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
duck pond
Sep 13, 2007

Welp, turns out I hadn't supplied a terms and conditions link for all five localisations... my bad.

Adbot
ADBOT LOVES YOU

mrbass21
Feb 1, 2009
Removed Text because I broke the page.


EDIT: Disregard this. The server logs were being cluttered by another persons problem. The server is getting the certificate and the problem seems to lie further down the line in their server code. I feel less crazy.

mrbass21 fucked around with this message at 19:16 on Sep 16, 2014

PleasureKevin
Jan 2, 2011

I'm following the Ray Wenderlich tutorials and I don't think I understand this passage.

Ray Wenderlich posted:

Finally, select your table view, and select the sixth Inspector (the Connections Inspector). You’ll see two entries for dataSource and delegate – drag the buttons to the right of those over to your view controller in the Document Outline.

As in I don't know where to control-drag to.

Glimm
Jul 27, 2005

Time is only gonna pass you by

PleasureKevin posted:

I'm following the Ray Wenderlich tutorials and I don't think I understand this passage.

As in I don't know where to control-drag to.

Typically you want to control drag to your ViewController's class extension category, which would be on top of your implementation (.m) and look something like:
code:
@interface MYAPPViewController()

// drag into this section

@end

@implementation MYAPPViewController
...
@end

You can also drag into the header, but unless the view really needs to be public that is discouraged.


edit: doh, I misunderstood - I thought you were asking about IBOutlets, but that doesn't look like that is the case.

I think it's telling you to drag to your view controller (it's probably on the left side of your xib/storyboard, with a yellow circle next to its name)

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

PleasureKevin posted:

I'm following the Ray Wenderlich tutorials and I don't think I understand this passage.


As in I don't know where to control-drag to.

On the left side of interface builder, you probably see a vertical bar of icons about 48px wide. At the bottom of that bar, to the right, should be a little right-pointing arrow, which will expand that bar into a full outline of everything in your view with full names. That's the Document Outline.

Kallikrates
Jul 7, 2002
Pro Lurker
So who else has an extension/widget that probably won't work tomorrow?

https://devforums.apple.com/thread/245432?tstart=0

Juul-Whip
Mar 10, 2008

This is not really programming related but, is it normal for all prices to appear in US dollars on the Korean iTunes store? Is there any case where we would want the prices to appear in won?

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.
I foresee a lot of pain in my future with universal storyboards.


I've spent the past couple of days just trying to get this one stupid square resizing to stay 1:1 and adjust a few labels and images and such all around it on both 4 and 3.5 inch screens. I'm about to rip my dick off in frustration. Of course it's a subview in a xib by itself, so I can't use the preview pane to help, as far as I can tell.

I think I have some kind of mental block when it comes to constraints. I set everything up right but end up somehow putting a constraint on a tiny UI element that ends up propagating all the way up through every view and making everything in the wrong place again.

NOTinuyasha
Oct 17, 2006

 
The Great Twist
So iTunes Connect, it sucks, but it's been working fine until I upgraded to the 6.1 Xcode GM. Now I'm trying to submit something tonight and getting hit with this useless error on the last step:



I can login to iTunes Connect fine with the same credentials. According to google it could be five hundred different things, including trouble on Apple's end. I've been at it for hours and I'm out of ideas. Anything?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

NOTinuyasha posted:

6.1 Xcode GM

On the off-chance that this isn't simply a typo: are you submitting with the Xcode 6.0 GM? 6.1 hasn't hit GM yet and shouldn't be used for submission.

NOTinuyasha
Oct 17, 2006

 
The Great Twist
That's a typo, I meant 6.0.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Is there some way to get Xcode to build an archive suitable for a device when I have an unsuitable device plugged in? For example, I can't find a way to submit an app requiring iOS 8 while an iPhone 4 is plugged in. If I pick a simulator then I can't pick "Archive", and if I pick the only device listed, the iPhone, then "the run destination iPhone is not valid for Archiving".

Maybe I can permanently enable the generic "iOS Device" menu item?

NOTinuyasha posted:

That's a typo, I meant 6.0.

Ah, ok. I'm out of ideas then, sorry!

Doc Block
Apr 15, 2003
Fun Shoe
As long as "Build active architecture only" is turned off for the build configuration used by the archive action/scheme/whatever then I don't think it matters. You basically just have to be telling it you want to build for the actual device.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Doc Block posted:

As long as "Build active architecture only" is turned off for the build configuration used by the archive action/scheme/whatever then I don't think it matters. You basically just have to be telling it you want to build for the actual device.

I'm stuck at the actual "archive action" step. If I plug in an iPhone 4 by itself, I seemingly can't perform the archive action.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

pokeyman posted:

I'm stuck at the actual "archive action" step. If I plug in an iPhone 4 by itself, I seemingly can't perform the archive action.

You should be able to do what you want on the command line; you can specify a generic iOS device destination that way.

Doctor w-rw-rw-
Jun 24, 2008

pokeyman posted:

I'm stuck at the actual "archive action" step. If I plug in an iPhone 4 by itself, I seemingly can't perform the archive action.

Odd. Just to throw my datapoint in there, I didn't have a problem archiving after I selected the application target and generic 'iOS Device' earlier today.

LP0 ON FIRE
Jan 25, 2006

beep boop
Anyone know anything about Cocos2D? I'm using version 2, and I'm moving tiles by pointing it to a CCSprite and changing the position. Unfortunately it still behaves as if the tile is in it's old location (I can test and see that a tile is there) even though graphically the position has moved.

code:
CCSprite *blocksCollidableTileSprite = [blocksCollidable tileAt:tileCoord];
					
blocksCollidableTileSprite.position = ccp(blocksCollidableTileSprite.position.x,blocksCollidableTileSprite.position.y+64);
EDIT: I'm just going to make these moving tiles on a new layer and test to see if the player is going to hit a rectangular area instead of checking for tile properties.

LP0 ON FIRE fucked around with this message at 16:25 on Sep 17, 2014

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

eschaton posted:

You should be able to do what you want on the command line; you can specify a generic iOS device destination that way.

Oh right, there's some new(ish?) flags for xcodebuild. That'll have to do!

Doctor w-rw-rw- posted:

Odd. Just to throw my datapoint in there, I didn't have a problem archiving after I selected the application target and generic 'iOS Device' earlier today.

Right, that works for me too. It's when I have an unhelpful device plugged in, so the generic "iOS Device" is replaced by e.g. "iPhone 4", that I cannot choose the Archive action.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
I saw that in iOS 8, Mail is getting a swipe left action on its table view cells. Are us mortals getting a hook in UITableView for that, or do we have to create our own implementation?

Doctor w-rw-rw-
Jun 24, 2008
Today, I figured out that -[NSNumber isEqualToNumber:] crashes on nil. That is to say:
Objective-C code:
[@NO isEqualToNumber:@NO] == YES
[@YES isEqualToNumber:@YES] == YES
[@NO isEqualToNumber:@YES] == NO
[@YES isEqualToNumber:@NO] == NO
[@NO isEqualToNumber:nil] => crash!
[@YES isEqualToNumber:nil] => crash!

[@NO isEqualToValue:nil] => crash!
[@YES isEqualToValue:nil] => crash!

[@NO isEqual:nil] == NO
[@YES isEqual:nil] == NO
NSNumber crash:
code:
2014-09-17 12:12:20.614 CMAttributedStringExample[83131:2332768] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean compare:]: nil argument'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001017613f5 __exceptionPreprocess + 165
	1   libobjc.A.dylib                     0x00000001013fabb7 objc_exception_throw + 45
	2   CoreFoundation                      0x000000010176132d +[NSException raise:format:] + 205
	3   CoreFoundation                      0x00000001016b9891 -[__NSCFBoolean compare:] + 81
	4   CoreFoundation                      0x00000001016b9838 -[__NSCFBoolean isEqualToNumber:] + 24
etc...
NSValue crash:
code:
(lldb) thread backtrace
* thread #1: tid = 0x239d62, 0x0000000103544d17 libsystem_platform.dylib`_platform_strcmp + 23, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000103544d17 libsystem_platform.dylib`_platform_strcmp + 23
    frame #1: 0x000000010032efca Foundation`-[NSValue isEqualToValue:] + 99
etc...
Am I crazy to expect those to work like isEqual: instead of crashing?

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

pokeyman posted:

Is there some way to get Xcode to build an archive suitable for a device when I have an unsuitable device plugged in? For example, I can't find a way to submit an app requiring iOS 8 while an iPhone 4 is plugged in. If I pick a simulator then I can't pick "Archive", and if I pick the only device listed, the iPhone, then "the run destination iPhone is not valid for Archiving".

Maybe I can permanently enable the generic "iOS Device" menu item?


Ah, ok. I'm out of ideas then, sorry!

Unplug and select iOS Device. That's what I always do just on general principal.

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.
Am I trying to do something stupid with constraints?

I want a vertical space above a view that has a minimum value but can grow if other constraints force the issue (meaning the space grows and the view shrinks). I wanted to do this with two constraints, but this seems impossible. IB will not allow me to create it, and if I do so manually in XML, Xcode crashes whenever I open the file.
  • Vertical space equals 52, 500 priority
  • Vertical space greater than or equal to 52, 1000 priority

If I neglect the equals constraint with 500 priority, the view starts tiny with way too much space. I want it to start big and shrink only if needed.



edit: Of course, as soon as I post this, I find another constraint to do the job. I made a 500 priority constraint for the view's height instead of the space above it. This ends up having the exact same effect, but it does it without having two constraints on the same dimension with different values. I'm still curious if the above is a bug or if I am abusing autolayout.

ManicJason fucked around with this message at 02:02 on Sep 18, 2014

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Doctor w-rw-rw- posted:

Am I crazy to expect those to work like isEqual: instead of crashing?

I don't think so, but maybe someone on the Foundation team violently disagrees with you.

If you want to cite things in your bug report, I believe -[NSString isEqualToString:] gracefully handles nil.

Ender.uNF posted:

Unplug and select iOS Device. That's what I always do just on general principal.

Alright. It just feels wrong somehow, like I'm missing something.

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.
I'm learning the hard way that autolayout is a horrible mistake if you have anything remotely complicated or not stock UIKit. I want the last week of my life back.

I especially love how it seems to randomly decide to shift everything around by 0.5 and that breaking when it happens just shows you bog standard CALayer things with no hint as to why in the world autolayout just had a stroke.

ManicJason fucked around with this message at 04:42 on Sep 18, 2014

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

That's how I would do it. Let the height constraint be lower priority so it gets sacrificed if needed.


ManicJason posted:

I'm learning the hard way that autolayout is a horrible mistake if you have anything remotely complicated or not stock UIKit. I want the last week of my life back.

I especially love how it seems to randomly decide to shift everything around by 0.5 and that breaking when it happens just shows you bog standard CALayer things with no hint as to why in the world autolayout just had a stroke.

Don't give up. Autolayout is cool and powerful, but you have to approach it in a completely different way. I wish I could come up with a good explanation. Once you "get" it, creating complicated layouts is fairly easy. For the record I tried to learn and use it three times and gave it up as bullshit twice before it stuck.

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.
I understand the advantages of auto layout when it comes to bog standard UI. The problem is that I have a giant chain of custom views. I'm sure this is all because I didn't perfectly follow the UIView contract to handle resizing/redrawing, and I'm paying the price big time right now when using auto layout.

This project turned into a giant mess in a hurry. There is core animation stuff being drawn based on coordinates converted from other views. That kind of thing is where auto layout is boning me when it twitches around and causes me to redraw stuff.

Doctor w-rw-rw-
Jun 24, 2008

Ender.uNF posted:

Don't give up. Autolayout is cool and powerful, but you have to approach it in a completely different way. I wish I could come up with a good explanation. Once you "get" it, creating complicated layouts is fairly easy. For the record I tried to learn and use it three times and gave it up as bullshit twice before it stuck.

Having in the past dealt with its opaque resolution scheduling, and having just dealt with nonsensical and seemingly irrecoverable constraint failure of a layout defined by someone else, I would call it "cool and powerful" in the same way regular expressions are:

Autolayout constraints seem to be mostly write-only, the intent is clearest when you're the one who created it, you don't control or have insight into what exactly is executing (more important when animating than when dealing with text), and difficult to debug. And yet, occasionally, the easiest, quickest way from point A to B.

I'd consider using it for any app I don't anticipate caring about more than a couple of months after its writing, but not much else.

EDIT: spelling

Doctor w-rw-rw- fucked around with this message at 05:47 on Sep 18, 2014

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.

Doctor w-rw-rw- posted:

Having in the past dealt with its opaque resolution scheduling, and having just dealt with nonsensical and seemingly irrecoverable constraint failure of a layout defined by someone else, I would call it "cool and powerful" in the same way regular expressions are:

That's remarkably accurate.


edit: Nevermind. No one wants to hear my bitching about auto layout. Suffice it to say I am unhappy with the experience and have found it impossible if you want to animate anything.

edit2 with maybe useful info: My constraint animation problem was that you now have to explicitly call [[viewToAnimate superview] layoutIfNeeded] inside of the animation block. If you don't do that, the views just disappear instantly instead of animating.

ManicJason fucked around with this message at 05:46 on Sep 18, 2014

dizzywhip
Dec 23, 2005

ManicJason posted:

I'm learning the hard way that autolayout is a horrible mistake if you have anything remotely complicated or not stock UIKit. I want the last week of my life back.

I especially love how it seems to randomly decide to shift everything around by 0.5 and that breaking when it happens just shows you bog standard CALayer things with no hint as to why in the world autolayout just had a stroke.

I think I've posted about it a couple times already but man I fuckin hate autolayout. It sounds cool in theory, but any time I've tried to use it it's just made everything significantly more complicated than if I just did the layout myself.

I wonder how long we'll be able to avoid it entirely. When I use the new 10.10 NSViewController APIs to present a view controller in a popover or sheet, the view controller shits a bunch of constraints all over my views that are coded to layout manually. I have no clue how it even decides to generate those constraints -- they're translated autoresizing mask constraints but none of the views even have an autoresizing mask set. Depending on how it's set up it'll either complain about unsatisfied constraints and break the app, or just complain that the views still need to be laid out after calling layout.

I hope this isn't Apple's way of forcing us towards autolayout. I haven't found a good workaround yet aside from not using the new APIs. Hacks like overriding autolayout properties and methods seem to do nothing or just break things more.

Doctor w-rw-rw-
Jun 24, 2008
Taking a break from autolayout discussion for a moment:

Ari Grant, from Facebook, presented recently at @Scale 2014 on Facebook's iOS infrastructure:
https://www.youtube.com/watch?v=XhXC4SKOGfQ

View reuse and major infrastructure performance problems definitely plagued iOS at FB for quite some time, both for the main app and Paper. Replacing Core Data with Mem Models was tremendous for performance and thread affinity problems, and Components seem pretty cool (I wasn't there for the Objective-C version of that).

Toady
Jan 12, 2009

Doctor w-rw-rw- posted:

Today, I figured out that -[NSNumber isEqualToNumber:] crashes on nil. That is to say:
Objective-C code:
[@NO isEqualToNumber:@NO] == YES
[@YES isEqualToNumber:@YES] == YES
[@NO isEqualToNumber:@YES] == NO
[@YES isEqualToNumber:@NO] == NO
[@NO isEqualToNumber:nil] => crash!
[@YES isEqualToNumber:nil] => crash!

[@NO isEqualToValue:nil] => crash!
[@YES isEqualToValue:nil] => crash!

[@NO isEqual:nil] == NO
[@YES isEqual:nil] == NO
NSNumber crash:
code:
2014-09-17 12:12:20.614 CMAttributedStringExample[83131:2332768] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean compare:]: nil argument'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001017613f5 __exceptionPreprocess + 165
	1   libobjc.A.dylib                     0x00000001013fabb7 objc_exception_throw + 45
	2   CoreFoundation                      0x000000010176132d +[NSException raise:format:] + 205
	3   CoreFoundation                      0x00000001016b9891 -[__NSCFBoolean compare:] + 81
	4   CoreFoundation                      0x00000001016b9838 -[__NSCFBoolean isEqualToNumber:] + 24
etc...
NSValue crash:
code:
(lldb) thread backtrace
* thread #1: tid = 0x239d62, 0x0000000103544d17 libsystem_platform.dylib`_platform_strcmp + 23, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000103544d17 libsystem_platform.dylib`_platform_strcmp + 23
    frame #1: 0x000000010032efca Foundation`-[NSValue isEqualToValue:] + 99
etc...
Am I crazy to expect those to work like isEqual: instead of crashing?

The documented convention is that, when passed nil, -isEqual: returns NO and -isEqualTo*: throws an exception, but this isn't consistent across all of Cocoa.

Flobbster
Feb 17, 2005

"Cadet Kirk, after the way you cheated on the Kobayashi Maru test I oughta punch you in tha face!"
Since everyone just loves auto layout, would anyone recommend one of those DSL-like libraries like Masonry?

I find my biggest problems when I need to use auto layout in code are:

  • Creating individual constraints with the initializer is way too verbose, but sometimes necessary when using constraints that the visual format doesn't support
  • Using the format language is less verbose, but more fragile when I need to grab individual constraints out of the returned array by index for later modification

Something that fixes both of those at once would be fantastic.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

iTunes Connect Developer Guide posted:


4.7-inch Retina screenshot

Don't include the device status bar in your screenshots. Screenshot requirements are:
72 dpi, RGB, flattened, no transparency
High-quality JPEG or PNG image file format
750 x 1334 pixels for hi-res portrait
1334 x 750 pixels for hi-res landscape

How does one "[not] include the device status bar" in a full-height screenshot?

Says the same thing for 5.5-inch Retina screenshots. iTunes Connect outright refuses screenshots for these two that crop out the status bar.

Why is it so important to rush the poo poo out of these things.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer
xpost:

ultramiraculous posted:

Hey, FYI there's vector images in XCode 6 which could really make everything easier.

See:
http://stackoverflow.com/a/25818846

You give the Assets bundle a PDF from Illustrator or whatever and it scales it for @1x, @2x, @3x, @?x for you at build time. This might make a lot of this easier.

Doc Block
Apr 15, 2003
Fun Shoe

pokeyman posted:

[url=https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Appendices/Properties.html]


How does one "[not] include the device status bar" in a full-height screenshot?

Says the same thing for 5.5-inch Retina screenshots. iTunes Connect outright refuses screenshots for these two that crop out the status bar.

Why is it so important to rush the poo poo out of these things.

Just submit with the status bar showing like everyone has since forever. Or turn the status bar off to take your screenshots.

Use QuickTime in Yosemite to take your screenshots and it will show a Perfect Status Bar instead of the real one.

kitten smoothie
Dec 29, 2001

Perfect indeed, 9:41 AM. That's awesome.

Doc Block
Apr 15, 2003
Fun Shoe
The "No status bar allowed!" thing is an anachronism from when the status bar was completely separate from the app, and if you cropped it out the App Store would show a Steve-Approved Status Bar. Now that the status bar is just overlaid on top of the app's views, it doesn't really make sense to crop it out.

I've submitted multiple updates to an app with the status bar visible in the screenshots and sailed through the approval process. Lots of other apps' screenshots show the status bar. Make a game of it, look at apps on the App Store and try to guess where the developer is from based on the carrier name in the status bar.

HaB
Jan 5, 2001

What are the odds?
So jumping back into iOS dev after a year long hiatus.

Can someone check me on SOP for doing this?

I have a NavigationController. Using that, my main screen is a List view, which leads to a Detail view. On the Detail view there is an action you can take which requires a Modal popup. When the Modal is dismissed, I want to go back to the List view, which has now updated to reflect the action performed. So to recap:

List -> Detail -> Modal (user performs action here) -> List View

I currently have the NavController handling List -> Detail, and the Detail View handling the Modal. Something like:

Detail -> implements ModalDelegate
List -> implements DetailDelegate

So the Modal view sends the ModalDelegate event to the Detail view, dismissing the Modal.
The Detail view then sends the DetailDelegate event to the List view, which dismisses the Detail view.

Is that correct? Or is there some better way I am missing?

Kallikrates
Jul 7, 2002
Pro Lurker
Thats probably fine for small getting started projects.

The standard of practice for app architecture changes drastically with the size of the app, the size of the team, fashion etc.

Right now FRP, and MVVM are popular and you can see parts of them within in MVC depending on where you draw the boundaries of responsibilities.

Consider a Model/Store layer. Your List view just represents the current state of Lists Members.
Your Detail View just represents a List Member, your Modal Edit just dispatches a change request to your Model/Store layer which initiates a redraw of anything currently representing anything that changed.

So your in your example the arrows only move in one direction Store -> Views, Collection -> Item.
Your navigationcontroller informs the listcontroller what its collection is, and your list informs the detailcontroller what its item is, and your modal editor just issues a change request to the store, which (via various means) cascades downward.

One example of something similar is the video linked by Doctor666, even apple experiments with different ways of doing things see WWDC videos which discuss architecture.

Adbot
ADBOT LOVES YOU

Doh004
Apr 22, 2007

Mmmmm Donuts...

gently caress yes.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply