Tag Archives: xcode

[Solved] Message from debugger: debug-server is x86_64 binary running in translation, attached failed.

After transferring an Xcode project from an Intel Mac to an Apple M1 chip, code compiles successfully on the M1 chip, but displays the following error at runtime:

Message from debugger: debug-server is x86_64 binary running in translation, attached failed.

insert image description here

Solution:

I have checked Xcode’s “Open with Rosettea” option, but it still doesn’t work successfully on the M1 chip. So this program doesn’t work for me. . .
insert image description here
Valid solutions:
Find Edit Scheme -> Run -> Debug excitable, Cancel this option to run successfully.
insert image description here
Note: If this method fails to Solve your problem, Please refer to the link below:
debugserver is x86_64 binary running in translation, attached failed. Could not attach to pid

Failed to register bundle identifier. The app identifier “xxx” cannot be registered to your developm

Error

Failed to register bundle identifier. The app identifier “xxx” cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.

Provisioning profile “iOS Team Provisioning Profile: *” doesn’t support the Associated Domains and Push Notifications capability.

Provisioning profile “iOS Team Provisioning Profile: *” doesn’t include the aps-environment and com.apple.developer.associated-domains entitlements.

Please add picture description

Solution:

Log in to Xcode with the apple account that supports the APP, and select the team where the account is locatedPlease add a picture description

As shown in the picture, Select the team corresponding to the account
Please add a picture description

How to Solve Xcode 14 Pod Signature Error

Background:

After pod install with Xcode 14, If there are bundle resource files in the library, an error will be reported during compilation, error: “igning for “xxxxx” requires a development team. Select a development team in the Signing & Capabilities editor.”

Solution:

Option 1:
Set the bundle identifier and team for the pod library that reported the error one by one.

Disadvantages: Our configuration will disappear after each execution of pod install, Need to manually set it again

Option 2:

Add the following configuration in Podfile, add and then re-pod update

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings["DEVELOPMENT_TEAM"] = " Your Team ID &# 34;
         end
    end
  end
end

If you don’t want to set a specific team ID, try the following configuration:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" 
      target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
      end
    end
  end
end

The above solution comes from: https://github.com/CocoaPods/CocoaPods/issues/11402

IOS Adds C File Error [How to Solve]

Reason: This is actually the logic of using pch files in Xcode compilation, after introducing c files in the project, pch will mix #include and #import, in order to reduce compiler workload, you need to use precompiled macros to make a slight distinction.

Solution: Check all pch files in the project and put “#import xxx”, which is only used in OC, in “#indef __OBJC__” and “#endif”

#ifndef PrefixHeader_pch
#define PrefixHeader_pch

#ifdef __OBJC__

#import "Masonry.h"

#endif


#endif /* PrefixHeader_pch */

[Solved] Mac git clone error:xcrun:error:invalid active developer path(/Library/Developer/CommandLineTools)

Background

After upgrading the MAC system, using git clone and other related commands on the terminal fails with an error

xcrun:error:invalid active developer path(/Library/Developer/CommandLineTools),missing xcrun at:/Library/Developer/CommandLineTools/usr/bin/xcrun

Troubleshooting

1. Check whether git has been installed

# command
which git

# outcome
/usr/local/bin/git

Description git has been installed

2. View git help information

git --help

Error reporting is the same as above:

xcrun:error:invalid active developer path(/Library/Developer/CommandLineTools),missing xcrun at:/Library/Developer/CommandLineTools/usr/bin/xcrun

to sum up, GIT has been installed, but the GIT command cannot be used normally. It may be that the GIT installation package is damaged, so reinstall git

3. Reinstall Git

brew install git

The following error messages appear during installation:

Error: The following formula:
  git
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:
  xcode-select --install

Error: Git must be installed and in your PATH!
Error: The following formula:
  git
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:
  xcode-select --install

according to the prompt, you need to reinstall xcode-select

Solution: install xcode-select

To sum up, we need to reinstall xcode-select and execute the following commands on the terminal

 xcode-select --install

After installation, perform the following:

git --help

The correct output of information indicates that git has returned to normal and can be used

 

[Solved] IOS ipa Pack Upload Error: ERROR ITMS-90165

Error itms-90165 is reported when the IPA package is uploaded recently; the full error message is as below:

ERROR ITMS-90165: "Invalid Provisioning Profile Signature. The provisioning profile included in the bundle xxx

 

The problem is that Apple officials updated the new signature verification mechanism on April 12, resulting in the signature error;

Solution:

Go to the official website of Apple Developer, find the profile certificate of the corresponding certificate, click Edit, and then click save directly (there is no need to modify anything). After downloading again, double-click to add it to the key chain, and then package and upload it again.

[Solved] Homebrew Error: xcrun: error: invalid active developer path

Recently, I found an error when installing things with homebrew. It turned out that homebrew was not adapted after my Mac updated maxos big sur11. In addition, the Xcode tool was deleted before, resulting in the following error:

Input directly at the terminal and xcrun will be installed

xcode-select --install

It can be used directly after installation

[Solved] Mac homebrew error: Error: homebrew-core is a shallow clone.

Mac command line execution:

brew update 

The following error is reported:

Error: 
  homebrew-core is a shallow clone.
To `brew update`, first run:
  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
This command may take a few minutes to run due to the large size of the repository.
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!

The cause of this problem is usually the problem caused by the system update.

Solution: delete the homebrew core and then update it

cd /usr/local/Homebrew/Library/Taps/homebrew
rm -rf homebrew-core
brew upgrade

[Solved] IOS Error: Command MergeSwiftModule failed with a nonzero exit code

environment

Xcode13. 2 the first project created is set. The minimum version of IOS is 15.2, which has been compiled several times. The minimum IOS version of the switching project is IOS 10.0 After 0, the following errors appear:

error: Command MergeSwiftModule failed with a nonzero exit code

Solution:

Method 1: clean (Command + Shift + k)

Method 2: Change (Project -> target -> builfsetting -> compilation mode -> debug -> switch to whole module) (but this may slow down subsequent compilation)