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
Doh004
Apr 22, 2007

Mmmmm Donuts...

pokeyman posted:

Cookies shouldn't be cleared between builds, so I'm not sure what that's about.

That said, you can grab the cookies from NSHTTPCookieStorage, grab their properties dictionary, and save that. Then you can deserialize them as needed.

That doesn't want to work. :(

I've been reading up, and the cookie we're returning doesn't have an expiration. So I tried setting that manually as supposedly if it doesn't have an expiration it gets destroyed after the session is over (ie the app restarts). However, that doesn't seem to work. When I restart the app (via command + r), there are no cookies. :(

*edit* Hmm, expiresDate isn't being set when I create the new cookie!

code:
NSDate *tomorrow = [NSDate dateTomorrow];
NSMutableDictionary *properties = [[NSMutableDictionary alloc] initWithDictionary:cookie.properties ];
[properties setObject:tomorrow  forKey:NSHTTPCookieExpires];
NSHTTPCookie *newCookie = [NSHTTPCookie cookieWithProperties:properties];

Doh004 fucked around with this message at 22:46 on Nov 12, 2012

Adbot
ADBOT LOVES YOU

Froist
Jun 6, 2004

DreadCthulhu posted:

Any recommendations for really cheap/free but still effective analytics services? I like the Mixpanel UX, but it gets really expensive really fast. They insist you only track a couple of events, but at my app's really early evolution stage I need to know everything about it.

I've been really happy with Flurry, it's totally free (optionally ties in with their advertising products, so there's the revenue stream) and trivial to integrate.

Doc Block
Apr 15, 2003
Fun Shoe
Gonna second Flurry. The analytics don't cost anything and are useful and easy to integrate. Plus they don't care how many events you have; they even recommend having events for everything so you can track users' flow through your app.

Though, according to them, someone is running one of my apps on an iOS 4 device, despite the app requiring iOS 5 to work (iOS 4 doesn't even have all the frameworks I'm using). v:shobon:v

tarepanda
Mar 26, 2011

Living the Dream
What's up with this rapid pace of iOS updates? Is this normal for Apple?

some kinda jackal
Feb 25, 2003

 
 
Pretty much. Plus I'm sure they're really raring to fix the poo poo out of iOS Maps.

Doh004
Apr 22, 2007

Mmmmm Donuts...

Doh004 posted:

That doesn't want to work. :(

I've been reading up, and the cookie we're returning doesn't have an expiration. So I tried setting that manually as supposedly if it doesn't have an expiration it gets destroyed after the session is over (ie the app restarts). However, that doesn't seem to work. When I restart the app (via command + r), there are no cookies. :(

*edit* Hmm, expiresDate isn't being set when I create the new cookie!

code:
NSDate *tomorrow = [NSDate dateTomorrow];
NSMutableDictionary *properties = [[NSMutableDictionary alloc] initWithDictionary:cookie.properties ];
[properties setObject:tomorrow  forKey:NSHTTPCookieExpires];
NSHTTPCookie *newCookie = [NSHTTPCookie cookieWithProperties:properties];

I ended up fixing this by manually recreating the properties dictionary instead of copying it over. I guess it was retaining some setting that I was missing that wasn't allowing me to set the expiresDate.

lord funk
Feb 16, 2004

Is there any way to stop autocomplete guessing objects that I have never even used?

UIColor *aColor = [UICollectionElementCategoryCell

THANKS AUTOCOMPLETE THAT'LL DO

Hog Obituary
Jun 11, 2006
start the day right

lord funk posted:

Is there any way to stop autocomplete guessing objects that I have never even used?

UIColor *aColor = [UICollectionElementCategoryCell

THANKS AUTOCOMPLETE THAT'LL DO

heh http://www.textfromxcode.com/post/24542673087

I thought the latest Xcode (4.5-ish?) was supposed to be better about that. What version are you on?

lord funk
Feb 16, 2004

Hog Obituary posted:

heh http://www.textfromxcode.com/post/24542673087

I thought the latest Xcode (4.5-ish?) was supposed to be better about that. What version are you on?

4.5.1. I think when they announced that it was better was exactly when it stopped being nice to me.

klem_johansen
Jul 11, 2002

[be my e-friend]
I'm running into a weird issue with SQLite. It works fine for a certain number of database calls and then fails. I can run the app several different ways and the error seems random. The fact that it always seems to fail (even in the simulator) after a certain number of database calls tells me that I'm doing something wrong in my db calls. I'm using a subclass for my sql calls. Here's a typical example of a function (assuming sqlite3 *db" is in the header).

....

Edit: never mind. I found a DB call inside of a function that also calls the DB. Opening the sqlite file while it's already open causes issues. I made sure we finalized each call before closing the db and it looks like that fixed it.

klem_johansen fucked around with this message at 21:56 on Nov 13, 2012

Doc Block
Apr 15, 2003
Fun Shoe

lord funk posted:

Is there any way to stop autocomplete guessing objects that I have never even used?

UIColor *aColor = [UICollectionElementCategoryCell

THANKS AUTOCOMPLETE THAT'LL DO

Just turn autocomplete off. Then you can hit Escape when you want an autocomplete suggestion for whatever you're typing (and it will continue to refine its guess as you type), but won't get pestered by it when you don't want to be.

Doh004
Apr 22, 2007

Mmmmm Donuts...

Hog Obituary posted:

heh http://www.textfromxcode.com/post/24542673087

I thought the latest Xcode (4.5-ish?) was supposed to be better about that. What version are you on?

I like this blog.

Hog Obituary
Jun 11, 2006
start the day right
Why does Xcode change around my xib files under the covers when all I did was click on an element? (i.e. this)

I don't actually expect a real answer.

edit, well I guess I got one: http://stackoverflow.com/questions/5900245/how-to-avoid-xcode-4s-gratuitous-edits-to-xib-files

Hog Obituary fucked around with this message at 06:43 on Nov 14, 2012

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!

Hog Obituary posted:

Why does Xcode change around my xib files under the covers when all I did was click on an element? (i.e. this)

I don't actually expect a real answer.

edit, well I guess I got one: http://stackoverflow.com/questions/5900245/how-to-avoid-xcode-4s-gratuitous-edits-to-xib-files

That is indeed annoying. Trying to avoid accidentally clicking on a .xib is not a good use of anybody's time.

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.
:laffo: at there being a bug report that engineers are working on. That's just one of those Xcode things that has always and will always be. We have to do a lot of fingerprinting of apps in my industry, and we've always had to exclude nib files for similar reasons.

We had a haunted xib appear in 4.5 that would suddenly fail to compile and would crash Xcode if you attempted to open it. If you accidentally clicked on it, Xcode would be in a crashing loop until you did a fuxcode. One of our engineers had a blast wasting half a day rebuilding that extremely complicated xib he made two years ago again from scratch.

edit: The easiest way to avoid constantly changing xibs by accident is to manually touch every single xib in Xcode whenever a new Xcode build is installed, then commit all of the phantom changes at once. It never seems to happen more than once per Xcode version per file.

ManicJason fucked around with this message at 08:57 on Nov 14, 2012

duck pond
Sep 13, 2007


i just wanna say i had this idea for a popover numpad just the other day

duck pond
Sep 13, 2007

Unrelated, I'm trying to do a thing where I subclass UIBezierPath so i can tack a bunch of wacky methods onto it, and I'm having some trouble doing so as it doesn't have any initialisation methods.

in VOBezierPath.h:
code:
@interface VOBezierPath : UIBezierPath
{
    VOBezierPathState state;
}

@property (nonatomic) VOBezierPathState state;

- (id)initWithPoint:(CGPoint)endPoint;
and in VOBezierPath.m:
code:
- (id)initWithPoint:(CGPoint)endPoint
{
    VOBezierPath *path = [super bezierPath];
    if (path) {
        path.state = VOBezierPathNew;
    }
    return path;
}
and I get the warning: No visible @interface for 'UIBezierPath' declares the selector 'bezierPath'.
Even tried VOBezierPath *path = (VOBezierPath *)[super bezierPath]; with no luck.

Doc Block
Apr 15, 2003
Fun Shoe

ManicJason posted:

edit: The easiest way to avoid constantly changing xibs by accident is to manually touch every single xib in Xcode whenever a new Xcode build is installed, then commit all of the phantom changes at once. It never seems to happen more than once per Xcode version per file.

XIBs store the version of IB they were built with. Opening them in a newer version of Xcode updates this, hence the phantom change.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Doc Block posted:

XIBs store the version of IB they were built with. Opening them in a newer version of Xcode updates this, hence the phantom change.

That's hardly the only thing that changes seemingly arbitrarily.

What I don't get is why does Xcode re-serialize the nibs and storyboards when you open them? It's one thing if I make a change and Xcode goes "oh hey, while I'm saving this, I'ma bump the version number", or "I'm opening all these nibs and I need to migrate them to the new version". It's the one at a time, only when you open it that strikes me as weird.

At least there's been progress. There used to only be straight-up binary nibs, which were entirely un-diffable. Now it's possible to see the phantom changes, if not do anything about them.

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

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, and I'm having some trouble doing so as it doesn't have any initialisation methods.

in VOBezierPath.h:
code:
@interface VOBezierPath : UIBezierPath
{
    VOBezierPathState state;
}

@property (nonatomic) VOBezierPathState state;

- (id)initWithPoint:(CGPoint)endPoint;
and in VOBezierPath.m:
code:
- (id)initWithPoint:(CGPoint)endPoint
{
    VOBezierPath *path = [super bezierPath];
    if (path) {
        path.state = VOBezierPathNew;
    }
    return path;
}
and I get the warning: No visible @interface for 'UIBezierPath' declares the selector 'bezierPath'.
Even tried VOBezierPath *path = (VOBezierPath *)[super bezierPath]; with no luck.

Uhhh... You certainly can't initialize that way. You are creating a new auto released instance of bezierPath, unrelated to the actual storage alloc created for your subclass. That's a guaranteed path to leakytown if nothing else, plus the storage super created wont be big enough to hold any of your properties so its going to crash sooner or later.

Super has an init method, you should be calling it. I bet if you checked UIBezierPath's super chain you would find the designated initializer in there somewhere.

HiriseSoftware
Dec 3, 2004

Two tips for the wise:
1. Buy an AK-97 assault rifle.
2. If there's someone hanging around your neighborhood you don't know, shoot him.
I have an iOS app project that has a dependency on a static library project (this is Xcode 4.4). Everything compiles, links and deploys to a device just fine when I go from a clean build, but the problem I have is that if I want to make a change to one of the static library's sources (and not any of the app sources) and then run, it compiles but doesn't deploy to the device again. In order for my changes to deploy, I have go from a clean build. Is there some sort of build setting that I'm not seeing that would allow this to happen? I have "Skip Install" set to No for both the library and app (I do have it set to "Yes" for the app in my Distribution build though). My app project's linker flags are "-ObjC -l<static library>"

If I can get this figured out, there'll be no more compile coffee breaks for me! Actually it's not terribly long it's just still a productivity bottleneck.

lord funk
Feb 16, 2004

duck pond posted:

i just wanna say i had this idea for a popover numpad just the other day

I mentioned it earlier but once I get a spare moment I'll post the code. Easy enough to do, but stupid that I had to do it.

Doc Block
Apr 15, 2003
Fun Shoe

HiriseSoftware posted:

I have an iOS app project that has a dependency on a static library project (this is Xcode 4.4). Everything compiles, links and deploys to a device just fine when I go from a clean build, but the problem I have is that if I want to make a change to one of the static library's sources (and not any of the app sources) and then run, it compiles but doesn't deploy to the device again. In order for my changes to deploy, I have go from a clean build. Is there some sort of build setting that I'm not seeing that would allow this to happen? I have "Skip Install" set to No for both the library and app (I do have it set to "Yes" for the app in my Distribution build though). My app project's linker flags are "-ObjC -l<static library>"

If I can get this figured out, there'll be no more compile coffee breaks for me! Actually it's not terribly long it's just still a productivity bottleneck.

You shouldn't have to manually add them in the linker flags. Add their xcode projects as dependencies, then go into your app target's build settings under the Build Phases tab, and add the libraries in the Link Phase.

That way changing the library sources will also cause your app to be relinked.

duck pond
Sep 13, 2007

Ender.uNF posted:

Uhhh... You certainly can't initialize that way. You are creating a new auto released instance of bezierPath, unrelated to the actual storage alloc created for your subclass. That's a guaranteed path to leakytown if nothing else, plus the storage super created wont be big enough to hold any of your properties so its going to crash sooner or later.

Super has an init method, you should be calling it. I bet if you checked UIBezierPath's super chain you would find the designated initializer in there somewhere.

Thankyou, I knew was doing something drastically wrong. For the record this works fine (like any other class, I guess...):

code:
- (id)initWithPoint:(CGPoint)point
{
    self = [super init];
    if (self) {
        self.state = VOBezierPathNew;
        [self moveToPoint:point];
    }
    return self;
}

Doh004
Apr 22, 2007

Mmmmm Donuts...
Sorry, another cookie issue.

Pushing the app to a physical device causes the cookies to not be saved. Yet the same exact code works perfectly fine on the simulator. This is in iOS 6.

Steps:
Push app to test device while debugging
Login, store cookie, confirm cookie is there
Command + R in XCode and restart the app
Cookie is no longer there

Any ideas?

tarepanda
Mar 26, 2011

Living the Dream
Did the provisioning portal just die for anyone else?

It's working now.

tarepanda fucked around with this message at 02:49 on Nov 15, 2012

Glimm
Jul 27, 2005

Time is only gonna pass you by

lord funk posted:

4.5.1. I think when they announced that it was better was exactly when it stopped being nice to me.

Yes this is my experience as well. I remember updating and being so happy I wouldn't have stupid auto-complete suggestions as often, and it has only gotten much, much worse.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
Anyone have some guides, videos, etc for Mac development, but oriented toward iOS developers? I have only the vaguest grasp of AppKit development and my understanding is that it sucks compared to UIKit.

I know there are plenty of resources for someone trying to learn Mac development, but I just want one that focuses on stuff like "in UIKit you have the App delegate, in AppKit you have X" or "in UIKit, you use storyboards like X, in AppKit use Y or Z instead".

Doc Block
Apr 15, 2003
Fun Shoe

Ender.uNF posted:

Anyone have some guides, videos, etc for Mac development, but oriented toward iOS developers? I have only the vaguest grasp of AppKit development and my understanding is that it sucks compared to UIKit.

I know there are plenty of resources for someone trying to learn Mac development, but I just want one that focuses on stuff like "in UIKit you have the App delegate, in AppKit you have X" or "in UIKit, you use storyboards like X, in AppKit use Y or Z instead".

There's this blog post written by an iOS developer who had to write a Mac app. His blog also has a few later posts about Mac development from an iOS developer's perspective.

HiriseSoftware
Dec 3, 2004

Two tips for the wise:
1. Buy an AK-97 assault rifle.
2. If there's someone hanging around your neighborhood you don't know, shoot him.

Doc Block posted:

You shouldn't have to manually add them in the linker flags. Add their xcode projects as dependencies, then go into your app target's build settings under the Build Phases tab, and add the libraries in the Link Phase.

That way changing the library sources will also cause your app to be relinked.

Holy crap you are a GENIUS! :)

Edit: If I have a custom key in my Info.plist, is there any way to create a "human readable" version of the key like in the default set of keys?

HiriseSoftware fucked around with this message at 05:25 on Nov 15, 2012

Doc Block
Apr 15, 2003
Fun Shoe

pokeyman posted:

That's hardly the only thing that changes seemingly arbitrarily.

What I don't get is why does Xcode re-serialize the nibs and storyboards when you open them? It's one thing if I make a change and Xcode goes "oh hey, while I'm saving this, I'ma bump the version number", or "I'm opening all these nibs and I need to migrate them to the new version". It's the one at a time, only when you open it that strikes me as weird.

At least there's been progress. There used to only be straight-up binary nibs, which were entirely un-diffable. Now it's possible to see the phantom changes, if not do anything about them.

If you open a XIB in IB, the File Inspector tab of the Inspector bar on the right will show various info about the XIB.

In the Versioning subsection there's a Development setting. The default is something like "Previous Version" (so it'll still work with the previous version of Xcode, in case all your devs don't upgrade at once). So what happens is that you open it in the new version of Xcode and it updates the XIB's stored "Developed with IB version..." key and serialization to the last version of Xcode. And since there's been a change to the XIB, Xcode wants you to save it.

However, you can set this to a specific Xcode version, and then from then on Xcode won't update the version info in your XIBs when you open them in a new version of Xcode. Which means it won't make "phantom" changes.

Ditto for the Deployment version setting.

As to why it doesn't just upgrade them all at once, I imagine it's at least partly to prevent breaking things if anything changes between OS/SDK versions in the XIB values but the view controller code and whatnot haven't been updated, so that the entire program doesn't all break at once. If a programmer opens a XIB, it's a signal that they're working on that part of the app and it's OK to go ahead and update the XIB.

Doc Block fucked around with this message at 04:40 on Nov 15, 2012

Lando2
Jan 16, 2010

Turns out just hunks
I am extremely interested in bringing a few of my ideas onto the App store but don't know how to code for poo poo. I have $5,000 CDN at the moment. Is this enough to fund a project that requires both UI (I have the layouts and how everything fits together, but I would probably need someone to make it nice and pretty in photoshop) and complete code for a game not unlike Football Manager 2012 or other Soccer simulator? Pretty much randomly generated players and statistics, along with some basic AI behavior (Putting players in the right positions) with a focus on manager progression. I plan on focusing on a different market but depth is my main selling point. Graphics are slim, 2D portraits of people and scenic backgrounds.

I got quoted 500-600 hrs and about $12,500 from a company called NIX Solutions. They had an OK portfolio, nothing great and estimated delivery would be about 3 months. I have gotten some replies with companies with more flare which is what I am going after but haven't received actual quotes back yet after detailing my game some more.

Just wondering if this is plausible to some people in this thread or should I just think smaller for now.

Doc Block
Apr 15, 2003
Fun Shoe
I dunno if $5000 will get you a game from an experienced developer. Might be able to get an inexperienced one to bite, though, especially if they're just a lone developer.

edit: as a lone, somewhat inexperienced developer with two apps in the app store I might be interested, though. Would you be willing to PM or e-mail me some info? (sean AT seanridenour.com)

Doc Block fucked around with this message at 20:49 on Nov 15, 2012

Lando2
Jan 16, 2010

Turns out just hunks
I don't have PM's. But I have a basic job summary on oDesk if you'd like to take a look at it, just apply or send me a message there:

https://www.odesk.com/jobs/Experienced-Android-iOS-programmer-Designer_~0184af35b5b0cdb830?tot=31&pos=0

I've gotten almost triple the amount of responses on oDesk than elance but also more spam from random developers. I am aiming to start this in the new year, I figure Xmas schedules will be tough depending on the applicant. My current budget is $3,000 to see if I get any bites and out of 20+ applicants so far I've shortlisted 5 that have what I am looking for. I'm just not sure if their budget is accurate based on the information I gave.

And as for the experienced developer part I woke up to a guy named Steve M. messaging me. His work history includes:
- Lead Games Engine Programmer. / Team Lead at UBI Soft Inc
- Lead Games Engine Programmer. / Team Lead at Rockstar Games
- Senior Software Engineer / Team Lead at Microsoft
He's been a rogue developer for 5+ years now so I just sent him an email asking for an updated quote based on some new information and some menu designs, he listed estimated completion at 6 months though, which sucks.

tarepanda
Mar 26, 2011

Living the Dream

Lando2 posted:

he listed estimated completion at 6 months though, which sucks.

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

tarepanda fucked around with this message at 01:58 on Nov 16, 2012

Lando2
Jan 16, 2010

Turns out just hunks
Thanks for suggestion. What was it again?

By all means give me some feedback or tips but you kind of just reworded my post.

Lando2 fucked around with this message at 02:54 on Nov 16, 2012

tarepanda
Mar 26, 2011

Living the Dream
My point was that you have unreasonable expectations for what you're offering.

Lando2
Jan 16, 2010

Turns out just hunks
poo poo. Double post

Lando2 fucked around with this message at 03:14 on Nov 16, 2012

Lando2
Jan 16, 2010

Turns out just hunks
So...$5000? $10000?

I'm asking what is about right before I hand a project off to some kid in Pakistan who "very much can help and meet requirements of this project sir or madam".

I know who I'm looking for I just don't know what's fair to programmers or how long a project like this will take. Throw me a bone.

Adbot
ADBOT LOVES YOU

tarepanda
Mar 26, 2011

Living the Dream
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?

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