Post

Replies

Boosts

Views

Activity

Document-based app with multiple file type in Appkit
I'm trying to create an document-based app using AppKit. in the documentation is created a file called content that is the data model. documentation says: The Content object encapsulates the document’s data into a single package. Putting all of the document’s data into a single Content object simplifies data management. For example, it’s easier to add new data elements to the document later. In my app I use two type of file: text file custom data type file for the first the document's sample is perfect. but I have to use both files and in different time. e.g. because my app is an editor of text, when user write and click on save button, the app saves the content of file. but the user first of all create a project, give it a name and save the file project, like Xcode. So, how can I manage the crud of tow type of file?
0
0
711
Sep ’22
Open CSS files in MacOS document-based App
I want the my app can open, create, edit, safe and write CSS file. because css file are known file type, I set the info in Imported Type end added the info in Document Type as you can see in images. when I run the app and click on open button of menu, I see css file but they are not selectable. Why? How can I fix the problem? here the images:
2
0
1.1k
Aug ’22
Multiple Type in MacOS Document-based App
I try to create an native MacOS document-based- app with AppKit this app should can read and write many different type of file like HTML, CSS, Javascript, PHP, Java and so on. The problem is with css file. in other post of forum is written that The correct type is public.css. but if I import type that is conform to public.css, when I run the app and look for an css file to open, that file doesn't selectable and I get error: An NSDocumentController returned nil when sent -fileExtensionsFromType:@"com.example.css". See the info about new support for UTIs in the Leopard AppKit release notes. p.s. I've retry to put the same settings and the error doesn't come out but the file still unselectable in open dialog panel can someone help me?
1
0
762
Aug ’22
UISplitViewController and UITabBarController in iOS 15 is always full screen
I'm reworking my app and update code and design. Because my app is one both iPhone and iPad, i'm using Splitview to handle the configurations. But my app has 4 section that I manage using a Tab bar and each tab has a SplitView. As you can see in images, the problem is that if I attach directly the UISplitViewController to UITabBarController you don't see two columns but only one (the primary or secondary view) both iPhone landscape orientation and iPad. A solution that I found is to attach the splitviewcontroller to a view that contains a ContainerViewController e connect the split view to this container. If you do this, you see the split view work correctly ma the problem is the customization of appearance (look at image 3) So may questions are: why I have to embed a split view in a container view controller and i can't connect it directly to tabbar as we done until now? Is there an other better solution then put a split view in a containerView? Thank you )
2
0
1.9k
Mar ’22
swift instead javascript
I'm creating a framework that allows you to easily create html and css web pages in ios style. As long as it's static components that don't have events (e.g. a webpage with a paragraph), that's okay. The problem arises when I have to create a button, recognize and capture the click event. In the same way, however, I have the problem of recognizing and capturing all the other browser events (e.g. the page is loaded into memory). In web development this is handled by javascript. But I would like to replace javascript with my framework and with swift. So how do I interact with browser events? do i have to install swift in the browser? how can I do? thank you
1
1
1.1k
Dec ’21
Core Data concurrency to Swift and Relationship
The example used in the video is an update of the project used last year to explain the batch functions. in that project NSBatchInsertRequest is used to insert large data in few seconds but NSBatchInsertRequest could not be used to set the relationships. I don't understand if this is changed or not, but, if not, can I use the concurrency to set the relationship? is it possible to have an simple example in which you can save large data with relationship in few seconds?
0
0
833
Jun ’21
Core Data and Relationships
I've a large data feed to load in database. this data populate many entities that are related each others. I've follow this official tutorial - https://developer.apple.com/documentation/coredata/loading_and_displaying_a_large_data_feed to use nsbatchInsertRequest. But this tutorial has one big bug: populate data only in one entity. How many apps use a database with only one entity? therefore the problem that I have not only me, but several people, is time. With nsbatchinsertrequst I was able to insert more than 30000 records in just 5 seconds with a use of just 25MB of RAM. But without setting up relationships. if after the execution of the various insertrequests I set the relations, everything takes me about 50 seconds with an increase in memory to 60-70 MB. Is it possible that there is no way to quickly set up relationships? Not only that, this is a forum where Apple engineers, who therefore know the subject better, should give help. but who knows why, for such questions they disappear. Maybe it's my posts that are so boring that Apple ignores them? Or are they so difficult that even apple engineers can't solve them? Who knows if I'll ever find the answer! But is it possible that they don't have a solution? These Apple engineers if they had the same problem as me, how would they solve it? they simply say: "it can't be done! Arrange!"? anyway, I hope that some Apple engineer or someone experienced will be able to find the solution at least to this problem. Or it will be another zombie post in the billions of zombie posts of people like me who pay $ 100 but get no support. Thank you
2
1
1.6k
Feb ’21