Find Jobs
Hire Freelancers

Convert Swift to Objective C. 1hr work

€8-30 EUR

Completed
Posted about 3 years ago

€8-30 EUR

Paid on delivery
Code: class MyAssetResourceLoaderDelegate: NSObject, AVAssetResourceLoaderDelegate { let certificateURL: URL let licenseAcquisitionURL: URL let contentId: String init(certificateURL: URL, licenseAcquisitionURL: URL, contentId: String) { [login to view URL] = certificateURL [login to view URL] = licenseAcquisitionURL [login to view URL] = contentId } public func resourceLoader( _ resourceLoader: AVAssetResourceLoader, shouldWaitForLoadingOfRequestedResource loadingRequest: AVAssetResourceLoadingRequest ) -> Bool { print([login to view URL] ?? "no url") // asdf // We first check if a url is set in the manifest. guard let url = [login to view URL] else { print("?", #function, "Unable to read the url/host data.") [login to view URL](with: NSError(domain: "[login to view URL]", code: -1, userInfo: nil)) return false } print("?", #function, url) // When the url is correctly found we try to load the certificate date. Watch out! For this // example the certificate resides inside the bundle. But it should be preferably fetched from // the server. guard let certificateData = try? Data(contentsOf: certificateURL) else { [login to view URL](with: NSError(domain: "[login to view URL]", code: -2, userInfo: nil)) return false } // Request the Server Playback Context. let usedContentId = [login to view URL] ?? "irdeto" guard let contentIdData = [login to view URL](using: [login to view URL]), let spcData = try? [login to view URL](forApp: certificateData, contentIdentifier: contentIdData, options: nil), let dataRequest = [login to view URL] else { [login to view URL](with: NSError(domain: "[login to view URL]", code: -3, userInfo: nil)) print("?", #function, "Unable to read the SPC data.") return false } // Request the Content Key Context from the Key Server Module. let ckcURL = licenseAcquisitionURL var request = URLRequest(url: ckcURL) [login to view URL] = "POST" [login to view URL] = spcData let session = URLSession(configuration: [login to view URL]) let task = [login to view URL](with: request) { data, response, error in if let data = data { // The CKC is correctly returned and is now send to the `AVPlayer` instance so we // can continue to play the stream. [login to view URL](with: data) [login to view URL]() } else { print("?", #function, "Unable to fetch the CKC.") [login to view URL](with: NSError(domain: "[login to view URL]", code: -4, userInfo: nil)) } } [login to view URL]() // asdf return true } }
Project ID: 29018816

About the project

2 proposals
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello I am good at both swift and objective c and I am sure I can finish this conversion in one hour Hope to work for you Thanks
€20 EUR in 1 day
4.4 (40 reviews)
6.5
6.5
2 freelancers are bidding on average €20 EUR for this job
User Avatar
Hello, I have 5+years of experience in iPhone Application Development. I want always clients satisfied with my work. I am working as a full-time freelancer. Thanks
€19 EUR in 7 days
4.6 (1 review)
0.3
0.3

About the client

Flag of NETHERLANDS
Delft, Netherlands
0.0
0
Payment method verified
Member since Oct 27, 2017

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.