В случае, если кто-то интересно, исправить за то, что мне было нужно, достаточно просто. К счастью, мне не нужны все функции, доступные в классе TUCallCenter. Мне просто нужно было немного, и я мог уйти, комментируя ненужные строки.
Вот изменения в файл заголовок TUCallCenter.h:
/* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/TelephonyUtilities.framework/TelephonyUtilities
*/
#include "TUCallModelState.h" // <<< Had to add this because TUCallModelState is used below
@interface TUCallCenter : NSObject {
TUCallModelState *_callModelState;
}
//@property (nonatomic, readonly, retain) TUCall *activeVideoCall;
//@property (nonatomic, readonly) BOOL anyCallIsEndpointOnCurrentDevice;
//@property (nonatomic, readonly) BOOL anyCallIsHostedOnCurrentDevice;
//@property (nonatomic, readonly) unsigned int callCountOnDefaultPairedDevice;
//@property (nonatomic, readonly, copy) NSArray *callGroupsOnDefaultPairedDevice;
@property (nonatomic, retain) TUCallModelState *callModelState;
//@property (nonatomic, readonly, copy) NSArray *callsHostedElsewhere;
//@property (nonatomic, readonly, copy) NSArray *callsHostedOrAnEndpointElsewhere;
//@property (nonatomic, readonly, copy) NSArray *callsOnDefaultPairedDevice;
//@property (nonatomic, readonly, copy) NSArray *callsWithAnEndpointElsewhere;
//@property (nonatomic, readonly, copy) NSArray *conferenceParticipantCalls;
//@property (nonatomic, readonly) unsigned int currentAudioAndVideoCallCount;
//@property (nonatomic, readonly, copy) NSArray *currentAudioAndVideoCalls;
//@property (nonatomic, readonly) unsigned int currentCallCount;
//@property (nonatomic, readonly, retain) NSArray *currentCallGroups;
//@property (nonatomic, readonly, copy) NSArray *currentCalls;
//@property (nonatomic, readonly, retain) TUCall *currentVideoCall;
//@property (nonatomic, readonly) unsigned int currentVideoCallCount;
//@property (nonatomic, readonly, copy) NSArray *currentVideoCalls;
//@property (nonatomic, readonly, copy) NSArray *displayedCalls;
//@property (nonatomic, readonly, retain) TUCall *incomingCall;
//@property (nonatomic, readonly, copy) NSArray *incomingCalls;
//@property (nonatomic, readonly, retain) TUCall *incomingVideoCall;
//
//+ (id)_sharedInstanceWithDaemonDelegate:(id)arg1;
//+ (BOOL)emergencyCallBackModeIsActive;
+ (BOOL)isInCallServiceProcess;
//+ (void*)sharedAddressBook;
+ (id)sharedInstance;
//
//- (void).cxx_destruct;
//- (id)_allCalls;
//- (id)_callGroupsFromCalls:(id)arg1;
//- (void)_callStatusChangedInternal:(id)arg1;
//- (id)_dial:(id)arg1 callID:(int)arg2 service:(int)arg3 sourceIdentifier:(id)arg4 dialType:(int)arg5 uniqueProxyIdentifier:(id)arg6;
//- (id)_dialWithRequest:(id)arg1 completion:(id /* block */)arg2;
//- (void)_handleCallControlFailure:(id)arg1;
//- (id)activeVideoCall;
//- (BOOL)allCallsAreOfService:(int)arg1;
//- (BOOL)allCallsPassTest:(id /* block */)arg1;
//- (int)ambiguityState;
- (void)answerCall:(id)arg1;
//- (void)answerCall:(id)arg1 withSourceIdentifier:(id)arg2;
//- (void)answerCall:(id)arg1 withSourceIdentifier:(id)arg2 wantsHoldMusic:(BOOL)arg3;
//- (void)answerCallWithHoldMusic:(id)arg1;
//- (BOOL)anyCallIsEndpointOnCurrentDevice;
//- (BOOL)anyCallIsHostedOnCurrentDevice;
//- (BOOL)anyCallPassesTest:(id /* block */)arg1;
//- (id)audioAndVideoCallsWithStatus:(int)arg1;
//- (id)audioOrVideoCallWithStatus:(int)arg1;
//- (unsigned int)callCountOnDefaultPairedDevice;
//- (id)callGroupsOnDefaultPairedDevice;
//- (id)callModelState;
//- (id)callPassingTest:(id /* block */)arg1;
//- (id)callPassingTest:(id /* block */)arg1 sortedUsingComparator:(id /* block */)arg2;
//- (id)callPassingTest:(id /* block */)arg1 withOptions:(unsigned int)arg2;
//- (id)callWithCallUUID:(id)arg1;
//- (id)callWithStatus:(int)arg1;
//- (id)callWithUniqueProxyIdentifier:(id)arg1;
//- (id)callsHostedElsewhere;
//- (id)callsHostedOrAnEndpointElsewhere;
//- (id)callsOnDefaultPairedDevice;
//- (id)callsPassingTest:(id /* block */)arg1;
//- (id)callsPassingTest:(id /* block */)arg1 returningNilForEmpty:(BOOL)arg2;
//- (id)callsWithAnEndpointElsewhere;
//- (id)callsWithStatus:(int)arg1;
//- (BOOL)canInitiateCallForService:(int)arg1;
//- (BOOL)canInitiateCalls;
//- (BOOL)canInitiateVoicemailCall;
//- (BOOL)canMergeCalls;
//- (BOOL)canUseThumperOverRelayForIncomingAndOutgoingCalls;
//- (id)conferenceCall;
//- (id)conferenceParticipantCalls;
//- (unsigned int)countOfCallsPassingTest:(id /* block */)arg1;
//- (unsigned int)currentAudioAndVideoCallCount;
//- (id)currentAudioAndVideoCalls;
//- (unsigned int)currentCallCount;
//- (id)currentCallGroups;
//- (id)currentCalls;
//- (id)currentVideoCall;
//- (unsigned int)currentVideoCallCount;
//- (id)currentVideoCalls;
//- (void)dealloc;
//- (id)dial:(id)arg1 callID:(int)arg2 service:(int)arg3;
//- (id)dial:(id)arg1 callID:(int)arg2 service:(int)arg3 sourceIdentifier:(id)arg4 uniqueProxyIdentifier:(id)arg5;
//- (id)dial:(id)arg1 service:(int)arg2;
//- (id)dialEmergency:(id)arg1;
//- (id)dialEmergency:(id)arg1 sourceIdentifier:(id)arg2;
//- (id)dialVoicemail;
//- (id)dialVoicemailWithSourceIdentifier:(id)arg1;
//- (id)dialWithRequest:(id)arg1;
//- (void)dialWithRequest:(id)arg1 completion:(id /* block */)arg2;
//- (void)disconnectAllCalls;
//- (void)disconnectCall:(id)arg1;
//- (void)disconnectCall:(id)arg1 withReason:(int)arg2;
//- (void)disconnectCurrentCallAndActivateHeld;
//- (void)disconnectNonRelayingCalls;
//- (void)disconnectRelayingCalls;
//- (id)displayedCall;
//- (id)displayedCallFromCalls:(id)arg1;
//- (id)displayedCalls;
//- (void)endActiveAndAnswerCall:(id)arg1;
//- (void)endActiveOrHeldAndAnswerCall:(id)arg1;
//- (void)endEmergencyCallBackMode;
//- (void)endHeldAndAnswerCall:(id)arg1;
//- (void)enteredBackgroundForAllCalls;
//- (void)enteredForegroundForCall:(id)arg1;
//- (void)enumerateCallsInvokingBlock:(id /* block */)arg1 forCallsPassingTest:(id /* block */)arg2;
//- (void)enumerateCallsWithOptions:(unsigned int)arg1 invokingBlock:(id /* block */)arg2 forCallsPassingTest:(id /* block */)arg3;
//- (id)frontmostAudioOrVideoCall;
//- (id)frontmostCall;
- (void)handleCallModelStateChanged:(id)arg1;
//- (void)holdActiveAndAnswerCall:(id)arg1;
//- (id)incomingCall;
//- (id)incomingCalls;
//- (id)incomingVideoCall;
//- (id)initWithDaemonDelegate:(id)arg1;
//- (BOOL)isAddCallAllowed;
//- (BOOL)isAmbiguous;
//- (BOOL)isEndAndAnswerAllowed;
//- (BOOL)isHardPauseAvailable;
//- (BOOL)isHoldAllowed;
//- (BOOL)isHoldAndAnswerAllowed;
//- (BOOL)isMergeable;
//- (BOOL)isSendToVoicemailAllowed;
//- (BOOL)isSwappable;
//- (BOOL)isTakingCallsPrivateAllowed;
//- (void)pullHostedCallsFromPairedHostDevice;
//- (void)pullRelayingCallsFromClient;
//- (void)pullThumperCallFromClientUsingInfo:(id)arg1 completion:(id /* block */)arg2;
//- (void)pushHostedCallsToPairedClientDevice;
//- (void)pushRelayingCallsToHost;
//- (void)pushRelayingCallsToHostWithSourceIdentifier:(id)arg1;
//- (void)resumeCall:(id)arg1;
//- (void)sendFieldModeDigits:(id)arg1;
//- (void)setCallModelState:(id)arg1;
//- (void)swapCalls;
//- (id)videoCallWithStatus:(int)arg1;
@end
Как вы можете видеть, только остались в нескольких функциях, и я смог построить и запустить.
Возможно, вы смогли ответить на вызов автоматически, используя этот частный API. –
Прошло некоторое время, когда я попробовал еще раз, но я не верю, что когда-либо исправил его. – Will