How to find iOS 4 only code in iPhone project - iphone

i have a iPhone Project with Base SDK 4.0 and Deployment Target set to 3.0 with XCode 3.2.3. Is there an "easy" way to find out whether i use iOS 4 only API calls in my Source Code. I'm aware that i could install an old XCode to run my project against an e.g. 3.1.3 Simulator, but i hope there is a simpler way for checking this.
Anybody has an idea?
Thanks
Roland

Set the SDK to a 3.x SDK and recompile. If you have any new errors or warnings, it's probably a sign you have 4.0-specific code, and the errors will tell you where.

Related

parse.com Linker Error xcode 6 swift

After I installing xcode6 I got some errors with parse.The project was working just fine in beta versions of xcode 6. I think i might be parse.com that is not compatible with xcode6. I think I have added all the frameworks properly
I experienced the same problem,
first, download the latest SDK version from Parse.com
second, I noticed that when I run it NOT on the iPhone 6 simulator it works fine.
You're targeting the iOS Simulator, which the Parse framework does not seem to support. So:
Clean project.
Change the destination from iOS Simulator to iOS Device.
Build.
That's all you need to do.

iOS 6 WebDriver compilation

I tried to compile Selenium WebDriver for iPhone 6.1.3 and got some errors, like
Objective-C declarations may only appear in global scope
in HTTPVirtualDirectory+FindElement.mm file.
I use XCode 4.6.2 , iOS 6.1 SDK and WebDriver sources from https://code.google.com/p/selenium/
Someone compiled WebDriver for iOS6 successfully? Had you same problem?
Also, if you have any useful information about automated web testing on real devices (iPhone with iOS 6) please, share it with me =)
I have not used the iOSDriver but it is now deprecated in favor of something else, specifically the ios-driver created by a third party:
http://freynaud.github.io/ios-driver/
I would set that up, come back if you have any further questions.
Go to https://code.google.com/p/selenium/wiki/IPhoneDriver
take trunk from https://code.google.com/p/selenium/
Add project from trunk to Xcode
In Xcode Build and run thorugh Iphone 6.1 Emulator
P.S i think that will help you

Problems running application compiled with XCode 3.2.4 and iOS SDK 4.1 on iOS 3.x

I recently ran into troubles building an app with latest iOS 4.1 SDK and running it on device with iOS 3.x. App works OK on 4.x devices and iPad, but crashes on devices running older 3.x iOS.
Problem appears to be in linker, since crashes are obviously caused by calls to 3rd party libraries used in the project. The linker (or even compiler) suspicion is supported by fact that when I build the app with older 3.1.3 SDK, it works as expected.
My Release configuration uses iOS 4.1 as Base SDK and iOS 3.0 as deployment target platform, compiled with LLVM GCC 4.2. I also tried GCC 4.2 compiler, but it didn't help too.
I've found that there's some bug in linker/compiler in this version of SDK, but none of proposed solutions worked for me.
I desperately need to resolve this issue, so any help is highly appreciated.
Thanks to everyone for any hint or advice.
Just to let you know that if you are using something like iAd framework, you need to add this framework as "weak dependency" in the Target Info Pop-Up :-)
If it's a librairie, could you list them ?
Good Luck !
I guess I am too late at answering this one. But still - If you have the 3.1.3 device with you, doing an in-system debugging by loading an app with a developer profile gives you what caused the crash. I faced a similar problem when my apps used to work fine on the 4.0+ devices but used to crash immediately upon startup when I tried it on 3.1.2 device. I compiled it with a developer profile and then did an in-system debugging. I found out that I was using a class UIPopoverController which was brought in with iOS 3.2 and hence used to fail for my 3.1.2. Putting in the necessary checks for this resolved my problem.
Hope that helps.

Simulate iPhone 3.0 with SDK 4.0

i have xcode 3.1.3 and xcode 3.2.1 installed
For sure now I use 3.2.1 with Sdk 4 to develop new apps.
But what if I like to test a App compiled with sdk 4 on a
simulated iphone that would just have 3.0??
As BaseSDk i use 4.0 and as target 3.0
In xcode 3.1.3 i could select a simulator down to 2.x but with sdk 4.0
i only have the option 4.0 iphone or 3.2 ipad
Example> i know iAd is not supported before 4.0 so I set the
framework to weak. But just to be sure all works fine I really
would like to test my app in a simulator that simulates an iphone with 3.0
thx
chris
The new simulator does not seem to be able to run the old simulator OSs (3.2 being the oldest it'll run). I tried moving them over from old SDK installs and several variations and "no go".
You can check that you aren't using methods defined in the new SDK, when you set the base SDK to 4.0 but set the Deployment to to 3.1.3, for example. For a blog post on how to do this see this blog post, and note my comment on an easier way to do the last two steps (no need to edit the project file as a text file).
inside the iphone sdk dmg file, there should be a folder called packages. in it, you'll find packages like iPhoneSDK3_0 and iPhoneSimulator3_0. Install them to be able to use them in xcode.
Correct me if I'm wrong, but I think a device with 3.0 installed can't even run apps compiled with 3.2 or 4.0. Furthermore, Apple now only accepts iPhone apps (including updates of existing apps) linked against the 4.0 libraries, which won't run on OS version 3.0 devices.
So why do you want to test your app on a 3.0 device?
Try setting the architecture you want to build for in the Xcode project preferences and rebuilding.
If this doesn't work, completely uninstall Xcode and downgrade. You have to completely uninstall because your system must have updated the frameworks for 4.0.
Hope this helps

How to get iPhone SDK 2.2.1 for Xcode 3.2?

After my upgrade to Snow Leopard and Xcode 3.2 (which I really regret a lot!!), Xcode lost all the SDK's. I'm one of those old-fashioned idiots who still want to develop for 2.2.1. But Apple does not offer me an old SDK download.
Now I was clever and made tons of time machine backups. But: What's the preferred way to get iPhone SDK 2.2.1 running with Xcode 3.2? Some guys said that's generally possible. I do hope so because I still don't believe in all those "faked" stats, and besided that, my app doesn't benefit from 3.x additional features so I would not want to constrain my market just for that lazyness.
Any idea?
Regardless of whether or not you're targeting iPhone OS 3.0 or not using any 3.0 specific features, you should always compile your app against the latest SDKs to benefit from bug fixes and performance improvements.
You can compile against the 3.0 SDK and set the iPhone OS Deployment Target to 2.2.1 and still cater for users who are using 2.2.1.
You may find that some methods have been deprecated, but that doesn't stop you from using them until you're ready to move on.
Get the 3.1 final sdk, it has the 2.2.1 sdk in it. On disk its usual location is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.1.sdk
Also included is 3.0 and 3.1.
XCode 3.2 should have the prior iPhone SDKs available, just make sure you are setting your project's Base SDK setting to "iPhone OS 2.2.1". (Right-click on your top-level project icon in the Groups & Files browser in XCode and choose "Get Info", then go to the Build tab.)
Raffaello and others are correct: you can use the latest SDK and still target (and test on) older SDKs. For example, I'm using iOS4.0 (xcode 3.2.3) and testing on my iPhone 3g running 3.1.3.
To clarify the procedure:
- go to project info > build tab
- set Architectures:Base SDK (most likely) the latest
- set Deployment:iPhone OS Deployment Target to what ever you want (I have the option to go as far back as 2.0).
Hope this helps someone.
Like I said on other threads, the SDK and Deployment Target are different.
You can still use the latest SDK to build for an older OS.
Just go to your Target settings and under the Deployment section set the iPhone OS Deployment Target to whatever you'd like.
Cheers,
Raffaello Colasante