Search code examples
iphoneobjective-ccocoa-touchios4messageui

iPhone : How do I update my project from iOS 3.0 to iOS 4.3 (or iOS 5.0) which includes MessageWebLayer?


I have to update project from iOS 3.2 to iOS 4.3 (or iOS 5.0).

I found that in iOS 3.2, they have used MessageWebLayer.h private file of framework.

But from this link, I found that its public from iOS 4.3.

When I try to implement MessageWebLayer.h in my app it gives me error.

And from my search I found that i have to use MFMailComposer of MessageUI framework.

Code which works fine with iOS 3.2

.h file

import "MessageWebLayer.h"

MessageWebLayer *message;

.m file

CGRect webViewFrame = CGRectMake(0, 118, 768, 4000);

message =[[MessageWebLayer alloc] initWithFrame:webViewFrame visibleSize:webViewFrame.size];

If i try to run this in iOS 4.3 it gives me error like

_OBJC_CLASS_$_MessageWebLayer", referenced from: objc-class-ref in MessageUIAppDelegate.o

But still I am unable to solve problem ?

What should I do ?


Solution

  • OK, I have solved my problem.

    In iOS 3.0,

    MessageUI.framework contains private header file that is MessageWebLayer.h.

    And in iOS 4.3 and iOS 5.0,

    MessageUI.framework contains private header file which is now renamed as MFMessageWebLayer.h

    So, I have replaced MessageWeblayer.h file with MFMessageWebLayer.h file.

    And also changed object and related method to this private header file.

    So its working fine and giving proper outputs. :)


    Q. : How to get this private header files from MessageUI.framework ?

    Ans :

    1 ) Download class-dump-z

    2 ) And then use the last option from the this link