diff --git a/README.md b/README.md new file mode 100644 index 0000000..57472ef --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +##BUILT FROM TwilioClient-1.2.0-705f421 + +###Had to Strip Out Duplicate Symbols From the static library + +lipo libTwilioClient.a -info +lipo libTwilioClient.a -thin arm64 -output libTwilioClient.arm64 +lipo libTwilioClient.a -thin armv7 -output libTwilioClient.armv7 +lipo libTwilioClient.a -thin armv7s -output libTwilioClient.armv7s +lipo libTwilioClient.a -thin i386 -output libTwilioClient.i386 +lipo libTwilioClient.a -thin x86_64 -output libTwilioClient.x86_64 + +ar -d -sv libTwilioClient.arm64 srtp_hmac.o +ar -d -sv libTwilioClient.armv7 srtp_hmac.o +ar -d -sv libTwilioClient.armv7s srtp_hmac.o +ar -d -sv libTwilioClient.arm64 srtp_hmac.o +ar -d -sv libTwilioClient.i386 srtp_hmac.o +ar -d -sv libTwilioClient.x86_64 srtp_hmac.o + +ar -d -sv libTwilioClient.arm64 srtp_aes_cbc.o +ar -d -sv libTwilioClient.armv7 srtp_aes_cbc.o +ar -d -sv libTwilioClient.armv7s srtp_aes_cbc.o +ar -d -sv libTwilioClient.arm64 srtp_aes_cbc.o +ar -d -sv libTwilioClient.i386 srtp_aes_cbc.o +ar -d -sv libTwilioClient.x86_64 srtp_aes_cbc.o + +ar -d -sv libTwilioClient.arm64 srtp_err.o +ar -d -sv libTwilioClient.armv7 srtp_err.o +ar -d -sv libTwilioClient.armv7s srtp_err.o +ar -d -sv libTwilioClient.arm64 srtp_err.o +ar -d -sv libTwilioClient.i386 srtp_err.o +ar -d -sv libTwilioClient.x86_64 srtp_err.o + +lipo libTwilioClient.arm64 libTwilioClient.armv7 libTwilioClient.armv7s libTwilioClient.i386 libTwilioClient.x86_64 -create -output libTwilioClient.a + +###Wanted to combine ios device and simulator frameworks + +lipo TwilioClientKit.device TwilioClientKit.simulator -create -output TwilioClientKit diff --git a/TwilioClientKit.xcodeproj/project.pbxproj b/TwilioClientKit.xcodeproj/project.pbxproj new file mode 100644 index 0000000..bd6f545 --- /dev/null +++ b/TwilioClientKit.xcodeproj/project.pbxproj @@ -0,0 +1,581 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 435D00B61A30D7E20076417E /* TwilioClientKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 435D00B51A30D7E20076417E /* TwilioClientKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 435D00BC1A30D7E20076417E /* TwilioClientKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 435D00B01A30D7E20076417E /* TwilioClientKit.framework */; }; + 435D00C31A30D7E20076417E /* TwilioClientKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 435D00C21A30D7E20076417E /* TwilioClientKitTests.m */; }; + 439D30E01A30DE0B00512C6D /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 439D30DF1A30DE0B00512C6D /* AVFoundation.framework */; }; + 439D30E21A30DE1000512C6D /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 439D30E11A30DE1000512C6D /* AudioToolbox.framework */; }; + 439D30E41A30DE1600512C6D /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 439D30E31A30DE1600512C6D /* CFNetwork.framework */; }; + 439D30E81A30DE2000512C6D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 439D30E71A30DE2000512C6D /* SystemConfiguration.framework */; }; + 43A53EB01A30D837004AF0E9 /* TCConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A53EAA1A30D837004AF0E9 /* TCConnection.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 43A53EB11A30D837004AF0E9 /* TCConnectionDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A53EAB1A30D837004AF0E9 /* TCConnectionDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 43A53EB21A30D837004AF0E9 /* TCDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A53EAC1A30D837004AF0E9 /* TCDevice.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 43A53EB31A30D837004AF0E9 /* TCDeviceDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A53EAD1A30D837004AF0E9 /* TCDeviceDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 43A53EB41A30D837004AF0E9 /* TCPresenceEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A53EAE1A30D837004AF0E9 /* TCPresenceEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 43A53EB51A30D837004AF0E9 /* TwilioClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A53EAF1A30D837004AF0E9 /* TwilioClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 43A53EBA1A30D8A4004AF0E9 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43A53EB71A30D8A4004AF0E9 /* libcrypto.a */; }; + 43A53EBB1A30D8A4004AF0E9 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43A53EB81A30D8A4004AF0E9 /* libssl.a */; }; + 43A53EEC1A30D94B004AF0E9 /* disconnect.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EDD1A30D94B004AF0E9 /* disconnect.wav */; }; + 43A53EED1A30D94B004AF0E9 /* dtmf_0.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EDE1A30D94B004AF0E9 /* dtmf_0.wav */; }; + 43A53EEE1A30D94B004AF0E9 /* dtmf_1.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EDF1A30D94B004AF0E9 /* dtmf_1.wav */; }; + 43A53EEF1A30D94B004AF0E9 /* dtmf_2.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EE01A30D94B004AF0E9 /* dtmf_2.wav */; }; + 43A53EF01A30D94B004AF0E9 /* dtmf_3.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EE11A30D94B004AF0E9 /* dtmf_3.wav */; }; + 43A53EF11A30D94B004AF0E9 /* dtmf_4.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EE21A30D94B004AF0E9 /* dtmf_4.wav */; }; + 43A53EF21A30D94B004AF0E9 /* dtmf_5.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EE31A30D94B004AF0E9 /* dtmf_5.wav */; }; + 43A53EF31A30D94B004AF0E9 /* dtmf_6.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EE41A30D94B004AF0E9 /* dtmf_6.wav */; }; + 43A53EF41A30D94B004AF0E9 /* dtmf_7.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EE51A30D94B004AF0E9 /* dtmf_7.wav */; }; + 43A53EF51A30D94B004AF0E9 /* dtmf_8.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EE61A30D94B004AF0E9 /* dtmf_8.wav */; }; + 43A53EF61A30D94B004AF0E9 /* dtmf_9.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EE71A30D94B004AF0E9 /* dtmf_9.wav */; }; + 43A53EF71A30D94B004AF0E9 /* dtmf_hash.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EE81A30D94B004AF0E9 /* dtmf_hash.wav */; }; + 43A53EF81A30D94B004AF0E9 /* dtmf_star.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EE91A30D94B004AF0E9 /* dtmf_star.wav */; }; + 43A53EF91A30D94B004AF0E9 /* incoming.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EEA1A30D94B004AF0E9 /* incoming.wav */; }; + 43A53EFA1A30D94B004AF0E9 /* outgoing.wav in Resources */ = {isa = PBXBuildFile; fileRef = 43A53EEB1A30D94B004AF0E9 /* outgoing.wav */; }; + 43D208351A30E4C0004E1EA6 /* libTwilioClient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43D208341A30E4C0004E1EA6 /* libTwilioClient.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 435D00BD1A30D7E20076417E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 435D00A71A30D7E20076417E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 435D00AF1A30D7E20076417E; + remoteInfo = TwilioClientKit; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 435D00B01A30D7E20076417E /* TwilioClientKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TwilioClientKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 435D00B41A30D7E20076417E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 435D00B51A30D7E20076417E /* TwilioClientKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TwilioClientKit.h; sourceTree = ""; }; + 435D00BB1A30D7E20076417E /* TwilioClientKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TwilioClientKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 435D00C11A30D7E20076417E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 435D00C21A30D7E20076417E /* TwilioClientKitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TwilioClientKitTests.m; sourceTree = ""; }; + 439D30DF1A30DE0B00512C6D /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 439D30E11A30DE1000512C6D /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 439D30E31A30DE1600512C6D /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; + 439D30E51A30DE1B00512C6D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 439D30E71A30DE2000512C6D /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 43A53EAA1A30D837004AF0E9 /* TCConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCConnection.h; sourceTree = ""; }; + 43A53EAB1A30D837004AF0E9 /* TCConnectionDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCConnectionDelegate.h; sourceTree = ""; }; + 43A53EAC1A30D837004AF0E9 /* TCDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCDevice.h; sourceTree = ""; }; + 43A53EAD1A30D837004AF0E9 /* TCDeviceDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCDeviceDelegate.h; sourceTree = ""; }; + 43A53EAE1A30D837004AF0E9 /* TCPresenceEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCPresenceEvent.h; sourceTree = ""; }; + 43A53EAF1A30D837004AF0E9 /* TwilioClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TwilioClient.h; sourceTree = ""; }; + 43A53EB71A30D8A4004AF0E9 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcrypto.a; sourceTree = ""; }; + 43A53EB81A30D8A4004AF0E9 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libssl.a; sourceTree = ""; }; + 43A53EDD1A30D94B004AF0E9 /* disconnect.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = disconnect.wav; sourceTree = ""; }; + 43A53EDE1A30D94B004AF0E9 /* dtmf_0.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_0.wav; sourceTree = ""; }; + 43A53EDF1A30D94B004AF0E9 /* dtmf_1.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_1.wav; sourceTree = ""; }; + 43A53EE01A30D94B004AF0E9 /* dtmf_2.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_2.wav; sourceTree = ""; }; + 43A53EE11A30D94B004AF0E9 /* dtmf_3.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_3.wav; sourceTree = ""; }; + 43A53EE21A30D94B004AF0E9 /* dtmf_4.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_4.wav; sourceTree = ""; }; + 43A53EE31A30D94B004AF0E9 /* dtmf_5.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_5.wav; sourceTree = ""; }; + 43A53EE41A30D94B004AF0E9 /* dtmf_6.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_6.wav; sourceTree = ""; }; + 43A53EE51A30D94B004AF0E9 /* dtmf_7.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_7.wav; sourceTree = ""; }; + 43A53EE61A30D94B004AF0E9 /* dtmf_8.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_8.wav; sourceTree = ""; }; + 43A53EE71A30D94B004AF0E9 /* dtmf_9.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_9.wav; sourceTree = ""; }; + 43A53EE81A30D94B004AF0E9 /* dtmf_hash.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_hash.wav; sourceTree = ""; }; + 43A53EE91A30D94B004AF0E9 /* dtmf_star.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dtmf_star.wav; sourceTree = ""; }; + 43A53EEA1A30D94B004AF0E9 /* incoming.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = incoming.wav; sourceTree = ""; }; + 43A53EEB1A30D94B004AF0E9 /* outgoing.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = outgoing.wav; sourceTree = ""; }; + 43D208341A30E4C0004E1EA6 /* libTwilioClient.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libTwilioClient.a; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 435D00AC1A30D7E20076417E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 439D30E81A30DE2000512C6D /* SystemConfiguration.framework in Frameworks */, + 439D30E41A30DE1600512C6D /* CFNetwork.framework in Frameworks */, + 439D30E21A30DE1000512C6D /* AudioToolbox.framework in Frameworks */, + 439D30E01A30DE0B00512C6D /* AVFoundation.framework in Frameworks */, + 43A53EBB1A30D8A4004AF0E9 /* libssl.a in Frameworks */, + 43A53EBA1A30D8A4004AF0E9 /* libcrypto.a in Frameworks */, + 43D208351A30E4C0004E1EA6 /* libTwilioClient.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 435D00B81A30D7E20076417E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 435D00BC1A30D7E20076417E /* TwilioClientKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 435D00A61A30D7E20076417E = { + isa = PBXGroup; + children = ( + 439D30E71A30DE2000512C6D /* SystemConfiguration.framework */, + 439D30E51A30DE1B00512C6D /* Foundation.framework */, + 439D30E31A30DE1600512C6D /* CFNetwork.framework */, + 439D30E11A30DE1000512C6D /* AudioToolbox.framework */, + 439D30DF1A30DE0B00512C6D /* AVFoundation.framework */, + 435D00B21A30D7E20076417E /* TwilioClientKit */, + 435D00BF1A30D7E20076417E /* TwilioClientKitTests */, + 435D00B11A30D7E20076417E /* Products */, + ); + sourceTree = ""; + }; + 435D00B11A30D7E20076417E /* Products */ = { + isa = PBXGroup; + children = ( + 435D00B01A30D7E20076417E /* TwilioClientKit.framework */, + 435D00BB1A30D7E20076417E /* TwilioClientKitTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 435D00B21A30D7E20076417E /* TwilioClientKit */ = { + isa = PBXGroup; + children = ( + 43A53EA91A30D837004AF0E9 /* Headers */, + 43A53EB61A30D8A4004AF0E9 /* Libraries */, + 43A53EDC1A30D94B004AF0E9 /* Resources */, + 435D00B51A30D7E20076417E /* TwilioClientKit.h */, + 435D00B31A30D7E20076417E /* Supporting Files */, + ); + path = TwilioClientKit; + sourceTree = ""; + }; + 435D00B31A30D7E20076417E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 435D00B41A30D7E20076417E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 435D00BF1A30D7E20076417E /* TwilioClientKitTests */ = { + isa = PBXGroup; + children = ( + 435D00C21A30D7E20076417E /* TwilioClientKitTests.m */, + 435D00C01A30D7E20076417E /* Supporting Files */, + ); + path = TwilioClientKitTests; + sourceTree = ""; + }; + 435D00C01A30D7E20076417E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 435D00C11A30D7E20076417E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 43A53EA91A30D837004AF0E9 /* Headers */ = { + isa = PBXGroup; + children = ( + 43A53EAA1A30D837004AF0E9 /* TCConnection.h */, + 43A53EAB1A30D837004AF0E9 /* TCConnectionDelegate.h */, + 43A53EAC1A30D837004AF0E9 /* TCDevice.h */, + 43A53EAD1A30D837004AF0E9 /* TCDeviceDelegate.h */, + 43A53EAE1A30D837004AF0E9 /* TCPresenceEvent.h */, + 43A53EAF1A30D837004AF0E9 /* TwilioClient.h */, + ); + path = Headers; + sourceTree = ""; + }; + 43A53EB61A30D8A4004AF0E9 /* Libraries */ = { + isa = PBXGroup; + children = ( + 43A53EB71A30D8A4004AF0E9 /* libcrypto.a */, + 43A53EB81A30D8A4004AF0E9 /* libssl.a */, + 43D208341A30E4C0004E1EA6 /* libTwilioClient.a */, + ); + path = Libraries; + sourceTree = ""; + }; + 43A53EDC1A30D94B004AF0E9 /* Resources */ = { + isa = PBXGroup; + children = ( + 43A53EDD1A30D94B004AF0E9 /* disconnect.wav */, + 43A53EDE1A30D94B004AF0E9 /* dtmf_0.wav */, + 43A53EDF1A30D94B004AF0E9 /* dtmf_1.wav */, + 43A53EE01A30D94B004AF0E9 /* dtmf_2.wav */, + 43A53EE11A30D94B004AF0E9 /* dtmf_3.wav */, + 43A53EE21A30D94B004AF0E9 /* dtmf_4.wav */, + 43A53EE31A30D94B004AF0E9 /* dtmf_5.wav */, + 43A53EE41A30D94B004AF0E9 /* dtmf_6.wav */, + 43A53EE51A30D94B004AF0E9 /* dtmf_7.wav */, + 43A53EE61A30D94B004AF0E9 /* dtmf_8.wav */, + 43A53EE71A30D94B004AF0E9 /* dtmf_9.wav */, + 43A53EE81A30D94B004AF0E9 /* dtmf_hash.wav */, + 43A53EE91A30D94B004AF0E9 /* dtmf_star.wav */, + 43A53EEA1A30D94B004AF0E9 /* incoming.wav */, + 43A53EEB1A30D94B004AF0E9 /* outgoing.wav */, + ); + path = Resources; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 435D00AD1A30D7E20076417E /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 43A53EB31A30D837004AF0E9 /* TCDeviceDelegate.h in Headers */, + 435D00B61A30D7E20076417E /* TwilioClientKit.h in Headers */, + 43A53EB51A30D837004AF0E9 /* TwilioClient.h in Headers */, + 43A53EB01A30D837004AF0E9 /* TCConnection.h in Headers */, + 43A53EB11A30D837004AF0E9 /* TCConnectionDelegate.h in Headers */, + 43A53EB21A30D837004AF0E9 /* TCDevice.h in Headers */, + 43A53EB41A30D837004AF0E9 /* TCPresenceEvent.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 435D00AF1A30D7E20076417E /* TwilioClientKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 435D00C61A30D7E20076417E /* Build configuration list for PBXNativeTarget "TwilioClientKit" */; + buildPhases = ( + 435D00AB1A30D7E20076417E /* Sources */, + 435D00AC1A30D7E20076417E /* Frameworks */, + 435D00AD1A30D7E20076417E /* Headers */, + 435D00AE1A30D7E20076417E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TwilioClientKit; + productName = TwilioClientKit; + productReference = 435D00B01A30D7E20076417E /* TwilioClientKit.framework */; + productType = "com.apple.product-type.framework"; + }; + 435D00BA1A30D7E20076417E /* TwilioClientKitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 435D00C91A30D7E20076417E /* Build configuration list for PBXNativeTarget "TwilioClientKitTests" */; + buildPhases = ( + 435D00B71A30D7E20076417E /* Sources */, + 435D00B81A30D7E20076417E /* Frameworks */, + 435D00B91A30D7E20076417E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 435D00BE1A30D7E20076417E /* PBXTargetDependency */, + ); + name = TwilioClientKitTests; + productName = TwilioClientKitTests; + productReference = 435D00BB1A30D7E20076417E /* TwilioClientKitTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 435D00A71A30D7E20076417E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0610; + ORGANIZATIONNAME = swift; + TargetAttributes = { + 435D00AF1A30D7E20076417E = { + CreatedOnToolsVersion = 6.1; + }; + 435D00BA1A30D7E20076417E = { + CreatedOnToolsVersion = 6.1; + }; + }; + }; + buildConfigurationList = 435D00AA1A30D7E20076417E /* Build configuration list for PBXProject "TwilioClientKit" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 435D00A61A30D7E20076417E; + productRefGroup = 435D00B11A30D7E20076417E /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 435D00AF1A30D7E20076417E /* TwilioClientKit */, + 435D00BA1A30D7E20076417E /* TwilioClientKitTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 435D00AE1A30D7E20076417E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 43A53EED1A30D94B004AF0E9 /* dtmf_0.wav in Resources */, + 43A53EEC1A30D94B004AF0E9 /* disconnect.wav in Resources */, + 43A53EF91A30D94B004AF0E9 /* incoming.wav in Resources */, + 43A53EF51A30D94B004AF0E9 /* dtmf_8.wav in Resources */, + 43A53EF41A30D94B004AF0E9 /* dtmf_7.wav in Resources */, + 43A53EF11A30D94B004AF0E9 /* dtmf_4.wav in Resources */, + 43A53EF21A30D94B004AF0E9 /* dtmf_5.wav in Resources */, + 43A53EF01A30D94B004AF0E9 /* dtmf_3.wav in Resources */, + 43A53EF71A30D94B004AF0E9 /* dtmf_hash.wav in Resources */, + 43A53EEF1A30D94B004AF0E9 /* dtmf_2.wav in Resources */, + 43A53EF81A30D94B004AF0E9 /* dtmf_star.wav in Resources */, + 43A53EF61A30D94B004AF0E9 /* dtmf_9.wav in Resources */, + 43A53EF31A30D94B004AF0E9 /* dtmf_6.wav in Resources */, + 43A53EEE1A30D94B004AF0E9 /* dtmf_1.wav in Resources */, + 43A53EFA1A30D94B004AF0E9 /* outgoing.wav in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 435D00B91A30D7E20076417E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 435D00AB1A30D7E20076417E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 435D00B71A30D7E20076417E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 435D00C31A30D7E20076417E /* TwilioClientKitTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 435D00BE1A30D7E20076417E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 435D00AF1A30D7E20076417E /* TwilioClientKit */; + targetProxy = 435D00BD1A30D7E20076417E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 435D00C41A30D7E20076417E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = ""; + SDKROOT = iphoneos; + STRIP_INSTALLED_PRODUCT = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "arm64 armv7 armv7s"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 435D00C51A30D7E20076417E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + SDKROOT = iphoneos; + STRIP_INSTALLED_PRODUCT = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VALID_ARCHS = "arm64 armv7 armv7s"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 435D00C71A30D7E20076417E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = TwilioClientKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/TwilioClientKit/Libraries", + ); + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = ( + "-ObjC", + "-force_load", + "${SRCROOT}/${PROJECT_NAME}/Libraries/libTwilioClient.a", + ); + PRODUCT_NAME = TwilioClientKit; + SKIP_INSTALL = YES; + VALID_ARCHS = "arm64 armv7 armv7s"; + }; + name = Debug; + }; + 435D00C81A30D7E20076417E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = TwilioClientKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/TwilioClientKit/Libraries", + ); + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = ( + "-ObjC", + "-force_load", + "${SRCROOT}/${PROJECT_NAME}/Libraries/libTwilioClient.a", + ); + PRODUCT_NAME = TwilioClientKit; + SKIP_INSTALL = YES; + VALID_ARCHS = "arm64 armv7 armv7s"; + }; + name = Release; + }; + 435D00CA1A30D7E20076417E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = TwilioClientKitTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = TwilioClientKitTests; + }; + name = Debug; + }; + 435D00CB1A30D7E20076417E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = TwilioClientKitTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = TwilioClientKitTests; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 435D00AA1A30D7E20076417E /* Build configuration list for PBXProject "TwilioClientKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 435D00C41A30D7E20076417E /* Debug */, + 435D00C51A30D7E20076417E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 435D00C61A30D7E20076417E /* Build configuration list for PBXNativeTarget "TwilioClientKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 435D00C71A30D7E20076417E /* Debug */, + 435D00C81A30D7E20076417E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 435D00C91A30D7E20076417E /* Build configuration list for PBXNativeTarget "TwilioClientKitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 435D00CA1A30D7E20076417E /* Debug */, + 435D00CB1A30D7E20076417E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 435D00A71A30D7E20076417E /* Project object */; +} diff --git a/TwilioClientKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TwilioClientKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..107a7c5 --- /dev/null +++ b/TwilioClientKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TwilioClientKit/Headers/TCConnection.h b/TwilioClientKit/Headers/TCConnection.h new file mode 100644 index 0000000..988167d --- /dev/null +++ b/TwilioClientKit/Headers/TCConnection.h @@ -0,0 +1,118 @@ +// +// Copyright 2011-2014 Twilio. All rights reserved. +// +// Use of this software is subject to the terms and conditions of the +// Twilio Terms of Service located at http://www.twilio.com/legal/tos +// + +#import + +#import "TCConnectionDelegate.h" + +/** TCConnectionState is an enum representing the current status of TCConnection. + */ +typedef enum +{ + TCConnectionStatePending = 0, /**< An incoming TCConnection has not yet been accepted. */ + TCConnectionStateConnecting, /**< An incoming TCConnection has been accepted, or an outgoing TCConnection is being established. */ + TCConnectionStateConnected, /**< A connection has been established. */ + TCConnectionStateDisconnected /**< An open connection has been disconnected. */ +} TCConnectionState; + + +/** @name Incoming connection parameter capability keys */ + +/* + * These keys can retrieve values from the TCConnection.parameters dictionary for incoming connections. + * These are a subset of the values provided as a part of a Twilio Request to your Twilio application. + * Please visit http://www.twilio.com/docs/api/twiml/twilio_request for details on the specifics of the parameters. + */ +extern NSString* const TCConnectionIncomingParameterFromKey; /**< NSString representing the calling party. If the caller is a telephone, it will be in the E.164 format. If the caller is another Twilio Client, it will be in a URI format "client:name" */ +extern NSString* const TCConnectionIncomingParameterToKey; /**< NSString representing the client name of the called party. This is in a URI format "client:name" */ +extern NSString* const TCConnectionIncomingParameterAccountSIDKey; /**< NSString representing the account id making the incoming call */ +extern NSString* const TCConnectionIncomingParameterAPIVersionKey; /**< NSString representing the version of the Twilio API used in the server application */ +extern NSString* const TCConnectionIncomingParameterCallSIDKey DEPRECATED_ATTRIBUTE; /**< NSString representing a unique identifier for the incoming call */ + +// Included in both Incoming and Outgoing parameters dictionaries +extern NSString* const TCConnectionParameterCallSIDKey; /**< NSString representing a unique identifier for the incoming call */ + +// Outgoing parameters besides CallSid are completely up to application developers and thus there are no constants for them here. + + +/** A TCConnection object represents the connection between a TCDevice and Twilio's services. + + A TCConnection is either incoming or outgoing. You do not create a TCConnection directly; an outgoing connection is created by calling the -[TCDevice connect:delegate:] method. Incoming connections are created internally by TCDevice and handed to the registered TCDeviceDelegate via -[TCDeviceDelegate device:didReceiveIncomingConnection:]. + */ +@interface TCConnection : NSObject + +/** Current status of the TCConnection. + */ +@property (nonatomic, readonly) TCConnectionState state; + +/** BOOL representing if the TCConnection is an incoming or outgoing connection. + + If the connection is incoming, the value is YES. + */ +@property (nonatomic, readonly, getter=isIncoming) BOOL incoming; + +/** A dictionary of parameters that define the connection. + + Incoming connection parameters are defined by the "Incoming connection parameter capability keys". + Outgoing connection parameters are defined by the union of optional application parameters specified in the Capability Token and any additional parameters specified when the -[TCDevice connect:delegate:] method is called. + */ +@property (weak, nonatomic, readonly) NSDictionary* parameters; + +/** The delegate object which will receive TCConnection events. + */ +@property (nonatomic, weak) id delegate; + +/** Property that defines if the connection's microphone is muted. + + Setting the property will only take effect if the connection's state is TCConnectionStateConnected. + */ +@property (nonatomic, getter=isMuted) BOOL muted; + +/** Accepts an incoming connection request. + + When the TCDeviceDelegate receives a -[TCDeviceDelegate device:didReceiveIncomingConnection:] message, calling this method will accept the incoming connection. Calling this method on a TCConnection that is not in the TCConnectionStatePending state will have no effect. + + @returns None + */ +-(void)accept; + +/** Ignores an incoming connection request. + + When the TCDeviceDelegate receives a -[TCDeviceDelegate device:didReceiveIncomingConnection:] message, calling ignore will close the incoming connection request and the connection may not be accepted. Calling this method on a TCConnection that is not in the TCConnectionStatePending state will have no effect. + The TCConnectionDelegate will eventually receive a -[TCConnectionDelegate connectionDidDisconnect:] message once the connection is terminated. + + @returns None + */ +-(void)ignore; + +/** Rejects an incoming connection request. + + When the TCDeviceDelegate receives a -[TCDeviceDelegate device:didReceiveIncomingConnection:] message, calling reject will terminate the request, notifying the caller that the call was rejected. Calling this method on a TCConnection that is not in the TCConnectionStatePending state will have no effect. + The TCConnectionDelegate will not receive a -[TCConnectionDelegate connectionDidDisconnect:] message since there was no actual connection created. + + @returns None + */ +-(void)reject; + +/** Disconnect the connection. + + Calling this method on a TCConnection that is in the TCConnectionStateDisconnected state will have no effect. + The TCConnectionDelegate will eventually receive a -[TCConnectionDelegate connectionDidDisconnect:] message once the connection is terminated. + + @returns None + */ +-(void)disconnect; + +/** Send a string of digits over the connection. Calling this method on a TCConnection that is not in the TCConnectionStateConnected state will have no effect. + + @param digits A string of characters to be played. Valid values are '0' - '9', '*', '#', and 'w'. Each 'w' will cause a 500 ms pause between digits sent. If any invalid character is present, no digits will be sent. + + @returns None + */ +-(void)sendDigits:(NSString*)digits; + +@end diff --git a/TwilioClientKit/Headers/TCConnectionDelegate.h b/TwilioClientKit/Headers/TCConnectionDelegate.h new file mode 100644 index 0000000..083229b --- /dev/null +++ b/TwilioClientKit/Headers/TCConnectionDelegate.h @@ -0,0 +1,66 @@ +// +// Copyright 2011-2014 Twilio. All rights reserved. +// +// Use of this software is subject to the terms and conditions of the +// Twilio Terms of Service located at http://www.twilio.com/legal/tos +// + +#import + +@class TCConnection; + +/** TCConnectionDelegate is the delegate protocol for receiving TCConnection state-change notifications. + */ +@protocol TCConnectionDelegate + +@required + +/** The TCConnection has failed with an error. + + After this selector has been called, it is safe to assume that the connection is no longer connected. When this occurs the TCConnection will be in the TCConnectionStateDisconnected state. + + For a list of error codes and their meanings, see http://www.twilio.com/docs/client/errors. + + @param connection The TCConnection that encountered an error + + @param error The NSError for the error encountered by TCConnection + + @returns None + */ +-(void)connection:(TCConnection*)connection didFailWithError:(NSError*)error; + + +@optional + + +/** The TCConnection is in the process of trying to connect. + + When this occurs, TCConnection is in the TCConnectionStateConnecting state. + + @param connection The TCConnection that is in the process of trying to connect. + + @returns None + */ +-(void)connectionDidStartConnecting:(TCConnection*)connection; + +/** The TCConnection has successfully connected. + + When this occurs, TCConnection is in the TCConnectionStateConnected state. + + @param connection The TCConnection that has just connected. + + @returns None + */ +-(void)connectionDidConnect:(TCConnection*)connection; + +/** The TCConnection has just disconnected. + + This will occur when the connection has been disconnected or ignored by any party. When this occurs the TCConnection will be in the TCConnectionStateDisconnected state. + + @param connection The TCConnection has just disconnected. + + @returns None + */ +-(void)connectionDidDisconnect:(TCConnection*)connection; + +@end diff --git a/TwilioClientKit/Headers/TCDevice.h b/TwilioClientKit/Headers/TCDevice.h new file mode 100644 index 0000000..d15c239 --- /dev/null +++ b/TwilioClientKit/Headers/TCDevice.h @@ -0,0 +1,151 @@ +// +// Copyright 2011-2014 Twilio. All rights reserved. +// +// Use of this software is subject to the terms and conditions of the +// Twilio Terms of Service located at http://www.twilio.com/legal/tos +// + +#import + +#import "TCDeviceDelegate.h" +#import "TCConnectionDelegate.h" + +/** TCDeviceState represents the various states of the device's ability to listen for incoming connections and make outgoing connections. + + The TCDeviceDelegate gets notified of the state changes. + */ +typedef enum +{ + TCDeviceStateOffline = 0, /**< TCDevice The device is not connected and cannot receive incoming connections or make outgoing connections. */ + TCDeviceStateReady, /**< TCDevice can receive incoming connections and attempt outgoing connections if capabilities allow. */ + TCDeviceStateBusy /**< TCDevice is connected to the network and has an active connection. No additional connections can be created or accepted. */ +} TCDeviceState; + +/** @name Device capability keys */ + +/* + * These keys can retrieve values from the TCDevice.capabilities dictionary. + * The values are extracted from the Capability Token that is used to initialize a TCDevice. + */ +extern NSString* const TCDeviceCapabilityIncomingKey; /**< NSNumber of BOOL that indicates whether the device can receive incoming calls. */ +extern NSString* const TCDeviceCapabilityOutgoingKey; /**< NSNumber of BOOL that indicates whether the device can make outgoing calls. */ +extern NSString* const TCDeviceCapabilityExpirationKey; /**< NSNumber of long long that represents the time the device's capability token expires (number of seconds relative to the UNIX epoch). */ +extern NSString* const TCDeviceCapabilityAccountSIDKey; /**< NSString representing the account SID. */ +extern NSString* const TCDeviceCapabilityApplicationSIDKey; /**< The application SID used when making an outgoing call. Only present if TCDeviceCapabilityOutgoingKey is also present with a YES value. */ +extern NSString* const TCDeviceCapabilityApplicationParametersKey; /**< A non-modifiable NSDictionary of key/value pairs that will be passed to the Twilio Application when making an outgoing call. Only present if TCDeviceCapabilityOutgoingKey is also present with a YES value and the Capability Token contains application parameters. Additional parameters may be specified in the connect:delegate: method if needed. */ +extern NSString* const TCDeviceCapabilityClientNameKey; /**< NSString representing the client name. */ + + +@class TCConnection; + +/** An instance of TCDevice is an object that knows how to interface with Twilio Services. + + A TCDevice is the primary entry point for Twilio Client. An iOS application should initialize a TCDevice with the initWithCapabilityToken:delegate: method with a Capability Token to talk to Twilio services. + + A Capability Token is a JSON Web Token (JWT) that specifies what the TCDevice may do with respect to the Twilio Application, such as whether it can make outgoing calls, how long the token and the TCDevice are valid before needing to be refreshed, and so on. Please visit http://www.twilio.com/docs/client/capability-tokens for more information. + + @see TCDeviceDelegate + */ +@interface TCDevice : NSObject + +/** Current status of the TCDevice. + + State changes will cause relevant methods to be called in TCDeviceDelegate and will include any NSErrors that occur. + */ +@property (nonatomic, readonly) TCDeviceState state; + + +/** Current capabilities of the TCDevice. The keys are defined by the "Device capability keys" constants. + */ +@property (weak, nonatomic, readonly) NSDictionary* capabilities; + + +/** The delegate object which will receive events from a TCDevice object. + */ +@property (nonatomic, weak) id delegate; + +/** A BOOL indicating if a sound should be played for an incoming connection. + + The default value is YES. See the Twilio Client iOS Usage Guide for more information on sounds. + */ +@property (nonatomic) BOOL incomingSoundEnabled; + +/** A BOOL indicating if a sound should be played for an outgoing connection. + + The default value is YES. See the Twilio Client iOS Usage Guide for more information on sounds. + */ +@property (nonatomic) BOOL outgoingSoundEnabled; + +/** A BOOL indicating if a sound should be played when a connection is disconnected for any reason. + + The default value is YES. See the Twilio Client iOS Usage Guide for more information on sounds. + */ +@property (nonatomic) BOOL disconnectSoundEnabled; + + +/** Initialize a new TCDevice object. If the incoming capabilities are defined, then the device will automatically begin listening for incoming connections. + + @param capabilityToken A signed JSON Web Token that defines the features available to the TCDevice. These may be created using the Twilio Helper Libraries included with the SDK or available at http://www.twilio.com . The capabilities are used to begin listening for incoming connections and provide the default parameters used for establishing outgoing connections. Please visit http://www.twilio.com/docs/client/capability-tokens for more information. + + @param delegate The delegate object which will receive events from a TCDevice object. + + @returns The initialized receiver + + @see updateCapabilityToken: + */ +-(id)initWithCapabilityToken:(NSString*)capabilityToken delegate:(id)delegate; + + +/** Start TCDevice to listen for incoming connections. + + The TCDevice will automatically listen for incoming connections on method calls to initWithCapabilityToken:delegate: or updateCapabilityToken: if the token allows. + + This method only needs to be called if unlisten was previously called. + + @returns None + */ +-(void)listen; + + +/** Stop the device from listening for incoming connections. This could be used for a "silence" mode on the your iOS application, for instance. + + This method will do nothing if the TCDevice is currently not listening, either because of a previous call to unlisten or because the TCDevice has not been granted the incoming capability. + + @returns None + */ +-(void)unlisten; + + +/** Update the capabilities of the TCDevice. + + There may be circumstances when the defined capabilities have expired. For example, the TCDevice may enter the TCDeviceStateOffline state because the capabilities have expired. In these cases, the capabilities will need to be updated. If the device is currently listening for incoming connections, it will restart the listening process (if permitted) using these updated capabilities. + + Existing connections are not affected by updating the capability token. + + @param capabilityToken A signed JWT that defines the capability token available to the TCDevice. Please visit http://www.twilio.com/docs/client/capability-tokens for more information on capability tokens. + + @return None + */ +-(void)updateCapabilityToken:(NSString*)capabilityToken; + + +/** Create an outgoing connection. + + @param parameters An optional dictionary containing parameters for the outgoing connection that get passed to your Twilio Application. These parameters are merged with any parameters supplied in the Capability Token (e.g. the dictionary retrived with the TCDeviceCapabilityApplicationParametersKey against the capabilities property). If there are any key collisions with the two dictionaries, the value(s) from TCDeviceCapabilityApplicationParametersKey dictionary will take precedence. Parameters other than NSString are ignored. + + @param delegate An optional delegate object to receive callbacks when state changes occur to the TCConnection object. + + @returns A TCConnection object representing the new outgoing connection. If TCConnection is nil, the connection could not be initialized. + */ +-(TCConnection*)connect:(NSDictionary*)parameters delegate:(id)delegate; + + +/** Disconnect all current connections associated with the receiver. + + This a convenience routine that disconnects all current incoming and outgoing connections, including pending incoming connections. + + @returns None + */ +-(void)disconnectAll; + +@end diff --git a/TwilioClientKit/Headers/TCDeviceDelegate.h b/TwilioClientKit/Headers/TCDeviceDelegate.h new file mode 100644 index 0000000..e8e7d1a --- /dev/null +++ b/TwilioClientKit/Headers/TCDeviceDelegate.h @@ -0,0 +1,71 @@ +// +// Copyright 2011-2014 Twilio. All rights reserved. +// +// Use of this software is subject to the terms and conditions of the +// Twilio Terms of Service located at http://www.twilio.com/legal/tos +// + +@class TCDevice; +@class TCConnection; +@class TCPresenceEvent; + +/** TCDeviceDelegate is the delegate protocol for a TCDevice. + */ +@protocol TCDeviceDelegate + +@required + +/** TCDevice is no longer listening for incoming connections. + + @param device The TCDevice object that stopped listening. + + @param error An NSError indicating the reason the TCDevice went offline. If the error is nil, this means that the incoming listener was successfully disconnected (for example, -[TCDevice unlisten] was called). For a list of error codes associated with a non-nil error and their meanings, see http://www.twilio.com/docs/client/errors. + + @returns None + */ +-(void)device:(TCDevice*)device didStopListeningForIncomingConnections:(NSError*)error; + + +@optional + +/** TCDevice is now listening for incoming connections. + + @param device The TCDevice object that is now listening for connections. + + @returns None + */ +-(void)deviceDidStartListeningForIncomingConnections:(TCDevice*)device; + + +/** Called when an incoming connection request has been received. At this point you choose to accept, ignore, or reject the new connection. + + When this occurs, you should assign an appropriate TCConnectionDelegate on the TCConnection to properly respond to events. + + Pending incoming connections may be received at any time, including while another connection is active. This method will be invoked once for each connection, and your code should handle this situation appropriately. A single pending connection can be accepted as long as no other connections are active; all other currently pending incoming connections will be automatically rejected by the library until the active connection is terminated. + + @param device The TCDevice that is receiving the incoming connection request. + + @param connection The TCConnection associated with the incoming connection. The incoming connection will be in the TCConnectionStatusPending state until it is either accepted or disconnected. + + @returns None + */ +-(void)device:(TCDevice*)device didReceiveIncomingConnection:(TCConnection*)connection; + + +/** Called when a presence update notification has been received. + + When the device is ready, this selector (if implemented) is invoked once for each available client. Thereafter it is invoked as clients become available or unavailable. + + A client is considered available even if another call is in progress. + + Remember, when your client disconnects the [TCDeviceDelegate device:didStopListeningForIncomingConnections:] selector will be invoked, and when the device reconnects this presence selector will be called again for every available online client. + + @param device The TCDevice that is receiving the presence update. + + @param presenceEvent A TCPresenceEvent object describing the notification. + + @returns None + */ +-(void)device:(TCDevice *)device didReceivePresenceUpdate:(TCPresenceEvent *)presenceEvent; + +@end diff --git a/TwilioClientKit/Headers/TCPresenceEvent.h b/TwilioClientKit/Headers/TCPresenceEvent.h new file mode 100644 index 0000000..a472821 --- /dev/null +++ b/TwilioClientKit/Headers/TCPresenceEvent.h @@ -0,0 +1,24 @@ +// +// Copyright 2012-2014 Twilio. All rights reserved. +// +// Use of this software is subject to the terms and conditions of the +// Twilio Terms of Service located at http://www.twilio.com/legal/tos +// + +#import + +/** An object encapsulating client presence state for other clients connected to the Twilio Application. + + See [TCDeviceDelegate device:didReceivePresenceUpdate:] for more information. + */ +@interface TCPresenceEvent : NSObject + +/** The client name for which the event applies. + */ +@property (nonatomic, readonly) NSString *name; + +/** Whether or not the client specified by name is currently connected to Twilio services for the account. + */ +@property (nonatomic, readonly, getter=isAvailable) BOOL available; + +@end diff --git a/TwilioClientKit/Headers/TwilioClient.h b/TwilioClientKit/Headers/TwilioClient.h new file mode 100644 index 0000000..da2d52b --- /dev/null +++ b/TwilioClientKit/Headers/TwilioClient.h @@ -0,0 +1,29 @@ +// +// Copyright 2011-2014 Twilio. All rights reserved. +// +// Use of this software is subject to the terms and conditions of the +// Twilio Terms of Service located at http://www.twilio.com/legal/tos +// + +#import "TCConnection.h" +#import "TCConnectionDelegate.h" +#import "TCDevice.h" +#import "TCDeviceDelegate.h" +#import "TCPresenceEvent.h" + +@interface TwilioClient : NSObject + +typedef enum { + TC_LOG_OFF = 0, + TC_LOG_ERROR, + TC_LOG_WARN, + TC_LOG_INFO, + TC_LOG_DEBUG, + TC_LOG_VERBOSE +} TCLogLevel; + ++(id)sharedInstance; +-(void)setLogLevel:(TCLogLevel)level; + +@end + diff --git a/TwilioClientKit/Info.plist b/TwilioClientKit/Info.plist new file mode 100644 index 0000000..8cd536d --- /dev/null +++ b/TwilioClientKit/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + edu.gatech.pe.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/TwilioClientKit/Libraries/Stripped/libTwilioClient.arm64 b/TwilioClientKit/Libraries/Stripped/libTwilioClient.arm64 new file mode 100644 index 0000000..f2a9d9d Binary files /dev/null and b/TwilioClientKit/Libraries/Stripped/libTwilioClient.arm64 differ diff --git a/TwilioClientKit/Libraries/Stripped/libTwilioClient.armv7 b/TwilioClientKit/Libraries/Stripped/libTwilioClient.armv7 new file mode 100644 index 0000000..50d4e47 Binary files /dev/null and b/TwilioClientKit/Libraries/Stripped/libTwilioClient.armv7 differ diff --git a/TwilioClientKit/Libraries/Stripped/libTwilioClient.armv7s b/TwilioClientKit/Libraries/Stripped/libTwilioClient.armv7s new file mode 100644 index 0000000..5179217 Binary files /dev/null and b/TwilioClientKit/Libraries/Stripped/libTwilioClient.armv7s differ diff --git a/TwilioClientKit/Libraries/Stripped/libTwilioClient.i386 b/TwilioClientKit/Libraries/Stripped/libTwilioClient.i386 new file mode 100644 index 0000000..e5db9e0 Binary files /dev/null and b/TwilioClientKit/Libraries/Stripped/libTwilioClient.i386 differ diff --git a/TwilioClientKit/Libraries/Stripped/libTwilioClient.x86_64 b/TwilioClientKit/Libraries/Stripped/libTwilioClient.x86_64 new file mode 100644 index 0000000..f1445ee Binary files /dev/null and b/TwilioClientKit/Libraries/Stripped/libTwilioClient.x86_64 differ diff --git a/TwilioClientKit/Libraries/libTwilioClient.a b/TwilioClientKit/Libraries/libTwilioClient.a new file mode 100644 index 0000000..bc0bba7 Binary files /dev/null and b/TwilioClientKit/Libraries/libTwilioClient.a differ diff --git a/TwilioClientKit/Libraries/libTwilioClient.a.orig b/TwilioClientKit/Libraries/libTwilioClient.a.orig new file mode 100644 index 0000000..a26ee44 Binary files /dev/null and b/TwilioClientKit/Libraries/libTwilioClient.a.orig differ diff --git a/TwilioClientKit/Libraries/libcrypto.a b/TwilioClientKit/Libraries/libcrypto.a new file mode 100644 index 0000000..6cf5742 Binary files /dev/null and b/TwilioClientKit/Libraries/libcrypto.a differ diff --git a/TwilioClientKit/Libraries/libssl.a b/TwilioClientKit/Libraries/libssl.a new file mode 100644 index 0000000..1718186 Binary files /dev/null and b/TwilioClientKit/Libraries/libssl.a differ diff --git a/TwilioClientKit/Resources/disconnect.wav b/TwilioClientKit/Resources/disconnect.wav new file mode 100644 index 0000000..1bea19f Binary files /dev/null and b/TwilioClientKit/Resources/disconnect.wav differ diff --git a/TwilioClientKit/Resources/dtmf_0.wav b/TwilioClientKit/Resources/dtmf_0.wav new file mode 100644 index 0000000..9043fcc Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_0.wav differ diff --git a/TwilioClientKit/Resources/dtmf_1.wav b/TwilioClientKit/Resources/dtmf_1.wav new file mode 100644 index 0000000..81fd948 Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_1.wav differ diff --git a/TwilioClientKit/Resources/dtmf_2.wav b/TwilioClientKit/Resources/dtmf_2.wav new file mode 100644 index 0000000..c2c16ac Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_2.wav differ diff --git a/TwilioClientKit/Resources/dtmf_3.wav b/TwilioClientKit/Resources/dtmf_3.wav new file mode 100644 index 0000000..f3e988a Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_3.wav differ diff --git a/TwilioClientKit/Resources/dtmf_4.wav b/TwilioClientKit/Resources/dtmf_4.wav new file mode 100644 index 0000000..078d6ac Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_4.wav differ diff --git a/TwilioClientKit/Resources/dtmf_5.wav b/TwilioClientKit/Resources/dtmf_5.wav new file mode 100644 index 0000000..f11f9e7 Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_5.wav differ diff --git a/TwilioClientKit/Resources/dtmf_6.wav b/TwilioClientKit/Resources/dtmf_6.wav new file mode 100644 index 0000000..de52363 Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_6.wav differ diff --git a/TwilioClientKit/Resources/dtmf_7.wav b/TwilioClientKit/Resources/dtmf_7.wav new file mode 100644 index 0000000..991fb10 Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_7.wav differ diff --git a/TwilioClientKit/Resources/dtmf_8.wav b/TwilioClientKit/Resources/dtmf_8.wav new file mode 100644 index 0000000..ee5bfee Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_8.wav differ diff --git a/TwilioClientKit/Resources/dtmf_9.wav b/TwilioClientKit/Resources/dtmf_9.wav new file mode 100644 index 0000000..f692aa1 Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_9.wav differ diff --git a/TwilioClientKit/Resources/dtmf_hash.wav b/TwilioClientKit/Resources/dtmf_hash.wav new file mode 100644 index 0000000..a7eed8d Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_hash.wav differ diff --git a/TwilioClientKit/Resources/dtmf_star.wav b/TwilioClientKit/Resources/dtmf_star.wav new file mode 100644 index 0000000..923f94a Binary files /dev/null and b/TwilioClientKit/Resources/dtmf_star.wav differ diff --git a/TwilioClientKit/Resources/incoming.wav b/TwilioClientKit/Resources/incoming.wav new file mode 100644 index 0000000..4fb3bba Binary files /dev/null and b/TwilioClientKit/Resources/incoming.wav differ diff --git a/TwilioClientKit/Resources/outgoing.wav b/TwilioClientKit/Resources/outgoing.wav new file mode 100644 index 0000000..1504683 Binary files /dev/null and b/TwilioClientKit/Resources/outgoing.wav differ diff --git a/TwilioClientKit/TwilioClientKit.h b/TwilioClientKit/TwilioClientKit.h new file mode 100644 index 0000000..2f6e828 --- /dev/null +++ b/TwilioClientKit/TwilioClientKit.h @@ -0,0 +1,20 @@ +// +// TwilioClientKit.h +// TwilioClientKit +// +// Created by swift on 12/4/14. +// Copyright (c) 2014 swift. All rights reserved. +// + +#import + +//! Project version number for TwilioClientKit. +FOUNDATION_EXPORT double TwilioClientKitVersionNumber; + +//! Project version string for TwilioClientKit. +FOUNDATION_EXPORT const unsigned char TwilioClientKitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import + diff --git a/TwilioClientKitTests/Info.plist b/TwilioClientKitTests/Info.plist new file mode 100644 index 0000000..7b87180 --- /dev/null +++ b/TwilioClientKitTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + edu.gatech.pe.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/TwilioClientKitTests/TwilioClientKitTests.m b/TwilioClientKitTests/TwilioClientKitTests.m new file mode 100644 index 0000000..e4d93ca --- /dev/null +++ b/TwilioClientKitTests/TwilioClientKitTests.m @@ -0,0 +1,40 @@ +// +// TwilioClientKitTests.m +// TwilioClientKitTests +// +// Created by swift on 12/4/14. +// Copyright (c) 2014 swift. All rights reserved. +// + +#import +#import + +@interface TwilioClientKitTests : XCTestCase + +@end + +@implementation TwilioClientKitTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // This is an example of a functional test case. + XCTAssert(YES, @"Pass"); +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end