Closed duribreux closed 3 years ago
Building standalone frameworks and archiving is missing in the plugin.
Hi, struck with the same problem. Any update on this ?
Building frameworks should be possible. I have created an example with this project: https://github.com/openbakery/OBInjector
When you execute ./gradlew archiveFramework
a zip archive is created in ./build/distributions
(The example is not a swift project, but this should not make any difference)
Hi, Tried your Gradle script. still getting the same error. Am I missing something ?
Task :archiveFramework FAILED
FAILURE: Build failed with an exception.
Could not list contents of '/build/sym/Release-iphoneos/TEST.framework/TEST'. Couldn't follow symbolic link.
When you execute the buildFramework
is the framework built in /build/sym/Release-iphoneos
?
Yes its there for both simulator and iphoneos. But my framework has the dependency of .a file. is it problem?
Finally, it worked by separately building debug and release [simulator + iphoneos]. The below task will create TEST.framework.zip in 'buildDir/nexus_build' directory. is it possible to build debug and release [simulator + iphoneos] in single shot?
task packageDistribution(type: Zip) { archiveName = "TEST.framework.zip" destinationDir = file("$buildDir/nexus_build")
from "$buildDir/sym/Release-iphoneos/TEST.framework" }
You can define your tasks by yourself in your build.gradle file. Just create a task buildSimulator
and a Task buildRelease
and the packageDistribution
depends on both.
Hi, The built framework is working for simulator app. But when I try to use it for iphoneos app getting the following error.
/Pods-TestApp/Pods-TEST-frameworks.sh: line 104: EXPANDED_CODE_SIGN_IDENTITY: unbound variable Command PhaseScriptExecution failed with a nonzero exit code
I guess its due to signing issue. Could you tell me what's wrong with the following TESTAPP code signing? Also, I'm not doing any signing for my built framework.
signing { certificateURI = 'file:///Users/saravanan/Desktop/certificates/Certificates.p12' certificatePassword = 'test' mobileProvisionURI = 'file:///Users/saravanan/Desktop/certificates/saravanandev.mobileprovision' }
That issue could be from cocoa pods. Basically a newer version of cocoa pods may be able to fix it Reference to the issue here There is also a pre-released version rather than the beta version of cocoa pods in release 1.6.0.rc.2
Yes, I think I had the same issue.
I'm working on a Swift
framework
and I would like to create asdk.framewok
like I do fromXcode
interface withproduct > archive > export
process.This is my
build.gradle
:As you can see, there is nothing special. I also have part to override
test
task but that's irrelevant (Just changing scheme, target and configuration)This is the error I have running
gradle archive
Obviously running
zip --symlinks --verbose --recurse-paths /path/to/project/build/archive/sdk.zip . -i sdk.app
doesn't help.And my
build/
folder generated:Since you're often asking for it, this is my
gradle infoPlistModify --debug | grep org.openbakery.XcodeProjectFile
outputI did try a lot of variations in my
build.gradle
but without any success. Maybe it's simply not the good command, maybe it's not possible, i didn't find any input aboutarchive
in the documentation.Thanks