EventKit in Universal app (OS3.2)

柔情痞子 提交于 2019-12-04 16:10:39

You need to do two things:

  1. First, weak link against the EventKit framework. You do this in Target->Get Info->General.

  2. Secondly, you need to decide at run time whether or not certain functionality is available:

    Class someClass = NSClassFromString(@"SomeClass");
    if(someClass) {
      // iOS4 code
    }
    else {
      // iOS3.2 code
    }
    

Need to make weak linking.

Right Click on Target -> Get Info -> General Tab

change Eventkit Framework required to weak.

I know this is a really weak answer, but the only answer if you need EventKit on the iPad: Wait until next month when iOS 4.2 ships for the iPad. At this time use the 4.2 beta to develop your universal app. Maybe your app can be ready when the App Store starts accepting apps requiring iOS 4.2.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!