Open Xcode Live Preview for UIKit

One of the big benefits of using SwiftUI is that you can hot update the App like Flutter,UI code changed,Will be directly reflected in the simulator or the real machine,Greatly improve the efficiency of writing user interfaces,No need to change 1px,run,Various clicks,Then check the loop of effects。But it's too early to use SwiftUI,After all, there is still a lot of iOS 12 Equipment is running,Want to do popular software,That still needs to be supported。

Then,Is there any way to make UIKit The software written can also be used in real-time[……]

Click link to continue reading...

Run and train Moses on macOS

Moses official website actually has macOS Binary packageof,You don't need to compile them from source。But in short,,Since Moses developers no longer use Macs,So he can't update,This leads to a bug in the code of the latest version (4.0),Make the binary file can not be used directly,The author said, "It's not difficult to compile from source anyway..." But in short,It is almost impossible to compile Moses from BigSur,Various strange errors,Headache。

In fact,We can directly modify the binary file[……]

Click link to continue reading...

Use Packages to create a pkg installation package that supports Apple M1 chip

Use advanced settings to modify Packages default parameters

It's been a while since Apple released the M1 chip device,Although I applied for DTK equipment at the first time,But for some reasons,Until Apple Recycles Equipment,I couldn't touch it myself。In short,The drop grid input method macOS still successfully supports the Apple architecture by blind typing,I.e. arm64,According to user feedback,The effect is ok。

Until some users say that although the app supports the m1 chip,But the installation package does not work-when running the pkg installation package,Rosetta 2 pops up...

Although it does not affect[……]

Click link to continue reading...

macOS uses the atos command to parse arbitrary crash records and sample data

Recently, the drop grid input method has encountered several difficult to reproduce problems-the key is that it will not cause a crash。This makes the crash statistics function completely ineffective,The specific performance is that the input method will suddenly get stuck for a few seconds in some cases,Very annoying。Then I thought,macOS comes with activity manager,There is a "sampling" function,You can see the current execution (call) status of the corresponding process,Can I use it to analyze the cause of the error?

After communicating with users,I got a sampling report like this:
[crayon-673f626120d3b01632[……]

Click link to continue reading...

Quickly update Python packages

Python is a good thing,Many times we like to use it to write small things... For example, many services on my server are written in Python ( Supervisor will use your Python program becomes Services ),Accumulate,Many dependency packages are actually used。

but,These Python dependencies will not follow your apt upgrade Update,Today, after a long time,I found a package I am using[……]

Click link to continue reading...

Cocoa Binding practical tutorial

First of all, this is not a new technology,It's very old,So old that almost no one mentions it。

This is a product of Apple's MVC model,It was born when there was no iPhone,It is used in conjunction with the Xcode graphical setting interface-such as NIB,of course,Now it has become XIB,Oh,And storyboard。

Now if you want to bind a storyboard object to the code,All you may find are like this:

Click the right mouse button in the left column to open a small window[……]

Click link to continue reading...

Xcode plugin is missing and does not display the solution

In system preferences,Xcode extensions are not displayed

In a previous article, I introduced a way to install multiple versions at the same time Xcode Tool ofUse xcode-install to manage Xcode versionsBut when there are multiple Xcodes in your system at the same time,Will cause system confusion,Make Xcode plugins unrecognizable,The main manifestation is that it is not visible at all in the system preferences Xcode pluginOptions-as if you haven't installed them at all。

In short,I'm hereHereFound the answer

First execute the command:
[crayo[……]

Click link to continue reading...

Use a third-party mouse without a driver on macOS

Enable management of Logitech mouse

All to known,macOS to third partiesmouseVery picky,If it is an ordinary office mouse,That almost works,At most, the fixed DPI requires adjusting the mouse speed.,But if it goes up to a gaming mouse with more buttons,There are many problems。

Not necessarily for playing games,For example, a mouse with forward and back buttons is very useful when writing code。

In General,The mouse of the famous manufacturer will support macOS better,Mainly because the big factory has the energy to make a mouse for macOSdrive,If a mouse is natively driven by Windows only,[……]

Click link to continue reading...

Use xcodebuild to archive and export app

I wrote an article beforemacOS app script to automate notarize,But there is no mention of using code to automatically compile and generate App scripts,After all, there are many tools to complete this step,For example, fastlane。

I didn’t think about automation before notarize,At the time of writing that article, fastlane did not support notarized upload,So I wrote it myself,The specific compilation command is like this:
[crayon-673f62612[……]

Click link to continue reading...