Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fighting Xcode

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Carbon
Mac Carbon  
Author Message
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Thu Mar 08, 2007 12:36 pm    Post subject: Fighting Xcode Reply with quote

iDevGames: XCode Build Question

"The problem is that if I only change my resources, I have to do a clean,
then a build to get the new resources deployed. The project consists of 50
or so source code files, and a build takes more than 30 seconds."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 2330
Location: Europe

PostPosted: Wed Apr 11, 2007 6:47 pm    Post subject: Reply with quote

Red Sweater: Xcode Index

"f you use Xcode often, surely you appreciate the “Code Sense Index.” This
is the magic cache of symbolic info that allows tricks like command-double-
clicking a variable name to jump to its declaration, or Opt-Period to complete
a function name. ... Unless. Ughh!!!!! Angst, angst, angst! It’s got crap in the
index."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Fri Apr 13, 2007 12:37 am    Post subject: Reply with quote

idevapps.com - My apps don't run anymore!

"Turns out I was using ZeroLink... But I found out that it only happens when
I set it to be the default application to open all .rtf files. If I change only one
file to open with it, it runs perfectly."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Sat Apr 21, 2007 9:42 pm    Post subject: Reply with quote

I downloaded some demo projects from Apple's site and Xcode complained
it can't find MacOSX10.4u.sdk. I didn't even knew something like that exists
in carbon projects.

I'm not sure exactly what I did to make this error go away - I just followed
what this document told me to do: Building Your Code.

Now, everything is fine again. ;)

First, it was: HISimpleList. It has that MacOSX10.4u.sdk problem, but then
I found another list example: SimpleList. It has issue with stdlibc++.a. Well,
just removing that library from the project solves it.
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 2330
Location: Europe

PostPosted: Fri Jun 15, 2007 3:59 pm    Post subject: Reply with quote

Carbon List: Is Carbon Viable?

"What I *do* need is better ways to navigate my code. Xcode's Find in Project
feature is an interface and usability disaster, and its Jump to Definition feature
is almost useless to me. These are important pieces of functionality on which
I rely heavily and their implementation in Xcode severely impacts my productivity
and enjoyment level when I'm using Xcode."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Wed Aug 22, 2007 5:55 pm    Post subject: Reply with quote

adc: Mac OS X Xcode 2.4 Release Notes: Compiler Tools

These notes are for the Mac OS X Xcode 2.4 Release of the compiler tools.
They contain information about the following topics:

The Mac OS X Mach-O GNU-based assemblers
The Mac OS X 32-bit Mach-O static link editor
Mach-O object file tools (nm, otool, and so on)
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Wed Aug 22, 2007 6:13 pm    Post subject: Reply with quote

roobaLog: Just Because it Compiles, Doesn’t Mean it Works

"My question is why doesn’t the compiler whine about me sending 3 arguments
to a C function that only takes 1? I don’t even see a warning. I dug a little
deeper. Turns if you want to see the error, you have to #include<unistd.h>
(that’s where usleep’s prototype is declared). So why does this even compile?"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Thu Aug 23, 2007 6:43 pm    Post subject: Reply with quote

CocoaDev - XCodeTips

"Enabling Warnings If you'd like to enable as many of gcc's compiler warnings
as possible, there are a few pitfalls to be aware of when doing so with Xcode.
The following is my advice based on my experience."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Thu Aug 23, 2007 6:51 pm    Post subject: Reply with quote

MachTen - My top reasons why Mac developement with XCode is a nightmare...

"We've been working with XCode on the Mac for at least six month now.
We used to build all our Mac products with CodeWarrior 8.3 and 9 but decided
to drop it because it wasn't offering any support for the new Apple SDKs ...

... XCode uses the well known GCC compiler and all the suite of the GNU
toolchain which would supposedly offer a much better development environment.
I've been quite disapointed with that choice. Here are the main problems we
encountered with XCode"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 2330
Location: Europe

PostPosted: Sun Aug 26, 2007 4:39 pm    Post subject: Reply with quote

Uli's blog - The Dangers of ZeroLink

"So, instead of just breaking or just working, ZeroLink can make unlinked
functions half-work. That's a thing to keep in mind... "
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Mon Aug 27, 2007 11:52 pm    Post subject: Reply with quote

I hate this GCC warning: "suggest parentheses around assignment used as
truth value". I know the story behind it but I don't care. Tutorials like to give
very simplified examples, but I don't buy it.

So, putting "-Wall -Wno-parentheses -Wno-unused-variable" as "Other C flags"
did the trick. Now, instead of a few thousand warnings in my project - I have
none. That allows me to turn on treatment of warnings as errors.

P.S. Options to Request or Suppress Warnings
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Wed Oct 17, 2007 10:35 pm    Post subject: Reply with quote

Apple List: Showing all the build settings

"If by "build settings" you actually mean "preprocessor macros," then you're
looking for -dM.

1) Project > Edit Current Target
2) In Build tab, find Other C Flags and add -dM to it
3) Choose your source file and select Build > Preprocess

You'll get a list of all the preprocessor macros defined for the compilation of
that file."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Wed Nov 14, 2007 12:59 am    Post subject: Reply with quote

TheList: Change Application Name

Chris Espinosa: "The most common problem is that you have to change the
CFBundleExecutable in the Info.plist to match the new execitable name once
you change the product name. In recent versions of Xcode we set this to be
${EXECUTABLE_NAME} so it's propagated automatically, but in projects cre-
ated with templates from earlier versions, it's set at project creation time and
must be changed manually when the product name is changed."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Sun Mar 02, 2008 7:35 pm    Post subject: Reply with quote

Because of some 3rd party code I had to change my C flags:

"-Wall -Wno-parentheses -Wno-unused-variable -Wno-unused-function -Wno-unused-label -Wno-trigraphs"

* see: GCC - Options to Request or Suppress Warnings

* see: warning: trigraph ... ignored - again

"The documentation is out of date. -Wtrigraphs has been included in
-Wall for a long time, but no one noticed because it didn't do
anything when trigraphs were disabled. We felt that they were a
common enough portability problem that they should be warned about
even when they were disabled..."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 2330
Location: Europe

PostPosted: Thu Jun 05, 2008 3:15 pm    Post subject: Reply with quote

the List: Re: -Wall

"Finally, some versions of Xcode have a bug where you can't turn ZeroLink
off; that means you'll get what looks like a clean compile, but you'll crash as
soon as you try to run. The only way to fix this is to hand edit the project
file to turn off ZeroLink.

1) Find your project file. It ends in '.xcodeproj'. This is a bundle, so you can
either use the terminal and cd into it, or you can control click on it to open it
up (control click -> 'Show Package Contents').
2) ..."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Mon Apr 13, 2009 2:54 am    Post subject: Reply with quote

I hate drag&drop in editors!

Code:
defaults write com.apple.xcode NSDragAndDropTextDelay 0


And that anoying message:


Code:
write com.apple.xcode XCShowUndoPastSaveWarning NO
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Thu Jun 18, 2009 10:01 pm    Post subject: Reply with quote

MF - Xcode cannot find header file?

"I also edit the settings of "Header Search Path" to be /opt/local/include
and type
# include <gsl/gsl_xxx.h>
in my program.
But Xcode2 still cannot locate the file."

Heh: YES!

Just had this issue myself. I had #include <libxml/xmlmemory.h> and Xcode
was not able to locate it. Changing it to <libxml2/libxml/xmlmemory.h> didn't
solve anything. So I had to put libxml2 folder into project settings. At first I
typed "usr/include/libxml2/" into Header Search Paths option, but it didn't
work that way! Correct path is "/usr/include/libxml2/".
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 2330
Location: Europe

PostPosted: Tue Mar 15, 2011 10:47 pm    Post subject: Reply with quote

MF - A Warning for those of you installing XCode 3 and 4

"If you're going to do this and have XCode 3 installed at the default /Developer,
you'll need to do 3 installs for things to work properly - namely, upgrade
XCode 3 to 4, then install XCode 3 elsewhere, then reinstall XCode 4. If you
do NOT do this, XCode 4 will crash immediately on launch with a plug-in error."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 2330
Location: Europe

PostPosted: Fri Mar 25, 2011 1:04 am    Post subject: Reply with quote

Apple - iTunes was unable to load provider data from sync services

"Thanks. I just ran into this problem after installing the latest version of
Xcode 3.2.6 with the 4.3 SDK."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Fri Jun 17, 2011 8:21 pm    Post subject: Reply with quote

Usefull flags, when needed:

-Wall
-Wno-parentheses
-Wno-unused-variable
-Wno-unused-function
-Wno-unused-label
-Wno-trigraphs
-Wno-idiomatic-parentheses // if (self = [self init])
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Sat Jun 25, 2011 12:02 pm    Post subject: Reply with quote

High Order Blog: Customizing Xcode File Templates

"One of the first things many users of Xcode want to do is customize the file
templates used to generate stubs for classes and other items in your project.
We’re spending most of our time building iPhone applications, so we’re inte-
rested in customizing the Cocoa Touch templates."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Fri Jan 20, 2012 12:39 am    Post subject: Reply with quote

lists.apple.com - Re: recompile without -mlong-branch?

"The Snow Leopard version of the 10.4u SDK seems to contain an outdated
version of crt1.o. You can fix the linker warning on your own by recompiling
the Csu package from the Tiger sources;

Replace /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.o with the newly
created version."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Fri Aug 26, 2016 8:30 am    Post subject: Reply with quote

universalmind - What every iOS Developer Should Be Doing with Instruments

"You've just wrapped up development on a shiny new iOS project and
have done your best to ensure that the app doesn't crash and it seems to
run ok on your test devices, but is it ready to submit? If you haven't done
any profiling in Instruments, the answer is probably no. Just because it
doesn't crash doesn't mean that it's going to behave and run well on your
user's devices"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Tue Dec 27, 2016 2:25 pm    Post subject: Reply with quote

so - Using Xcode post-build scripts to create a ZIP archive

"I am working on a super simple little app that I distribute as a ZIP archive.
The archive contains the app itself, a readme, and a few scripts. I wanted to
automate this process, so I added the scripts to my project and auto-copied
them into the build folder with a copy files build phase."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Thu Dec 29, 2016 7:22 pm    Post subject: Reply with quote

lists.apple.com - Re: Not finding libraries

"I've sometimes seen a problem where Xcode thinks a '.a' file is a dynamic
library, which causes the linker to ignore it. You can fix that by changing the
file's type to 'Mach-O Object Code' in the file inspector in the right-hand pane."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Tue Jan 10, 2017 5:07 pm    Post subject: Reply with quote

wikihow.com - How to Make a DMG File on a Mac

"One way to store or group files on a Mac is to create a Disk Image. A Disk
Image is a file which has the properties of a separate hard drive or CD and
allows for greater password protection and compression. It has a size limit
and options for encryption to keep your files safe and secure. While there
are a few applications that perform this task for you, it is recommended
that you complete this process manually."


Apple - Disk Utility for Mac: Create a disk image using Disk Utility
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 2330
Location: Europe

PostPosted: Fri Jan 27, 2017 6:50 pm    Post subject: Reply with quote

adf - Porting old Cocoa projects to Xcode 7.3

"I have a number of very old Cocoa projects, created before Xcode using
Project Builder and Interface Builder. I tried opening these projects in Xcode
7.3 and they wouldn't build -- the projects were too old. Is there another
way to bring them up to date? Can the Interface Builder NIB file be updated
to work in a recent version of Xcode?"
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Wed Apr 26, 2017 4:32 pm    Post subject: Reply with quote

eclecticlight - If you're still running El Capitan, Apple doesn't care about you

"Whereas older versions of Xcode shipped with a choice of target versions
of OS X, this Xcode offered just one. Well, two if you believed its non-choice
between macOS 10.12 and Latest macOS (macOS 10.12)."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 2330
Location: Europe

PostPosted: Wed May 17, 2017 9:08 am    Post subject: Reply with quote

adc - Exporting Your Framework Interface

"For ANSI C-based code, you can usually just prefix an underscore character
to the name of a function or variable to get the symbol name. For languages
like C++, which uses mangled symbol names, you may need to run the nm
tool to get the list of existing symbol names. Run nm with the -g option to
see the currently exported symbols. You can then copy the output from the
tool and paste it into your exports file, ..."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Fri Jun 02, 2017 2:50 pm    Post subject: Reply with quote

apple - Debug library suffix (_debug) in Xcode 2.2?

"Under the "Use [...] suffix when loading frameworks,"
select "debug" from the popup menu"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Mon Jun 26, 2017 3:28 pm    Post subject: Reply with quote

Re: Documentation Viewer is Buggy (Game Kit)

You may find these Wayback Machine links helpful. They have old style
documentation with searchable pdfs available.

Mac Developer Library September 11, 2014

https://web.archive.org/web/20140911155409/https://developer.apple.com/library/mac/navigation/

iOS Developer Library October 21, 2014

https://web.archive.org/web/20141021181308/https://developer.apple.com/library/ios/navigation/

Apple's new style documentation is amazing. You can choose Swift or
Objective-C, it is fully functional on an iPhone or iPad and it is crafted and
presented like a work of art. The downside is the usability has fallen off a
cliff. Like you I actually hate the new style documentation.
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Mon Jul 31, 2017 6:01 pm    Post subject: Reply with quote

r - What programs/software do you use aside from Xcode?

"PaintCode is essential for me when doing UI. It is 99$ but isn't hard to find
for free online. Buy it if you can though it is really a great program and always
good to help out the devs."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Thu Aug 03, 2017 3:44 pm    Post subject: Reply with quote

bitbar How to archive and export ipa from script using Xcode 6

"First, create yourself a build script. The proposed build script could start by a
clean and followed with performing an archive call:"

Code:
xcodebuild clean -project <PROJECT_NAME>.xcodeproj -configuration Release -alltargets
xcodebuild archive -project <PROJECT_NAME>.xcodeproj -scheme <NAME_OF_SCHEME> -archivePath <PROJECT_NAME>.xcarchive
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Mon Nov 20, 2017 11:17 pm    Post subject: Reply with quote

so - Move to beginning of text in Xcode

"As of 7.3 (not sure when it was added), Xcode seems to have turned this
on by default. Cmd-left in the Key Bindings preference pane is now bound
to Move to Beginning of Text.

Personally, this drives me bonkers, so I've changed it back to Move to
Beginning of Line
."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Wed Jan 24, 2018 10:31 pm    Post subject: Reply with quote

-Wno-idiomatic-parentheses // if (self = [self init])
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Wed Jan 09, 2019 10:01 pm    Post subject: Reply with quote

so - I get conflicting provisioning settings error when I try to archive to submit an iOS app

"Don't forget to do this,

Select the Project -- > Build Settings. Search PROVISIONING_PROFILE and
delete whatever nonsense is there."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 2330
Location: Europe

PostPosted: Wed Feb 27, 2019 11:36 am    Post subject: Reply with quote

For some reason this script DOES work on Mojave/Xcode 10.1

cp ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_NAME} ${PROJECT_DIR}/${EXECUTABLE_NAME}App

For some reason this script DOES NOT work on Mojave/Xcode 10.1

cp ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_NAME} ${PROJECT_DIR}/${EXECUTABLE_NAME}App

Two computers, same project, build phase - run script. Works on one, does not on the other.

BUT THIS!!!!!

cp "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_NAME}" "${PROJECT_DIR}/${EXECUTABLE_NAME}App"
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3511
Location: Zagreb

PostPosted: Wed Apr 10, 2019 4:48 pm    Post subject: Reply with quote

so - Suppressing deprecated warnings in Xcode

"With all the SDKs floating around, it's handy to be able to build for multiple
SDKs and platforms."


Code:
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- (void) methodUsingDeprecatedStuff
{
    //use deprecated stuff
}
#pragma GCC diagnostic pop
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Carbon All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group