6

I am currently building an iOS app written in Objective-C and Swift containing the openssl and openldap frameworks, which builds and runs without any issues.

However, when I try to archive the app for release, the below errors occur:

The Errors

Here is some additional information:

  • The Xcode version is 7.3.1 (7D1014)

  • The project is an Xcworkspace (contains a podfile, but the frameworks are not integrated through Cocoapods)

UPDATE:

After further testing, another makefile error occurred (similar issue in any case)

Second Image

This image illustrates all the frameworks and libraries used and the errors that occur.

Here is the build log:

more detail

I appreciate any assistance and would be happy to provide any additional information.

Note: I am still looking for answers in order to solve this issue

GJZ
  • 2,482
  • 3
  • 21
  • 37
  • I'm not sure if it matters, but `Makefile-openssl` is *not* provided by the OpenSSL project. Someone else provided it. You might try excluding it from the archive operation since its not an OpenSSL file and its breaking the archival operation. Also see [Is there a way to exclude some files from submitting to the iOS app store](http://stackoverflow.com/q/12500860). – jww Sep 04 '16 at 00:45
  • @jww The makefile cannot be excluded from the project using the method you mentioned as it does not appear in Copy Bundle Resources – GJZ Sep 04 '16 at 05:38
  • 1
    It sounds like an Xcode bug; file a RADAR and hope that Apple fixes it. In the interim, maybe you can just delete `Makefile-openssl` since its not needed once the library is configured and built. Also be aware... I've seen *a lot* of problems with those POD builds of OpenSSL because they don't configure properly; especially the fat ones. See, for example, [Build Multiarch OpenSSL on OS X](http://stackoverflow.com/q/25530429). The same applies to all multiarch builds, and not just OS X. – jww Sep 04 '16 at 05:40
  • I'll try that out - what about the OpenLDAP make file? @jww – GJZ Sep 04 '16 at 08:55
  • @jww It didn't work - the same error occurred when removing the target - and removing the files further caused problems. – GJZ Sep 05 '16 at 19:31
  • 1
    It would be helpful if you actually included the full error message. The screenshots are not sufficient. If you look at the build log, it will give you the actual error. – Mobile Ben Sep 05 '16 at 20:07
  • Right away @MobileBen – GJZ Sep 05 '16 at 20:09
  • Where did you get Make-openssl? Is it running a script? The error message is "clear", however without knowing what the actually script and how that target is configured, etc, it is hard to diagnose. As an FYI, I do use openssl and build it via command line. – Mobile Ben Sep 05 '16 at 20:17

1 Answers1

5

I'd actually recommend something completely different. Making opens and openldap as standalone universal static libraries that you just link to. Presumably, this is what Makefile-openssl and Makefile-openldap are doing (making the universal lib)

"Why would I do such craziness?" you may be thinking. The code for openssl and openldap are not changing ... unless you have a unique case where you have forked the code and have some modification (which would probably be a bad thing). Thus there is no need to continually re-build it.

"Ahh but what about if I want to update the version?" you may be thinking. Then get the latest source and build it once. Done.

The benefits are that you are not wasting time building those libraries. While you could say it is not big deal right now, as projects get bigger, you're just wasting time re-building libraries that are not in active development. Additionally, you don't have to worry about any weird build issue like this.

For some projects I've been working on, I've convinced them to even make a pre-built library of all the cocoa pods libs we need in the project. Which has had the added benefit of keeping our main project a bit cleaner of the pods nastiness (I know some people will disagree) in your project.

Mobile Ben
  • 7,121
  • 1
  • 27
  • 43