Post

Replies

Boosts

Views

Activity

Creating a missing Info.plist file
The Info.plist file is missing from my project as shown in this screenshot: Yet the project has properties as the screenshot does show. So obviously the properties are being remembered somewhere, and I do not know where. As can be seen no paths to an Info.plist is currently set. I need to create a new Info.plist file, and add it to the project. My concern now is about synchronization. If I were to do this by navigating to: File => New => File => Resource => Property List, and named it Info.plist, will this new property list file automatically synchronized with all of my current settings? Or would it contain only default settings, and synchronize my project's settings with those default settings? I suspect the original Info.plist file was lost when I decided rename folders, and filenames, and had to copy everything into a new project to do that. I failed to copy over the Info.plist file.
1
0
3.7k
May ’23
Mac to iPhone USB Communications
These are download links to zip files that contain Xcode 14.3 project files which are my attempt to establish USB communications with an iPhone 14 connected by lightning cable to a MacStudio: https://www.mediafire.com/file/k3my6y94iyjobeq/Bonjour-Trial-iPhone.zip/file https://www.mediafire.com/file/cof3b3w9tru1jd0/Bonjour-Trial-Mac-Enumeration.zip/file I could not attach them here. This web interface's file browser had these files grayed out, so it was necessary to make them available on a file sharing site. The Bonjour-Trial-iPhone.zip project files run on the iPhone 14. The Bonjour-Trial-Mac-Enumeration.zip run on the MacStudio. I have the iPhone 14 project code working on the iPhone. I expect it should be advertising its presence. MacStudio project runs, but does not find the iPhone 14. When I trace execution in file Bonjour-Trial-Mac-Enumeration.swift the "results" array is empty on line 65. What is going wrong here? Is a type "_ssh._tcp" connection possible between a MacStudio, and an iPhone, over the lightning cable?
1
0
626
May ’23
Displaying a Set in a View
The function: browseResultsChangedHandler: ((_ newResults: Set<NWBrowser.Result>, _ changes: Set<NWBrowser.Result.Change>) -> Void)? returns two Set type parameters. There is data in each element of these sets I need to display in a view. What is the best way to convert these sets to an array that can be iterated in a "ForEach" statement so they can be displayed in a View? When I attempt to do it on a set directly I get the error: Cannot convert value of type 'Set<NWBrowser.Result>' to expected argument type 'Range<Int>'
3
0
909
May ’23
enum to String conversion
In the example code in this thread: https://stackoverflow.com/questions/61235935/understanding-some-nwbrowser-i-managed-to-get-working there is this line: print("result ", result ) The second argument in the print statement, the "result" variable, is not a String type. It is instead a struct whose definition begins in line 10731 in the "Network" import file. Somehow the print function knows how to convert this into a string for printing to the terminal. I conclude, with some uncertainty, that the instructions for doing this conversion have to be defined in this struct. Where in this struct is the conversion defined? If not defined there, how is the conversion done?
2
0
653
May ’23
Identifier cannot be registered
On my Mac I made the mistake of reorganizing my development files. I renamed files folders, and application names, and moved some folders around to improve order, and better my ability to navigate the file structure. The result was a corrupted project that I could not fix all the errors on. So I created a new project that has the same name as the old, and copied the files into it. The result in the new after all the old project's files were copied to were these errors of the form: Failed to register bundle identifier The app identifier "com.example.com.Trial-iPhone" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again. No profiles for 'com.example.com.Trial-iPhone' were found Xcode couldn't find any iOS App Development provisioning profiles matching 'com.IntOpSys.com.Bonjour-Trial-iPhone'. (not the real domain name) So I logged into my developer account at developer.apple.com to delete this certificate, and could not find a way to navigate in my account to where that is done. Is that doable? Where, or How? I worked around the problem by appending a revision letter to the Bundle Identifier, such that it is now: com.example.com.Trial-iPhoneA . I would rather not have to do this when I already have an identifier to use, and also I do not like the idea of accumulating old, and never again used, certificates.
0
0
1.4k
May ’23
Valid NWListener application, and transport, protocol strings
In this thread, eskimo posted code containing the line: listener.service = .init(type: "_ssh._tcp") I see in this document the type parameter is a service string, where its first substring identifies the application protocol, and its second identifies the transport protocol. Where is it documented what the valid NWListener.listener.service string options are for these application, and transport, protocols?
1
0
586
May ’23
Enumerating, and Communicating, with iPhone 14s connected to a MacStudio
I have a powered up, and logged in, iPhone 14 connected to a MacStudio by means of lightning cable. This code snippet is being run in the MacStudio inside the XCode IDE: @Published var iPhones: [IPhone] = [] var test: [EAAccessory] = [] var count = 0; /// Update the iPhones list. func Update(){ test = EAAccessoryManager.shared().connectedAccessories count = test.count iPhones = EAAccessoryManager.shared().connectedAccessories.map{ IPhone( Accessory: $0) } // ToDo: Filter for iPhone accessories only } The variable test is set to a value of 0 in the the Update() method. The iPhone 14 is not showing up in the test array. On this webpage: https://developer.apple.com/documentation/externalaccessory/eaaccessorymanager I see this: Important iPhone and iPad apps running on Macs with Apple silicon never receive connection notifications. In the XCode IDE I have target set to Mac. Since I am running this in a Mac, and I have XCode set to a Mac target, I expected the result would be a Mac app running in a Max, and so I expected the above Important notice would not apply. Is my expectation correct? If not what has gone wrong here? Does a MacStudio receive a connection notification when an iPhone 14 is connected? Can EAAccessory methods be used in a MacStudio to communicate with an iPhone 14?
0
0
303
May ’23
Controlling iPhones from Mac Studio
The need is to control the cameras, and LIDAR, on up to four iPhone 14 Pros from at Mac Studio they are connected to. The data from the iPhones is to be uploaded from the iPhone 14s to the MacStudio for processing. What I need help with is: How can the iPhone 14s connected to MacStudio be enumerated on the Mac Studio to know how many there, are and their communication handles? How can the camera application that takes the photos, and the other that takes LIDAR data, be communicated with over the Lighting Cables to send commands from the Mac Studio, and to transfer the image, and lidar, data files? 1 The iPhones will have to route commands sent over lighting cables from the Mac Studio to the appropriate application for camera, and LIDAR. What is the best way to do this routing? To save time I will be basing the software on the iPhones on these sample projects which I will modify to meet the project's needs: https://developer.apple.com/documentation/avfoundation/capture_setup/avcam_building_a_camera_app https://developer.apple.com/documentation/avfoundation/additional_data_capture/capturing_depth_using_the_lidar_camera Parameters I need to directly control from the Mac Studio are exposure times, F stops, which of the iPhones will flash. Each connected iPhone's camera must be triggered as simultaneously as possible. I am very new to Swift, and OSX. I have read the Swift manual, and done the iOS App Dev Tutorials.
1
0
342
May ’23