Posts

Post marked as solved
2 Replies
1.2k Views
Hi, I am writing this to WARN other developers about a problem that I have run into with Xcode 13.3 (13e113). Ever since downloading this version, I have noticed that my apps have bloated in size. From 23mb to 55mb and above. After an investigation, I noticed that Xcode was duplicating project and other files. Such as [nameofproject] [nameofproject2], etc. Because of this, not only did my project get bloated, but when I try to delete some of the duplicate files (yes, I know what to delete and what NOT too) this would then allow Xcode to delete even MORE FILES each time I went into the project. There is nothing worse then going into a project that you've worked MONTHS on and seeing RED FILES inside the project (red files means not there). So, I keep backups of all my apps. Restoring these backups cause the same problems. This is a notice to all developers -> CHECK YOUR PROJECT FILES FROM THE FINDER so you don't experience this problem. I would HOPE someone from Apple will see AND READ this and maybe even CONTACT ME so I can make DAMN sure this never happens again. Thank you, Dan Uff
Posted Last updated
.
Post not yet marked as solved
0 Replies
1.1k Views
Hi, In the past, I have tried to make an app that reads JSON from a remote server. I tried to use the same steps that are done with an iOS app, without success. I need to know if its even possible and where I would need to look to get this up and running. Thanks, Dan Uff
Posted Last updated
.
Post marked as solved
1 Replies
745 Views
Hi, I have several iOS apps in the App Store. I have been asked to provide a Mac app for some of them, which I am willing to do. Should I add the Mac app to an existing iOS app (i.e. a new target) or make a separate app just for the Mac, even though the information inside the app would be the same? Thanks, Dan Uff
Posted Last updated
.
Post not yet marked as solved
2 Replies
2.6k Views
I'm trying to display a share sheet and am using examples from the Internet but am getting the following warning: "'windows' was deprecated in iOS 15.0: Use UIWindowScene.windows on a relevant window scene instead" Here's the code I'm trying to use: func shareButton() {   let url = URL(string: introText)   let av = UIActivityViewController(activityItems: [url!], applicationActivities: nil)  UIApplication.shared.windows.first?.rootViewController?.present(av, animated: true, completion: nil) } Thanks, Dan Uff
Posted Last updated
.
Post not yet marked as solved
0 Replies
791 Views
Hi all, I've been working on an app for months and have recently came across the below problem. I have a listView with a NavigationView in SwiftUI. When I go into the list, there is NO NavigationBar title or Buttons above it. When I start to scroll, it appears, and then disappears when I go to the top of the list. It has suddenly appeared without any rhyme or reason. I have seen this question asked before and a solution. I have tried it and it still is a problem. Here's the code: import Foundation struct MainMenu: View {       @State private var mainOptions: Int? = 0   @State private var tag: Int = 0   var fSize = Int(20)       var body: some View {           NavigationView() {                      List {                    Section(header: Text("MAIN INFORMATION"))         {                       NavigationLink(destination: Introduction(), tag:1, selection: $mainOptions) {                         Image(systemName: "doc")            Text("Introduction")              .bold()                      }                       NavigationLink(destination: BeSafe(), tag:2, selection: $mainOptions)            {              Image(systemName: "doc")              Text("Be Safe")                .bold()            }                        NavigationLink(destination: MythsAndFacts(), tag:3, selection: $mainOptions)            {              Image(systemName: "doc")              Text("Myths and Facts")                .bold()            }                        NavigationLink(destination: CycleofViolence(), tag:4, selection: $mainOptions)            {              Image(systemName: "doc")              Text("Cycle of Violence")                .bold()            }                        NavigationLink(destination: Definition(), tag:5, selection: $mainOptions)            {              Image(systemName: "doc")              Text("Definitions")                .bold()            }                        NavigationLink(destination: PersonalSafetyPlan(), tag:6, selection: $mainOptions)            {              Image(systemName: "doc")              Text("Personal Safety Plan")                .bold()            }                        NavigationLink(destination: PPOs(), tag:7, selection: $mainOptions)            {              Image(systemName: "doc")              Text("PPOs")                .bold()            }                        NavigationLink(destination: QuestionsOnLeaving(), tag:8, selection: $mainOptions)            {              Image(systemName: "doc")              Text("Questions on Leaving")                .bold()            }                        NavigationLink(destination: AbuseMenu(), tag:9, selection: $mainOptions)            {              Image(systemName: "doc")              Text("Information on Abuse")                .bold()            }                    }            Section(header: Text("GET MORE INFORMATION"))            {                            NavigationLink(destination: PhoneNumbers())              {                Image(systemName: "phone")                Text("Phone Numbers")                  .bold()              }                            NavigationLink(destination: Search())              {                Image(systemName: "safari")                Text("Search")                  .bold()              }                                        }                        Section(header: Text("TAKE NOTES"))            {              NavigationLink(destination: CPNoteLite())              {                Image(systemName: "note.text")                Text("CPNote Lite")                  .bold()              }                             NavigationLink(destination: CPNoteHelp())                {                  Image(systemName: "questionmark")                  Text("Help with CPNote Lite")                    .bold()                }            }                        Section(header: Text("FOR YOUR PROTECTION"))            {             NavigationLink(destination: HideInfo())                 {                   Image(systemName: "book.closed")                           Text("Hide This App.")                     .bold()                                                 }            }          }                                 }.navigationTitle("Domestic Violence")           .navigationBarTitleDisplayMode(.inline)                     .toolbar           {                          ToolbarItem(placement: .bottomBar)             {               HStack {               Image(systemName: "c.circle")                   .resizable()                   .frame(width: 20, height: 20)               Text("2021 Connecting People Software")                   .font(.custom("", size: 18))               }             }           }         .navigationBarItems(leading: NavigationLink(destination: About(),               label: {               Image(systemName: "info.circle")             .font(.custom("", size: 18))            }), trailing: NavigationLink(destination: Support(),               label: {               Image(systemName: "person.circle")             .font(.custom("", size: 18))              }))          }          } struct MainMenu_Previews: PreviewProvider {     static var previews: some View {         MainMenu()       .previewInterfaceOrientation(.portrait)     } } Thank you, Dan Uff
Posted Last updated
.
Post not yet marked as solved
0 Replies
520 Views
Hi, When I try to install a app that I want to test on an iPhone 13, I get the following error: ` Showing All Messages The file "/Users/danuff/Documents/CPS/iOS/iOS 15/Projects (Current)/iPhone : iPad/SwiftUI/General/DVP/DVP/DVP.entitlements" could not be opened. Verify the value of the CODE_SIGN_ENTITLEMENTS build setting for target "DVP" is correct and that the file exists on disk. The app is not installed on the actual device, but it does work on the Simulator.' It worked fine the other day. Thanks, Dan Uff
Posted Last updated
.
Post not yet marked as solved
0 Replies
603 Views
Hi, I have a small Apple Watch game that someone downloaded and liked a lot. That same individual asked me to make a Mac version of the same app, which I am willing to do. Should I add the app to the current Apple Watch version, or make a stand alone version? Thanks, Dan Uff
Posted Last updated
.
Post not yet marked as solved
0 Replies
423 Views
Hi, I added an Apple Watch target to an existing app using SwiftUI and Xcode 13 (13A233) and the Canvas shows the first view controller correctly (an Apple Watch) but when I add additional VCs, the canvas shows an iPhone. I recreated the additional VC making sure I had WatchOS selected and got the same thing. Is anyone else having this problems with this? Any work arounds? Thanks, Dan Uff
Posted Last updated
.
Post not yet marked as solved
1 Replies
427 Views
Hi, I am using the RC version of Xcode and get the following error while submitting to the App Store. I tried using the otool bit it didn't work. I have attached a screen shot of the actual error. Have any ideas? Thanks, Dan Uff
Posted Last updated
.
Post not yet marked as solved
6 Replies
713 Views
How would I take the output from JSON and print it to the IBOutlet's newsview? Thanks! class ViewController: UIViewController {   @IBOutlet var newsview: UITextView!   override func viewDidLoad() {     super.viewDidLoad()     // Do any additional setup after loading the view.     // API Endpoint:   let urlString = "[string withheld]"   let url = URL(string: urlString)   guard url != nil else {     debugPrint("URL IS nil")     return   }   let session = URLSession.shared   let dataTask = session.dataTask(with: url!) { (data, response, error) in     if error == nil && data != nil {       let decoder = JSONDecoder()       do {         let newsFeed = try decoder.decode(NewsFeed.self, from: data!)         print("Result: \(newsFeed)")       //  newsview.text = NewsFeed as? String!       } catch {         debugPrint("Error in JSON Parsing!")     }   } }   dataTask.resume() }   override func viewDidAppear(_ animated: Bool) { }
Posted Last updated
.
Post not yet marked as solved
0 Replies
363 Views
Hi, I have a list of items on the iPhone that I want to share on the watch. The list would be too big to have the actual file on the watch, so, what's the best way to share the list from the iPhone, and could someone give me a step by step on what to do or point me to a good document? Thanks, Dan Uff
Posted Last updated
.
Post not yet marked as solved
0 Replies
376 Views
Hi, I have been trying to change the default color of the NavigationView in the AppDelegate file and am unable to. Is it the code, or me? Using Xcode 13, Beta 1. I got the code from hackingwithswift.com. Here's the code: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {     // Change Color of Navigation Bar:     let configuration = UINavigationBarAppearance()     configuration.configureWithOpaqueBackground()     configuration.backgroundColor = .systemPurple     return true } Thank you. Dan Uff
Posted Last updated
.
Post marked as solved
3 Replies
5.8k Views
Hi,How would I go about using the standard WebKit delegates in SwiftUI, such as:func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) { activityView?.startAnimating() self.title = "Loading...." }Here's what I have so far:import SwiftUI import UIKit import Foundation import WebKit struct Support: View { var body: some View { NavigationView { VStack { WebView(request: URLRequest(url: URL(string: "https://www.connectingpeoplesoftware.com/iossupport")!)) }.navigationBarTitle(Text("Support")) } } struct WebView: UIViewRepresentable { let request: URLRequest func makeUIView(context: Context) -> WKWebView { return WKWebView() } func updateUIView(_ uiView: WKWebView, context: Context) { uiView.load(request) } } struct Support_Previews: PreviewProvider { static var previews: some View { Support() } } }Thanks in advance,Dan
Posted Last updated
.