Tag Archives: Xcode error

How to Solve Xcode Error: could not attach to pid “xx”

This problem occurs when you start Xcode to run the project recently. Start it again or start it a few more times, and you can run the project normally.

Popularize it: PID (Process Identifier) ​​is called Process Identifier in English, and it also belongs to electrical and electronic technical terms.
PID is the identity of each process. Once the program runs, the system will automatically assign a unique PID to the process. After the process is terminated, the PID is reclaimed by the system and may continue to be assigned to the newly running program.
The PID column represents the process ID of each process , that is to say, PID is the identity of each process.
Reason: pid is a sign of unix allocation of resources, which means that it may be related to the version of the Mac system.

Solution:
1. clean the project (command+shift+k)
2. restart simulator if you use it
3. re-build
4. run it again.

There is no good solution yet, mainly relying on re-build.

Xcode Error: Command CodeSign failed with a nonzero exit code

Some solutions on the Internet are: Command + K, and then restart the computer. Just run it again.

But it is invalid for me. My reason is that the system library import location of accounts. Framework (the part circled in red below) is wrong. So I deleted the library and re imported it to run normally.

How to delete and add: select targets – & gt; build phases–> Link binary with libraries, find the corresponding library (I’m here accounts. Framework), click minus sign to delete, and click plus sign to add.

 

[IOS Development] Xcode console keeps printing ‘Status bar could not find cached time string image. Rendering in-process.’

Problem: I have encountered some strange phenomena recently. When developing an iOS project, I observed that the Xcode console prints at regular intervals Status bar could not find cached time string image. Rendering in-process.as shown in the figure below:

It seems that it has no effect on the operation of the program, but when debugging, the console outputs some useless information, which is very uncomfortable.

 

solve:

  • Method 1: Target-> Deployment Info-> CheckHide status bar

But this method still doesn’t work for me, so I have to look for another method.

  • Method 2: Product-> Scheme-> Edit Scheme-> Run-> Arguments-> Environment VariablesAdd a OS_ACTIVITY_MODEfield to the value Disable.

 

This method solves my problem perfectly.