Xcode 7.1 Swift Framework App Builds But Not Archiving

xcode 7.1 swift framework app builds but not archiving

xcode requires that bitcode for all embedded frameworks is generated during archiving.

Copying the release build of framework/dylib isn't enough

do

archive the framework and THEN use the archived version of the framework from then on.

to get xcode to archive a framework (normally it only archives apps), set the build setting 'skip install' to NO for the framework target!

Project Builds and Runs, but does not Archive

The issue was to do with the iOS Deployment Target setting:

  • The main project: iOS 10
  • Sub project: iOS 11

In Debug it is building only for the current architecture, in Release it builds for all. Obvious once you know.

Setting the sub project to build for iOS 10 fixed the issue.

The most frustrating part: I double checked the build log and it doesn't mention the version issue anywhere :(

Xcode 7.1 hangs while archiving swift ios app

For anyone else facing the same issue. After trying and failing everything else, it was fixed by restarting the mac :D

Apple framework not found when building Archive

Looks like the way around this issue is with a canImport(module) preprocessor directive. This worked for me:

#if canImport(RealityKit)

import RealityKit

@available(iOS 13.0, *)
class MyARClass {

@IBOutlet weak var arView: ARView!

...
}

#endif

iOS app fails to create archive in Xcode but builds fine

Adding this to my "Header Search Paths" fixed the problem.

"$(BUILD_ROOT)/../IntermediateBuildFilesPath/Headers"

Apparently certain folders where the headers reside are not built during the "Archive" process.

Flutter for iOS run, build but not archive

This is an issue that occurs in version 13.3 of Xcode. In Xcode 13.3, if you have a code that uses UI_USER_INTERFACE_IDIOM(), you will get an "Out of Memory" error when you run Archive.
Changing "UI_USER_INTERFACE_IDIOM()" to "UIDevice.current.userInterfaceIdiom" resolves the error.

Currently, we have the following solutions.

  • Modify the code,
  • Downgrade to Xcode 13.2.1
  • Wait for Apple to modify Xcode

References

  • https://developer.apple.com/forums/thread/702200
  • https://bugs.swift.org/browse/SR-16003
  • https://github.com/longitachi/ZLPhotoBrowser/issues/699

Xcode won't archive Swift iOS app with a Swift framework as a separate target. How can this be fixed?

I have run into this frustrating problem before myself. It seems that with pure Swift framework targets the Objective-C header file causes intermittent or strange build errors (Xcode bug?). It seems counter-intuitive but part of the solution at least is to either change the header file from public to project or simply remove it from the build target. I wish I had a better explanation as to why this works!

I have forked your project and created a build (that works on my machine at least) here: https://github.com/acwright/X-Schedule

Hope this helps!



Related Topics



Leave a reply



Submit