Posts

Post not yet marked as solved
5 Replies
hi, has anyone solved this? My trouble started with XCode 15.3 beta 1
Post marked as solved
11 Replies
Same situation on two computers, an M1 MacMini and an M2 MacBook Pro. Using an iPhone 12 as my test device. I've followed directions here and in other threads. No joy. I don't think i can step back to Xcode 14 as my devices would not be recognized. I've submitted a report to Apple.
Post not yet marked as solved
2 Replies
Got it. I forgot to override viewWillDisappear
Post not yet marked as solved
11 Replies
Has anyone tries CocoaPods in Xcode 14 beta 5 (14A5294e)? I get a stew of errors when using: 1: sudo arch -x86_64 gem install ffi 2: arch -x86_64 pod install pod install Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3 Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3 Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3 Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3 Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3 Analyzing dependencies xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in force_encoding': can't modify frozen String (FrozenError) from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in report' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in report_error' from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in handle_exception' from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in rescue in run' from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in run' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in run' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in <top (required)>' from /usr/local/bin/pod:23:in load' from /usr/local/bin/pod:23:in ' /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in initialize_from_file': [Xcodeproj] Unknown object version (56). (RuntimeError) from /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in open' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1190:in block (2 levels) in inspect_targets_to_integrate' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in each' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in block in inspect_targets_to_integrate' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in section' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1184:in inspect_targets_to_integrate' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:106:in analyze' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in analyze' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in block in resolve_dependencies' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in section' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in resolve_dependencies' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in install!' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in run' from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in run' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in <top (required)>' from /usr/local/bin/pod:23:in load' from /usr/local/bin/pod:23:in `' Thanks for any tips
Post not yet marked as solved
20 Replies
Still there for me using MapKit, Swift 5, Xcode 12.3. (12C33).
Post not yet marked as solved
9 Replies
Hi again. I'm confused by the following: let myNumber = 12345 if let myHex = Double(String(myNumber, radix: 16)) {     print(myHex) } else {     print("Bad input as hexadecimal: \(myNumber)") } That works well. However, if I change myNumber to 1234, I get the Bad Input message.
Post not yet marked as solved
9 Replies
I found this to work, but is it the best method? let myNewNumber = 12345 if let myBinary = Int(String(myNewNumber, radix: 2)) {     print(myBinary) } else {     print("Bad input as binary: \(myNumber)") }
Post not yet marked as solved
9 Replies
Thank you both for your responses. I do need to bone up on how to use optionals. Point taken. One question regarding converting to binary. Would you explain more why I cannot convert "27" . Is there a method to convert integers to binary. Thanks for your help. And I really like the new forums.xc
Post not yet marked as solved
1 Replies
I looked at the 5.3 beta release notes. There seemed to be a workaround to using my physical watch instead of the simulator. The command is:defaults write com.apple.dt.Xcode Enable43515398 -bool YESThat also does not work for me.
Post marked as solved
6 Replies
Thanks a ton - the light came on.
Post marked as solved
6 Replies
Thanks for all the tips !I have changed the definition of stationArray to:var trainArray: [[String: Any]] = []After replacing the `processResponse` code, I now get this console output:configureTable() trainArray: [["LocationCode": G01, "Min": , "LocationName": Benning Road, "Car": 6, "DestinationCode": , "Line": BL, "Destination": Nat''l Air, "DestinationName": Nat''l Air, "Group": 2]] currentStation count: 1 currentStation type ArrayI still am confused how to access the elements within "currentStation", eg the value for "LocationName", "Car", etc.In objC, I'd use value forKey...How can I do this in Swift? I really appreciate your help.
Post marked as solved
6 Replies
@OOPer, Thanks for the reply. Let me see if I can answer your questions.1. Line 1 should read:for i in 0..&lt;trainarray.count2. trainArray is derived from a web service. Sorry for the large code snip but this is how the array is populated:@IBAction func updateTrains() { // Set up the URL request let tempString1: String = "************" let tempString2: String = "*************" pathString = tempString1 + codeString + tempString2 guard let url = URL(string: pathString) else { print("Error: cannot create URL") return } let task = URLSession.shared.dataTask(with: url) { (data, response, error) in if error != nil { print(error!.localizedDescription) } if let httpResponse = response as? HTTPURLResponse { print("statusCode: \(httpResponse.statusCode)") if httpResponse.statusCode != 200 { self.showError() return } } guard let usableData = data else { self.showError() return } do { //Get back to the main queue DispatchQueue.main.async { self.processResponse(using: usableData) } } //End implementing URLSession } task.resume() } func processResponse(using data: Data?) { let error: Error? = nil var jsonResult: [AnyHashable : Any] = [:] if nil != data { do { if let data = data, let json = try JSONSerialization.jsonObject(with: data, options: .mutableContainers) as? [AnyHashable : Any] { jsonResult = json } } catch { } } if error != nil || jsonResult.count == 0 { if let error = error { print("Could not parse loaded json with error:\(error)") } } else { DispatchQueue.main.async(execute: { if let value = jsonResult["Trains"] as? [AnyHashable] { self.trainArray = value } self.buildDetailsForMap() }) } configureTable() }and trainArray is defined as: var trainArray: [Any] = []I plan to extract the station names and minutes as rows in a WKInterfaceTable.. The other info will be used in follow on controllers. I've logged the urlRequest, and the results are fine.Thanks for any help.David