Has something changed with the build system? For some reason while I used to be able to weak link a class using the if([CLASSNAME class] != nil) method now I need to use the old class from string method.
I think LiveCode should be compatible with the newer method and indeed was until quite recently:
The base SDK for your Xcode project must be iOS 4.2 or newer. The name for this setting in the build settings editor is SDKROOT (Base SDK).
The deployment target for your project must be iOS 3.1 or newer. The name for this setting is MACOSX_DEPLOYMENT_TARGET (OS X Deployment Target).
The compiler for your project must be the LLVM-GCC 4.2 compiler or newer, or the LLVM compiler (Clang) 1.5 or newer. The name for this setting is GCC_VERSION (C/C++ Compiler Version).
I haven't gone back and tested old versions of LC to see where the change happened but wonder if it's related to the build automation somehow?
weak linking issues
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark
weak linking issues
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: weak linking issues
What error are you seeing when using the [CLASSNAME class] != nil approach?
The current settings on master haven't changed for a while and they conform to what is listed above (4.3/default sdk (latest)/llvmgcc42).
The current settings on master haven't changed for a while and they conform to what is listed above (4.3/default sdk (latest)/llvmgcc42).
Re: weak linking issues
dyld error on the class... crashes at startup. But it seems to work fine using the class from string method.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: weak linking issues
Is it a particular class, or all classes you previously used like this?
I'm a little puzzled - we've not done anything to my knowledge (consciously at least) which would break this... Although, that being said, I do recall us having issues using that form of weak-linking in the engine itself, but I think that was to do with needing to support different SDKs for different OS versions.
I'm a little puzzled - we've not done anything to my knowledge (consciously at least) which would break this... Although, that being said, I do recall us having issues using that form of weak-linking in the engine itself, but I think that was to do with needing to support different SDKs for different OS versions.
Re: weak linking issues
Well the particular class that brought it to my attention was UIActivityViewController which is iOS 6.0 and was crashing in iOS 5.1.1. But I think it's a general thing. I guess it doesn't really matter as long as I know for the future but I'm positive I had it working before... For example, mergSocial used it and it degrades from the Social framework to the Twitter framework on iOS 5. So it was definitely working.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/