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...

Doc Block posted:

IIRC you can mention that users must already have an account or need to go make one, but not have a link to your site's sign up page in the app.

That's how Hulu and Netflix get away with not having to give Apple 30%.


Doctor w-rw-rw- posted:

Login roadblock, prominent notice on the description that an account is required, no links telling them to subscribe or ability to do so in the app.

Apple might be finicky but their mindset is that if you used them to acquire a user, they want their tax. Approach writing your copy with that in mind. This means that a link to sign up, e en if the form is an external website, is verboten but a "you need a blah.com account to use this app" should be okay. Sometimes they get picky and even a '.com' will get them antsy and they'll ask you to remove that.

Ok cool, this is what I had gathered as well. Thanks for the help guys :)

Adbot
ADBOT LOVES YOU

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
I'm working on an OS X project that is going to record video and try to compress it in realtime. Currently, I'm using QTKit to set up a QTCaptureSession and then do the usual enumerating of devices and starting the capture. However, there's very little configuration that is allowed in this format, you have to use the Apple-supplied presets. Is there any way to capture video (whether it's AVFoundation or QTKit, or whatever) and pass it to an encoder with more fine-grained control?

lmao zebong
Nov 25, 2006

NBA All-Injury First Team
Does anybody have any recommendations for iOS unit testing frameworks? I know there's a built in one in Xcode but I was curious if anybody used another and found it better. My team hasn't used unit testing very extensively in the past and I'm looking into our options here. Any advice is appreciated.

Hughlander
May 11, 2005

lmao zebong posted:

Does anybody have any recommendations for iOS unit testing frameworks? I know there's a built in one in Xcode but I was curious if anybody used another and found it better. My team hasn't used unit testing very extensively in the past and I'm looking into our options here. Any advice is appreciated.

We use a few things where I work. OCMock/OCUnit was traditionally used. Then we started doing a lot more Functional/Integration tests with KIF. Lately we're using GUnit/GMock to keep tests cross-compilable with Android.

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch

Yodzilla posted:

Am I just missing something or does the new Organizer in Xcode no longer tell you how many devices are assigned to a Provisioning Profile? I used to be able to just log in to the iOS Dev Center, add devices, update the profile and click Refresh and I'd see that the number of devices assigned would change to whatever I'd assigned online. Now it seems that they've removed the device count (it used to be right above the table header) and hitting Refresh no longer actually syncs my profiles with what's in my Dev Center. I have to now manually download the profile, add it to the Organizer, delete the old one and then reassign the Code Signing identities to the newly added profile. Did some core functionality change or is the Organizer now just kinda busted?

I'm quoting my own post because now Xcode isn't updating my code signing profiles at all. When I go to set code signing for my project it's showing profiles that I've long deleted and doesn't match what's in my organizer at all. If I try to add a new profile to the organizer it doesn't show up here so...is something just cached? Why is this all of the sudden a problem after working fine for years? What is Refresh supposed to do if it doesn't pull down from the Apple Dev Center any more?


e: and i just realized that Xcode is no longer showing up in Spotlight :wtc:

Yodzilla fucked around with this message at 16:52 on Feb 21, 2013

Doh004
Apr 22, 2007

Mmmmm Donuts...
Anyone know how I can have a UITableView's scrollView expand outside of the TableView's bounds? Say my table view is 700pt wide and is centered inside of 1000pt. I'd like for the scrollview to listen to the empty space on the sides.

*edit* Nevermind! I ended up just adding the TableView inside of a new ScrollView. :)

*edit #2* Ah crap, now the tableview isn't requesting new cells as I scroll down, duh. Gotta find a way for the two to talk :\

*edit #3* I got it. Realized I was overcomplicating things. Now I just add extra padding depending on the orientation to the view I add to the cell's contentView. Screw extra scroll views and managing other scroll view's offset. That poo poo sucked.

Doh004 fucked around with this message at 20:09 on Feb 21, 2013

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

CRIP EATIN BREAD posted:

I'm working on an OS X project that is going to record video and try to compress it in realtime. Currently, I'm using QTKit to set up a QTCaptureSession and then do the usual enumerating of devices and starting the capture. However, there's very little configuration that is allowed in this format, you have to use the Apple-supplied presets. Is there any way to capture video (whether it's AVFoundation or QTKit, or whatever) and pass it to an encoder with more fine-grained control?

Well with AVFoundation you can specify stuff like AVVideoMaxKeyFrameIntervalKey, AVVideoAverageBitrateKey, AVVideoPixelAspectRatioKey, AVVideoProfileLevelKey, etc. AVAssetWriter can take raw pixel buffers, existing files, etc as input and do the transform, encoding in realtime or offline.


If you want to really tweak the esoteric settings of the MPEG encoder, I'm not sure about that.

dizzywhip
Dec 23, 2005

Whew, I just submitted my first app to the app store after 2 long years of work! Many thanks to everyone in this thread that's helped me out.

It's called Tabular and it's a pretty kickass tablature editor for stringed instruments and drums.

Fun stats:

There have been 1619 commits in git. The first one was on January 23, 2011, which puts the development time at 762 days. Output from CLOC:

code:
    -------------------------------------------------------------------------------
    Language                     files          blank        comment           code
    -------------------------------------------------------------------------------
    Objective C                    164           9642           5284          31408
    C/C++ Header                   164           2159           3680           3697
    -------------------------------------------------------------------------------
    SUM:                           328          11801           8964          35105
    -------------------------------------------------------------------------------
I'm really excited. I quit my job about three months ago to work on this full time, so I really hope it does well enough for me to continue doing this.

Doc Block
Apr 15, 2003
Fun Shoe
Submitting your first app is super exciting. Hope yours does well.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Gordon Cole posted:

Whew, I just submitted my first app to the app store after 2 long years of work! Many thanks to everyone in this thread that's helped me out.

Congrats dude! Break a leg :)

I should get on writing some app as soon as I can figure out what the hell I want to write.

Toady
Jan 12, 2009

Gordon Cole posted:

Whew, I just submitted my first app to the app store after 2 long years of work! Many thanks to everyone in this thread that's helped me out.

It's called Tabular and it's a pretty kickass tablature editor for stringed instruments and drums.

Fun stats:

There have been 1619 commits in git. The first one was on January 23, 2011, which puts the development time at 762 days. Output from CLOC:

code:
    -------------------------------------------------------------------------------
    Language                     files          blank        comment           code
    -------------------------------------------------------------------------------
    Objective C                    164           9642           5284          31408
    C/C++ Header                   164           2159           3680           3697
    -------------------------------------------------------------------------------
    SUM:                           328          11801           8964          35105
    -------------------------------------------------------------------------------
I'm really excited. I quit my job about three months ago to work on this full time, so I really hope it does well enough for me to continue doing this.

Try running gource on it. That's always fun.

dizzywhip
Dec 23, 2005

Carthag posted:

Congrats dude! Break a leg :)

I should get on writing some app as soon as I can figure out what the hell I want to write.

Doc Block posted:

Submitting your first app is super exciting. Hope yours does well.

Thank you both :)

Toady posted:

Try running gource on it. That's always fun.

Haha, that's really cool! What a neat idea.

Doh004
Apr 22, 2007

Mmmmm Donuts...
I'm trying to get this NSParagraphStyle to work because I wanted to reduce the line height between two lines of a UILabel. For some reason, the paragraph isn't word wrapping and I'm a bit confused as to why. I've set the UILabel.numberOfLines = 0, just as I would when doing this normally (without the NSParagraphStyle), and I've also set the linebreakmode on the Style. I know I've set the size correctly and I've verified that the long text isn't wrapping (but setting the UILabel to be super wide and it actually shows up).

Anyone else run into this issue? I'm a bit confused :(

Doc Block
Apr 15, 2003
Fun Shoe
Have you set the line break mode of the UILabel?

Objective-C code:
label.lineBreakMode = NSLineBreakByWordWrapping;    // use UILineBreakModeWordWrap if your deployment target is earlier than iOS 6

Doc Block fucked around with this message at 21:44 on Feb 26, 2013

Doh004
Apr 22, 2007

Mmmmm Donuts...

Doc Block posted:

Have you set the wrapping style of the UILabel?

Yes, I've set mylabel.lineBreakMode = NSLineBreakModeWordWrap (or whatever it is off the top of my head).

Doc Block
Apr 15, 2003
Fun Shoe
And adjustsFontSizeToFitWidth and adjustsLetterSpacingToFitWidth are both set to NO?

LP0 ON FIRE
Jan 25, 2006

beep boop

lord funk posted:

Yeah those are separate. As long as the app has a bundle identifier that the profile accepts (e.g., com.stayonthescene.*), you can revoke / create a new profile with the new certificate and they'll pair up just fine.

This seems like it's not working for me! And for an example of the stuff I've come across that says I have to rebuild the app: http://stackoverflow.com/questions/3829422/expiration-certificate-iphone-in-house-enterprise-deployment

I created a new distribution certificate and profile with the same bundle id. When I attempt to install the app it hangs for a while on the last bit of the progress bar and finally says "SubCom failed to install".

ManicJason
Oct 27, 2003

He doesn't really stop the puck, but he scares the hell out of the other team.
I'll have to talk to a former co-worker of mine that had some issues with our enterprise certificate before he left. I don't know the details, but I do know that he ended up making a new wildcard profile and that this ended up instantly revoking our old one (!) even though he was led to believe that it would not. This meant we got to push out emergency builds to all of our clients. Luckily we hang onto all of our Xcarchives, so we were able to resign the same builds and push them out through our automatic updates nearly instantly.

We also just hit the fun limit of 100 devices under our company dev license. Apparently we're boned until our next renewal in a few months. Good thing most of my coworkers and I have plenty of slots left on our personal licenses.

LP0 ON FIRE
Jan 25, 2006

beep boop
From the Code Signing Identity drop down I had to choose Refresh Code Signing Identity! This replaced the top most one I chose last time. Now it works!

Doh004
Apr 22, 2007

Mmmmm Donuts...

Doc Block posted:

And adjustsFontSizeToFitWidth and adjustsLetterSpacingToFitWidth are both set to NO?

Yes, that's correct.

I'm just confused as I'm able to get it to wrap when not using the AttributedString, and just using a normal string.

Doc Block
Apr 15, 2003
Fun Shoe
AFAIK when you're using attributed strings it converts them to HTML and uses a web view to display them instead of just doing it with straight CoreText, which seems wasteful to me.

Doc Block
Apr 15, 2003
Fun Shoe
Also, does anyone know the status of TWTweetComposeViewController and SLComposeViewController re: Twitter API v1.1?

I've got two apps that use the built-in Twitter integration to allow users to send tweets from within the apps, and I don't want them to break March 5th. Both apps use TWComposeViewController on iOS 5 and SLComposeViewController on iOS 6.

Searching Google yields loads of tutorials and whatnot for using the Twitter integration, but I can't seem to find anything about what Twitter API version they use.

Doc Block fucked around with this message at 02:46 on Feb 27, 2013

Small White Dragon
Nov 23, 2007

No relation.
Anybody have any good scripts for retrieving exchange rates from iTunes Connect?

haveblue
Aug 15, 2005



Toilet Rascal

Small White Dragon posted:

Anybody have any good scripts for retrieving exchange rates from iTunes Connect?

If this is for an IAP store, it's not exposed like that, you're expected to retrieve the price in local currency from the SKProduct and the currency symbol from the locale.

Books On Tape
Dec 26, 2003

Future of the franchise
I'm about halfway done with my first app and managing viewcontrollers still confuses me on some level.

The game I'm programming needs to be set up so that the first time it is run, the players gets an introduction/tutorial/character selection. After that, the game uses a tabbarcontroller to manage the various screens of the game. I'll be using a BOOL saved variable as a flag in the appdelegate to determine if the intro needs to be run or if it goes straight to the tabbarcontroller, but my question is, when the game's intro is complete on first run and it's ready to go to the tabbarcontroller, how do I go back and change the rootviewcontroller and set it to the tabbarcontroller?

Doh004
Apr 22, 2007

Mmmmm Donuts...

Doc Block posted:

AFAIK when you're using attributed strings it converts them to HTML and uses a web view to display them instead of just doing it with straight CoreText, which seems wasteful to me.

Well that's just silly. Oh well, I'll just keep the extra line spacing. Thank you for your help.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

jerkstore77 posted:

when the game's intro is complete on first run and it's ready to go to the tabbarcontroller, how do I go back and change the rootviewcontroller and set it to the tabbarcontroller?

The same way you set the intro as the root view controller? Find the window, set the property, for example:

[[UIApplication sharedApplication] keyWindow].rootViewController = tabBarController

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
Page flow question

Should all page transitions be possible as far as not crashing is concerned? I understand that the flow might not make any sense to the user, but as far as the code is concerned, should I keep controllers abstracted enough from each other that technically you could present or navigate from any one to another at any point?

Why am I asking?

I'm working on implementing a tips system that would occasionally popup a notification to the user after some app use, and I'm noticing that I have to continuously check what current controller I'm on before I can present the tip. Basically there's enough coupling between controllers that I need to do checks like: "Is the top presented controller or controller on top of navigation stack the main menu? If so then you can transition to this other controller, otherwise wait until you're back to the main menu".

The above approach is somewhat painful to work with because sometimes that check doesn't quite work (for example for mail writer modal) and you have to make sure that all possible transitions don't cause you to crash. Have you guys had to deal with this before?

HaB
Jan 5, 2001

What are the odds?
Is there some sort of Collection object in Obj-C that maintains insertion order?

An equivalent to SortedDictionary in C#?

I am converting over a program I wrote in C# a while back and this is the last thing I am having trouble with. The program builds an alphabetic table, 26 x 26.

The way it works is: you take a keyword, say 'whiskey' You tack on the remaining chars in the alphabet onto the end: 'whiskeyabcdfgjlmnopqrtuvxz'

Each character in that string now becomes a column heading. For the first alphabet (column W) you simply reverse that: 'zxvutrqponmligfdcbayeksihw' and for each subsequent column, you shift that string one char to the left: column H = 'xvutrq...z;, column I = vutrqponml...' and so on, until you have done it 26 times.

So I have code to do all that, and insert each value into an NSMutableDictionary using the single Column character as the key, and the alpha string as the object. Problem is - I do a similar step to build the table rows, but it relies on the columns being in the original order: W, H I, S, K, E, Y, A, B, C etc.

If I use [columns keyEnumerator] they come back out in alpha order: A, B, C, D, etc. which hoses everything after.

So once again - in C# I used SortedDictionary which preserves the order of insertion. This function isn't getting called often and it's such a light app anyway that I don't mind a solution that's inelegant and/or inefficient. I'm just new to Obj-C so I'm not really sure what I should even be googling for.


I have the C# version running and they match up until I get to the next step. So...help?

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.

HaB posted:

Is there some sort of Collection object in Obj-C that maintains insertion order?

An equivalent to SortedDictionary in C#?

How about keeping an array of keys that match to the keys in your dictionary (e.g. you remove a key from the dictionary, you remove it from the array), and then just iterate over that array and pick out the objects from the dictionary that way?

Doing some research, I think that is what http://www.cocoawithlove.com/2008/12/ordereddictionary-subclassing-cocoa.html does.

LP0 ON FIRE
Jan 25, 2006

beep boop
In a game I have a really big class (I guess it's my abstract class) that I keep on adding categories to. I only do this when I feel that I need to take advantage of this class and there's no where else it could be done. Categories neatens up my abstract class of methods but of course I need to include the list of headers of the categories in my abstract's .m.

Performance-wise is there anything bad about this? Can I just keep on expanding my class with categories indefinitely?

Design-wise are there any better options programmers take in this situation?

haveblue
Aug 15, 2005



Toilet Rascal
There's no performance cost, categories are integrated into the class once at launch.

You can keep going indefinitely but it's not good OO design as you will probably bump up against the limits of the category system (no new member variables, no supercalls, exactly one implementation per method name) sooner than you would if you were subclassing. You also have the issue that now ObjC's introspection features cannot distinguish between any of your objects so if that's ever important you'll have to implement it yourself.

Also, you aren't supposed to need to include the category headers in the base class's implementation, only in any files that call methods you want overridden. if your code won't work without doing that something is wrong.

LP0 ON FIRE
Jan 25, 2006

beep boop

gooby on rails posted:

There's no performance cost, categories are integrated into the class once at launch.

Okay, good.

gooby on rails posted:

You can keep going indefinitely but it's not good OO design as you will probably bump up against the limits of the category system (no new member variables, no supercalls, exactly one implementation per method name) sooner than you would if you were subclassing.

It seems to me the problem couldn't be solved by subclassing. The base class is a single instance, so if I called most methods in a subclass of the base class, like placing a sprite and making it a child of the map, it would appear to have never taken place. I do have lots of subclasses of other things that I make instances of, and that's helpful. If it sounds like I'm not making any sense please tell me because I may have a huge misunderstanding.

gooby on rails posted:

Also, you aren't supposed to need to include the category headers in the base class's implementation, only in any files that call methods you want overridden. if your code won't work without doing that something is wrong.

That's sort of what I'm doing even though it's not quite what I said! However, there's some base class category header files that are listed in my bass class. This helps with getting rid of a mess of methods that would otherwise be there. Does this still not sound right?

Toady
Jan 12, 2009

The Objective-C mailing list is arguing again, this time about replacing BOOL with C99 bool. Is there any way to do that which wouldn't break backwards compatibility?

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
Anyone ever have experience being contacted by foreign publishers or advertisers?

I received an email from Gaia Communications (gaia-ad.co.jp) concerning iPad styles magazine, apparently to be placed in SoftBank shops. Obviously I have never heard of this outfit nor the magazine. Part of the document they sent me is graphics (proofs for the magazine) so I can't plug that into Google Translate. From what I can gather between the English message and google translate they want to put my app in the magazine.

I think they are saying it is free but I can't tell exactly. If this were an American or European company I would guess this was an advertising scam but I can see SoftBank paying for this to give people info about their new devices.

Obviously I can pay a translator to give me a decent translation but I have no idea how to go about figuring out if the thing is legit or even worth looking into.

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.

Toady posted:

The Objective-C mailing list is arguing again, this time about replacing BOOL with C99 bool. Is there any way to do that which wouldn't break backwards compatibility?

The answer is YES. Or, uh, maybe NO. It could also be true though. Or false.

orenronen
Nov 7, 2008

Ender.uNF posted:

Obviously I can pay a translator to give me a decent translation but I have no idea how to go about figuring out if the thing is legit or even worth looking into.

For starters, you can post what you got to the Japanese thread here on SA. There are people there (including me) who can probably give you a decent translation, or are actually in Japan and may know something about the company or the state of advertising material at Softbank stores.

From a very quick look, the website looks legit.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Toady posted:

The Objective-C mailing list is arguing again, this time about replacing BOOL with C99 bool. Is there any way to do that which wouldn't break backwards compatibility?

I posted there about that exact question, as did Greg Parker. We really have looked into it. The answer is no, not without major weirdness like making a second fundamental Boolean type that somehow encodes and passes exactly like signed char, and even that wouldn't fix things for C++.

Sometimes you just have to wait for the next ABI break.

Toady
Jan 12, 2009

Actually, I vaguely remember Greg Parker posting that same position before, maybe on the devforums.

Adbot
ADBOT LOVES YOU

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang




I generally only use categories for two things:

- Extending a framework class with convenience methods, like putting a base64 method on NSData or something like that
- Keeping things seperate in a big class, for instance if you do a lot of Key-Value or validation or other things like that, it might be a good idea to keep all those in their own categories on your class and the "normal" base parts of the class in the main.

(Actually there's a third thing that's kinda gross: I have some classes that I autogenerate with a homecooked script based on a giant settings file, and I extended those with categories too instead of gently caress around with the generator script)

Aside from that, it's a bit hard to give concrete advice without knowing what kind of stuff is in your categories. I dunno if you're up for posting the interface or part of it, that might get people talking.

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