ringcentral / ringcentral-swift Goto Github PK
View Code? Open in Web Editor NEWRingCentral Swift Client
RingCentral Swift Client
Hi @tylerlong.
I am working Xcode 9.3, iOS 11.3 and I am going to send the Fax in the mobile app using RingCentral.
Following code does not work.
let parameters = FaxPath.PostParameters(to: [CallerInfo(phoneNumber: phone)])
var attachments: [Attachment] = []
for image in images {
attachments.append(Attachment(fileName: "image.jpg", contentType: "image/jpeg", data: UIImageJPEGRepresentation(image, 1.0)!))
}
client.restapi().account().extension().fax().post(parameters: parameters, attachments: attachments) { messageInfo, error in
if let error = error {
completion(error as? Error)
} else {
print("Fax has sent")
completion(nil)
}
}
The problem is that
Type 'FaxPath' has no member 'PostParameters'
Can you please let me know what is the problem?
Regards.
Hua.
Swift 4.0 is included with Xcode 9.0 and is not backward compatible with Swift 3.0.
MMS is now supported in the API. This is similar to Fax support.
Type 'BlockMode' has no member 'ECB'
SubscriptionService.swift
public func client(_ client: PubNub, didReceiveMessage message: PNMessageResult) {
let base64Message = message.data.message as! String
let encrypted = Data(base64Encoded: base64Message)!.bytes
let key = Data(base64Encoded: subscriptionInfo!.deliveryMode!.encryptionKey!)!.bytes
let decrypted = try! AES(key: key, blockMode: .ECB, padding: .pkcs7).decrypt(encrypted)
let json = String(bytes: decrypted, encoding: String.Encoding.utf8)!
for listener in listeners {
let notification = Notification(json: json)!
listener(notification)
}
}
on update carthage for my iOS project:
*** Fetching ringcentral-swift
*** Fetching CryptoSwift
*** Fetching ObjectMapper
*** Fetching objective-c
*** Fetching Alamofire
*** Checking out objective-c at "v4.7.5"
*** Checking out Alamofire at "4.6.0"
*** Checking out ObjectMapper at "3.1.0"
*** Checking out ringcentral-swift at "0.7.1"
*** Downloading CryptoSwift.framework binary at "0.8.0"
*** Skipped installing CryptoSwift.framework binary due to the error:
"Incompatible Swift version - framework was built with 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38) and the local version is 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)."
*** Checking out CryptoSwift at "0.8.0"
*** xcodebuild output can be found in /var/folders/zw/6q26sn9n7gzggwm6rm_fx_2h0000gp/T/carthage-xcodebuild.KkNIZh.log
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "CryptoSwift" in CryptoSwift.xcworkspace
*** Building scheme "Framework (iOS)" in PubNub.xcworkspace
*** Building scheme "ObjectMapper-iOS" in ObjectMapper.xcworkspace
*** Building scheme "RingCentral_iOS" in RingCentral.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/XXXXXXXXX/Downloads/RingcentralSwiftSdkDemo/RingcentralSwiftSdkDemo/Carthage/Checkouts/ringcentral-swift/RingCentral.xcodeproj -scheme RingCentral_iOS -configuration Release -derivedDataPath /Users/XXXXXXXXX/Library/Caches/org.carthage.CarthageKit/DerivedData/9.2_9C40b/ringcentral-swift/0.7.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/zw/6q26sn9n7gzggwm6rm_fx_2h0000gp/T/ringcentral-swift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO (launched in /Users/XXXXXXXXX/Downloads/RingcentralSwiftSdkDemo/RingcentralSwiftSdkDemo/Carthage/Checkouts/ringcentral-swift)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/zw/6q26sn9n7gzggwm6rm_fx_2h0000gp/T/carthage-xcodebuild.KkNIZh.log
carthage update --platform iOS . OR carthage update --platform iphoneos .
*** Checking out Alamofire at "4.7.2"
*** Checking out objective-c at "v4.8.1"
*** Checking out ringcentral-swift at "0.7.3"
*** Checking out ObjectMapper at "3.3.0"
*** Checking out CryptoSwift at "0.10.0"
RingCentral_iOS issue occur when Build.
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "CryptoSwift" in CryptoSwift.xcworkspace
*** Building scheme "Framework (iOS)" in PubNub.xcworkspace
*** Building scheme "ObjectMapper-iOS" in ObjectMapper.xcworkspace
*** Building scheme "RingCentral_iOS" in RingCentral.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/apple/Desktop/Lokesh\ Kumawat/WCS\ TEST/Woundcare\ copy/Carthage/Checkouts/ringcentral-swift/RingCentral.xcodeproj -scheme RingCentral_iOS -configuration Release -derivedDataPath /Users/apple/Library/Caches/org.carthage.CarthageKit/DerivedData/9.3_9E145/ringcentral-swift/0.7.3 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/c_/nkxb3yr92ld6nq3wdjcgkggr0000gn/T/ringcentral-swift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/apple/Desktop/Lokesh Kumawat/WCS TEST/Woundcare copy/Carthage/Checkouts/ringcentral-swift)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/c_/nkxb3yr92ld6nq3wdjcgkggr0000gn/T/carthage-xcodebuild.fOTYlH.log
Not working for me
carthage update --platform iOS
*** Fetching ringcentral-swift
*** Fetching CryptoSwift
*** Fetching objective-c
*** Fetching Alamofire
*** Fetching ObjectMapper
*** Checking out ObjectMapper at "3.4.2"
*** Checking out Alamofire at "4.8.1"
*** Checking out ringcentral-swift at "1.0.1"
*** Checking out CryptoSwift at "0.14.0"
*** Checking out objective-c at "v4.8.5"
*** xcodebuild output can be found in /var/folders/49/ckkpnf9n6lgbfsfp407twf840000gn/T/carthage-xcodebuild.gTqjHT.log
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "CryptoSwift" in CryptoSwift.xcworkspace
*** Building scheme "Framework (iOS)" in PubNub.xcworkspace
*** Building scheme "ObjectMapper-iOS" in ObjectMapper.xcworkspace
*** Building scheme "RingCentral_iOS" in RingCentral.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/xxxxxxxxx/Downloads/MyFax\ /Carthage/Checkouts/ringcentral-swift/RingCentral.xcodeproj -scheme RingCentral_iOS -configuration Release -derivedDataPath /Users/xxxxxxxxx/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/ringcentral-swift/1.0.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/49/ckkpnf9n6lgbfsfp407twf840000gn/T/ringcentral-swift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/xxxxxxxxx/Downloads/MyFax /Carthage/Checkouts/ringcentral-swift)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/49/ckkpnf9n6lgbfsfp407twf840000gn/T/carthage-xcodebuild.gTqjHT.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.