questions on submitting an app

Apprentice
Posts: 7
Joined: 2011.03
Post: #1
Hi guys,

I'm ready to submit my first app but still have a few questions that i'm not too sure of and would like to get some advises from you.

1) should i remove all the comments from my code
2) should i remove all the NSLog from my code
3) do i need to run a released build and archive it

Thanks in advance.
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2011.05
Post: #2
1) Why should you remove your comments? Comments are ignored by compiler and they does not increase size of your binary file.
2) It is a nice practice to use NSLog only in Debug mode. Define a global constant:
#define kDebugMode YES (or NO)

Then do something like this:

if(kDebugMode == YES) NSLog(@"What ever");

3) You need to make a copy of your "Relase" build and to call it "Distribution". You need also new provisioning certificates for this build. Go to Apple "iOS Provisioning Portal" and read the documentation about how to distribute an app on the App Store. https://developer.apple.com/ios/manage/o...dex.action

- Kenan
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
That's not a good way to disable logging. That *does* decrease performance and increase code size. If you really want to disable all logging, put #define NSLog(...) /* nothing */ into your prefix header (after foundation include).
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2011.05
Post: #4
I meant comments, not logging. He asked in question 1 should he delete his comments. And if someone talks about comments, I think, it is a kind of:

// Hi, I am a comment!

And such comments does NOT increase size of binary file.

Smile

But yes, you're right about question 2...
#define NSLog(...); /* nothing */
is definitely better way to remove NSLog-s.

- Kenan
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #5
I wasn't talking about question one, and your define to remove NSLog is broken.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  website for submitting an app Bommbomm 3 5,757 Jul 4, 2011 03:03 PM
Last Post: bdsowers
  Testing Game Center Before Submitting App superdoctor 3 9,353 Jan 15, 2011 12:26 PM
Last Post: MattDiamond
  Submitting Updates to iTunes Connect and Review Times Bersaelor 4 10,035 May 26, 2010 09:51 AM
Last Post: AnotherJake