M1 in the eyes of iOS developers

As a veteran iOS developer who has been working in the digital world for years, I’ve also worked with a number of new and controversial gadgets, as is often said.

As the first person to eat crab, I have been itching for the release of M1 for a long time, but AFTER all, I am a guy who eats. I did not start blindly this time, but with the desktop at home, I have more and more honed my ambition and the need of work.

I was so mercilent that I abandoned the 21.5 iMac that had been with me for five years (mainly because the mechanical disk was getting more and more jammed, I couldn’t stand it), emptied my only savings, and bought an M1 Mac Mini from an acquaintance.

It is just half a year since the release of M1 chip, and I have been watching it almost. No major problems have been revealed, except that the chip architecture has been changed from x86 to ARM, so I used it to play around and find out what it is.

At first glance, I thought it was bigger than I expected. I had never seen it in a physical store. I always thought it was really Mini, but I still need to be thinner if I want to put it in my lunch box and take it with me.

Basically do not carry a bag is unable to carry, and on the following diamond-shaped clear, although good-looking, but a little knock against there must be a mark, on the table I dare not move, add a jacket or necessary.

The performance test

Hardware configuration will not be described, M1 is the same, except for the negligible performance impact of solid-state disk capacity and optional memory size, a check. The first boot, after a series of network Settings, account Settings, keyboard and mouse, personalization Settings, and so on, soon entered the desktop.

As an excellent iOS developer, the first step was to install Xcode. After downloading, the installation speed was not very fast, and it took about half an hour.

Then I opened the software update in the system preference setting to check whether there was a new version, and found that it could be upgraded to 11.4 (factory 11.3), so I decided to upgrade. When the download was nearly complete, suddenly the window popped up indicating installation failure (error occurred during the installation of the selected update).

Some people say that this is caused by the Mac SIP system integrity protection mechanism, and it is relatively easy to solve, but it needs to be restarted. I am installing the software, so it is temporarily shelving.

A few hours later, a message popped up in the upper right corner of the screen to install the update. Click “Install” and the installation started directly. It is suspected that the system has automatically downloaded the update in the background and the manual update has a lower priority.

Supplement: Two months later, I updated system version 11.5.1. When the download was about to end, another problem appeared, indicating that the download failed. This was the case for several days.

Then install the software I need, because my data are in baidu network disk, first download and install baidu network disk in the official website, open when the popup prompts the need to install Rosetta plug-in to adapt the function of THE M1 chip based on Intel chip.

Click the installation input boot password, for a while, and then open baidu network disk again, icon in the program dock bounce a few seconds, just open the login interface, exit open again is the normal start speed.

Compatibility test

Here is one of the biggest points of M1. As for compatibility issues, as we all know, x86 is a complex instruction set, while ARM is a simplified instruction set. Apps developed for x86 are not supported to run directly on ARM, which reflects the strength of Apple.

Apple has translated x86 directly into arm-enabled applications through a “widget”, and it’s no use! There are widespread concerns about the efficiency of Rosetta2 translation, and in my experience, you can’t tell if it’s been translated at all by the speed of startup and the process of use.

Some of you may have heard of Rosetta, but the Rosetta used in M1 is actually Rosetta2, which means second generation. What about first generation? Apple used Rosetta to translate Mac architecture from PowerPc to Intel x86 in 2006. Apple has a very good heritage from its name.

I also looked up Rosetta, and here’s what the Official Apple documentation says:

Rosetta 2 runs in the background whenever you use an App built specifically for An Intel-processor Mac. Rosetta automatically converts apps to work with Apple chips.

In most cases, there will be no difference in performance for apps that require Rosetta.

Which of your apps require Rosetta?

You can use the Display Overview to identify apps that require Rosetta or can use Rosetta:

Select the corresponding App in “Access”.

From the File menu of the menu bar, select Show Introduction.

View information marked “Category” :

Application (Intel) indicates that the App only supports Intel processors and requires Rosetta to run on any Mac with An Apple chip.

Application (universal) means that the App supports both Apple chips and Intel processors and uses Apple chips by default.

The General App’s “Introduction” window contains the “Open with Rosetta” setting. The setting lets email apps, Web browsers and other apps use add-ons that haven’t been updated to support Apple chips. If an App does not recognize plug-ins, extensions, or other add-ons, exit the App, select this setting, and try again.

During the test, I found that all the apps with the category of “Application (general)” had a check box of “Open with Rosetta”, except for system preference Settings. App, I also found only netease Youdao Dictionary among the apps I often use. App and Google Chrome.

Other apps, such as Enterprise wechat, Office, XMind, TeamViewer, etc., are all “applications (Intel)”. This type of app does not have the check box of “Open with Rosetta”, and will be opened with Rosetta by default, as shown below.

Of course, the most intuitive way you can view the storage space management window, in the category column “General /Intel” at a glance.

Installation Steps

Softwareupdate –install-rosetta –agree-to-license if the system does not automatically prompt you to install Rosetta, or if some App is displayed, you can enter /usr/sbin/softwareupdate –install-rosetta –agree-to-license. After finishing, select open with Rosetta in the App Introduction window that blinks back.

Then I need to install cocoapods, Homebrew, RVM, Ruby, and Cocoapods.

1. Terminal input

/ bin/bash – c “$(curl – fsSL gitee.com/cunkai/Home… -v Checks whether the command succeeds.

2. Download RVM from Github:

Github.com/rvm/rvm, sud… SPCTL –master-disable Enables the option to download applications from any source and select it. Then, double-click to run the /bin/ rvM-Installer shortcut for offline installation. After installation is complete configure to.bash_profile:

The export PATH = “/ Users/zions /. RVM/bin: $PATH”.

3, enter RVM list know to check the list of Ruby versions. The latest version is 3.0.1. Enter RVM install 3.0.1 to install the latest Ruby version.

Gem sources –remove rubygems.org/ remove rubygems.org/ remove rubygems.org/ remove rubygems.org/ remove rubygems.org/ remove rubygems.org/ remove rubygems.org/ remove rubygems.org/ remove rubygems.org/ remove rubygems.org/ Sources –add gems.ruby-china.com add domestic sources, then gem sources -l to check whether the replacement is successful.

4. Run sudo gem install cocoapods -n /usr/local/bin to install cocoapods. Wait about 10 minutes and check whether the installation is successful.

Pod Repo add Master github.com/CocoaPods/S… Search AF automatically performs pod setup, and the search result is displayed successfully after the setup completed is displayed.

Since then, Cocoapods has been installed successfully. M1 has not been unable to use cocoapods and other tools, and the process has not been too difficult, during which I encountered problems installing RVM online.

Someone said that M1 chip does not support RVM, so I installed it offline and opened the introduction of terminal. App, and checked “Open with Rosetta”, as shown in the picture:

When USING POD install for many times, I found that some tripartite framework is error, also need to check the terminal “use Rosetta to open”, before normal install, in my experience, this check box is basically check after do not cancel, Otherwise sometimes forget to tick some puzzling problems will card for a long time.

When using Xcode, the project copied from the old Mac will also have some problems with the chip, which will report an error and cannot run. It is also recommended to check the “open with Rosetta” of Xcode. Of course, if a new project is started from scratch on M1, it should not be checked, after all, it will affect the performance.

Next comes the biggest change: iOS apps are now available for download on the App Store! Of course, it can only be downloaded if developers check the Mac App Store when they launch an iOS app.

Of course, there are ways to install iOS apps without Mac App Store support, such as Baidu webdisk and Weibo iPad version can be downloaded, QQ Music iPhone version can be downloaded.

Wechat and some popular large mobile games will not work, I believe that in the future more and more mainstream apps will support M1 Mac, the use of iPhone or iPad is exactly the same, M1 must try.

Then, with the launch of Apple M1 series PC products, a new interface Type emerged, namely USB4. Mac Mini is equipped with two USB4 interfaces. In terms of interface form, USB4 adopts USB Type-C form, which may be a little confused here.

It can reach the theoretical speed of 40Gbps, while Type-C is a form of hardware. At present, almost all mainstream smart phones use type-C interface to charge. Starting from USB4, all of them may use type-C interface in the future, because it is convenient and easy to use.

The Mac Mini’s two USB4 ports, however, are compatible with apple’s flagship lei Li port, which means that thunderbolt-enabled devices can plug directly into the two USB4 ports, which can be considered one and the same.

Entertainment and Office

In terms of entertainment, first of all, the sound quality can only be said to be better than nothing, just like the feeling of the phone speakers in the era of function machines more than ten years ago, and really can not find any Angle to praise it.

If it is used at home, with a set of audio is essential, external support to connect up to two monitors, this is very convenient to use.

I often have two screens and one secondary screen without any problem. Then, since there is no description on the official website about whether the 8-core GPU of M1 supports high-brush, I specially went to test it and used TPV 34-inch 144Hz high-brush curved fish-belt screen.

You can choose a maximum refresh rate of 100Hz, so the M1 integrated GPU will support a high refresh rate, no doubt, not up to 144Hz, I suspect because THE cable I use is HDMI, if using USB4 should be fine.

As for the game, because I was immersed in work and didn’t have time to try it, my old Mac was a mechanical hard disk, running starcraft II would be relatively hard, and the game experience would not be affected if the effects were all turned off, and American Server LOL would run smoothly.

In addition, War Thunder also missed the screen, the screen obviously has a jump frame, but can also play, this M1, I have time to try again, if you just want to play LOL and other Tencent games, START take it away.

Tencent cloud game platform, do not need to install game client, do not need to wait for a long time each version update, with the local hardware is good or bad, binding WeGame login to play.

The only drawback is the clarity of the picture, similar to watching a video, if the Internet speed is not good, the picture will be too blurred to put skills.

Also, some people buy a Mac with dual operating systems the first thing they do. Windows is probably more comfortable for most people, and you can play a lot of games, so M1 is probably disappointing.

M1 does not support the installation of Windows at the moment, so it cannot use Boot Camp to install dual systems (Microsoft needs to authorize ARM version of Windows system to Apple and a series of obstacles).

Boot Camp does not work, but for those who really need To use Windows, it can also be implemented through virtual machines. There is no need for heavy Windows users to buy M1.

Or support to support our national enterprises (Huawei, millet in the high-end of the book are doing good), through virtual machine installation Windows online many tutorials, I have no time to toss, did not try.

Another interesting aspect of the M1 is the inclusion of a neural network engine, which was first introduced in the A11 chip, and which I didn’t test because I’m not currently involved in machine learning.

Need to mention in addition, on/off speed, is really fast, because of the need for external display, so it will lead to signal delay, press the switch after the screen did not feel very fast, but as soon as the progress bar appears, shua passed.

Then enter the password to enter the desktop, the whole process is second level, just like the feeling of the screen light of the android phone with a bit of lag, although the x86 is also fast, but when you compare, the gap is clear at a glance.

Note: On July 26, when I was writing the demo, I found that the M1 chip could not support the keyword IB_DESIGNABLE, and the effect could not be seen in the StoryBoard. I also reported an error, but there was no specific error message. The demo project worked well on my colleague’s Intel book.

So I checked “open with Rosetta” in Xcode and restarted Xcode. At this time, there was an error message as shown in the picture below.

But could not solve this problem, finally gave up, think there should be no solution at present, may be my posture is wrong, if you know how to solve it, please tell me, thank you.

On August 5th, I pulled a tableView with a StoryBoard, and the simulator ran. When sliding, it lost the Bounce On Scroll effect, so it stopped when I let go, and when sliding quickly, the effect was also wrong, it would Bounce quickly. Similarly, I tried scrollView, and the same thing happened. There is no problem with the real one.

I guess it is caused by translation. Sure enough, after unchecking “open with Rosetta”, the simulator runs without any problems. It is most likely that the simulator is not properly adapted after translation.

conclusion

From the point of view of iOS developers, it is absolutely no problem to buy M1 as the main development force, which is unreasonably fast. The small issues encountered at present will not affect the development of functional requirements or even the progress of the project. In addition, As Apple’s own software, Xcode will definitely fix these problems in the future.

The experience is only going to get better, and I think it’s fun to use it in one way or another, if you’re a person who likes to be challenged, and if you want stability and a sense of formality, Then Intel is probably for you.