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
Small White Dragon
Nov 23, 2007

No relation.
Question posed from an earlier thread: I have a large UIButton and, due to its size, the "highlight" glow doesn't show up. What can I do about this (aside from shrinking the button)?

Also, I just added an GLES2 pipeline, and I have the problem that sometimes it will run at full 60fps, and other times at will run at a fraction thereof. Anyone ever seen any like that?

code:
	struct TileStruct {
		GLshort vX;
		GLshort vY;
		GLshort vZ;
		GLshort tX;
		GLshort tY;
		GLshort tZ;
	};

...

        // Use the program object
        glUseProgram(_shader.programObject);
        
        // Load the vertex position
        glVertexAttribPointer(_shader.positionLoc, 3, GL_SHORT, GL_FALSE, sizeof(struct TileStruct), &coordinates[0].vX);
        glVertexAttribPointer(_shader.texCoordLoc, 3, GL_SHORT, GL_FALSE, sizeof(struct TileStruct), &coordinates[0].tX);
        
        glEnableVertexAttribArray(_shader.positionLoc);
        glEnableVertexAttribArray(_shader.texCoordLoc);
        
        // Bind the texture and set the sampler texture unit
        glActiveTexture ( GL_TEXTURE0 );
        glBindTexture ( GL_TEXTURE_2D, textures[0] ); //  userData->textureId );
        
        glActiveTexture ( GL_TEXTURE1 );
        glBindTexture ( GL_TEXTURE_2D, textures[1] ); //  userData->textureId );

        // Set the sampler texture unit to 0
        glUniform1i(_shader.tileTextureLoc, 0);
        glUniform1i(_shader.paletteTextureLoc, 1);
        glUniform2f(_shader.texSizeLoc, texSize[0].size.width, texSize[0].size.height);
        glUniform3f(_shader.colorAdjustmentLoc, _colorAdditions[0], _colorAdditions[1], _colorAdditions[2]);
        glUniform1f(_shader.alphaMultiplerLoc, color[3]);
        
        // Draw!
        glDrawElements(GL_TRIANGLES, 6*quads, GL_UNSIGNED_SHORT, indices);
It's never exhibited this in GLES1. :psyduck:

Adbot
ADBOT LOVES YOU

Small White Dragon
Nov 23, 2007

No relation.
Selling out this fast is insanity. :psyduck: I can only assume it will get worse.

Small White Dragon
Nov 23, 2007

No relation.

fankey posted:

Can MPMoviePlayerController deal with anything other than a .m3u8 file when loading from an http server? Pointing it at a .mov, .mp4 or .m4v doesn't appear to work.
I worked on a video streaming app during the iOS 2.0 - 2.2 period, and it did then.

Small White Dragon
Nov 23, 2007

No relation.
I ran into a really bizarre problem in one of my apps.

In many cases, I have views that I CATransition out, and CATransition in a new one in its place. However, if I have an active touch on the screen I transition out, the new one will not appear or will disappear as soon as the touch is let up? :psyboom:

Has anyone seen anything like this?

Small White Dragon
Nov 23, 2007

No relation.
Hey Clang friends:

I'm hearing about Clang LLVM 3.0, but the current version is 2.9 and I don't see any info on 3.0. Given it's an open source project, can you talk about (or point to) some info about 3.0?

Small White Dragon
Nov 23, 2007

No relation.

monkey posted:

and whether I can even use fopen and fgets on iOS.
Absolutely you can.

Small White Dragon
Nov 23, 2007

No relation.
Hey, how do I compile a single file with a different compiler in Xcode 4?

I have one C++ file that makes use of variable-size new[]'s, and this bombs on ARMv6 devices with Clang.

Unfortunately, most of the project makes use of Objective C features only available in Clang.

Small White Dragon
Nov 23, 2007

No relation.
Can I have my UIViewController be transparent to the one behind it?

Small White Dragon
Nov 23, 2007

No relation.

klem_johansen posted:

Just about to issue a new app and I got this note warning me against compiling it with 4.3, noting that Verizon users won't be able to run them.

So, do I have to retrograde to the 4.2 sdk? Is that even possible? My only options are 3.2 and 4.3.

In the build's summary I can change the development target to 4.2 and rebuild, but I'm still worried because I'm compiling with 4.3. The code itself is almost completely unchanged since I last built it with 4.1, so I should be fine. Right?
Newer SDKs can produce binaries that run on older OSes just fine. If you set the target to 4.2 and don't use any 4.3-specific APIs, you'll be fine.

Small White Dragon
Nov 23, 2007

No relation.

Ender.uNF posted:

This.

Also note that the number of new APIs between 4.0 and 4.3 is pretty small so odds are you can set 4.0 as your target OS which opens you up to most devices except the original iPhone.
Also the original iPod Touch, I believe?

There actually have been ABI changes in each of the major versions, but I think the current SDKs can target back to 3.0 or so. (Although Apple no longer accepts apps that run on 2.x.)

Small White Dragon
Nov 23, 2007

No relation.

Ender.uNF posted:

I thought it was 3.0 that introduced the "modern" runtime (non-fragile base classes and the ability to add ivars dynamically) and was the last ABI change but I could be wrong.
Hasn't it always been non-fragible ABI?

Anyway, a lot of the various utilities (e.g., classdump, otool) will often error or throw lots of warnings on binaries compiled with major new iOS releases, and usually there are some additions to the Mach-O structures and defines with major new releases.

It's possible some of those changes may be backwards compatible, though, I'm not sure.


Substar posted:

xcode 4: What the poo poo?
XC4 is definitely a big change, but it is a lot better in many ways -- once you figure it out.

Small White Dragon
Nov 23, 2007

No relation.

Doc Block posted:

A lot of people forget that all the Unix stuff is still in there, including all the Unix file stuff.

John Carmack wrote up an interesting blog post about using relatively low-level Unix stuff like memory mapped files in Rage HD.
NSData will memory-map files for you, if you let it.

Small White Dragon
Nov 23, 2007

No relation.
Had a discussion with another developer and now I'm curious.

Anyone here do programmatic layouts? If so, where do you your cleanup for loadView?

Small White Dragon
Nov 23, 2007

No relation.

Carthag posted:

foo.bar = @"whatever"; //not foo.Bar = ...

It probably still won't work without a getter though.
You can create a write-only property (and it will work), if you provide the implementation, although as noted elsewhere it's probably bad form.

In any case, you can do it with one of the following:

code:
@dynamic property;
- (void)setProperty:(type)val
{
     _property = val;
}
or

code:
- (type)property
{
    NSLog(@"This property is write-only.");
    [self doesNotRecognizeSelector:_cmd];
    return 0;
}

- (void)setProperty:(type)val
{
     _property = val;
}

Small White Dragon
Nov 23, 2007

No relation.

Mikey-San posted:

If only I had the time!

So, you're all going, riiiight? ;)
I wanted to go but unfortunately it's the same week as E3 and a bunch of other poo poo. Maybe next year.

Small White Dragon
Nov 23, 2007

No relation.

deep square leg posted:

Do I have a hope in hell?
So two things.

First, you can create apps solely for your own use. When you do that, of course, they don't have to pass Apple validation, so you're free to screw around with the stuff that's normally off limits.

Second, you might want to consider jailbreaking. If you go this route, you can install sshd on the iPad, ssh to it, su(do) to root, and modify the OS's default configuration and files.

Small White Dragon
Nov 23, 2007

No relation.

deep square leg posted:

For the first part, I had believed that even personal apps could still only use whatever functionality was available in the API, and I wasn't sure if the kind of thing I want to change would be available. I'll do some research.

For the second, I assumed I'd be waiting until an iPad 2 jailbreak became available, but my concern was still that everything on the filesystem would still be compiled in such a way to make alteration difficult. Again, I'll look into it.
Just keep in mind your application is going to run as a regular user and not root. That said, there are a lots of interesting things you can do by poking around in the Private Frameworks and other such areas.

In any case, if you just want to look around the iOS filesystem without actually jailbreaking, there are tools to do that.

Small White Dragon
Nov 23, 2007

No relation.
Xcode 4.2? :allears:

Small White Dragon
Nov 23, 2007

No relation.

lord funk posted:

How can I monitor how hard the iPhone processor is working while my app runs?
"Instruments" can do it.

Small White Dragon
Nov 23, 2007

No relation.

Ender.uNF posted:

Does anyone know off-hand if you have a beta xcode+sdk installed but target the latest official SDK, are there any problems submitting updates to the App Store?
Apple employees elsewhere have stated this is not allowed. And in case you're curious, the output tells what version of Xcode you used to build it.


EDIT: You can, however, install a release and beta SDK simultaneously (and this is what they recommend).

Small White Dragon fucked around with this message at 01:34 on Jun 11, 2011

Small White Dragon
Nov 23, 2007

No relation.

Markov Chain Chomp posted:

As far as the app verification thing goes, I want to use location/gps information from the phone and I'd prefer it if people couldn't easily inject fake locations, but when it comes down to it it's just a game so who cares if someone spoofs packets to appear at the north pole, right?
Unless your app is incredibly popular, I'd consider it far more likely that someone who jailbroke would modify the location data on the phone rather than try and hack your app to submit something other than what the phone sees.

Small White Dragon
Nov 23, 2007

No relation.

rjmccall posted:

Just to be clear, ARC itself is no longer under NDA, q.v., so you can run wild.
So can you talk about what else is in the new version of Clang, yet?

Small White Dragon
Nov 23, 2007

No relation.

Akuma posted:

Dudes! My customer in Hong Kong wants to test the IAP of my game; we're developing it in the UK. I didn't think there was any way to test IAP in the sandbox environment without running a debug build, which obviously I can't do because of... geography. Is there a way to test IAP in adhoc builds?
You can load someone else's debug builds onto a phone with either Xcode or the iPhone Configuration Utility, the later of which is available on Windows too.

Small White Dragon
Nov 23, 2007

No relation.
WWDC 2011 videos are up.

Small White Dragon
Nov 23, 2007

No relation.

mc.schroeder posted:

If you watch the "Full Screen and Aqua Changes" WWDC video, for example, they discuss some stuff near the end that pretty clearly hints at future hardware. Of course even in the session they never make any direct reference to that. But I bet in a year or two Steve will get up on stage and present PENUS PENUS PENUS to a cheering audience, pointing out that they're the first to accomplish that, only to top it off with a "x% of apps in the App Store already support PENUS PENUS PENUS".
That said, references to this particular feature were in the first Lion seeds.

Small White Dragon
Nov 23, 2007

No relation.

Yakattak posted:

I feel like its harder to go through all the loops and bounds to not use Objective-C, than it is to learn and use Objective-C.
A number of games (especially ports) simply define an AppDelegate and UIView subclass in Objective-C, and then handle everything else in C.

Small White Dragon
Nov 23, 2007

No relation.

Campbell posted:

I'm being asked if its possible to can create a native iOS "portal app" that will allow you to download and play various games. I was 99% of the way into saying Apple doesn't allow interpreted code but then I found the C64 app which appears to do just that.

I'm guessing that the app either 1) already has the games built into the binary, or 2) downloads and actually interprets BASIC to present the game (I thought this was a big no-no, by the way) or 3) something else.

Anyhow, if you had any thoughts on if what's being asked is possible, it'd be cool because it's hurting my brain at this point!
When you download an App in iTunes, the IPA is just a ZIP file if you want to look inside it.

That said, it would appear that the games are already included.

Small White Dragon
Nov 23, 2007

No relation.

Doc Block posted:

Can't you just copy the installer to a thumbdrive and then take it home? (should be in /Applications)
No; the App Store on 10.6.x will refuse to download it.

Doc Block posted:

Is there anybody else here who's in the iOS dev program but not the Mac dev program that has Xcode 4.1? If so, could you please try to download the 10.7 docs (in the Documentation panel in Preferences) and let me know how it goes.
I got prompted to login to get the documentation, but Apple probably forgot to set them public. I suggest filing a bugreport.

Small White Dragon
Nov 23, 2007

No relation.
Anybody getting warnings like "No previous prototype for function" when building under Clang in Xcode 4.1?








EDIT: What's the "correct" way to release a CTFont? CFRelease?

Small White Dragon fucked around with this message at 22:03 on Jul 24, 2011

Small White Dragon
Nov 23, 2007

No relation.

lord funk posted:

Now that I take a closer look, it is running off of DisplayLink, with the interval set to 1 (I think this means its updating 60x / sec).

Google is telling me that this is expected behavior, but I didn't know if there was any sorcery out there to tighten it up.
If your render is chewing up too much CPU time, you can miss or have events delayed.

So you could also try, say, 20 or 30fps and see what happens.

Small White Dragon
Nov 23, 2007

No relation.

lord funk posted:

Is Xcode 4.1 more stable than 4.0.2? I've been sitting at 4.0.1 for a while and I'm reluctant to upgrade (for no reason other than preventing headaches), but it is crashing constantly.
Yes, Xcode 4.0 crashed a lot on me, but 4.1 does not so much.

That said, I have run into a bug where after a few hours of modify/compile/run in Xcode 4.1, Lion will fail to launch new processes. :o But I'm sure if that's Xcode's fault, or the OS's.

Small White Dragon
Nov 23, 2007

No relation.
When it happens, I can't do things like open new terminal windows. I usually end up restarting the machine.

Small White Dragon
Nov 23, 2007

No relation.
I need to look through some serialized (NSKeyedArchived output) data. Any good tools for this?

Small White Dragon
Nov 23, 2007

No relation.

Carthag posted:

From the docs it looks like it's a binary plist. Try writing it to a file with .plist extension and opening it in the Property List Editor.

http://developer.apple.com/library/...WithRootObject:
I've opened it that way, and it's somewhat indecipherable :(

Small White Dragon
Nov 23, 2007

No relation.

lord funk posted:

Is there a good way to determine the exact model iPad at compile time (1 or 2)? I need to change some things to optimize between the two, and I'd rather do it at compile time than runtime.

If it needs to be runtime, is there a better solution than this StackOverflow answer?
I believe they're both ARMv7, so you can't compile a universal binary with separate iPad 1 and 2 versions.

Small White Dragon
Nov 23, 2007

No relation.

nolen posted:

My suggestion that I posted earlier would tell you which iPad you are running on currently. No camera + UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad tells you that you are on an iPad with no camera. iPad first generation, ahoy.

Like I said, still not the "proper" way of handling such a test but I would say it's better than checking device types specifically like the StackOverflow link.
In this case, I think checking for "iPad1,1" would be OK.

The biggest thing is that you be future-device-proof. If you don't recognize the device, you should probably assume it's better than the iPad 2.

Small White Dragon
Nov 23, 2007

No relation.
Is there a good place that catalogues SDK issues with jail broken phones?

As it doesn't seem to be something Apple likes to talk about. ;)

Small White Dragon
Nov 23, 2007

No relation.
How do I symbolicate a crash file in Xcode 4?

Small White Dragon
Nov 23, 2007

No relation.

PT6A posted:

Speaking of rejected apps, I just had an app rejected (by an automated process) for non-public API use in almost every class (including, apparently, UIKit classes). I'm pretty sure I didn't do anything crazy enough to gently caress everything up, and a cursory google search indicates other people are having the same problem since earlier today, so I imagine it's just something to do with their updates today.

Has anyone else had this problem, or even more interestingly, has anyone successfully submitted a binary today?
It wasn't my app, but I saw another app rejected for that same reason a couple hours ago.

Adbot
ADBOT LOVES YOU

Small White Dragon
Nov 23, 2007

No relation.
Are there any iOS devices that support texture sizes greater than 2048x2048?

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