问题描述:

I need to integrate aurioTouch in another app. I have put all of his classes in my app, I have also changed is didFinishLaunching function to a normal void function, and removed UIApplicationDelegate tag from the header file.

In my app, I put this code:

aurioTouchAppDelegate *soundRecord = (aurioTouchAppDelegate *)[[UIApplication sharedApplication] delegate];

[soundRecord startRecord];

I have also change the file in my app where this code is, to a mm file.

When I run this, I get this error:

2011-06-27 12:57:20.269 HomeSense[14996:40b] -[HomeSenseAppDelegate startRecord]: unrecognized selector sent to instance 0x5846a30

2011-06-27 12:57:20.271 HomeSense[14996:40b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[HomeSenseAppDelegate startRecord]: unrecognized selector sent to instance 0x5846a30'

网友答案:

This might be due to the fact that u didn't import the audio file "buttonpress.caf" in your Project->target->build phases-> copy bundle resources. So, when your start record method gets called, the audio file isn't recognized as it is not in the project's target. I too had the same issue and it was driving me nuts for a long time, but then figured out this actual issue.

网友答案:

It appears that your HomeSenseAppDelegate class lacks a -startRecord method.

相关阅读:
Top