Ambiguous use of init(contentsOfURL:)

Hello I Use XCode 9.3 and Swift 4.1

Below my code:

 

import SolarMaxIosFramework

var upsList = [Any]()

class initUps {

//    print(“InitUps Initialization”)  

func loadUpsValues () {      

print(“loadUpsValues”)      

let upsFileAsURL = URL(string: “Upslist.txt”)      

//   Original ObjectiveC: NSMutableArray *ListUpsArray = [NSMutableArray arrayWithContentsOfURL:upsFile];

let upsList = NSArray(contentsOfURL:upsFileAsURL! ) // Error  

}

}

 

I Get an error : Ambiguous use of init(contentsOfURL:)

It seems this error indicates that two frameworks gives a definition of NSArray

1. Found this candidate (Foundation.NSArray)

2. Found this candidate (Foundation.NSArray)

 

Someone to help me ? Thanks in advance

Powered by WPeMatico

About

You may also like...

Comments are closed.