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
DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!

Doc Block posted:

A grep search shows that the word "parent" isn't in my code or any of the libraries I'm using. Also, I am completely unable to reproduce this bug, I just saw it in the Flurry crash logs (which are terrible and nearly useless).

Have you discovered a better crash reporting service out there than Flurry? I'd be very nice to have a stack trace.

Adbot
ADBOT LOVES YOU

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

DreadCthulhu posted:

Have you discovered a better crash reporting service out there than Flurry? I'd be very nice to have a stack trace.

I'd really recommend Crashlytics.

bumnuts
Dec 10, 2004
mmm...crunchy

ultramiraculous posted:

I'd really recommend Crashlytics.

I can't stress enough how awesome Crashlytics is. If you have apps on the store you should have it.

unpurposed
Apr 22, 2008
:dukedog:

Fun Shoe
Can anyone with experience developing on a Macbook Air vs a MBP speak as to the performance differences in XCode? I've been using a 2012 MBP with 8GB and the dual graphics chips, and what I'm most concerned about is how XCode performs on an air.

Froist
Jun 6, 2004

unpurposed posted:

Can anyone with experience developing on a Macbook Air vs a MBP speak as to the performance differences in XCode? I've been using a 2012 MBP with 8GB and the dual graphics chips, and what I'm most concerned about is how XCode performs on an air.

I switch between my work MBP (2011 I think, 2.2 i7, 8GB) and my own Air (late 2010, 2.13 Core2Duo, 4GB) on a near-daily basis. Obviously there's a far bigger performance difference there than between models on sale at the same time - I guess more recent Airs would be closer as they have the Sandy/Ivy Bridge chips to match. When I'm at home I have my Air connected to an external 1920x1200 monitor, and it's performant enough to stick with that rather than get my MBP out of my bag (where all my personal projects are synced onto it with Dropbox anyway, so it wouldn't be a hassle). I also far prefer the Air for couch-coding when I'm not at my desk.

There IS a noticeable difference in some areas, but then I'd be shocked if there wasn't with that gulf in performance. There's a bit of lag when scrolling the diff views sometimes (though I'd hope a more recent Air would get past that), and it really can't cope with the retina iPad simulator, but generally it doesn't feel that much slower - I've never run the figures but not noticed much of a difference in compile times. The SSD makes a world of difference and probably comes into play in there; it's a completely different area but I was surprised when my Air far out-performed a mate's (newer) MBP in iMovie, solely down to the SSD.

Binary
May 21, 2004
I have no idea what I'm doing with objective C. I have a prototype iphone app built from some modified demo code that builds and does what it should. I am trying to add on to it now and find myself very confused by objective C conventions.

I have these two files:
code:
// Text.h

@import <UIKit/UIKit.h>

... other stuff here

void MyDrawText (CGContextRef myContext, CGRect contextRect);


// Text.m

#import "Text.h"

... more stuff

void MyDrawText (CGContextRef myContext, CGRect contextRect)
{

... rest of file
Which builds and runs fine. What I want to do now is pass a string to this function, so I make the following change in Text.h to start:

code:
void MyDrawText (CGContextRef myContext, CGRect contextRect, *NSString aString);
Which then gives me an error saying "Type specifier not identified, defaulting to int" What is wrong with my code here?

I have a background in C++, a little Java, 3 years of college CS, and I just learned python and linux shell scripting on the fly with no problem, and despite reading a book and a bunch of articles on Objective C it seems to me to be some kind of horribly unintuitive anti-programming language that actively does not want to work with you. Clearly I am missing something basic here, are there any nut and bolts tutorials on objective C that explain its weird conventions without assuming I have a background in Cocoa or the like?

Binary fucked around with this message at 03:22 on Dec 19, 2012

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.
You wrote some C code with a syntax error; it isn't even an Objective-C method. An Objective-C instance method would look something like:

- (void) drawText: (NSString *)aString inContext: (CGContextRef)context inRect: (CGRect)rect
{
}

Your C function isn't compiling because the * is on the wrong side of NSString.

Doc Block
Apr 15, 2003
Fun Shoe
Needs to be NSString *aString instead of *NSString aString

Also, what parts of Objective C do you find weird or unintuitive? For me it was the exact opposite, where C++ was an awful thing full of gotchas and special cases, while Objective C clicked and was relatively easy to figure out (I already knew C).

edit: beaten

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.
Also, this may be a bit dense, but I got a lot of knowledge out of this Objective-C manual for C++ coders (pdf) when I was learning Objective-C. The only thing it's really missing on a quick glance is the newer automatic reference counting, but it's still important to understand retain/release that happens automagically under the hood in ARC nowadays.

If you skip over everything else in it, at least read sections 2.5 to 3 since you seem to have missed that part of Objective-C.

hedgecore
May 2, 2004
Is itunesconnect.apple.com running lovely for anyone else? Been trying to push for an app update for over half an hour, but every time it times out somewhere between login and reaching my app page. Half the time I get this when I log in:

Cannot Process Request

An error has occurred processing your request.

Binary
May 21, 2004

Doc Block posted:

Needs to be NSString *aString instead of *NSString aString

Also, what parts of Objective C do you find weird or unintuitive? For me it was the exact opposite, where C++ was an awful thing full of gotchas and special cases, while Objective C clicked and was relatively easy to figure out (I already knew C).

edit: beaten

I've been out of practive for a few years and decided to jump head first onto objective C for app development. Maybe it's because C++ was the first language I learned.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
Basic things like how you write types aren't really any different from C/C++; where you write types in things like method declarations can seem a little funny, but how you write them hasn't really changed.

unpurposed
Apr 22, 2008
:dukedog:

Fun Shoe

Froist posted:

MBP vs Air

Thanks for the response. I'm looking to switch sometime soon and your feedback is really helpful.

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
What are people's thoughts on CocoaPods? Is it as solid as the gem system in Ruby?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

DreadCthulhu posted:

What are people's thoughts on CocoaPods? Is it as solid as the gem system in Ruby?

I got excited about it awhile back, maybe a year ago? Even wrote some code for it.

Very quickly I stopped using it, and i haven't been back.

At the time, and I haven't seen any changes since, CocoaPods required a considerable change in my workflow for no appreciable gain. You can't use your .xcodeproj anymore, gotta switch to .xcworkspace. All the libraries show up in the new workspace. And I don't think I've ever seen an Objective-C library with external dependencies. (This last part happens way more in ruby because rubygems is ubiquitous, so Objective-C might get there someday if CocoaPods grows in popularity.)

Now if there was something that could grab a library's source code, resources, and license, and shove it into a folder in my xcodeproj while setting up the proper compiler/linker flags, I'd probably use that.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
You actually can just manually add the Pods project as a subproject of your main project and skip the xcworkspace; it just doesn't do it automatically.

Overall CocoaPods is decent, but you'll have to write your own Podspecs for a good chunk of your deps (which isn't very hard), and it's not all that polished yet. I really hope it manages to catch on, as it'd be really nice to have a standard package manager that everything uses.

lord funk
Feb 16, 2004

If you were teaching beginners (like, zero programming experience) Objective-C would you teach them dot notation or use brackets for everything? I think both are as readable but feel like brackets reinforces the method calling / accessor pattern more.

Doc Block
Apr 15, 2003
Fun Shoe
I would teach them dot notation, as long as they understood that it was just calling the accessor methods.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice
Design pattern type question... I have a core data model, with a List object that contains Item objects. I'm using a fetched results controller to display the "list of Lists". When a user taps on a list, they go to a detail view showing a list of Items. Since they can add / edit / delete items, it would be nice to have a fetched results controller here as well so it can handle updating the table for me. Is it "normal" to create a second fetched results controller for this 2nd table, despite the fact that I have the collection of items available as listInstance.items?

If that is so, what is the most appropriate NSpredicate for the fetch on the 2nd fetched results controller?

Lumpy fucked around with this message at 03:46 on Dec 20, 2012

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I would have a new FRC instance for the detail view. The predicate would simply be "list = %@", selectedList.

Echo Video
Jan 17, 2004

Are there conventions to how to order method declaration/definitions in class files for common patterns of objects? Like for a view controller, an ordering of all the view-related methods, then the methods that deal with whatever models are used, then finally the memory management methods?

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!

lord funk posted:

:hf::)


Might want to look into making a subclass of the UIPopoverBackgroundView abstract class and setting your UIPopoverController's popoverBackgroundViewClass property to that class.

See: http://developer.apple.com/library/...rBackgroundView

Update on that one. I didn't end up using the class you recommended because I'm on iPhone, the reimplementation of that class I found wasn't working too well, and ultimately I was looking more for a pop UP than a popover. Took me a long time to find an alternative, but luckily one showed up on Cocoa Controls: this one seems to do pretty much everything I need, and supports whatever content I want in it. Super neat. There's also another one with a cool blur effect.

Hope this helps if people were looking for something like that.

Doh004
Apr 22, 2007

Mmmmm Donuts...
Help!

Our app was reviewed and rejected for the following reason:

quote:

We found that your app exhibited one or more bugs, when reviewed on iPad 3 running iOS 6.0.1, on both Wi-Fi and cellular networks, which is not in compliance with the App Store Review Guidelines.

But our app is iPhone specific? It's not supposed to be run on the iPad.

Then someone told me how you can still run iPhone only apps on the iPad and you can 2x it to make it appear larger. We then tried out the app on the same model and OS version iPad, and could not replicate the "bug" that they had mentioned (very poor directions).

Any suggestions?

Doc Block
Apr 15, 2003
Fun Shoe
Yeah, it still has to work in iPhone mode on iPad, even for an iPhone-only app.

Did they tell you anything like what exception was thrown or whatever? Or was it just "when I do X it crashes?"

Doh004
Apr 22, 2007

Mmmmm Donuts...
"When the user taps on the Person icon, the screen slides left but no content is displayed." They also provided a screenshot and we see where they are and what they might have done.

I think they mean our top right menu icon which slides in a menu from right. We just can't replicate it either on our iPad or in the iPad simulator.

Doh004 fucked around with this message at 17:11 on Dec 20, 2012

emanresu tnuocca
Sep 2, 2011

by Athanatos
I'm looking to develop a simple application that is essentially nothing more than a glorified WebApp with a touch based interface, something very similar to a fantasy sports game that doesn't have need for any serious graphic assets. I would like to ideally have most of the project compatible between Android and iOS.

I'm rather new to development in general and apps in particular, I've been doing some research and figured out developing an actual webapp with Ruby on Rails and wrapping it into a native application using http://www.phonegap.com/ and http://w2ui.com/web/touch.php might be the 'smartest approach'.

Does anyone here have experience with a similar project outline? Is this as reasonable as I think it is or is this an incredibly lopsided solution?

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doh004 posted:

"When the user taps on the Person icon, the screen slides left but no content is displayed." They also provided a screenshot and we see where they are and what they might have done.

I think they mean our top right menu icon which slides in a menu from right. We just can't replicate it either on our iPad or in the iPad simulator.

Are you doing this test using an AdHoc ipa based on the *exact* build archive you submitted, or are you using XCode's Build and Run? There's a good chance that your submitted build is different from a debug build (for whatever reason).

Doh004
Apr 22, 2007

Mmmmm Donuts...

ultramiraculous posted:

Are you doing this test using an AdHoc ipa based on the *exact* build archive you submitted, or are you using XCode's Build and Run? There's a good chance that your submitted build is different from a debug build (for whatever reason).

I just redistributed the same exact archive from Organizer and installed it on our iPad. I still cannot recreate the bug that they provided.

I had responded to them and I still haven't heard back through their resolution center. :(

Doh004 fucked around with this message at 21:58 on Dec 20, 2012

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
If loading that content requires network traffic, are you testing with non-trivial network latency, or is your device literally connecting to the same network your servers are sitting on?

Doh004
Apr 22, 2007

Mmmmm Donuts...

rjmccall posted:

If loading that content requires network traffic, are you testing with non-trivial network latency, or is your device literally connecting to the same network your servers are sitting on?

Nope, this isn't making a network request or anything. It's tapping the top right of the navigation bar to animate in a menu from the right.

Also, this version of our app is hitting our production environment, which is not in our office but in our DC. Also I appreciate the help so far. Just kinda at a loss at what else to do.

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

Doh004 posted:

Nope, this isn't making a network request or anything. It's tapping the top right of the navigation bar to animate in a menu from the right.

Also, this version of our app is hitting our production environment, which is not in our office but in our DC. Also I appreciate the help so far. Just kinda at a loss at what else to do.

Try blocking the network entirely.

Also if you didn't before, delete your app and install a fresh IPA. If there is a missing resource or something then installing over top might not catch it.

Heisenbugs are hell.

Doh004
Apr 22, 2007

Mmmmm Donuts...

Ender.uNF posted:

Try blocking the network entirely.

Also if you didn't before, delete your app and install a fresh IPA. If there is a missing resource or something then installing over top might not catch it.

Heisenbugs are hell.

I completely deleted the app off of my simulator as well as the iPad before, and I just did it again. Nothing changed :(

I also disabled the Wifi completely. Still, the menu is completely static and no requests are made when it's shown/hidden.

Is this something I could file an appeal for?

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
Well you can wait for them to respond with more info.

Do you have iPads with other OS versions and/or an iPad 1/2/3? I suppose it could be hardware or version specific.

:iiam:

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
What is your experience with universal apps? Any words of wisdom and caveats you'd like to share? The market we're in seems to be much more popular on the iPad and so we're thinking of supporting that device as well.

It does however look like a monumental amount of work if you've got a lot invested in tweaking every single pixel on the UI. I'm assuming that some of the configuration management difficulty can be mitigated by exploiting OO as much as possible and having different subclassed controllers for each devices, but still sharing all of the business logic in them.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
Supporting the iPad doubled my sales. I found that some views worked on both devices as-is, others worked in a popover by adding a view calls to the controller. So generally I haven't had to have separate controllers but that varies based on the app.

I would definitely recommend going Universal, unless the app is really oriented to the phone size for some reason.

duck monster
Dec 15, 2004

emanresu tnuocca posted:

I'm looking to develop a simple application that is essentially nothing more than a glorified WebApp with a touch based interface, something very similar to a fantasy sports game that doesn't have need for any serious graphic assets. I would like to ideally have most of the project compatible between Android and iOS.

I'm rather new to development in general and apps in particular, I've been doing some research and figured out developing an actual webapp with Ruby on Rails and wrapping it into a native application using http://www.phonegap.com/ and http://w2ui.com/web/touch.php might be the 'smartest approach'.

Does anyone here have experience with a similar project outline? Is this as reasonable as I think it is or is this an incredibly lopsided solution?

There aren't really any situations where going wrapped web over native is a good idea. Its just claggy and you can't fool users. Look at how garbage facebooks app was. ergo go native.

Hog Obituary
Jun 11, 2006
start the day right

duck monster posted:

There aren't really any situations where going wrapped web over native is a good idea. Its just claggy and you can't fool users. Look at how garbage facebooks app was. ergo go native.

Absolutism of this sort is rarely justified. A wrapped webapp can work just fine if you aren't doing anything fancy... especially if you aren't using any hardware controls and it really is something that would be fine in a browser. You can't be lazy about it and you have to careful with how much interaction you're going for... but HTML/JavaScript/CSS can be hard to beat in terms of speed of development.

One thing to note, however, is that the webview controls in both iOS and Android don't always perform as well as their browser-app counterparts. That is, you may find that your webapp performs better in Safari (especially if it's JS heavy) than your wrapped app does (which may be using UIWebViews to hold content).

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!

duck monster posted:

There aren't really any situations where going wrapped web over native is a good idea. Its just claggy and you can't fool users. Look at how garbage facebooks app was. ergo go native.

A lot of people use that as an example of why html can't work in native apps, but I've recently heard that it's mostly because Facebook simply didn't do it right the first time. There are supposedly plenty of html apps out there that are so good that you can't tell the difference from native, so you don't even wonder. I don't know, that's what I read somewhere.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
That's because Safari uses the JIT compiler but so far apps use the interpreter for security reasons. No idea if they'll eventually support a system sandbox so apps can use it, as IIRC Safari runs the JS in a locked down content process, separate from the actual browser.

UIWebView JS will always have a speed disadvantage for the time being.

Adbot
ADBOT LOVES YOU

Doh004
Apr 22, 2007

Mmmmm Donuts...

Ender.uNF posted:

Well you can wait for them to respond with more info.

Do you have iPads with other OS versions and/or an iPad 1/2/3? I suppose it could be hardware or version specific.

:iiam:

Waiting is difficult :saddowns:

We do not have a 1, 2 or 4. Maybe we should? We will eventually make our app for the iPad.

What's frustrating as they specifically said they used an iPad 3 running 6.0.1, which is exactly what we have as our testing device.

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