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
lord funk
Feb 16, 2004

Don't have the app, so I don't know if this fits at all, but you could try something like swiping to 'bowl' through the operators and they fall back into their original spots.

Adbot
ADBOT LOVES YOU

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

wwb posted:

The more fundamental issue is that, in the raw, the build dies because there is something about schemes that gets setup when you open a project in xcode. So when I run xcodebuild it just times out after 10 seconds. Now if I open the project it will get to the point where it is dying on code signing which is surmountable.

This sounds like the generated project targets an old version of Xcode, and for some reason Xcode.app will update it but xcodebuild won't. That sounds like a bug. You might be able to use xctool as a workaround.

quote:

In either case it is amazing the difference between this and android where it just works if you feed it the right keystore with the right passwords.

You're in the right thread to share this pain.

Doc Block
Apr 15, 2003
Fun Shoe
Does anyone know how to tell if headphones are plugged in? I'm sure there's a way, but I don't even know where to start looking.

I don't care if the user plugs headphones in while the app is running, or unplugs them.

My thought was to load lower quality sounds and center pan them in my game if the user isn't using headphones, since 44khz stereo audio is wasted on the dinky iPhone/iPad built-in speaker. If checking for headphones can't be done easily then I won't worry about it.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doc Block posted:

Does anyone know how to tell if headphones are plugged in? I'm sure there's a way, but I don't even know where to start looking.

I don't care if the user plugs headphones in while the app is running, or unplugs them.

My thought was to load lower quality sounds and center pan them in my game if the user isn't using headphones, since 44khz stereo audio is wasted on the dinky iPhone/iPad built-in speaker. If checking for headphones can't be done easily then I won't worry about it.

Uh, yeah it's AVAudioSession to the rescue again! I could write up something myself, but this StackOverflow post covers it better than I probably could.

Doctor w-rw-rw-
Jun 24, 2008

Doc Block posted:

Does anyone know how to tell if headphones are plugged in? I'm sure there's a way, but I don't even know where to start looking.

I don't care if the user plugs headphones in while the app is running, or unplugs them.

My thought was to load lower quality sounds and center pan them in my game if the user isn't using headphones, since 44khz stereo audio is wasted on the dinky iPhone/iPad built-in speaker. If checking for headphones can't be done easily then I won't worry about it.

http://stackoverflow.com/a/5341967/321041
E: f,b

pokeyman posted:

You're in the right thread to share this pain.
Trigger warning: Android. Except app signing is one of the very few places where Apple sucks and Android is decent - probably because Apple doesn't /have/ to dogfood it.

Doc Block
Apr 15, 2003
Fun Shoe
Awesome, thanks.

wwb
Aug 17, 2004

pokeyman posted:

This sounds like the generated project targets an old version of Xcode, and for some reason Xcode.app will update it but xcodebuild won't. That sounds like a bug. You might be able to use xctool as a workaround.


You're in the right thread to share this pain.

Glad I'm in the right place. The funnier part is I've been dealing with iOS for years, I've got a week or so of seat-time with android.

I'm not so sure it is an older version of xcode but more that it views schemes as user data -- see http://stackoverflow.com/questions/20689850/define-schemes-in-an-xcode-phonegap-project-from-terminal for a great explanation. I've been avoiding treating the phonegap generated artifacts as source code as they are build output but it is looking like I'll have to do that. Or resort to hokey tricks like stashing said scheme bits somewhere else and copying them to the right place at the right time.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

wwb posted:

I'm not so sure it is an older version of xcode but more that it views schemes as user data -- see http://stackoverflow.com/questions/20689850/define-schemes-in-an-xcode-phonegap-project-from-terminal for a great explanation. I've been avoiding treating the phonegap generated artifacts as source code as they are build output but it is looking like I'll have to do that. Or resort to hokey tricks like stashing said scheme bits somewhere else and copying them to the right place at the right time.

You can mark schemes as "shared", and then they're moved out of the user data part of the bundle. But I don't know how doable that is for your generated project, and I would have expected xcodebuild to work as well as Xcode.app with the same inputs, so that's lovely.

wwb
Aug 17, 2004

Yeah, tell me about it. Sane people would have given up by now for this lovely little app. I'm not sane.

WORLDS BEST BABY
Aug 26, 2006

Going spare with this issue. I’ve implemented custom URL type handling in my app and it works great, save for one thing: when opening the URL with the (already launched) app, the app switches in using its LaunchImage instead of a snapshot of the app. I know you can specify that an app uses a special launch image for custom URLs using a special file naming scheme, but I’ve never made any image like that and my only LaunchImage is in a xcassets folder.

Is there some way I am inadvertently specifying that my app uses its default launch image for opening custom URLs? I’m absolutely certain that it’s not relaunching.

Hughlander
May 11, 2005

Does Xcode no longer have a way to break down time spent compiling? The defaults from xcode3 don't show anything and passing -ftime-report as a C option didn't work. I suppose can use xctool for their long time build.

lord funk
Feb 16, 2004

KVOController is the best. It's just so, so, so good. :)

Echo Video
Jan 17, 2004

I just released an app I've been poking on for a while: fridge.zanopan.com. I also put a lot of work into the video.

Here are some promo codes for you folks:
KF4XX6JWRWTJ
AXARY9RLTY7R
MJYTXPKT4NHR
JH4JWHF47NTA
KFTTK6HWJXE9

Let me know what you think, please!

dizzywhip
Dec 23, 2005

Echo Video posted:

JH4JWHF47NTA

Taken! Congrats on the release. I love the simplicity of it, it's just the right amount of functionality for me.

I'm not a huge fan of the UI or the icon, but I might be biased because I probably like the flat iOS 7 style design a lot more than most people. It's certainly not terrible, and it's fairly unique, I'm just not really into these kinds of pseudo-3D interfaces very much.

The colors changing based on the tilt of the device is kind of gimmicky, I'd rather just choose a color in the settings.

The icons are great when they exist, but they don't show up for a lot of foods (even some common ones like tomatoes!). It'd be nice to be able to choose the icons, especially for items that don't have one. The perspective is a little weird on some of the icons, like the one for bacon/ham. Getting that sort of thing right is really tough, which is one of the reasons I don't really like 3D UIs.

Small bug: When you add a custom item to the fridge, then view that item's history, it says it was purchased twice rather than once.

I also got a reproduceable crash after adding an item, throwing it out, clearing its history, then scrolling to the top of the list. It hadn't saved about half of the items in the list, so those were lost when it crashed. Actually, after trying it again, I think it just happens a second or two after clearing the history of an item and then leaving the history menu.

I'm sounding really negative, but I actually do like it a lot! I think I'll be getting a lot of use out of it.

The video was great too. Nice work!

Doctor w-rw-rw-
Jun 24, 2008

Echo Video posted:

KFTTK6HWJXE9

Claimed.

Interesting idea - one that I would benefit from using. Details on libraries/techniques/etc.?

Your springs are way too tense. It's a bit jarring, seeing them bounce at such high velocity.

"Juice" completes, but my first inclination was to type in "Orange Juice". I do like the completion, though.

The scroll area for the listed items in the add flow is too small.

The listed items in the add flow don't have the icons.

The fade to green / fade to red is a bit jarring, but the zooming away is good.

Transition from shelf into item view is good.

It's not clear why it's important to throw out or use up items at first.

Editing history is impossible, only deleting it.

Deleting/clearing history is confusing/awkward.

lord funk
Feb 16, 2004

Anyone know if what I'm trying to do with CAReplicatorLayers is impossible?

What I want to do: translate by uniform amount for each instance, and scale each by 0.x of its previous instance size:


What actually happens is the translation is scaled along with the scaling, so instead of uniform translation, it's relative:


Is this actually possible with funky transform assignments or is it just not doable with CAReplicatorLayers?

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
Maybe it's not clear from your description, but which do you want?

* 100%, 90%, 80%, 70%, etc
* 100%, 90%, 81%, 73%, etc

What you're doing sounds like the second (a fraction of the previous scale), but your intent is the first? If so I think you really want something more like:

code:
Scale = 100% - (scaleFactor * N)
(Edit: I don't know CAReplicatorLayers so ignore me if I'm talking out of my rear end)

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Echo Video posted:

I just released an app I've been poking on for a while: fridge.zanopan.com. I also put a lot of work into the video.

Here are some promo codes for you folks:
KF4XX6JWRWTJ
AXARY9RLTY7R
MJYTXPKT4NHR
JH4JWHF47NTA
KFTTK6HWJXE9

Let me know what you think, please!

No Way. Yesterday, I poo poo you not, I tossed a bunch of gross leftovers from my fridge and thought I should make an app for this. I even sketched out the UI last night. :argh:

Doctor w-rw-rw-
Jun 24, 2008

lord funk posted:

Anyone know if what I'm trying to do with CAReplicatorLayers is impossible?

What I want to do: translate by uniform amount for each instance, and scale each by 0.x of its previous instance size:


What actually happens is the translation is scaled along with the scaling, so instead of uniform translation, it's relative:


Is this actually possible with funky transform assignments or is it just not doable with CAReplicatorLayers?

That's a math question. I don't offhand know of a transform that, when composed, would result in (translation)*n and (scale)^n.

Also, the docs say: "The matrix is applied relative to the center of this layer".

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

Doctor w-rw-rw- posted:

That's a math question. I don't offhand know of a transform that, when composed, would result in (translation)*n and (scale)^n.

Also, the docs say: "The matrix is applied relative to the center of this layer".

I am totally just remembering this on the fly, but I think you would need to compose the matrix each time by keeping separate scale and translation, then apply the scale after all translations at each rendering step. I think you can cheat by increasing the translation value at each step instead to account for the scale since you don't have any rotation.

Whether CAReplicatorLayers can do that I have no idea.

Doctor w-rw-rw-
Jun 24, 2008

Ender.uNF posted:

I am totally just remembering this on the fly, but I think you would need to compose the matrix each time by keeping separate scale and translation, then apply the scale after all translations at each rendering step. I think you can cheat by increasing the translation value at each step instead to account for the scale since you don't have any rotation.

Whether CAReplicatorLayers can do that I have no idea.

Nope, it just composes the transform N times and applies that to its replica.

If you really want to repeat with custom positioning, see if drawing into a CGImage and setting contents on your CALayer works. The thing about CAReplicatorLayers, as far as I can tell, is that it's a neat abstraction to not waste a bunch of memory allocating backing stores, but if you need positioning in a way that can't be simply expressed in terms of CAReplicatorLayer's API, then you might have a better time reusing the layer backing store somehow else.

EDIT: http://blog.spacemanlabs.com/2011/08/calayer-internals-contents/ or, apparently, it's kosher to just reuse the original layer's contents property.

Echo Video
Jan 17, 2004

dizzywhip posted:

Taken! Congrats on the release. I love the simplicity of it, it's just the right amount of functionality for me.

I'm not a huge fan of the UI or the icon, but I might be biased because I probably like the flat iOS 7 style design a lot more than most people. It's certainly not terrible, and it's fairly unique, I'm just not really into these kinds of pseudo-3D interfaces very much.

The colors changing based on the tilt of the device is kind of gimmicky, I'd rather just choose a color in the settings.

It's an app that's been a long time in development and that's lead to me changing my mind a lot, which unfortunately does create a bit of a mish-mash of things. Originally I was trying to do it all skeuomorphically, which got stupid. Then I decided on trying out a two-part style, where the fridge and the contents are more cartoonishily realistic and the dialogue boxes were a flat digital style. The colour shifting came out of trying to reproduce the polarized effect of looking at the screen through 3D glasses. Features for turning it off or selecting a color/theme will be coming in the future.

dizzywhip posted:

The icons are great when they exist, but they don't show up for a lot of foods (even some common ones like tomatoes!). It'd be nice to be able to choose the icons, especially for items that don't have one. The perspective is a little weird on some of the icons, like the one for bacon/ham. Getting that sort of thing right is really tough, which is one of the reasons I don't really like 3D UIs.

Icon editing is going to be a future feature. And yeah, the perspective on some of them is off.

dizzywhip posted:

Small bug: When you add a custom item to the fridge, then view that item's history, it says it was purchased twice rather than once.

I also got a reproduceable crash after adding an item, throwing it out, clearing its history, then scrolling to the top of the list. It hadn't saved about half of the items in the list, so those were lost when it crashed. Actually, after trying it again, I think it just happens a second or two after clearing the history of an item and then leaving the history menu.

I'm sounding really negative, but I actually do like it a lot! I think I'll be getting a lot of use out of it.

The video was great too. Nice work!

I'll fix up those bugs soon! Thank you for telling me.


Doctor w-rw-rw- posted:

Claimed.

Interesting idea - one that I would benefit from using. Details on libraries/techniques/etc.?

I didn't use anything more than the default SDK stuff, what would you like to know more about in particular?

Doctor w-rw-rw- posted:

Your springs are way too tense. It's a bit jarring, seeing them bounce at such high velocity.

"Juice" completes, but my first inclination was to type in "Orange Juice". I do like the completion, though.

The scroll area for the listed items in the add flow is too small.

The listed items in the add flow don't have the icons.

The fade to green / fade to red is a bit jarring, but the zooming away is good.

Transition from shelf into item view is good.

It's not clear why it's important to throw out or use up items at first.

Editing history is impossible, only deleting it.

Deleting/clearing history is confusing/awkward.

I'll try tweaking those things around, thank you for the feedback. More involved history display & controls will be a future feature as well.


Lumpy posted:

No Way. Yesterday, I poo poo you not, I tossed a bunch of gross leftovers from my fridge and thought I should make an app for this. I even sketched out the UI last night. :argh:

It's definitely a common problem! There are a ton of apps to do it already, but they all are either really crappy or really fussy about details. So I'm trying to make one that looks good and starts with the basics, and build out from there.

dc3k
Feb 18, 2003

what.

Echo Video posted:

I just released an app I've been poking on for a while: fridge.zanopan.com. I also put a lot of work into the video.

Here are some promo codes for you folks:
KF4XX6JWRWTJ
AXARY9RLTY7R
MJYTXPKT4NHR
JH4JWHF47NTA
KFTTK6HWJXE9

Let me know what you think, please!

Took MJYTXPKT4NHR, thanks! Will let you know once I start using it.

benisntfunny
Dec 2, 2004
I'm Perfect.

Echo Video posted:

I just released an app I've been poking on for a while: fridge.zanopan.com. I also put a lot of work into the video.

Here are some promo codes for you folks:
KF4XX6JWRWTJ
AXARY9RLTY7R
MJYTXPKT4NHR
JH4JWHF47NTA
KFTTK6HWJXE9

Let me know what you think, please!

I'm not going to use up a code (if there's one even left) but I can tell from the screen shots that really don't care for the UI. All same colored boxes and text running into each other. It's not that I can't tell what each section of the colors is doing but it feels very very basic. You have the nice food icons but they feel out of place with the rest of the UI. You also have some alignment issues even present on the screen shots when adding groceries.

Don't feel bad though, an overwhelming number of list apps I have used have junky UI. Unless you're a big company or big enough app developer where someone is a professional UI person doing a good one can be hard.

Over time I would experiment with fonts - their colors, weights, types. Adding graphics to some buttons or replace text with it (where it makes sense). For example where you have "Buy" for the shopping list what if you replaced that with a green plus button? And not a 2px width plus sign, a nice thick plus sign. The green adds more color and removes the repetitive "buy" wording. Or hell, no button at all. Just pressing on the item could be enough.

Lastly, again this is just from screen shots:

Your bagel is a donut and your donuts are empty containers.

lord funk
Feb 16, 2004

Ender.uNF posted:

I am totally just remembering this on the fly, but I think you would need to compose the matrix each time by keeping separate scale and translation, then apply the scale after all translations at each rendering step. I think you can cheat by increasing the translation value at each step instead to account for the scale since you don't have any rotation.

Whether CAReplicatorLayers can do that I have no idea.

That's the problem. It's a simple transform idea, but that's if you yourself are doing the looping and application per instance. CAReplicatorLayers use the transform^n approach, which doesn't work for me.

Doctor w-rw-rw- posted:

Nope, it just composes the transform N times and applies that to its replica.

Like this. I'll look into reusing the backing store like you posted.

I'm just starting to rethink this graphic since it's tricky making it informative. It's for a stereo delay effect, so horizontal time should reflect what's actually happening with the delay.

duck pond
Sep 13, 2007


this looks very bret victor-y :3

Doc Block
Apr 15, 2003
Fun Shoe
:lol: Freaked myself out there for a minute while adding iAd to my game.

The game runs buttery smooth even on an iPhone 4 (it's a simple game, so it better :argh:). Then I added iAd and watched in horror as the FPS dropped to 30-ish even on an iPhone 5 :stare:

Took me a few minutes to realize I was adding the iAd banner as a subview of an OpenGL view. Of course that's going to run like poo poo. Went back and added the iAd banner as a subview of the navigation controller's view and now it runs at 60 FPS again.

So if anyone else here is using Cocos2D to make a game, and wants to use iAd, don't just lazily do
Objective-C code:
[[CCDirector sharedDirector].viewController.view addSubview:_adView];
instead do something like
Objective-C code:
[[CCDirector sharedDirector].viewController.navigationController.view addSubview:_adView];
edit: well, sorta. It runs at 60FPS on an iPhone 5 now. My old iPhone 4 ping pongs around between 40-60FPS depending on what the iAd banner is drawing. :argh:
edit2: even if I cap the FPS to 30 on the iPhone 4, it'll occasionally dip down to 20-25 thanks to iAd. I wonder how many people are even using an iPhone 4 anymore.
edit3: for one of my apps the number of iPhone 4 users is about 10%, but for my other app they're less than 2%

Doc Block fucked around with this message at 09:16 on Aug 13, 2014

lord funk
Feb 16, 2004

Doc Block posted:

:lol: Freaked myself out there for a minute while adding iAd to my game.

IAP those last 15fps. :v:

Doc Block
Apr 15, 2003
Fun Shoe
On the iPhone 4 I might just forego ads. Or use an ad network whose banner view doesn't perform so terribly.

AdMob are the ugly non-animating ones you see in a lot of "FREE!!! L@@K!!" games, right?

edit: even on my iPhone 5, rendering time gets as high as 17ms per frame with iAd. WTF Apple?

Doc Block fucked around with this message at 16:53 on Aug 13, 2014

Carthag Tuek
Oct 15, 2005

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



Forgot if I asked this before, but is there a less messed up way of setting a BOOL ivar via the runtime?

Objective-C code:
Class someClass = objc_getClass("someClass");
Ivar boolIvar = class_getInstanceVariable(someClass, "boolIvar");

object_setIvar(self, boolIvar, (__bridge id)((void *)YES));

Doctor w-rw-rw-
Jun 24, 2008
An ivar specifically? This doesn't seem that messed up to me, if you need to set an ivar like that by name.

Carthag Tuek
Oct 15, 2005

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



The bridging stuff, it's not very pretty.

Doctor w-rw-rw-
Jun 24, 2008

Snapchat A Titty posted:

The bridging stuff, it's not very pretty.

I suppose you could turn off ARC for the file you do that in, but what's the point of that, really?

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
If you make a macro around ivar_getOffset, it'll work for an arbitrary type.

slogula
Oct 2, 2013
Apologies if this has been asked recently, but could recommend a good introductory book/ tutorial for xcode 5.1.1? The links in the op haven't updated in just over a year and apple's "Your first mac app" tutorial is apparently out of date.

e: I'm overcoming the typos in the apple tutorial, but if anyone has a book on osx/ objective-c applications primer that they love, it'd be great to know.

slogula fucked around with this message at 20:13 on Aug 16, 2014

lord funk
Feb 16, 2004

slogula posted:

e: I'm overcoming the typos in the apple tutorial, but if anyone has a book on osx/ objective-c applications primer that they love, it'd be great to know.

I think the general consensus around here is to start playing around / writing little bits of code and then come and ask questions here. We're way better than a book. :)

slogula
Oct 2, 2013

lord funk posted:

I think the general consensus around here is to start playing around / writing little bits of code and then come and ask questions here. We're way better than a book. :)

Awesome. Diving in now.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

I honestly wouldn't go that far, having a beginner's walkthrough of some of the most important aspects of the API was quite nice. I've liked the stuff by Big Nerd Ranch, but you might be able to find something in your local library or online that get the job done. Once you start to get used to the lay of the land and the terminology you'll probably graduate to the official documentation and asking specific questions naturally.

Fate Accomplice
Nov 30, 2006




slogula posted:

Apologies if this has been asked recently, but could recommend a good introductory book/ tutorial for xcode 5.1.1? The links in the op haven't updated in just over a year and apple's "Your first mac app" tutorial is apparently out of date.

e: I'm overcoming the typos in the apple tutorial, but if anyone has a book on osx/ objective-c applications primer that they love, it'd be great to know.

I would read Kochan's book on objective-c, then Big Nerd Ranch + CS193P from stanford.

Adbot
ADBOT LOVES YOU

Carthag Tuek
Oct 15, 2005

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



Ya, gonna second Big Nerd Ranch for a decent book intro. I haven't read their iOS-specific books but their general Cocoa/ObjC books are really good imo.

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