Xcode version preprocessor - ios

I have a small bug in my application that only exists when building with Xcode 6. I fixed this bug, but then this part is bugged when building with Xcode 5.
So there is an ugly battle between the two Xcode versions..
Now.. I want to check which Xcode version is being used to build the project via a preprocessor. Is this possible to do so? If so, this would fix my problem really fast.

Related

Apple Mach -O Linker (Id) Warning in Xcode 8.3 release [duplicate]

I have a slight issue when build my Xcode project, get tones of warning after update pod. It looks like this
Already search the whole site here but still no luck. it doesn't affect the project but it is quite annoying. Anyone could help?
It probably means their binary file has non-aligned pointer when they compile their code. In those cases the alignment basically defaults to 1 byte and hypothetically might impact performance.
After updating to Xcode 8.3 public release I am still seeing this error, so Google might need to compile their static library with different settings to make it go away.
Got this response from firebase support:
This is a known issue with Xcode 8.3 beta, so it might be a beta thing
and Xcode being extra verbose. It works well though with 8.2.1 so I
recommend temporarily use it to avoid the warnings or ignore the
warnings on 8.3 beta if it does not affect your app.
This has been fixed in Firebase 3.16.0 (Firebase Core 3.6 + Firebase Analytics 3.8.0)
guys, it is all fixed now. Tested it all myself on two projects. You got to go to the correct directory of your project so that your pod spec file is visible to your command line commands, run
pod update
and see it all fixed and working properly!
These problems are addressed, and likely fixed, with release 3.16.0.

Apple Mach-O Linker Warning after xCode Update [duplicate]

I have a slight issue when build my Xcode project, get tones of warning after update pod. It looks like this
Already search the whole site here but still no luck. it doesn't affect the project but it is quite annoying. Anyone could help?
It probably means their binary file has non-aligned pointer when they compile their code. In those cases the alignment basically defaults to 1 byte and hypothetically might impact performance.
After updating to Xcode 8.3 public release I am still seeing this error, so Google might need to compile their static library with different settings to make it go away.
Got this response from firebase support:
This is a known issue with Xcode 8.3 beta, so it might be a beta thing
and Xcode being extra verbose. It works well though with 8.2.1 so I
recommend temporarily use it to avoid the warnings or ignore the
warnings on 8.3 beta if it does not affect your app.
This has been fixed in Firebase 3.16.0 (Firebase Core 3.6 + Firebase Analytics 3.8.0)
guys, it is all fixed now. Tested it all myself on two projects. You got to go to the correct directory of your project so that your pod spec file is visible to your command line commands, run
pod update
and see it all fixed and working properly!
These problems are addressed, and likely fixed, with release 3.16.0.

How to remove the Xcode warning Apple Mach-O Linker Warning 'Pointer not aligned at address

I have a slight issue when build my Xcode project, get tones of warning after update pod. It looks like this
Already search the whole site here but still no luck. it doesn't affect the project but it is quite annoying. Anyone could help?
It probably means their binary file has non-aligned pointer when they compile their code. In those cases the alignment basically defaults to 1 byte and hypothetically might impact performance.
After updating to Xcode 8.3 public release I am still seeing this error, so Google might need to compile their static library with different settings to make it go away.
Got this response from firebase support:
This is a known issue with Xcode 8.3 beta, so it might be a beta thing
and Xcode being extra verbose. It works well though with 8.2.1 so I
recommend temporarily use it to avoid the warnings or ignore the
warnings on 8.3 beta if it does not affect your app.
This has been fixed in Firebase 3.16.0 (Firebase Core 3.6 + Firebase Analytics 3.8.0)
guys, it is all fixed now. Tested it all myself on two projects. You got to go to the correct directory of your project so that your pod spec file is visible to your command line commands, run
pod update
and see it all fixed and working properly!
These problems are addressed, and likely fixed, with release 3.16.0.

Sudden Warnings after upgrading to XCode 5.1

I just stumbled upon 2 warnings in my project that are really confusing..
1.
warning: ignoring debug info with an invalid version (0)
2.
WARNING: Linking two modules of different target triples: 'x86_64-apple-ios7.0.0' and 'x86_64-apple-ios6.0.0'
the first one was resolved by this answer's help. But after restarting my Xcode I got the warning again…
The second one just appeared and i can't find anything on google for this…
THanks in advance.
Items:
You should for sure clean your Xcode project (⇧⌘K). Personally, I like to clean the entire derived data directory (⌥⇧⌘K), AKA "nuke the entire site from orbit...".
I had some problems after upgrading too. FWIW, Xcode 5.1 defaults Simulator builds to "active architecture", which for most folks is x86_64 now. Previously, I think the default architecture for sim builds was i386. This might be part of your problem with #2.
Re: #2, one of those modules is compiled against the iOS6 SDK, and one is iOS7. Clean might help, or you might need to reset the Base SDK in Build Settings to Latest iOS on all your submodules.

Can Xcode 4.6.x and Xcode 5 share project directories?

After installing Xcode 5 I immediately noticed it bringing up the windows/projects from a previous Xcode 4.6 session. Of course this is expected behavior if I am upgrading, but since this is only a preview/beta release it made me a bit nervous....
Is it reasonably safe to let Xcode 5 and Xcode 4.6.2 point to the same project directories (maybe not while running simultaneously?
Yes, it is perfectly fine and I have been using mainly XCode5 but switching to 4.x every once in a while. The only thing to be careful of is when opening some files, it may ask if you want to convert them to XCode 5 format. If you do, you will not be able to open that file in XCode 4.X anymore (or so the warning says, I've never clicked yes).
JSdodgers's answer is perfectly valid.
Upgrading XIBs is a big pain.
Note that you won't be able to use every new XIB feature in Xcode 5 if you don't use the Xcode 5 format.
The best solution is to have a separate branch (git or svn) for your iOS 7 code.

Resources