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
Hog Obituary
Jun 11, 2006
start the day right

tarepanda posted:

You one or two people to make a project from scratch, come up with art/designs, implement it all, test it, implement changes, test it, implement changes, etc., and ship in less than six months? AND on a 3,000 budget?

3000 dollars at 10/hr would get you 300 hours of work... assuming eight-hour days, you're looking at about a month and a half of work. And that's at fast food rates.

Keep in mind that once you see things, you're probably going to want changes or perhaps you'll have new ideas or perhaps some things won't be feasible for whatever reasons.

Plus sounds and whatever else you might want for your game that people will have to make or come up with.

I've been doing a project for work on my lonesome, pulling 70-80-hour weeks... and we don't even have (many) custom graphics assets... and after three months, I have something I'm happy with calling a "beta" version. It's a pretty complex thing though. :x

I would bet the guy who quoted 6 months probably has a bunch of other projects in progress at the same time. Nobody (worthwhile) is going to do 6 months of dev work full time for $3k.

Adbot
ADBOT LOVES YOU

tarepanda
Mar 26, 2011

Living the Dream

Hog Obituary posted:

I would bet the guy who quoted 6 months probably has a bunch of other projects in progress at the same time. Nobody (worthwhile) is going to do 6 months of dev work full time for $3k.

Very true.

$3k would account for around a week and a half of my time if we just straight divide my salary by the number of weeks in a year...

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

tarepanda posted:

Is there a parent class for all (or most) UI items?

I want to reposition a lot of things on the screen programmatically (through frame and setTransform), so I was hoping to just stick them into an array and iterate through it. The problem is that I can't just use id for the current object since it doesn't have a frame...

The array would include UILabels, UITextFields, and UISteppers... which all have frame and setTransform.

Am I way off in left field here?

You can't use .frame on an id, but you can send it the frame message, which is what .frame does. So it should work.

tarepanda
Mar 26, 2011

Living the Dream

rjmccall posted:

You can't use .frame on an id, but you can send it the frame message, which is what .frame does. So it should work.

Shoot, that's genius. I really should work on avoiding dot notation...

Doc Block
Apr 15, 2003
Fun Shoe
If you're just setting a property then dot notation is fine. It's when people try to use dot notation for non-getter/setter methods that they've gone too far. Just so long as you understand that the compiler is just translating someObject.frame = whatever; into [someObject setFrame:whatever];.

Also, to the best of my knowledge, all the UI elements on iOS are descended from UIView.

tarepanda
Mar 26, 2011

Living the Dream
I thought someone mentioned before that the Analyzer wasn't great with dot notation for some reason?

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
Hey guys, what's the most kosher way of storing hundreds of rather tiny (5-30kB) pictures and audio files that might need to be displayed to the user at some point. Think of a language learning tool where you play a sound / display an image in addition to showing the text.

My gut feel is, for simplicity sake, to just store everything in the bundle and fetch it directly from disk on demand, although that likely adds a 2-5ms delay for both the audio file and the picture itself, which may or may not result is a nasty user experience. Has anybody tried this approach before and found the results to be good?

The other option is to dump the images/audio files into CoreData during the first app boot (downside is now you have the same data persisted twice on the device) but now you can use the trick where you warm the CoreData cache in a background thread and thus make the data available at memory-speeds. The downside is having to keep CD in sync with the bundle as the app evolves and the additional complexity of cache preparation.

Thoughts?

DreadCthulhu fucked around with this message at 08:55 on Nov 16, 2012

tarepanda
Mar 26, 2011

Living the Dream
Okay, wow. Rotating a UIStepper is harder than I thought it would be.

First of all, if you just setTransform, it doesn't actually rotate the entire stepper, it rotates the contents of... the view (?) giving you a clipped stepper. If you turn off "clip subviews," it rotates the stepper properly, but the touch-sensitive areas aren't rotated (???).

Does anyone have experience with this? :x

dizzywhip
Dec 23, 2005

DreadCthulhu posted:

Hey guys, what's the most kosher way of storing hundreds of rather tiny (5-30kB) pictures and audio files that might need to be displayed to the user at some point. Think of a language learning tool where you play a sound / display an image in addition to showing the text.

My gut feel is, for simplicity sake, to just store everything in the bundle and fetch it directly from disk on demand, although that likely adds a 2-5ms delay for both the audio file and the picture itself, which may or may not result is a nasty user experience. Has anybody tried this approach before and found the results to be good?

The other option is to dump the images/audio files into CoreData during the first app boot (downside is now you have the same data persisted twice on the device) but now you can use the trick where you warm the CoreData cache in a background thread and thus make the data available at memory-speeds. The downside is having to keep CD in sync with the bundle as the app evolves and the additional complexity of cache preparation.

Thoughts?

Can't you just preload x number of images/sounds before you need to use them?

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

DreadCthulhu posted:

Hey guys, what's the most kosher way of storing hundreds of rather tiny (5-30kB) pictures and audio files that might need to be displayed to the user at some point. Think of a language learning tool where you play a sound / display an image in addition to showing the text.

My gut feel is, for simplicity sake, to just store everything in the bundle and fetch it directly from disk on demand, although that likely adds a 2-5ms delay for both the audio file and the picture itself, which may or may not result is a nasty user experience. Has anybody tried this approach before and found the results to be good?

The other option is to dump the images/audio files into CoreData during the first app boot (downside is now you have the same data persisted twice on the device) but now you can use the trick where you warm the CoreData cache in a background thread and thus make the data available at memory-speeds. The downside is having to keep CD in sync with the bundle as the app evolves and the additional complexity of cache preparation.

Thoughts?

Where are you getting your 2-5ms number? At 30fps that's 1/15th-1/6th of a frame and would be imperceptible to anyone. I suspect the actual amount of time it takes to load a 30KB resource from flash storage is much, much higher.

That point notwithstanding when I develop apps my rule of thumb is to do the simplest, most understandable thing first. If it results in a bad user experience I'll go and optimize where I need to. Balancing productivity and user experience is always the tradeoff as a developer, unless you have unlimited resources. If you still opt to front-load optimization I think Gordon Cole's method is the way to go. Figure out what assets you'll need to display during the sequence you're going to show the user and preload them. Core Data adds a decent amount of development overhead and it really feels like you're trying to fit a square peg into a round hole by using it to store binary assets that you already have on disk.

Doh004
Apr 22, 2007

Mmmmm Donuts...
Can you customize the message/buttons that show up when your app is requesting permission to access something in the phone (contacts, etc.). I'd like to change the standard "YourApp is requesting permission to access blah". Currently using this code:

code:
ABAddressBookRef addressBook = ABAddressBookCreate();
    
    if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined) {
        ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
            // First time access has been granted
            [self parseContacts:addressBook];
        });
    }
    else if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusAuthorized) {
        // The user has previously given access
        [self parseContacts:addressBook];
    }
    else {
        // The user has previously denied access
        // Send an alert telling user to change privacy setting in settings app
        UIAlertView *alert = [[UIAlertView alloc] 
initWithTitle:@"Error" message:@"Please add to privacy settings" 
delegate:self cancelButtonTitle:nil otherButtonTitles:nil, nil];
        [alert show];
    }

Doh004 fucked around with this message at 16:51 on Nov 21, 2012

Doc Block
Apr 15, 2003
Fun Shoe
No. It's presented by the OS, specifically to prevent apps from modifying it.

Doh004
Apr 22, 2007

Mmmmm Donuts...

Doc Block posted:

No. It's presented by the OS, specifically to prevent apps from modifying it.

That's what I told my designer, but he insisted that he'd seen other apps do it. Maybe they had been doing their own sort of confirmations without using the real method for requesting permission.

Hughlander
May 11, 2005

It's too early in the morning for me to think, but I thought that one of the functions had an argument where you could add the 'reason' for the request. Obviously it's not ABAddressBookRequestAccessWithCompletion though.

bumnuts
Dec 10, 2004
mmm...crunchy
In iOS 6 you can provide a purpose string in your Info.plist that is displayed along with the OS prompt.

Doh004
Apr 22, 2007

Mmmmm Donuts...

bumnuts posted:

In iOS 6 you can provide a purpose string in your Info.plist that is displayed along with the OS prompt.

Hmm, I found it in the plist.

Anyone know how to get the simulator to require privacy access? For some reason, there are no apps listed as being able to access contacts in the simulator, so I can't reset privacy settings. I even completely reset the simulator and settings, but the simulator still assumes I have access to everything.

bumnuts
Dec 10, 2004
mmm...crunchy

Doh004 posted:

Hmm, I found it in the plist.

Anyone know how to get the simulator to require privacy access? For some reason, there are no apps listed as being able to access contacts in the simulator, so I can't reset privacy settings. I even completely reset the simulator and settings, but the simulator still assumes I have access to everything.

You'll have to use a device. Only CoreLocation prompts work on the simulator.

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?

duck pond posted:

Unrelated, I'm trying to do a thing where I subclass UIBezierPath so i can tack a bunch of wacky methods onto it

You don't need to subclass UIBezierPath to do this; you can just add your wacky methods in a category on UIBezierPath. Then they'll be available on all instances of the class, not just instances of your subclass. (Unless your wacky methods also require you add instance variables. But you can work around that using associated objects.)

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?

Hog Obituary posted:

I would bet the guy who quoted 6 months probably has a bunch of other projects in progress at the same time. Nobody (worthwhile) is going to do 6 months of dev work full time for $3k.

I suspect the senior developer wasn't saying "I'll do this over the course of six months for CDN$3K." Rather I think the senior developer's message was really "what you're asking for is about six months' work," implying "and not something you'll get for that pittance."

Six months of full-time work is a plenty realistic estimate for a real game created by an experienced developer.

duck monster
Dec 15, 2004

Has the OS/X cocoa application template been removed from XCode?

When I go into Xcode/Project -> OS X/Application , there are only options for Cocoa-Applescript application and Command line tool.

Where the heck is ObjC cocoa application? Its fucken wierd I have options to create preference planes, IOKIt drivers, Address book plugins and all manner of other cruft, but for the goddamn life of me I have no idea at all where the "Make an OS X app" thing is.

Was it moved? Seems wierd its not in application anymore.

edit: Mystery deepens: The files are all there in /Developer/Library/Xcode/Templates/Project\ Templates/Mac/Application/ and the newfangled /Applications/XCode.app based location, but they don't show up in new projects. Is this some sort of apple shitfuckery where they want me to pay money to write a god drat apple app now?

duck monster fucked around with this message at 17:24 on Nov 25, 2012

duck monster
Dec 15, 2004

Can someone tell me where the project templates are kept in Version 4.5.2 so I can copy these files here. I can find 3 different locations all with the right files, but there must be another location I'm missing what with apple being brain-broken and putting files in hidden loving locations so mere plebs cant fix brokenness.

lord funk
Feb 16, 2004

Still there for me.

Only registered members can see post attachments!

crazysim
May 23, 2004
I AM SOOOOO GAY

duck monster posted:

Has the OS/X cocoa application template been removed from XCode?

When I go into Xcode/Project -> OS X/Application , there are only options for Cocoa-Applescript application and Command line tool.

Where the heck is ObjC cocoa application? Its fucken wierd I have options to create preference planes, IOKIt drivers, Address book plugins and all manner of other cruft, but for the goddamn life of me I have no idea at all where the "Make an OS X app" thing is.

Was it moved? Seems wierd its not in application anymore.

edit: Mystery deepens: The files are all there in /Developer/Library/Xcode/Templates/Project\ Templates/Mac/Application/ and the newfangled /Applications/XCode.app based location, but they don't show up in new projects. Is this some sort of apple shitfuckery where they want me to pay money to write a god drat apple app now?

They've moved to including pretty much everything inside the Xcode application bundle now so Xcode could be distributed without the installer approach from the App Store.

duck monster
Dec 15, 2004

Well this is annoying. Its just not there. Even updated to the latest xcode and the stubborn thing just doesn't want to give me the option :(

e: Is there something I'm supposed to do to activate it, like "Download Cocoa api" or something obvious I'm missing?

Doc Block
Apr 15, 2003
Fun Shoe

duck monster posted:

e: Is there something I'm supposed to do to activate it, like "Download Cocoa api" or something obvious I'm missing?

Not that I'm aware of.

duck monster
Dec 15, 2004

There definately has to be a setting somewhere that supresses it.

I just nuked /Developer *and* /Application/Xcode.app and reinstalled 4.5 from a DMG and the motherfucking thing still isn't there.

Google, alas, is silent on the issue. Lots of people asking forums the same question, none recieving replies.

e: Cleared out any trace of Xcode from ~/Library/Application support , still missing. :fuckoff:

e2: Found it! Nuked ~/Library/Developer and it all started working again.

duck monster fucked around with this message at 22:42 on Nov 25, 2012

dizzywhip
Dec 23, 2005

I've been enrolled in the Mac developer program as an individual, but I've recently started a company so I'd like to transition to a business account. I'm debating between migrating my current individual account or creating a new Apple ID for my business. It makes more sense to me to keep them separate, but I'm wondering if it's going to be a hassle to maintain two different accounts. Anyone have experience with this?

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
When you log into the dev portal, iTC, or download certs via Xcode it will ask you which dev account you want to use so its fairly simple. So far, everything seems to be aware that I'm part of multiple developer accounts.

some kinda jackal
Feb 25, 2003

 
 
Yeah I have both a personal (free) account and a paid company account and it just asks which I'd like to use when I log in. It's pretty good even though I wish it would just give me access to all the assets I have available to me at any given time. Oh well.

Also apparently Apple stopped recognizing a Sole Proprietorship as an actual corporation like a week before I decided to get a paid developer account (a few years ago) :suicide:

Spent so much time/money (well, not that much money) registering a SP just for Apple and ended up not being able to use it anyway.

dizzywhip
Dec 23, 2005

Ah, that sucks :( Fortunately I registered a corporation. It sounds like a separate account is fine so I'll go with that. Thanks!

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
How did I only just figure out that
code:
[someUIScrollView setContentOffset:CGPointZero animated:NO];
is not at all the same as
code:
someUIScrollView.contentOffset = CGPointZero;
in that
  • sometimes the latter is seemingly ignored?
  • the latter doesn't stop a scroll or deceleration in progress?
and thus it seems rather pointless that the contentOffset property is readwrite?

Froist
Jun 6, 2004

Speaking of ScrollViews, I need to make an EPG style component. It will only have a few channels vertically (less than 10, with most of those being sparsely populated rather than 24 hours of broadcast) but needs to scroll horizontally for a week into the future. What's the best way to do this? I guess I could either make a huge scroll view and pre-populate it with all 7 days worth of programmes (if that won't cause performance issues), or copy the TableView and make up a showEntryAtTime/dequeueReusableShowEntry design pattern, regenerating the entries as the user scrolls around.

I've also (for a separate purpose) been having trouble trying to work out which page index a pagingEnabled ScrollView will snap to when the user stops interacting with it. There's the scrollViewWillEndDragging:withVelocity:targetContentOffset: delegate function which seems perfect, but it doesn't get called for paging ScrollViews. I've tried to hack around it by storing the contentOffset in scrollViewWillBeginDecelerating and checking which direction it's moved in the next call to scrollViewDidScroll, but it still seems to get tricked sometimes (and it feels dirty).

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
Are Bezier Path objects meant to be animated? I'm basically attempting to create a shaped progress bar with bezier paths, and while it works, it's done by redrawing the entire path with each increment. This seems way less efficient than extending an existing path, but this doesn't seem possible. Should I just be adding new points to a filled path and then refilling it? Or should I be using a different class?

Echo Video
Jan 17, 2004

chumpchous posted:

Are Bezier Path objects meant to be animated? I'm basically attempting to create a shaped progress bar with bezier paths, and while it works, it's done by redrawing the entire path with each increment. This seems way less efficient than extending an existing path, but this doesn't seem possible. Should I just be adding new points to a filled path and then refilling it? Or should I be using a different class?

Check out CAShapeLayer for animating bezier paths. A technique using layer masks might be applicable as well. It depends on how complex the shape you're trying to fill is.

duck monster
Dec 15, 2004

pokeyman posted:

How did I only just figure out that
code:
[someUIScrollView setContentOffset:CGPointZero animated:NO];
is not at all the same as
code:
someUIScrollView.contentOffset = CGPointZero;
in that
  • sometimes the latter is seemingly ignored?
  • the latter doesn't stop a scroll or deceleration in progress?
and thus it seems rather pointless that the contentOffset property is readwrite?

apple-api.txt

I'm constantly stumbling on stupid poo poo like this.

duck monster
Dec 15, 2004

Man, testflights so loving flakey sometimes :(

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Echo Video posted:

Check out CAShapeLayer for animating bezier paths. A technique using layer masks might be applicable as well. It depends on how complex the shape you're trying to fill is.

Thanks -- I'll check this out. It's low priority and I've never really messed around with CA before, so I'll see how it goes.

Doh004
Apr 22, 2007

Mmmmm Donuts...
Oh god, we're looking to submit our initial app to the app store come December 15th. I'm going through and trying to polish everything that I can to make it ready but I'm pretty nervous. I've read through some guides on what to do to make sure the approval process goes smoother, but do you guys have any tips/gotchas that I should consider?

Our our is pretty simple and it mirrors the information displayed on our websites/profiles, so nothing overly complex.

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

Doh004 posted:

Oh god, we're looking to submit our initial app to the app store come December 15th. I'm going through and trying to polish everything that I can to make it ready but I'm pretty nervous. I've read through some guides on what to do to make sure the approval process goes smoother, but do you guys have any tips/gotchas that I should consider?

Our our is pretty simple and it mirrors the information displayed on our websites/profiles, so nothing overly complex.

It's really no big deal, especially if the app isn't overly complex. Just make sure you've tested it properly before you submit it and you shouldn't have a problem. They aren't looking to spend hours and hours making sure there are no bugs -- they just want to make sure it isn't going to crash in the most common of circumstances. If you're really concerned, there's a way to test the AppStore build on a development device, but personally speaking I've never found that to be necessary. Just deleting the development version completely and reinstalling it before testing should be enough.

At worst, they reject it, tell you what to fix, and you do it all over again. They don't fine you, or send hired goons to your house or place of business to beat you up, and they've only ever caught bugs that would've seriously hosed my app had it been released, so when you get down to it, they're reasonably helpful. They've failed to find, both in my apps and (clearly) others, many embarrassing bugs.

Realistically, as long as you've followed Apple's clearly-stated rules and submit them a bug-free product, it's going to get through no problem.

EDIT: Are you using SSL to secure profiles or anything? If so, you will have to go through the ORDEAL OF PAIN with the US government to get export compliance or some weird paranoid yankee poo poo.

PT6A fucked around with this message at 18:16 on Nov 30, 2012

Adbot
ADBOT LOVES YOU

Doc Block
Apr 15, 2003
Fun Shoe

PT6A posted:

EDIT: Are you using SSL to secure profiles or anything? If so, you will have to go through the ORDEAL OF PAIN with the US government to get export compliance or some weird paranoid yankee poo poo.

I was under the impression you don't need to seek export permission if you're using the built-in crypto libraries (including SSL), since Apple has already gone ahead and gotten export permission for those.

Otherwise there are thousands and thousands of apps in violation: every app that uses Facebook's SDK, an OAuth library, Flurry, etc.

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