AppCoda has Mac tutorials. The article at the following URL has a list of Mac development resources:swiftdevjournal.com/resources-for-learning-mac-development/
Post
Replies
Boosts
Views
Activity
If Instruments is showing memory addresses instead of function names in the call tree view, it usually means Instruments can't find the dSYM file that contains the debugging symbols that are needed to show function names in Instruments. Choose File > Symbols in Instruments and you should see a button to locate the dSYM file. You can get more detailed information in the Troubleshooting section at the end of the article at the following URL:swiftdevjournal.com/measuring-your-apps-memory-usage-with-instruments/
Are you using Catalyst to make a Mac version of an iOS SwiftUI app or are you making a regular Mac app with SwiftUI? I don't have an answer for you if you're using Catalyst.If you're making a regular Mac app, your FilePickerView won't work on Mac because you're using a UIKit view and the UIKit document picker. An AppKit view should use NSViewRepresentable and should use NSOpenPanel and NSSavePanel for opening and saving files. The answer by Matteo Paccini to the following Stack Overflow question should help you, and the other answer could help if you're using Catalyst:stackoverflow.com/questions/56645819/how-to-open-file-dialog-with-swiftui-on-platform-uikit-for-mac
To create a PDF without using NSPrintOperation, you have to use Quartz. If you have a lot of text in the PDF, using Core Text will also help you calculate the amount of text that fits on a page.Apple's Quartz2D Programming Guide has a section on creating PDF files with Quartz. The article at the following link goes into more detail on what you have to do to create a PDF with Core Text and Quartz:meandmark.com/blog/2016/08/creating-pdfs-with-core-text-and-quartz/
I have not created a PDF using the C API. I don't know why you're getting plain text instead of rich text in the PDF. I don't see anything in your code that would create a PDF with a plain text string instead of an attributed string.I noticed two things with your code. First, why do you need the variable thiscfAttr? Can't you pass the argument thisAttributedString to CTFramesetterCreateWithAttributedString?Second, your code will create a single page PDF no matter how long the text is. You create one page, draw the frame, and stop. You must create pages as long as there is text remaining in the attributed string.
For creating a PDF from a text view's contents, you're better off going with NSPrintOperation.To answer your question on creating pages as long there is text remaining, you have to keep track of how much text remains to be drawn. Create a variable of type CFRange to keep track of how much text remains. You will use the pageRange that line 19 of your code returns to update the remaining text range using code similar to the following:remainingTextRange.location = pageRange.location + pageRange.lengthCreate a while loop. While the location (a CFRange struct has a location and a length) of the remaining text range is less than the length of the attributed string, you will run lines 19-27 of your code: calculate the page range, create the frame, and draw the frame in the PDF page. After doing all that, update the remaining text range using the pageRange from line 19.
GroupBox is available only for Mac apps. You can't use it in an iOS app.
The problem with your app is that when someone closes the window, you provide no way to reopen the window. The app ends up in a state where the person using it can't do anything without quitting the app.The easiest fix is to have your app quit when the app window closes. In the app delegate, write the function applicationShouldTerminateAfterLastWindowClosed() and return true.func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}Another possible fix is to remove the Close control from the window so the window can't be closed. Open the storyboard or xib file, select the window, and deselect the Close checkbox in the Attributes Inspector.Another possible fix is to do what the rejection notice says and add a menu item to reopen the app window. But I don't have any code for you to do that.
The article at the following URL may help you determine what framework is using UIWebView:blog.kulman.sk/determining-which-frameworks-use-uiwebview/
How exactly are you changing the name?As a test on Xcode 11.3.1, I created an emitter, selected it and opened the attributes inspector. I changed the name of the emitter in the Name text field and pressed the Return key. The name change persisted after pressing the Return key. Pressing the Tab key after changing the name in the text field works as well.
The AppCoda tutorial you linked to is fine. The mistake you made was you didn't choose Storyboard from the User Interface menu when you created the project so you ended up with a SwiftUI project. The AppCoda tutorial does not use SwiftUI, which is why you're running into problems. Create a new project and make sure you choose Storyboard from the User Interface menu. If you don't explicitly choose Storyboard, you'll end up with a SwiftUI project.Read the article at the following URL for more detailed information about avoiding creating SwifUI projects in Xcode 11:swiftdevjournal.com/xcode-11-missing-view-controllers/
Choose App. That's what Apple calls the Cocoa App project template now.
The following URL contains a list of Mac programming resources:swiftdevjournal.com/resources-for-learning-mac-development/
If you created a Cocoa app Xcode project you should not need to add it to the Linked Frameworks and Libraries section. That section is normally used for adding non-Apple frameworks and libraries. None of my Mac apps written in Swift has the Cocoa framework in the Linked Frameworks and Libraries section, and they build and run.Clicking the Add button opens a sheet that will let you add any framework or library in the macOS or iOS SDK to the list of linked libraries and frameworks.
You need to provide a lot more information for anyone to help. Edit your question and add the following information:List the steps you are taking to upgrade the app.Explain what you mean by "Xcode creates the templates".List the entity where you get the conflict and the NSManagedObject subclass.Explain what you mean by "the app tries to do a @FETCH".Are you using NSPersistentDocument? If not, you should be for a document-based Core Data Mac app.