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
haveblue
Aug 15, 2005



Toilet Rascal

CGameProgrammer posted:

It would be an app distributed in the App Store so it would need to be signed. Guess it's not really doable without buying a Mac? Hm. Disappointing.

Yeah, it's not worth the trouble. You can get a used Mac Mini or something for a couple of hundred, or like the guy said install Mac OS X in a VM.

Adbot
ADBOT LOVES YOU

CGameProgrammer
Nov 5, 2008

haveblue posted:

Yeah, it's not worth the trouble. You can get a used Mac Mini or something for a couple of hundred, or like the guy said install Mac OS X in a VM.
So it's possible to buy and install Mac OSX without a Mac?

...another question: how do you test applications that use accelerometers, or the camera, etc? It sounds like you have to deploy them onto the target hardware, but how do you do that without going through the App Store (which is obviously only for finished and released products)?

CGameProgrammer fucked around with this message at 19:21 on Apr 14, 2012

xgalaxy
Jan 27, 2004
i write code

CGameProgrammer posted:

So it's possible to buy and install Mac OSX without a Mac?

Yes. It's possible to install in VMWare, and it is also possible to install on regular PC hardware (if you use the right components).
Both of these things are not exactly...legit. And involve using community 'tools' to boot using an unedited OSX image or hacked versions of the OSX image.


CGameProgrammer posted:

...another question: how do you test applications that use accelerometers, or the camera, etc? It sounds like you have to deploy them onto the target hardware, but how do you do that without going through the App Store (which is obviously only for finished and released products)?

XCode can deploy to a device as long as you setup a provisioning profile for that device, which can be done in the Apple developer member area. You can also deploy to devices using things like TestFlight, but you still need to setup provisioning profiles.

The provisioning profiles you get this way are temporary and for development / testing purposes only.

xgalaxy fucked around with this message at 20:03 on Apr 14, 2012

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

CGameProgrammer posted:

So it's possible to buy and install Mac OSX without a Mac?

You can buy Snow Leopard without a Mac. I'm not sure if you can install it on a non-Mac, or in a VM whose host isn't OS X, and still abide by the license agreement.

quote:

...another question: how do you test applications that use accelerometers, or the camera, etc? It sounds like you have to deploy them onto the target hardware, but how do you do that without going through the App Store (which is obviously only for finished and released products)?

Pay $100/yr to Apple and you too can put applications you develop on the iOS device you bought.

haveblue
Aug 15, 2005



Toilet Rascal

pokeyman posted:

You can buy Snow Leopard without a Mac. I'm not sure if you can install it on a non-Mac, or in a VM whose host isn't OS X, and still abide by the license agreement.

You can't, the license specifies that the OS must run on Apple-manufactured physical hardware.

dizzywhip
Dec 23, 2005

It looks like that Learning Core Audio book has finally been released. I've read a good amount of the in-progress version and it seems very good. I wish it had been out when I had first started learning Core Audio, but I think there's still a lot I can learn from it.

lord funk
Feb 16, 2004

Gordon Cole posted:

It looks like that Learning Core Audio book has finally been released. I've read a good amount of the in-progress version and it seems very good. I wish it had been out when I had first started learning Core Audio, but I think there's still a lot I can learn from it.

drat. That thing has been in pre-print for YEARS. Like I remember looking into it in 2006. Guess it's finally time to get it.

Scuzzywuffit
Feb 5, 2012

So I am somebody with essentially no experience who is teaching myself to program, and I have a question that is probably stupid.

I am a college student, and the online system to register for courses here is pretty poo poo. I feel like I could dramatically improve the user interface, but I'm not sure how possible that is. So my question is, would it be at all possible to make an app that would interact with the existing web site by automatically submitting forms and clicking links so that I could arrange the data in a non-retarded format without actually having access to the backend? Like I said, I'm still pretty much teaching myself at this point, so I'm just trying to figure out if it's even possible so that I don't devote a bunch of time and effort to trying to figure out how to do it if it's not.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
It is definitely technically possible. Your app will need to emulate the requests that would be made via the normal web interface, including whatever authentication the registration site uses. This may be straightforward or an obnoxious reverse-engineering effort, depending on how the system's been engineered. You have a major advantage, though, in that web technologies are pretty hard to obfuscate.

The first place to start is to capture the HTML and Javascript used by the registration page and try to understand everything it's doing and how it interacts with the server. That can be a really good lesson in and of itself.

\/ Oh, and that, of course. As an unofficial client of the registration servers, the admins will have no compunctions at all about breaking you.

rjmccall fucked around with this message at 07:39 on Apr 15, 2012

Doc Block
Apr 15, 2003
Fun Shoe
Probably, but if they change things around your app will break.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Definitely possible and, assuming your app works at all, it'll get some solid use too. Why does every school with a CS department have a terrible website?

Anyway, your app will break down into three parts:

1. Scraping your school website HTML for data (tip: View > View Source in your browser) and submitting forms (ditto).
2. Persisting and modifying that data within the app.
3. Your app's user interface.

You'll want to use something like AFNetworking to do the network requests/responses and libxml for scraping (with a little wrapper like the one from DTCoreText (grab the linked file and its .m counterpart, don't need the rest)). That'll get you started actually talking to your school website. If you're new to all this, expect to take a good few hours to a couple days to get to this point, and ask for help whenever you need it.

Once you're there, it's up to you whether you implement all the functionality you'll need in the backend (filling out each form, scraping each unique page) or stub out the interface and make the buttons and tables start working. Or start both and meet in the middle.

Feel free to ask anything here. No question is too small, so long as you've tried to solve it yourself first.

Scuzzywuffit
Feb 5, 2012

All right, thanks for the responses guys. As somebody who is learning to program by watching lectures on iTunes, I'm pretty far removed from that for the time being, but I'm sure I'll be back with more questions once I get to that point (this will probably be a summer project). It seemed like a decent idea for a practice project just because so much of the structure was already in place, and also because it's something I and others would get a good bit of use out of. Of course, I'm still figuring this stuff out, so it's entirely possible that this is way more ambitious than I had originally thought, but I just wanted to check in and make sure it was possible first.

Doc Block
Apr 15, 2003
Fun Shoe
Is anybody else still waiting on their financial reports? I've gotten a few, but still no US report.

lord funk
Feb 16, 2004

Yeah. Still waiting for US here too.

Kyth
Jun 7, 2011

Professional windmill tilter

pokeyman posted:

Feel free to ask anything here. No question is too small, so long as you've tried to solve it yourself first.

It's probably good I didn't see this yesterday: I spent an hour and a half googling, trying to figure out why my TableView embedded in a custom view wasn't scrolling (but could take interaction -- clicking worked, so it wasn't an issue of user interaction not being set.

Turns out I was using ipad controls on my mac's touchpad, trying to two-finger scroll. Which of course doesn't work in the iOS simulator, it wants a click and drag. I discovered my mistake when I accidentally used the wrong gesture to switch back to a browser for another round of fruitless searching.

iOS simulator: 1. Kyth: 0.

klem_johansen
Jul 11, 2002

[be my e-friend]
if you want to allow the user to download levels for a game, is there a standard method for that?

I'm thinking of using zip files with graphics & xml files and then unzipping them after download. Does that sound OK (as long as my naming convention is rock solid)?

Doc Block
Apr 15, 2003
Fun Shoe
If you use something like PhysFS or zziplib you don't even need to unzip them.

xgalaxy
Jan 27, 2004
i write code

Doc Block posted:

If you use something like PhysFS or zziplib you don't even need to unzip them.

One reason you may want to unzip them is to provide better minimal updates, say to fix a bug with one of the assets. This way you don't have to get the entire contents of the zip again, if you are only fixing a single asset.

Pick a strategy that works best for the kind of data you have.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Why is it so insanely complicated to just make a loving 'Hello World' view that has a UIButton that simply shows another view? Of course, if you choose a tabbed project you have that functionality out of the box, but that's not the point.

This poo poo is a CHAPTER in a book.

Toady
Jan 12, 2009

I wanted to share this neat tip I saw on the mailing list. The rules of C allow this to avoid double-indenting:

code:
for (id anObject in anArray) @autoreleasepool {
   // do stuff
}

do @autoreleasepool {
   // do stuff
} while (x);

while (x) @autoreleasepool {
   // do stuff
}

Doc Block
Apr 15, 2003
Fun Shoe

Bob Morales posted:

Why is it so insanely complicated to just make a loving 'Hello World' view that has a UIButton that simply shows another view? Of course, if you choose a tabbed project you have that functionality out of the box, but that's not the point.

This poo poo is a CHAPTER in a book.

Assuming you're using a navigation controller, it's not that complicated:

code:
- (IBAction)buttonWasTapped:(id)sender
{
    SomeViewController *controller = [[SomeViewController alloc] init];
    [self.navigationController pushViewController:controller animated:YES];
    [controller release];    // Leave out if you're using ARC
}

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
And if it's a storyboard, no code needed at all.

xgalaxy
Jan 27, 2004
i write code
Anybody got any ideas on why some object files are getting compiled with thumb assembly even when I tell the compiler not to compile thumb?

I've tried -mno-thumb and -marm and neither one is stopping the generation of thumb assembly in the resulting binary.

I've tried both llvm-gcc and clang. And both are doing this.
Clang 3.1 coincidentally does not recognize either switch btw, a bug?

Nothing in the project is inline assembly, and I've looked at the compile switches for the object files and I don't see anything wrong.

The files, btw, are all libtom* related, and as far as I can tell only these particular object files are getting compiled thumb. otool shows every other object file as arm as requested.

I'm pulling my hair out trying to figure out wtf...

xgalaxy fucked around with this message at 07:41 on Apr 17, 2012

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
Clang has recognized both of those switches for years. If you're getting warnings about it, it's probably because the flag's being passed to the wrong command (e.g. to the linker). If so, it's innocuous, and it's not a problem as long as the actual compile line has it as well.

Are you adding these as CFLAGS? I'm pretty sure there's some specific option to disable thumb, and I wouldn't be surprised if your flag is getting overridden by that; the last relevant option on a line usually wins. I'd need to see an actual command line to diagnose it further.

xgalaxy
Jan 27, 2004
i write code

rjmccall posted:

Clang has recognized both of those switches for years. If you're getting warnings about it, it's probably because the flag's being passed to the wrong command (e.g. to the linker). If so, it's innocuous, and it's not a problem as long as the actual compile line has it as well.

Are you adding these as CFLAGS? I'm pretty sure there's some specific option to disable thumb, and I wouldn't be surprised if your flag is getting overridden by that; the last relevant option on a line usually wins. I'd need to see an actual command line to diagnose it further.

It turns out the -mno-thumb 'Argument unused during compilation' error I was seeing is when it was compiling the i386 version. =x

Anyways. It still stands that its compiling thumb when it shouldn't.
Below I've attached the command line for one of the object files.

quote:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc -o build/ios/armv7/release/obj/libtommath/bn_mp_cmp_d.o -c -arch armv7 -mno-thumb -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -miphoneos-version-min=4.3 -Wno-trigraphs -fpascal-strings -fmessage-length=0 -pipe -std=gnu99 -gdwarf-2 -x objective-c -fobjc-abi-version=2 -fobjc-legacy-dispatch -Werror -Wall -fno-exceptions -Wno-unused-value -Os -DNDEBUG -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -DLTC_SOURCE -DLTC_NO_ASM -DHAVE_UNISTD_H=1 -DSQLITE_OMIT_LOAD_EXTENSION -DSKLOG_IDENT=LIBGG -DSKLOG_ASL -Iinc -Isrc -Ibuild/ios/armv7/release/obj -Isrc -Ibuild/ios/armv7/release/inc -Ibuild/ios/armv7/release/obj/libtomcrypt/src/headers -Isrc/libtomcrypt/src/headers -Ibuild/ios/armv7/release/obj/libtommath -Isrc/libtommath -Ibuild/ios/armv7/release/obj/sqlite -Isrc/sqlite -Ibuild/ios/armv7/release/obj/sanskrit/include -Isrc/sanskrit/include -Ibuild/ios/armv7/release/obj/zlib -Isrc/zlib -Ibuild/ios/armv7/release/obj/platform/ios -Isrc/platform/ios -Ibuild/ios/armv7/release/obj/platform/ios/Extensions -Isrc/platform/ios/Extensions -Ibuild/ios/armv7/release/obj/platform/ios/Reachability -Isrc/platform/ios/Reachability -Ibuild/ios/armv7/release/obj/platform/ios/Facebook -Isrc/platform/ios/Facebook src/libtommath/bn_mp_cmp_d.c


otool -tv build/ios/armv7/release/dist/lib/libgg.a > ~/Desktop/test1.txt

~/Desktop/test1.txt
build/ios/armv7/release/dist/lib/libgg.a(bn_mp_cmp_d.o):
(__TEXT,__text) section
_mp_cmp_d:
00000000 3008 adds r0, #8
00000002 e590 b.n 0xfffffb26
00000004 2000 movs r0, #0
00000006 e3e0 b.n 0x7ca
00000008 0001 lsls r1, r0, #0
0000000a e353 b.n 0x6b4
0000000c 000b lsls r3, r1, #0
0000000e 0a00 lsrs r0, r0, #8
00000010 3000 adds r0, #0
00000012 e590 b.n 0xfffffb36
00000014 2001 movs r0, #1
00000016 e3a0 b.n 0x75a
00000018 0001 lsls r1, r0, #0
0000001a e353 b.n 0x6c4
0000001c 0007 lsls r7, r0, #0
0000001e ca00 ldmia r2!, {}
00000020 200c movs r0, #12
00000022 e590 b.n 0xfffffb46
00000024 0000 lsls r0, r0, #0
00000026 e592 b.n 0xfffffb4e
00000028 2001 movs r0, #1
0000002a e3a0 b.n 0x76e
0000002c 0001 lsls r1, r0, #0
0000002e e150 b.n 0x2d2
00000030 0002 lsls r2, r0, #0
00000032 8a00 ldrh r0, [r0, #16]
00000034 0001 lsls r1, r0, #0
00000036 e150 b.n 0x2da
00000038 2000 movs r0, #0
0000003a e3a0 b.n 0x77e
0000003c 2000 movs r0, #0
0000003e 33e0 adds r3, #224
00000040 0002 lsls r2, r0, #0
00000042 e1a0 b.n 0x386
00000044 ff1ee12f vrhadd.u16 d14, d14, d31

LP0 ON FIRE
Jan 25, 2006

beep boop
Cocos2D iOS: I'm having trouble accessing a parent method from a sprite class. A bunch of the sprite classes are put into a mutable array in the parent class. When a method is called in the child class a sort of timed call to the parent is called later on using CCCallFuncO. But even with a regular method call in the child class to parent won't work!

In the child's .h I have
code:
#import "JoinedMapsLayer.h"
@class JoinedMapsLayer;
And inside a method (not init) is:
code:
JoinedMapsLayer *joinedMapsLayer = (JoinedMapsLayer*)self.parent;
[joinedMapsLayer displayMessageBox:@"whatever"];
JoinedMapsLayer is my parent class. It's dead simple. Shouldn't it call displayMessageBox: if it exists and print out the NSLog inside of it? Nothing happens, no crash yet no log.

LP0 ON FIRE fucked around with this message at 17:30 on Apr 17, 2012

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Stick a breakpoint on the line where you send -displayMessageBox: and check things out. Is joinedMapsLayer right object (i.e. not nil, right type)? Step into the method call. Does it go where you want?

Doc Block
Apr 15, 2003
Fun Shoe
Check and see if self.parent is nil. If you're adding the child sprites to the array yourself, rather than using CCNode's addChild: method, then you'll have to set the child sprite's parent property yourself.

LP0 ON FIRE
Jan 25, 2006

beep boop

pokeyman posted:

Stick a breakpoint on the line where you send -displayMessageBox: and check things out. Is joinedMapsLayer right object (i.e. not nil, right type)? Step into the method call. Does it go where you want?

I'm not sure where I would find if joinedMapsLayer is nil or not. I made a new method in joinedMapsLayer called test with no parameters and a NSLog inside. When I step into the the line [joinedMapsLayer test]; which is inside the child sprite class I get

code:
libobjc.A.dylib`objc_msgSend:
0x328a1f68:  teq.w  r0, #0
0x328a1f6c:  beq    0x328a1faa               ; objc_msgSend + 66
0x328a1f6e:  push.w {r3, r4}
0x328a1f72:  ldr    r4, [r0]
0x328a1f74:  lsr.w  r9, r1, #2
0x328a1f78:  ldr    r3, [r4, #8]
0x328a1f7a:  add.w  r3, r3, #8
0x328a1f7e:  ldr    r12, [r3, #-8]
0x328a1f82:  and.w  r9, r9, r12
0x328a1f86:  ldr.w  r4, [r3, r9, lsl #2]
0x328a1f8a:  teq.w  r4, #0
0x328a1f8e:  add.w  r9, r9, #1
0x328a1f92:  beq    0x328a1fa6               ; objc_msgSend + 62
0x328a1f94:  ldr.w  r12, [r4]
0x328a1f98:  teq.w  r1, r12
0x328a1f9c:  bne    0x328a217e               ; objc_msgSendSuper_stret + 34
0x328a1f9e:  ldr.w  r12, [r4, #8]
0x328a1fa2:  pop    {r3, r4}
0x328a1fa4:  bx     r12
0x328a1fa6:  pop    {r3, r4}
0x328a1fa8:  b      0x328a1fb0               ; objc_msgSend_uncached
0x328a1faa:  mov.w  r1, #0
0x328a1fae:  bx     lr
Even though that is a different method, that's where you wanted me to put a break and step into, right?

e:

Doc Block posted:

Check and see if self.parent is nil. If you're adding the child sprites to the array yourself, rather than using CCNode's addChild: method, then you'll have to set the child sprite's parent property yourself.

Wait, this is interesting.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
At the lldb prompt type po joinedMapsLayer

LP0 ON FIRE
Jan 25, 2006

beep boop

pokeyman posted:

At the lldb prompt type po joinedMapsLayer

(CCNode *(*)(void)) $1 = 0x00041475 (Flying Adventure`-[JoinedMapsScene joinedMapsLayer] + 1 at JoinedMapsScene.m:15) [no Objective-C description available]

By the way Doc Block, I'm trying to look it up, but I don't know how to manually set a child sprite's parent property as of yet. I'm guessing it's really easy. I also need to make sure that this is the problem first.

LP0 ON FIRE
Jan 25, 2006

beep boop
Holy crap you guys are amazing. It would have taken me ages to figure this out by myself. In init, when I when I make a temporary pointer to an array index I just do:

tempHummingChar.parent = self;

Now it works!

Doc Block
Apr 15, 2003
Fun Shoe
Not to be a jerk, but if the parent property wasn't set somewhere then yeah, it isn't going to work.

Also, is JoinedMapsLayer a descendent of CCNode? (if it's a descendent of CCLayer then it is). If so, you shouldn't need to make your own mutable array of sprites; each CCNode has its own array of all its children. Just do [joinedMapsLayer addChild:someSprite] or something and it will add it to joinedMapsLayer's CCArray and set someSprite's parent to joinedMapsLayer. And when joinedMapsLayer is drawn all its children will be drawn, etc.

Inside your joinedMapsLayer code you can access the child objects by accessing the children property.

Check out the documentation for CCNode (1.1 here, 2.0 here) and for CCArray (1.1 here 2.0 here).

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

xgalaxy posted:

Anyways. It still stands that its compiling thumb when it shouldn't.
Below I've attached the command line for one of the object files.

I don't know what to tell you, other than that the object file is somehow not making it into the archive. Have you tried a clean rebuild, or failing that a "hard" clean rebuild (i.e. deleting your build directory)?

xgalaxy
Jan 27, 2004
i write code

rjmccall posted:

I don't know what to tell you, other than that the object file is somehow not making it into the archive. Have you tried a clean rebuild, or failing that a "hard" clean rebuild (i.e. deleting your build directory)?

Yep =/
This is happening on two different computers with different version of the compiler tools even.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
If you run that command yourself in Terminal, does it produce a thumb object file?

xgalaxy
Jan 27, 2004
i write code

rjmccall posted:

If you run that command yourself in Terminal, does it produce a thumb object file?

Holy crap.
If I do it manually like this it seems to be producing non-thumb assembly.
Looking at the object file directly with otool.
WTF

Edit:
Okay...
Looking at the objective file with otool using the command:

quote:

otool -tv build/ios/armv7/release/obj/libtommath/bn_mp_cmp_d.o

Shows non-thumb code.

But if I look at the archive file libGG.a with otool using the command:

quote:

otool -tv build/ios/armv7/release/dist/lib/libGG.a

It shows it with thumb code.
I'm confused.

I guess.. we need -mno-thumb on the linker?

xgalaxy fucked around with this message at 01:12 on Apr 18, 2012

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Doc Block posted:

Assuming you're using a navigation controller, it's not that complicated:

code:
- (IBAction)buttonWasTapped:(id)sender
{
    SomeViewController *controller = [[SomeViewController alloc] init];
    [self.navigationController pushViewController:controller animated:YES];
    [controller release];    // Leave out if you're using ARC
}

Yea I figured it out this morning in five minutes, I just needed a break and I need to get a Xcode 4 book.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

xgalaxy posted:

But if I look at the archive file libGG.a with otool using the command:

It shows it with thumb code.
I'm confused.

I guess.. we need -mno-thumb on the linker?

I think otool is just confused. Looking more closely, that code is totally crazy and is almost certainly not actually thumb code. What problem are you actually having?

Adbot
ADBOT LOVES YOU

xgalaxy
Jan 27, 2004
i write code

rjmccall posted:

I think otool is just confused. Looking more closely, that code is totally crazy and is almost certainly not actually thumb code. What problem are you actually having?

Client is using Unity3d, which is compiled arm only.
Client claims we are using thumb in our native library and that they are getting a crash because of it.

They use the otool as proof, and seem unwilling to accept anything but arm only.

To be fair, the assembly looks like thumb code, but it seems to be filled with b.n ops every other line...

xgalaxy fucked around with this message at 03:26 on Apr 18, 2012

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