Build an archive of Phonegap project in Xcode - xcode

I created an Phonegap app for iOS devices. It works fine on my connected device, but if I want to archive the app to get an .ipa file I get errors from the compiler.
Do I have to change something in the Build Settings?

A couple of things to try:
Go to the Build Settings, then Linking, then find Other Linker Flags. Then change $(TARGET_BUILD_DIR)/libCordova.a -----> $(BUILT_PRODUCTS_DIR)/libCordova.a
Under Build Settings in Architectures, change Build Active Architecture Only to YES.
I'd try both these methods for the Project and Target. Hope this helps!

Related

Mac Catalyst build fails with "building for Mac Catalyst-x86_64 but attempting to link with file built for Mac Catalyst-arm64"

After updating to Xcode 12.2, my project started failing to compile because of Apple Silicon-related linking errors. I seem to have most of them fixed, but one sub-project that builds a statically-linked framework is giving me problems. And yet a sibling sub-project with apparently identical build settings doesn't.
During linking, I get this warning about the one framework:
ld: warning: ignoring file ...Build/Products/Debug-maccatalyst/TCSiOSC.framework/TCSiOSC, building for Mac Catalyst-x86_64 but attempting to link with file built for Mac Catalyst-arm64
I'm building on an Intel Mac, to boot (so "build active architecture only" is not a factor). I can't find any build setting that would address this problem, and a Web search turns up no hits on this exact error. Any ideas appreciated!
I consulted Apple for this one, and their engineer recommended some things:
Turn any Swift sub-projects into Swift packages, not embedded Xcode projects. So, I deleted one library's Xcode project from the parent project, and dragged its top-level directory into the parent project to include it as a Swift package. Now... this particular sub-project (SQLite.swift) already had a Swift package defined. I haven't generated a Swift package myself before, so I can't help with that. Also, don’t forget to add it to the Frameworks, Libraries, and Embedded Content list on the app’s target.
Go into your project's build settings and delete the "Supported platforms" setting. If you click on the "levels" button above the build-settings list, you can see where each setting is coming from. "Supported platforms" should be non-bold. Highlight the line and press Delete if it's bold. Then go into your target and do the same thing: delete "Supported platforms."
Set the Base SDK at your project (top) level to iOS; this is a must. Delete it from the target level, so it inherits from the project; I don't know if this holds true for multiple kinds of targets or all projects, but it's working for me.
Remove the VALID_ARCHS build setting from all targets, if it's present. That setting is deprecated.
The "build active architecture" setting doesn't make any difference after these changes in my case. The project now builds and runs under Catalyst just fine.
I have the same issue and found this question. In my case, building on Debug succeeds but on Release fails. The reason is exactly the "build active architecture only" option. It is an option can be found in your PROJECT - "Build Setting" Tab then "Architectures" section. There is a setting for "Build active architecture only". By default, the Debug mode it is Yes while Release mode it is no. That caused my build to fail in release.

building from xcode source, missing "pods" library

Attempting to build an ios project downloaded from the
build server, I get a link error complaining that the
"pods-develop" library was not found. There's also a
pods xcode project, but building it doesn't change the
outcome.
What information am I missing?
Do you have these hints in your Codename One propertie's build hint ?
ios.pods.sources=,https://github.com/CocoaPods/Specs.git
ios.objC=true

Google iOS SDK fails to archive (use of undeclared identifier errors)

I have attempted to archive my project for submission to App Store, however, every time I get errors "use of undeclared identifier" for everything related to google iOS SDK. The application itself runs and builds flawlessly with the discussed SDK integrated, the only thing that fails is the archive process. I have tried both cocoa pods and manual method of integration (separately, of course). Furthermore, I used the latest xCode versions (6.4 and 7 beta 4) on two different macs running OS X 10.10.4. This is the guide I have been using.
Your issue has something to do with the configuration of archiving in combination with your Release settings. If you change the scheme settings Command + < to use the Debug configuration for archiving, you may be able to successfully archive your app. This means that somewhere you are probably not matching the Debug and Release configurations.
See the following screenshot for example project Build Settings that are missing the Swift bridging header in release:
Add bridge.h to the release configuration and you will be able to build with the Release schema and you will be able to archive under release configuration.

Checked Out New Project in XCode 6.1 but XCTest and other libraries are missing

Today I checked out a new copy of stable project from gitHub to my home computer using Xcode 6.1. After doing so, I see that many of the frameworks and libraries, including XCTest, are missing (shown in red). I have added Framework and Header Search Paths, but they are still not found.
To make things stranger, I can build the project to a simulator or device, but when I try to run an individual test, I get clang or missing file error for the libraries/frameworks shown in red.
As it turns out, the reason for my errors was that I had not run "Build for Testing" before trying to run the individual Unit Tests. As such, the proper library dependencies had not been generated.

Run on device from xcode after making archive

I have a project in Xcode 4.5.2. I was able to run the project to a device from Xcode until I built an ad-hoc version with the "archive" function. (After changing the code signing).
Now, when the device is plugged in I get the error "CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 6.0'".
I have checked which profiles are selected under "Code Signing" in build settings, trying both the generic "*" profile, and the profile I used to build the ad-hoc release (For both debug and release builds).
What confuses me is I can build the project and install it to the device through ITunes without issue. It seems it's now running the 'release' version and not the 'debug' version when building with a device connected now. The device is in the provision profile however, so shouldn't it work either way?
I've tried
Restarting xcode,
Deleting the derived data (From finder, not through the organizer),
Deleting and reinstalling the provision profile.
Any help would be appreciated!
When you create your provisioning profile, make sure its a Distribution profile with your devices UDID on it.
I use a site called www.testflightapp.com, which will also help automate this process for you. Hope that helps

Resources