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
Faldoncow
Jun 29, 2007
Munchin' on some steak
I've been having some issues lately trying to update Xcode through the appstore. The download will get up to 40-60% and then it just fails and I'm not sure why. Anyone had to deal with this and have any idea how I might fix it?

Adbot
ADBOT LOVES YOU

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Faldoncow posted:

I've been having some issues lately trying to update Xcode through the appstore. The download will get up to 40-60% and then it just fails and I'm not sure why. Anyone had to deal with this and have any idea how I might fix it?

Restart your computer.

Find the cached partial download and delete it.

Download the full SDK from the developer center.

lord funk
Feb 16, 2004

I much prefer to download the .dmg through the Downloads section. Just click 'Looking for an older version of Xcode?' and grab it from there.

lord funk
Feb 16, 2004

I had the bright idea to include short videos for the Help section of my app. Also I like crushing my balls in a clamp.

Can anyone recommend a filetype / container / codec that a) is small and b) doesn't suck? I am clueless in Premiere when I go to export and have 10,000 export options.

edit: yay for google this is okay

lord funk fucked around with this message at 18:48 on Apr 25, 2014

Hughlander
May 11, 2005

AppCode 3 EAP is open. Complete with an interface builder and even cooler test suite.

Doctor w-rw-rw-
Jun 24, 2008

lord funk posted:

I had the bright idea to include short videos for the Help section of my app. Also I like crushing my balls in a clamp.

Can anyone recommend a filetype / container / codec that a) is small and b) doesn't suck? I am clueless in Premiere when I go to export and have 10,000 export options.

edit: yay for google this is okay

Handbrake is actually pretty decent for transcoding. I find the options reasonable.

lord funk
Feb 16, 2004

Doctor w-rw-rw- posted:

Handbrake is actually pretty decent for transcoding. I find the options reasonable.

Yep, way smaller files. Which I need because :lol: :

edit: down to 67.6MB. Still fat, but much leaner than before.

Only registered members can see post attachments!

lord funk fucked around with this message at 23:06 on Apr 27, 2014

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
My totally unoriginal idea that I completely ripped off from Mike Walker because every time I have to use CF apis I forget which __bridge I need:

http://fuckingbridgedcastsyntax.com


Please tell me if I messed anything up, lest I embarrass myself in front of the internet.

HookShot
Dec 26, 2005
Hi again iOS thread! I'm doing an app where I'm trying to play a certain sound file every time a certain tile is tapped. My code for this section is down below, and the line that's giving me trouble is the fourth line from the top:

code:
NSString *audioPath = [[NSBundle mainBundle] pathForResource:secondObject ofType:@"mp3"];
I would like pathForResource to be a variable, specifically the filename of the image associated with secondObject. I can't for the life of me figure out how to do it, everything I do gives me either the red triangle of "oh no you didn't" or, like the way I have it set up now, it breaks the thread.

code:
if (firstObject != sender)
            {
				self.matchHit +=1;
				self.secondTouch = YES;
				self.secondObject = [buttonId objectAtIndex:[buttonId indexOfObjectIdenticalTo:sender]];
				
				[UIView beginAnimations:nil context:NULL];
				[UIView setAnimationDuration:0.3];
				[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:secondObject cache:NO];
				[secondObject setImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@.png",[secondObject currentTitle]]] forState:UIControlStateNormal];
				[UIView commitAnimations];
				
				NSRange range =  NSMakeRange(0, 1);
				
				NSLog(@"firstString = %@ : secondString = %@",[[firstObject currentTitle] substringWithRange:range],[[secondObject currentTitle] substringWithRange:range]);

				if([[[firstObject currentTitle] substringWithRange:range] isEqualToString: [[secondObject currentTitle] substringWithRange:range]])
				{
					matchCount-=1;
					NSLog(@"Match. ^_^");
					self.matchFlag = YES;
					[self addScore:sender];
                    
                    AVAudioPlayer *audioPlayer;
                    NSString *audioPath = [[NSBundle mainBundle] pathForResource:secondObject ofType:@"mp3"];
                    NSURL *audioURL = [NSURL fileURLWithPath:audioPath];
                    audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:audioURL error:nil];
                    [audioPlayer play];
This is the code with the broken thread that it gives me when I build it like it is now:

[code] return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));[/code


And this is the green highlighted message I get: Thread 1:signal SIGABRT




I've spent like five hours trying to figure this out, I'm getting better at this whole coding thing, but I'm glad there's goons that know these things way better than me!

Doc Block
Apr 15, 2003
Fun Shoe
Shouldn't it be
Objective-C code:
NSString *audioPath = [[NSBundle mainBundle] pathForResource:[secondObject currentTitle] ofType:@"mp3"];
?

Otherwise you're passing secondObject itself, which I'm assuming isn't an NSString.

Echo Video
Jan 17, 2004

Is buttonId an NSArray?

haveblue
Aug 15, 2005



Toilet Rascal
Step 1 is to add a global breakpoint to the project that fires when an exception is thrown; that should tell you the exact line the error is coming from rather than bubbling up to main.

Meridian Rizing
Sep 4, 2007
I have couple of really odd questions regarding push notifications.

Due to server error (I can't modify the server) push notes get sent out to devices that shouldn't be receiving them. I can use the information in the push notification to find out if it should be displayed or not. Is it possible to selectively suppress certain push notifications? (I suspect the answer is no, but just in case)

Is it possible to access all push notifications for given app that are currently on the device? I want it so if the app is opened from the icon instead of the push note I can process and consume all the push notifications manually. I'm not too worried if it requires undocumented functionality as this is only a stop gap measure for something that's not going to be publicly released for a while. Where it should hopefully be fixed. (Again I suspect the answer is no but this one is more likely)

Doh004
Apr 22, 2007

Mmmmm Donuts...

Meridian Rizing posted:

Due to server error (I can't modify the server) push notes get sent out to devices that shouldn't be receiving them. I can use the information in the push notification to find out if it should be displayed or not. Is it possible to selectively suppress certain push notifications? (I suspect the answer is no, but just in case)
Not to my knowledge, no. Unless the app is currently active, you won't be able to respond to the notification. I could be wrong though as I've only just started handling push notifications for our app.

Meridian Rizing posted:

Is it possible to access all push notifications for given app that are currently on the device? I want it so if the app is opened from the icon instead of the push note I can process and consume all the push notifications manually. I'm not too worried if it requires undocumented functionality as this is only a stop gap measure for something that's not going to be publicly released for a while. Where it should hopefully be fixed. (Again I suspect the answer is no but this one is more likely)

You should be able to access all local notifications via
code:
[[UIApplication sharedApplication] scheduledLocalNotifications]
https://developer.apple.com/library...alNotifications

HookShot
Dec 26, 2005

Doc Block posted:

Shouldn't it be
Objective-C code:
NSString *audioPath = [[NSBundle mainBundle] pathForResource:[secondObject currentTitle] ofType:@"mp3"];
?

Otherwise you're passing secondObject itself, which I'm assuming isn't an NSString.

Thanks, I did this, but unfortunately I still got the same thread signal.


Echo Video posted:

Is buttonId an NSArray?

NSMutableArray


haveblue posted:

Step 1 is to add a global breakpoint to the project that fires when an exception is thrown; that should tell you the exact line the error is coming from rather than bubbling up to main.

Cool I'll look up how to do this and then hopefully come back later tonight with more info, thanks :)

lord funk
Feb 16, 2004

HookShot posted:

Cool I'll look up how to do this and then hopefully come back later tonight with more info, thanks :)

Add the breakpoint like this:

Doh004
Apr 22, 2007

Mmmmm Donuts...
Oh god do you not use a dark theme for coding?

Heathen. :colbert:

lord funk
Feb 16, 2004

Doh004 posted:

Oh god do you not use a dark theme for coding?

Heathen. :colbert:

It's gross. If the whole UI changed I'd probably switch, but the sidebars stay bright and the contrast is horrible.

Doctor w-rw-rw-
Jun 24, 2008
https://code.facebook.com/posts/234067533455773/introducing-pop-the-animation-engine-behind-paper/

Now open-source.

Meridian Rizing
Sep 4, 2007

Doh004 posted:

Not to my knowledge, no. Unless the app is currently active, you won't be able to respond to the notification. I could be wrong though as I've only just started handling push notifications for our app.


You should be able to access all local notifications via
code:
[[UIApplication sharedApplication] scheduledLocalNotifications]
https://developer.apple.com/library...alNotifications

This didn't work. I've have several push notes but array is empty each time. Do push notes and local notes work of the same system? I thought that they didn't.

Doh004
Apr 22, 2007

Mmmmm Donuts...

Meridian Rizing posted:

This didn't work. I've have several push notes but array is empty each time. Do push notes and local notes work of the same system? I thought that they didn't.

Sorry you're correct, you cannot do that. I don't believe your app has knowledge of all of its push notifications, just the one that it was opened with.

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

:dance:

Star War Sex Parrot
Oct 2, 2003

Intel Clang-based C++ Compiler, a new C++ compiler for OS X. If I'm reading this correctly, this should allow icc-like compiler performance with native OS X tools (Xcode, etc.). I'm curious to see what sort of performance gains this nets, but presumably they must be decent for Intel to go to this effort. I wonder if Apple pushed them on this at all.

HookShot
Dec 26, 2005

lord funk posted:

Add the breakpoint like this:



Thank you so much, I did this and then figured out what line the problem was in, and it turns out I had screwed up some file names and managed to solve the problem because of this. Thanks again :)

dc3k
Feb 18, 2003

what.
How the gently caress do I make interface builder give me outlets as (nonatomic, weak) instead of (weak, nonatomic) :argh:

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Star War Sex Parrot posted:

I wonder if Apple pushed them on this at all.
I'd expect it's more of the opposite. If it's actually meaningfully better than clang, it makes it harder for Apple to switch to AMD or ARM.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

status posted:

How the gently caress do I make interface builder give me outlets as (nonatomic, weak) instead of (weak, nonatomic) :argh:

nonatomic is probably the least interesting part of any given property declaration, why shouldn't it go last?

For a possibly helpful answer, see if you can use clang-format or uncrustify or something to fix it up for you and run it before commits.

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

pokeyman posted:

nonatomic is probably the least interesting part of any given property declaration, why shouldn't it go last?

For a possibly helpful answer, see if you can use clang-format or uncrustify or something to fix it up for you and run it before commits.

Perhaps we'll get -fobjc-nonatomic-properties someday.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Ender.uNF posted:

Perhaps we'll get -fobjc-nonatomic-properties someday.

You won't. We do not generally want to add compiler flags that subtly change the interpretation of the language. The existing dimensions of that (e.g. with -fobjc-arc) are bad enough.

Hughlander
May 11, 2005

status posted:

How the gently caress do I make interface builder give me outlets as (nonatomic, weak) instead of (weak, nonatomic) :argh:

You probably don't. Apple guidelines are for it to be (weak, nonatomic) I just embraced it internally when it did that after running the ARC converter on all of our MRC code.

Glimm
Jul 27, 2005

Time is only gonna pass you by

pokeyman posted:

nonatomic is probably the least interesting part of any given property declaration, why shouldn't it go last?

For a possibly helpful answer, see if you can use clang-format or uncrustify or something to fix it up for you and run it before commits.

I prefer nonatomic first because it keeps everything inline since nearly every single property is (nonatomic, foo).

Alas I've learned to give in as well.

Doctor w-rw-rw-
Jun 24, 2008
I always change it. Not only do I do that, but I often separate my properties into logical sections, within which I alphabetize them. :shepface:

The rationale being that I rarely have merge conflict issues that are difficult to resolve, since I also strictly organize my methods into logical sections as well.

Kallikrates
Jul 7, 2002
Pro Lurker
Heads up, apple seems to be auto rejecting apps that are improperly using ad identifiers.
If you use advertisingIdentifier you must also use advertisingTrackingEnabled even if you are using it for one of the approved non-ad purposes and especially if you are using it for ad purposes.
Now we have to wait while vendors/3rd parties update libraries.
Some affected libraries:

Facebook (on github so we can patch)
ComScore
Google admob

Kallikrates fucked around with this message at 14:21 on Apr 30, 2014

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Kallikrates posted:

Heads up, apple seems to be auto rejecting apps that are improperly using ad identifiers.
If you use advertisingIdentifier you must also use advertisingTrackingEnabled even if you are using it for one of the approved non-ad purposes and especially if you are using it for ad purposes.
Now we have to wait while vendors/3rd parties update libraries.
Some affected libraries:

Facebook (on github so we can patch)

Do you have an example for the Facebook case? The SDK team is asking for them.

From the SDK team:

quote:

we grab advertisingTrackingEnabled; always have. definitely would like more detail on what they think they need to patch.

Edit edit: there's definitely something going on here, some recent change to how Apple handles IDFA. Team is looking at it, though they're also crazy with F8 today.

Subjunctive fucked around with this message at 17:53 on Apr 30, 2014

Kallikrates
Jul 7, 2002
Pro Lurker

Subjunctive posted:

Edit edit: there's definitely something going on here, some recent change to how Apple handles IDFA. Team is looking at it, though they're also crazy with F8 today.

Thats what I'm talking about, seems Apple recently turned on some automated tool that might not be that great. They are just invalidating binaries.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Kallikrates posted:

Thats what I'm talking about, seems Apple recently turned on some automated tool that might not be that great. They are just invalidating binaries.

We haven't found any cases where our SDK was the cause; we definitely already grab tracking. Do you have a developer I could ping about them getting bounced until they changed something in the SDK?

https://github.com/facebook/facebook-ios-sdk/blob/7fe08877ea773dc35a5e4d6d9d305fae57c513b6/src/Core/FBUtility.m#L353

There may also be a checkbox or something the dev needs to select at upload about their use of IDFA, but I'm not certain.

Kallikrates
Jul 7, 2002
Pro Lurker

Subjunctive posted:

We haven't found any cases where our SDK was the cause; we definitely already grab tracking. Do you have a developer I could ping about them getting bounced until they changed something in the SDK?

https://github.com/facebook/facebook-ios-sdk/blob/7fe08877ea773dc35a5e4d6d9d305fae57c513b6/src/Core/FBUtility.m#L353

There may also be a checkbox or something the dev needs to select at upload about their use of IDFA, but I'm not certain.

Well iirc our rejection basically came after the binary was invalidated for misuse of "advertisingTrackingEnabled". A grep of the code base gave the above results from 3rd party libraries (we don't use advertisingTracking) so I think there is a chance it's not facebook's fault, it could be the other two but the message from apple is just a smack on the wrist it's up to us to figure out the cause.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Kallikrates posted:

Well iirc our rejection basically came after the binary was invalidated for misuse of "advertisingTrackingEnabled". A grep of the code base gave the above results from 3rd party libraries (we don't use advertisingTracking) so I think there is a chance it's not facebook's fault, it could be the other two but the message from apple is just a smack on the wrist it's up to us to figure out the cause.

Ah, AdMob definitely had to update their stuff because of this. That makes sense.

Doctor w-rw-rw-
Jun 24, 2008
Keep an eye out for Scott's talk at f8 today: https://f8.facebooklive.com/ 3:45-4:30. EDIT:Okay, it's actually mostly a summary of the Paper Tech Talks, plus an announcement that the Display Node library will be made open-source after a closed beta period. Some history of Paper as well.

Subjunctive, do I know you?

Doctor w-rw-rw- fucked around with this message at 00:50 on May 1, 2014

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Doctor w-rw-rw- posted:

Keep an eye out for Scott's talk at f8 today: https://f8.facebooklive.com/ 3:45-4:30.

Subjunctive, do I know you?

Not sure; I didn't work very closely with the Paper team other than Scott and a couple of others. I'm Mike Shaver.

Also: just launched http://applinks.org/ to make deep linking into other apps easy and auto-updating. I may try wedging it into Awful.app.

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