Send Xcode-users mailing list submissions to email@hidden
To subscribe or unsubscribe via the World Wide Web, visit https://lists.apple.com/mailman/listinfo/xcode-users or, via email, send a message with subject or body 'help' to email@hidden
You can reach the person managing the list at email@hidden
When replying, please edit your Subject line so it is more specific than "Re: Contents of Xcode-users digest..." Today's Topics:
1. Re: How to prevent script phase from running when there was a compile or link error (Howard Moon) 2. Understanding the docs. UIApplication for iOS (Alex Zavatone) 3. Re: Understanding the docs. UIApplication for iOS (Jens Alfke)
From: Howard Moon <email@hidden>
Subject: Re: How to prevent script phase from running when there was a compile or link error
Date: June 3, 2013 12:47:31 PM EDT
To: XCode Users <email@hidden>
In Xcode 3.2.6, I've got a script phase that runs after everything else is done, but it always runs even if there is a compile or link error prior to that. I don't want to have the compiler stop on build errors, but I also don't want to execute [at least a portion of] my script, because it will always fail if the link hasn't been performed or hasn't succeeded. I don't see any way to control the execution of the script in this manner, though. Is there a variable that gets set when linking has succeeded (or failed) that I can use to tell my script to skip over all or part of it?
If you’ve turned on the “Continue Building After Errors” preference (which it sounds like you have), then Xcode doesn’t provide any support for what you’re trying to do.
Your best bet would be to add a clause to your script to check whether the linked binary exists at the destination path (if it the link failed or the link was killed by Xcode [e.g. because the build was cancelled] then Xcode will have removed any partially-linked binary), and skip the meat of your script if it’s missing. You may wish to have the script emit an error message or return a nonzero exit code in that case.
Thanks, Michael,
You're correct, I have it set to continue building. Your idea sounds fine.
Hmmm… well, the problem is, Xcode doesn't remove the target bundle unless I do a clean first. I'm checking for the existence of ${TARGET_BUILD_DIR}/${PRODUCT_NAME).${WRAPPER_EXTENSION}. It's always there unless I do a clean, (as is the binary inside its Contents/MacOS folder). Is there some other (intermediate?) product I should check for?
Even doing a clean does not help, because the destination bundle is created in order to copy the resources, info.plist, etc., to it, prior to the script phase running.
Is there something else I can check besides the existence of the product to see if the compile and link phases completed without error?
-Howard
From: Alex Zavatone <email@hidden>
Subject: Understanding the docs. UIApplication for iOS
Date: June 3, 2013 1:49:14 PM EDT
To: Xcode Users <email@hidden>
What I'm used to in Apple's iOS class reference docs are listings at the top of the file that specify the objects inherited from and protocols conformed to.
I'm either missing something with UIApplication, or the docs are.
Referring to this class reference document: https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html
It's not listed that the UIApplication class conforms to the UIApplicationDelegate, but it is mentioned that the delegate exists and is "defined" by the UIApplication.
In fact, in the .h file, it obviously extends UIResponder to conform to the UIApplicationDelegate, but you actually can't tell this by eyeballing the docs. It's not listed at all until you read the overview.
Shouldn't this be included in the "Conforms to" section at the top of the class reference, while stating that it is conformed to through an extension to UIResponder?
It just seems odd that a fundamental part of UIApplication (the delegate protocol) isn't mentioned in area of the doc that normally lists it.
If this is a doc bug, I'll gladly report it, but I'd like to make sure it's not my oversight first.
Thoughts?
From: Jens Alfke <email@hidden>
Subject: Re: Understanding the docs. UIApplication for iOS
Date: June 3, 2013 2:11:44 PM EDT
To: Alex Zavatone <email@hidden>
Cc: Xcode Users <email@hidden>
No, it doesn’t:
NS_CLASS_AVAILABLE_IOS(2_0) @interface UIApplication : UIResponder <UIActionSheetDelegate>
It does implement/conform to UIActionSheetDelegate; is that what you meant?
—Jens
_______________________________________________ Xcode-users mailing list email@hidden https://lists.apple.com/mailman/listinfo/xcode-users
|