Find Jobs
Hire Freelancers

Convert Object C function to Swift 3 and test with data

$10-30 USD

Completed
Posted about 7 years ago

$10-30 USD

Paid on delivery
I need the Objective C function below converted to Swift for for iOS or OSX. Would prefer OSX. I'll provide the two csv files for testing. Don't need anything fancy to test a simple form and this function called. - (NSArray *) getMaterials; - (NSArray *) getLockingAssemblies; @synthesize materials; @synthesize lockingAssembly; - (void) initFromCsvs { // materials NSString *filePath = [[NSBundle mainBundle] pathForResource:@"Material" ofType:@"csv"]; NSString *content = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; NSArray *contentArray = [content componentsSeparatedByString:@"\r"]; NSMutableArray *workCopy = [[NSMutableArray alloc] init]; for (NSString *item in contentArray) { NSRange filter1 = [item rangeOfString:@"Perth"]; if ([login to view URL] == NSNotFound) { continue; } NSRange filter2 = [item rangeOfString:@"EndDisk"]; if ([login to view URL] == NSNotFound) { continue; } [workCopy addObject:item]; } materials = [[NSArray alloc] initWithArray:workCopy]; // NSLog(@"materials count %lu", (unsigned long)[materials count]); // lockingAssembly NSString *filePath2 = [[NSBundle mainBundle] pathForResource:@"LockingElements" ofType:@"csv"]; NSString *content2 = [NSString stringWithContentsOfFile:filePath2 encoding:NSUTF8StringEncoding error:nil]; NSArray *contentArray2 = [content2 componentsSeparatedByString:@"\r"]; NSMutableArray *workCopy2 = [[NSMutableArray alloc] init]; for (NSString *item in contentArray2) { NSRange filter1 = [item rangeOfString:@"LockingAssemblyID,PartNumber"]; // header out if ([login to view URL] != NSNotFound) { continue; } [workCopy2 addObject:item]; } lockingAssembly = [[NSArray alloc] initWithArray:workCopy2]; // NSLog(@"lockingAssembly count %lu", (unsigned long)[lockingAssembly count]); }
Project ID: 12907708

About the project

5 proposals
Remote project
Active 7 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
Dear client, I have gone through your job description & understand requirements. I will be glad to share my expertise with you. ***Apple Latest IOS10 Features*** Facebook/Twitter/Google Api***Google MapKIt***Video/Audio Streaming***Push Notification***Graphics Design***Animation***UIKit***Database/Address­book/Calendar***GPS***In App Purchase Server Side PHP (core),Codeigniter Framework(MVC),ASP.NET,ASP.NET MVC Framework,Wordpress,C#.Net,JAVA Below are the links of few Apps done by Us : iOS Apps: [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL]
[login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] Thanks
$35 USD in 1 day
5.0 (31 reviews)
6.4
6.4
5 freelancers are bidding on average $25 USD for this job
User Avatar
hello i m intrested to do that work i have developed 3 project in Swift 3 so i can do easily within an hour i have 4 year experience thanks
$30 USD in 0 day
4.7 (18 reviews)
4.3
4.3

About the client

Flag of UNITED STATES
Bonita Springs, United States
5.0
140
Payment method verified
Member since Oct 25, 2004

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) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
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.