compile problem for xcode 3.2 - objective-c

Hey I have problem compiling code in xcode 3.2
I have a code where it's using iOS 4's API, "MFMessageComposeViewController"
It would compile fine with 4.0 under xcode, but when when i try to compile with 3.2 I get error because of "MFMessageComposeViewController".
It seems that xcode can't find keyword for MFMessageComposeViewController.
In order to be able to compile for 4.0 and 3.2 and still use MFMessageComposeViewController, what should i do?
thank you!

I can't determine whether the version numbers you are referring to are to do with the iPhone OS version of the Xcode version.
The documentation for MFMessageComposeViewController shows that it is only available in iOS 4.0 and later, so you can't use it at all in earlier versions of iPhone OS.
If you are having trouble with Xcode version 4, you cannot ask for help here because it is under a non-disclosure agreement, as far as I am aware. If you are using Xcode 3.2 to compile for source code targeting iOS 4.0, ensure that your project settings are correct and are set to use the iOS 4.0 SDK.

Related

import CallKit crashes randomly on iOS 9

I have imported CallKit framework as optional only. But import CallKit crashes while running on iOS 9 at launch. But works perfectly on iOS 10.
It worked fine in XCode 8 beta 6 but this issue is happening only on XCode 8.
The code is in Swift 3.
Any help is much appreciated.
CallKit API is only for iOS 10.0+. It won't work for iOS 9.0. Use a condition for iOS version 9.0 and 10.0 to avoid the crash.
Reference : https://developer.apple.com/reference/callkit?language=objc
There is/was a bug in Swift 3 language that wrongly links module libraries github pull request, that is fixed now, but the fix is not yet implemented in XCode, not even in beta.
You could get latest swift toolchain build from link and install it to XCode to try and see the fix, but the app would not be approved for Appstore as it's stated here
You got two solutions;
wait for apple to release XCode with new version of swift 3.0.2+
or revert your code back to swift 2, where it works, with "Use Legacy Swift Language Version" flag in Build Settings
If you choose to revert back to swift 2, brace yourself with a lot of patience :D

Xcode 6 beta 5 won't build Swift with iOS 7.1 SDK

Despite the release notes stating this is supported and previous version of Xcode 6 working ok, I have a rather verbose error message when trying to build with 7.1 SDK.
"iOS targets using Swift cannot be built against an SDK older than 8.0, but the effective SDK is 7.1."
Has anyone else seen this?
I just had this issue, but with the app store build of Xcode 6.0.1 (6A317).
The issue was that I had copied old SDK's (7.0, 7.1) into the Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs directory. This was causing Xcode to use the wrong SDK for building.
Deleting them solved this problem for me. That'll teach me for mucking around with Xcode.

AdSupport Framework not found

I have been able to make xCode 4.3.2 work with iOS 6.0 using the technique described here Is it possible to get the iOS 5.1 SDK for Xcode 4.2 on Snow Leopard?
When I add AdSupport.framework or other iOS 6 specific frameworks, it builds fine against the iOS device scheme with no device connected. However, as soon as I connect an iOS device it gives erros 'framework not found AdSupport'. It does not even compile against iOS Simulator 5.1
I am using iOS 6.0 as base sdk and tried deployment target of 4.3 upto 5.1 but still same error.
AdSupport.framework is only available beginning on iOS6.
You should mark the framework as Optional (Weak Reference) and ensure that when running on iOS versions below 6, that the AdSupport code is not called.

iPhone 5.1 App using OpenCV crashes due to "nonatomic" not found

I'm developing an iOS App which targets iOS 5.1+. I'm using XCode 4.5 on Mac OS X 10.8 and I do own an iPhone 4 with iOS 5.1.1. The app needs OpenCV, which I have successfully built from sources according to a tutorial in the OpenCV-Documentation.
Here is what happens:
When I start up the application I get an exception:
dyld: Symbol not found: _objc_setProperty_nonatomic
The error does not occur with iOS 6, but with iOS 5.1 in both the simulator and on a real device.
What is that? Is it related to OpenCV? Does it have to do something with incompatibilities between iOS / the iPhone / XCode??
EDIT: My development target is set to 5.1. The Base SDK is 6.0. I copied an SDK für 4.3 (which is the lowest version that XCode 4.5 will support) from another Mac and set development target as well as the base SDK to 4.3. Did not work either (it did not even build then).
I did not an update, the project has been started from scratch using XCode 4.5 initially.
Meanwhile I also found a tip to use gnulibc++ instead of libc++, but that also resulted in that the project did not build at all.
I built a test project and found the same issue. OpenCV is being built with a deployment target of ios6, this is a known issue, and a fix is pending review, see https://github.com/Itseez/opencv/pull/70

Using Open SSL with Xcode 4.3

Recently i upgraded Xcode from 3.2 to 4.3
My Application using openSSL 1.0.0 and was working fine with Xcode 3.2 , even XYZ.App which is making use of open SSL and built on Xcode 3.2 also working fine with OSX lion 10.7
But when i built the same application over Xcode 4.2 , the log says , it couldn't get certificates from the Authority , in-tunrs it seems to be that open-SSL library has not integrated properly with Xcode 4.3 application development environment,
I tried re-built openSSL but no luck, i am suspecting following,
1 -- In my Xcode 4.3 i could see only two compiler LLVM 4.3 and Apple LVM , i believe open SSL built using GCC 4.2 and on Xcode 3.2 i was using the same so it was working ,
2 -- On Lion should i do any kind of cross compilation for open - SSL with Apple LLVM Compiler , which should be working on the Xcode 4.3 application
Please throw any lights on it.
I fixed it
The problem is,
SSL_CTX_load_verify_locations and SSL_CTX_set_default_verify_paths, the input parameter were not correct,
In 10.6 it was compiling and running, might be SSL would have ignored it, in 10.7 it didn't work,
Now i am giving proper input so working.
Thanks for reading it.