Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 339 Vote(s) - 3.47 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Found an unexpected Mach-O header code: 0x72613c21 in Xcode 7

#11
Take a look at this **Apple** documentation
[Embedding Frameworks in An App][1] go to the section **Embedded Static Libraries** they explain this error like this:

> This is caused by placing a static library in a bundle structure that looks like a framework; this packaging is sometimes referred to by third party framework developers as a static framework. Since the binary in these situations is a static library, apps cannot embed it in the app bundle.

They also provide a way to fixed:

> you can solve this error by identifying the static framework and removing it from the Embedded Binaries section.

You accomplish this by following the instructions in [Inspecting A Binary's Linkage][2]




[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply

#12
Remove them from `Embedded Binaries` and add them to `Linked Frameworks and Libaries`, then Archive again and upload to store.
Reply

#13
Check two things for every framework:

1. The Mach-O type of the framework (in Build Settings of the framework target)

[![Mach-O][1]][1]

2. Whether you copy the framework by putting it in Build Phases -> Embed Frameworks (or Copy Bundle Resources as mentioned by a. brooks hollar)

[![Embed frameworks][2]][2]

If the Mach-O type of the framework is "static library", it should *not* be put in embed frameworks; if the Mach-O type is "dynamic library", it *should* be put in embed frameworks.

In my case it was SocketRocket I added manually which has both a static library target and a dynamic library target with the same framework name. After deleting the static library target and only embed the dynamic library framework, the problem disappears.

---

*Note*:

If you don't have access to the source project, you can manually check if it's a dynamic or static framework using this approach:

[To see links please register here]


[1]:

[2]:
Reply

#14
For me, I had Fabric binaries in my Carthage `/usr/local/bin/carthage copy-frameworks` run script.

After removing those, it fixed the issue.

I'm using Xcode `Version 9.4.1 (9F2000)`
Reply

#15
My way of fixing this was to get back to `Fabric/Crashlytics` installation via Cocoapods instead of fancy Carthage setup (which appeared buggy).
Reply

#16
Given the amount of time I've poured into finding this problem, it was caused by Cocoapods. I was working on a Workspace that had both iOS apps and a command line tool to kick off some pipelines and stuff. My file looked like this:

```
target 'AppPipe' do
platform :osx, '10.14'
project 'AppPipe/AppPipe.xcodeproj'
pod 'Yams'

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['MACH_O_TYPE'] = 'staticlib'
end
end
end
end

```
I thought the `pods_install` hook was local to the scope I was writing it in, but it wasn't! It actually turned all of my target's configs into staticlibs! This fixed it:
```
target 'AppPipe' do
platform :osx, '10.14'
project 'AppPipe/AppPipe.xcodeproj'
pod 'Yams'
end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
# Only AppPipe always gets staticlib
if target.name == 'AppPipe'
config.build_settings['MACH_O_TYPE'] = 'staticlib'
end
end
end
end
```
Reply

#17
I don't know why but somehow pods appeared to become an **embedded binary**. So I had to remove it, pod install once more, and the issue disappeared.

[![enter image description here][1]][1]


[1]:


On Xcode 11 you need to change it to `Do Not Embed` in the Frameworks, Libraries, and Embedded Content.
Reply

#18
In XCode 11, click on the project file, select your target, then on General tab expand Frameworks, Libraries, and Embedded Content, change Embed & Sign to Do Not Embed.
Reply

#19
Check and looking for duplicate frameworks and Libraries in **Link Binary With Libraries** and **Embed Frameworks** in Build Phases tab of your project.

Only should be in one side ...
Reply

#20
If you have an Xcode project for a static framework, your test target must have "Bundle" value for MACH_O_TYPE build setting:

[![enter image description here][1]][1]


[1]:
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through