Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create .ipa file instead of .app file #155

Closed
AkhileshwarBV opened this issue Mar 13, 2015 · 21 comments
Closed

Create .ipa file instead of .app file #155

AkhileshwarBV opened this issue Mar 13, 2015 · 21 comments
Labels

Comments

@AkhileshwarBV
Copy link

Hi renep,
I am creating Xcode build through gradle plugin
I am using the gradle xcodebuild command to run the script

I can able to create .app file and app.dysm file in /build/sym/Release-iphoneos folder
but I am expecting the .ipa file instead of .app file

please could you guide me to create .ipa file instead of .app file

screen shot 2015-03-13 at 4 31 59 pm
screen shot 2015-03-13 at 4 31 59 pm

here I am seining you my build script:

buildscript {
repositories {
maven {
url('http://openbakery.org/repository/')
}
mavenCentral()
}
dependencies {
classpath group: 'org.openbakery', name: 'xcodePlugin', version: '0.9.+'
}
}
apply plugin: 'xcode'

xcodebuild {
configuration='Release'
sdk = 'iphoneos'
target = 'Test'
signing {
identity = 'iPhone Distribution: Republic Services Inc. (YKXBJ5R297)'
certificateURI = 'file://localhost/Users//PrivateKey.p12'
certificatePassword = pwd
mobileProvisionURI = 'file://localhost/Users/Employee_Directory_Adhoc-3.mobileprovision'
}

}

@AkhileshwarBV AkhileshwarBV changed the title Xcode gradle Create .ipa file instead of .app file Mar 13, 2015
@renep
Copy link
Contributor

renep commented Mar 13, 2015

If you run 'gradle package' you should find the ipa in the 'build/package' directory.

@renep renep added the question label Mar 13, 2015
@AkhileshwarBV
Copy link
Author

Thank you for quick replay,
When I tried with gradle package

pbxddxl:Test deltatechnology$ gradle package
Defining custom ‘build’ task is deprecated when using standard lifecycle plugin has been deprecated and is scheduled to be removed in Gradle 3.0

FAILURE: Build failed with an exception.

  • What went wrong:
    Task 'package' not found in root project 'Test'.
  • Try:
    Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2.651 secs
pbxddxl:Test deltatechnology$

I got the above error

@AkhileshwarBV
Copy link
Author

Hi renep,

by using gradle archive command I can able to make
.app file and .ipa and also app.dysm

Thank you renep

@renep
Copy link
Contributor

renep commented Mar 13, 2015

Ah, I see the problem, use version 0.10.+ not 0.9.+

@AkhileshwarBV AkhileshwarBV reopened this Mar 16, 2015
@AkhileshwarBV
Copy link
Author

I am using gradle-2.3

my terminal commands

pbxddxl:Test deltatechnology$ gradle -v


Gradle 2.3

Build time: 2015-02-16 05:09:33 UTC
Build number: none
Revision: 586be72bf6e3df1ee7676d1f2a3afd9157341274

Groovy: 2.3.9
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_31 (Oracle Corporation 25.31-b07)
OS: Mac OS X 10.9.5 x86_64

pbxddxl:Test deltatechnology$

Thank you,
Akhileshwar Babu

@renep
Copy link
Contributor

renep commented Mar 16, 2015

And?

@AkhileshwarBV
Copy link
Author

I dont understand what is this 0.10+version

Thanks & regards,
Akhileshwar Babu V

@renep
Copy link
Contributor

renep commented Mar 16, 2015

you have in your build file the following line:

classpath group: 'org.openbakery', name: 'xcodePlugin', version: '0.9.+'

You say here that you want to use the latest 0.9 version of this gradle plugin, which is 0.9.15

But where is a newer 0.10.2 version already release with improvements for swift etc.
Also it has a package task that was introduced with 0.10.0.

Therefor you need to change the line if you want to use the new 0.10.2 version:

classpath group: 'org.openbakery', name: 'xcodePlugin', version: '0.10.+'

@AkhileshwarBV
Copy link
Author

Hi renep
now I can able to run package task with 0.10+

but archive task is not working please see my o/p

pbxddxl:Test deltatechnology$ gradle package
:xcodebuildConfig
:infoplistModify
Updating /Users/deltatechnology/Documents/Test/Test/Info.plist
:keychainClean
:keychainCreate
:provisioningClean
:provisioningInstall
:xcodebuild
OK - Compile: Test/MasterViewController.m
OK - Compile: Test/AppDelegate.m
OK - Compile: Test/main.m
OK - Compile: Test/DetailViewController.m
OK - Compile: Test/AppDelegate.m
OK - Compile: Test/MasterViewController.m
OK - Compile: Test/main.m
OK - Compile: Test/DetailViewController.m
OK - Linking: build/obj/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/Test
OK - Linking: build/obj/Test.build/Release-iphoneos/Test.build/Objects-normal/arm64/Test
OK - Compile: Test/Base.lproj/Main.storyboard
OK - Compile: Test/Base.lproj/LaunchScreen.xib
Done
:archive FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':archive'.

    exec returned: 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 17.497 secs
pbxddxl:Test deltatechnology$

Thanks & regards,
Akhileshwar Babu V

@renep
Copy link
Contributor

renep commented Mar 16, 2015

Try to run with '--info' or '-i' parameter, then you see more detail.
I'll guess that there is something wrong with your sign settings.

@AkhileshwarBV
Copy link
Author

Here I am sending you the o/p of my terminal

but same settings were working fine with 0.9+ version, there I can able to archive the file
and also with v-0.9+ I can make a build but archive is not working

pbxddxl:Test deltatechnology$ gradle --info
Starting Build
Settings evaluated using empty settings script.
Projects loaded. Root project using build file '/Users/deltatechnology/Documents/Test/build.gradle'.
Included projects: [root project 'Test']
Evaluating root project 'Test' using build file '/Users/deltatechnology/Documents/Test/build.gradle'.
All projects evaluated.
No tasks specified. Using default task 'help'
Selected primary task 'help' from project :
Tasks to be executed: [task ':help']
:help (Thread[main,5,main]) started.
:help
Executing task ':help' (up-to-date check took 0.001 secs) due to:
Task has not declared any outputs.

Welcome to Gradle 2.3.

@renep
Copy link
Contributor

renep commented Mar 16, 2015

run gradle archive --info

@AkhileshwarBV
Copy link
Author

Please look into this

pbxddxl:Test deltatechnology$ gradle archive --info
Starting Build
Settings evaluated using empty settings script.
Projects loaded. Root project using build file '/Users/deltatechnology/Documents/Test/build.gradle'.
Included projects: [root project 'Test']
Evaluating root project 'Test' using build file '/Users/deltatechnology/Documents/Test/build.gradle'.
All projects evaluated.
Selected primary task 'archive' from project :
Tasks to be executed: [task ':xcodebuildConfig', task ':infoplistModify', task ':keychainClean', task ':keychainCreate', task ':provisioningClean', task ':provisioningInstall', task ':xcodebuild', task ':archive']
:xcodebuildConfig (Thread[main,5,main]) started.
:xcodebuildConfig
Executing task ':xcodebuildConfig' (up-to-date check took 0.001 secs) due to:
Task has not declared any outputs.
infoPlist: Test/Info.plist
devices: UNIVERSAL
isOSX: false
Xcode 6.1.1
Build version 6A2008a
/Applications/Xcode.app/Contents/Developer/usr/bin/simctl
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
Resizable iPhone (com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone)
Resizable iPad (com.apple.CoreSimulator.SimDeviceType.Resizable-iPad)
== Runtimes ==
iOS 7.0 (7.0 - Unknown) (com.apple.CoreSimulator.SimRuntime.iOS-7-0) (unavailable, runtime path not found)
iOS 7.1 (7.1 - Unknown) (com.apple.CoreSimulator.SimRuntime.iOS-7-1) (unavailable, runtime path not found)
iOS 8.1 (8.1 - 12B411) (com.apple.CoreSimulator.SimRuntime.iOS-8-1)
== Devices ==
-- iOS 7.0 --
-- iOS 7.1 --
iPhone 4s (2953835A-9BC5-4F66-B901-57F0E40F1A34) (Shutdown) (unavailable)
iPhone 5 (484259D5-06B1-4E82-89C2-A7111405B356) (Shutdown) (unavailable)
iPhone 5s (811F758F-B10E-4CE7-A97B-B905E0BAD2FC) (Shutdown) (unavailable)
iPad 2 (4527C195-FFB3-47DD-AE74-8C49F36BBAB6) (Shutdown) (unavailable)
iPad Retina (9A988884-880F-4405-B26F-4F1AB4519371) (Shutdown) (unavailable)
iPad Air (C62EC7DC-DA9C-4347-8808-9F8CB18DCBB5) (Shutdown) (unavailable)
-- iOS 8.1 --
iPhone 4s (4C9BDD18-5426-4EBD-8948-F271AFB632ED) (Shutdown)
iPhone 5 (5942CBCD-B38A-40F0-9E66-EB9A5B5C87F0) (Shutdown)
iPhone 5s (0026F641-8AEF-4267-9A28-9DE79029B2A5) (Shutdown)
iPhone 6 Plus (5C76E821-A1B8-4E90-B8A1-0A30AE03FC31) (Shutdown)
iPhone 6 (0701FB8A-5740-44B6-857A-4790D191AD68) (Booted)
iPad 2 (076BE18D-F000-4459-8ECE-787CFADA9531) (Shutdown)
iPad Retina (75EFF93E-8271-438B-A56A-5711E98C69DF) (Shutdown)
iPad Air (808309DB-FDB9-439F-8AB7-3F9973FC6E13) (Shutdown)
Resizable iPhone (BB0225BD-137B-4ABF-B932-EF800434A103) (Shutdown)
Resizable iPad (6E3FDD80-EF9E-4DED-A75B-0851174DDFB6) (Shutdown)
:xcodebuildConfig (Thread[main,5,main]) completed. Took 0.27 secs.
:infoplistModify (Thread[main,5,main]) started.
:infoplistModify
Executing task ':infoplistModify' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Updating /Users/deltatechnology/Documents/Test/Test/Info.plist
:infoplistModify (Thread[main,5,main]) completed. Took 0.003 secs.
:keychainClean (Thread[main,5,main]) started.
:keychainClean
Executing task ':keychainClean' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
"/Users/deltatechnology/Library/Keychains/login.keychain"
"/Users/deltatechnology/Documents/Test/build/codesign/gradle-1426501105553.keychain"
"/Library/Keychains/System.keychain"
:keychainClean (Thread[main,5,main]) completed. Took 0.036 secs.
:keychainCreate (Thread[main,5,main]) started.
:keychainCreate
Executing task ':keychainCreate' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:get] Getting: file://localhost/Users/deltatechnology/Desktop/Cer/EmployeeDirectory/PrivateKey.p12
[ant:get] To: /Users/deltatechnology/Documents/Test/build/codesign/PrivateKey.p12
[ant:get] .
import "/Users/deltatechnology/Documents/Test/build/codesign/PrivateKey.p12" "-k" "/Users/deltatechnology/Documents/Test/build/codesign/gradle-1426501121151.keychain" "-P" "Delta#123" "-T" "/usr/bin/codesign"
1 identity imported.
"/Users/deltatechnology/Library/Keychains/login.keychain"
"/Library/Keychains/System.keychain"
:keychainCreate (Thread[main,5,main]) completed. Took 0.207 secs.
:provisioningClean (Thread[main,5,main]) started.
:provisioningClean
Executing task ':provisioningClean' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
/Users/deltatechnology/Library/MobileDevice/Provisioning Profiles/gradle-32dc6244-716b-48f1-ad3f-13893b9338a9.mobileprovision
:provisioningClean (Thread[main,5,main]) completed. Took 0.008 secs.
:provisioningInstall (Thread[main,5,main]) started.
:provisioningInstall
Executing task ':provisioningInstall' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:get] Getting: file://localhost/Users/deltatechnology/Desktop/Cer/EmployeeDirectory/Employee_Directory_Adhoc-3.mobileprovision
[ant:get] To: /Users/deltatechnology/Documents/Test/build/provision/Employee_Directory_Adhoc-3.mobileprovision
[ant:get] .
:provisioningInstall (Thread[main,5,main]) completed. Took 0.032 secs.
:xcodebuild (Thread[main,5,main]) started.
:xcodebuild
Executing task ':xcodebuild' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Build settings from command line:
CODE_SIGN_IDENTITY = iPhone Distribution: Republic Services Inc. (YKXBJ5R297)
CODE_SIGN_RESOURCE_RULES_PATH = $(SDKROOT)/ResourceRules.plist
DSTROOT = /Users/deltatechnology/Documents/Test/build/dst
OBJROOT = /Users/deltatechnology/Documents/Test/build/obj
OTHER_CODE_SIGN_FLAGS = --keychain=/Users/deltatechnology/Documents/Test/build/codesign/gradle-1426501121151.keychain
PROVISIONING_PROFILE = 32dc6244-716b-48f1-ad3f-13893b9338a9
SDKROOT = iphoneos8.1
SHARED_PRECOMPS_DIR = /Users/deltatechnology/Documents/Test/build/shared
SYMROOT = /Users/deltatechnology/Documents/Test/build/sym/class org.gradle.api.tasks.testing.Test-Development

2015-03-16 15:48:42.618 xcodebuild[1694:1007] [MT] DVTAssertions: Warning in /SourceCache/IDEFrameworks/IDEFrameworks-6611/IDEFoundation/SourceControl/Model/IDESourceControlManager.m:423
Details: Error Domain=com.apple.dt.IDESourceControlErrorDomain Code=-1 "Missing extension: public.vcs.subversion" UserInfo=0x7f8932dbb270 {NSLocalizedDescription=Missing extension: public.vcs.subversion}
Object: <IDESourceControlManager: 0x7f8932f17c10>
Method: -loadRepositories
Thread: <NSThread: 0x7f8930c143e0>{name = (null), num = 1}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
=== BUILD TARGET Test OF PROJECT Test WITH CONFIGURATION Release ===

Check dependencies

ProcessProductPackaging /Users/deltatechnology/Library/MobileDevice/Provisioning\ Profiles/gradle-32dc6244-716b-48f1-ad3f-13893b9338a9.mobileprovision build/sym/class\ org.gradle.api.tasks.testing.Test-Development/Release-iphoneos/Test.app/embedded.mobileprovision
cd /Users/deltatechnology/Documents/Test
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/deltatechnology/Desktop/gradle-2.3/bin"
builtin-productPackagingUtility /Users/deltatechnology/Library/MobileDevice/Provisioning\ Profiles/gradle-32dc6244-716b-48f1-ad3f-13893b9338a9.mobileprovision -o /Users/deltatechnology/Documents/Test/build/sym/class\ org.gradle.api.tasks.testing.Test-Development/Release-iphoneos/Test.app/embedded.mobileprovision

Touch build/sym/class\ org.gradle.api.tasks.testing.Test-Development/Release-iphoneos/Test.app
cd /Users/deltatechnology/Documents/Test
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/deltatechnology/Desktop/gradle-2.3/bin"
/usr/bin/touch -c /Users/deltatechnology/Documents/Test/build/sym/class\ org.gradle.api.tasks.testing.Test-Development/Release-iphoneos/Test.app

CodeSign build/sym/class\ org.gradle.api.tasks.testing.Test-Development/Release-iphoneos/Test.app
cd /Users/deltatechnology/Documents/Test
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/deltatechnology/Desktop/gradle-2.3/bin"

Signing Identity: "iPhone Distribution: Republic Services Inc. (YKXBJ5R297)"
Provisioning Profile: "Employee Directory Adhoc"
(32dc6244-716b-48f1-ad3f-13893b9338a9)

/usr/bin/codesign --force --sign 9A3A6FCAFA74060657E5521A26839A8E123BC6F1 --resource-rules=/Users/deltatechnology/Documents/Test/build/sym/class\ org.gradle.api.tasks.testing.Test-Development/Release-iphoneos/Test.app/ResourceRules.plist --keychain=/Users/deltatechnology/Documents/Test/build/codesign/gradle-1426501121151.keychain --entitlements /Users/deltatechnology/Documents/Test/build/obj/Test.build/Release-iphoneos/Test.build/Test.app.xcent /Users/deltatechnology/Documents/Test/build/sym/class\ org.gradle.api.tasks.testing.Test-Development/Release-iphoneos/Test.app

/Users/deltatechnology/Documents/Test/build/sym/class org.gradle.api.tasks.testing.Test-Development/Release-iphoneos/Test.app: replacing existing signature

Validate build/sym/class\ org.gradle.api.tasks.testing.Test-Development/Release-iphoneos/Test.app
cd /Users/deltatechnology/Documents/Test
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/deltatechnology/Desktop/gradle-2.3/bin"
export PRODUCT_TYPE=com.apple.product-type.application
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Users/deltatechnology/Documents/Test/build/sym/class\ org.gradle.api.tasks.testing.Test-Development/Release-iphoneos/Test.app

** BUILD SUCCEEDED **

Done
:xcodebuild (Thread[main,5,main]) completed. Took 0.776 secs.
:archive (Thread[main,5,main]) started.
:archive
Executing task ':archive' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
TestName
[ant:exec] cp: /Users/deltatechnology/Documents/Test/build/sym/class org.gradle.api.tasks.testing.Test-Development/Release-iphoneos/TestName.app: No such file or directory
:archive FAILED
:archive (Thread[main,5,main]) completed. Took 0.042 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':archive'.

    exec returned: 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 3.819 secs
pbxddxl:Test deltatechnology$

@renep
Copy link
Contributor

renep commented Mar 16, 2015

You have spaces in your project path, can you try to change it so you do not have spaces.

@AkhileshwarBV
Copy link
Author

Here I am seining my project path which I am using now

/Users/deltatechnology/Documents/Test

@AkhileshwarBV
Copy link
Author

Now I have changed The path to pbxddxl:Test deltatechnology$ cd /Users/deltatechnology/Desktop/ChangedThePathTest

still have same issues: O/p

pbxddxl:ChangedThePathTest deltatechnology$ gradle archive
:xcodebuildConfig
:infoplistModify
Updating /Users/deltatechnology/Desktop/ChangedThePathTest/Test/Info.plist
:keychainClean
:keychainCreate
:provisioningClean
:provisioningInstall
:xcodebuild
OK - Compile: Test/AppDelegate.m
OK - Compile: Test/MasterViewController.m
OK - Compile: Test/main.m
OK - Compile: Test/DetailViewController.m
OK - Compile: Test/AppDelegate.m
OK - Compile: Test/MasterViewController.m
OK - Compile: Test/DetailViewController.m
OK - Compile: Test/main.m
OK - Linking: build/obj/Test.build/Release-iphoneos/Test.build/Objects-normal/armv7/Test
OK - Linking: build/obj/Test.build/Release-iphoneos/Test.build/Objects-normal/arm64/Test
OK - Compile: Test/Base.lproj/LaunchScreen.xib
OK - Compile: Test/Base.lproj/Main.storyboard
Done
:archive FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':archive'.

    exec returned: 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 5.38 secs
pbxddxl:ChangedThePathTest deltatechnology$

Thank you for the help

@renep
Copy link
Contributor

renep commented Mar 16, 2015

Your SYM_ROOT is containing spaces:

SYMROOT = /Users/deltatechnology/Documents/Test/build/sym/class org.gradle.api.tasks.testing.Test-Development

this should be /Users/deltatechnology/Documents/Test/build/sym

Do you set the xcodebuild.symRoot parameters in your build.gradle file?

If not this is really strange.

@AkhileshwarBV
Copy link
Author

I was using using
symRoot = new File('build/sym/' + Test + '-Development') before

but now I removed this lines
still I am having same issues

am sending my build script

buildscript {
repositories {
maven {
url('http://openbakery.org/repository/')
}
mavenCentral()
}
dependencies {
classpath group: 'org.openbakery', name: 'xcodePlugin', version: '0.10.+'
}
}
apply plugin: 'xcode'

xcodebuild {
configuration='Release'
sdk = 'iphoneos'
target = 'Test'
signing {
identity = 'iPhone Distribution: Republic Services Inc. (YKXBJ5R297)'
certificateURI = 'file://localhost/Users/deltatechnology/Desktop/Cer/EmployeeDirectory/PrivateKey.p12'
certificatePassword = 'Delta#123'
mobileProvisionURI = 'file://localhost/Users/deltatechnology/Desktop/Cer/EmployeeDirectory/Employee_Directory_Adhoc-3.mobileprovision'
}
}

@AkhileshwarBV
Copy link
Author

pbxddxl:ChangedThePathTest deltatechnology$ gradle package

:xcodebuildConfig
:infoplistModify
Updating /Users/deltatechnology/Desktop/ChangedThePathTest/Test/Info.plist
:keychainClean
:keychainCreate
:provisioningClean
:provisioningInstall
:xcodebuild
Done
:archive FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':archive'.

    exec returned: 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 4.604 secs
pbxddxl:ChangedThePathTest deltatechnology$

pbxddxl:ChangedThePathTest deltatechnology$ gradle archive --info

Starting Build
Settings evaluated using empty settings script.
Projects loaded. Root project using build file '/Users/deltatechnology/Desktop/ChangedThePathTest/build.gradle'.
Included projects: [root project 'ChangedThePathTest']
Evaluating root project 'ChangedThePathTest' using build file '/Users/deltatechnology/Desktop/ChangedThePathTest/build.gradle'.
All projects evaluated.
Selected primary task 'archive' from project :
Tasks to be executed: [task ':xcodebuildConfig', task ':infoplistModify', task ':keychainClean', task ':keychainCreate', task ':provisioningClean', task ':provisioningInstall', task ':xcodebuild', task ':archive']
:xcodebuildConfig (Thread[main,5,main]) started.
:xcodebuildConfig
Executing task ':xcodebuildConfig' (up-to-date check took 0.001 secs) due to:
Task has not declared any outputs.
infoPlist: Test/Info.plist
devices: UNIVERSAL
isOSX: false
Xcode 6.1.1
Build version 6A2008a
/Applications/Xcode.app/Contents/Developer/usr/bin/simctl
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
Resizable iPhone (com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone)
Resizable iPad (com.apple.CoreSimulator.SimDeviceType.Resizable-iPad)
== Runtimes ==
iOS 7.0 (7.0 - Unknown) (com.apple.CoreSimulator.SimRuntime.iOS-7-0) (unavailable, runtime path not found)
iOS 7.1 (7.1 - Unknown) (com.apple.CoreSimulator.SimRuntime.iOS-7-1) (unavailable, runtime path not found)
iOS 8.1 (8.1 - 12B411) (com.apple.CoreSimulator.SimRuntime.iOS-8-1)
== Devices ==
-- iOS 7.0 --
-- iOS 7.1 --
iPhone 4s (2953835A-9BC5-4F66-B901-57F0E40F1A34) (Shutdown) (unavailable)
iPhone 5 (484259D5-06B1-4E82-89C2-A7111405B356) (Shutdown) (unavailable)
iPhone 5s (811F758F-B10E-4CE7-A97B-B905E0BAD2FC) (Shutdown) (unavailable)
iPad 2 (4527C195-FFB3-47DD-AE74-8C49F36BBAB6) (Shutdown) (unavailable)
iPad Retina (9A988884-880F-4405-B26F-4F1AB4519371) (Shutdown) (unavailable)
iPad Air (C62EC7DC-DA9C-4347-8808-9F8CB18DCBB5) (Shutdown) (unavailable)
-- iOS 8.1 --
iPhone 4s (4C9BDD18-5426-4EBD-8948-F271AFB632ED) (Shutdown)
iPhone 5 (5942CBCD-B38A-40F0-9E66-EB9A5B5C87F0) (Shutdown)
iPhone 5s (0026F641-8AEF-4267-9A28-9DE79029B2A5) (Shutdown)
iPhone 6 Plus (5C76E821-A1B8-4E90-B8A1-0A30AE03FC31) (Shutdown)
iPhone 6 (0701FB8A-5740-44B6-857A-4790D191AD68) (Booted)
iPad 2 (076BE18D-F000-4459-8ECE-787CFADA9531) (Shutdown)
iPad Retina (75EFF93E-8271-438B-A56A-5711E98C69DF) (Shutdown)
iPad Air (808309DB-FDB9-439F-8AB7-3F9973FC6E13) (Shutdown)
Resizable iPhone (BB0225BD-137B-4ABF-B932-EF800434A103) (Shutdown)
Resizable iPad (6E3FDD80-EF9E-4DED-A75B-0851174DDFB6) (Shutdown)
:xcodebuildConfig (Thread[main,5,main]) completed. Took 0.284 secs.
:infoplistModify (Thread[main,5,main]) started.
:infoplistModify
Executing task ':infoplistModify' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Updating /Users/deltatechnology/Desktop/ChangedThePathTest/Test/Info.plist
:infoplistModify (Thread[main,5,main]) completed. Took 0.005 secs.
:keychainClean (Thread[main,5,main]) started.
:keychainClean
Executing task ':keychainClean' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
"/Users/deltatechnology/Library/Keychains/login.keychain"
"/Users/deltatechnology/Documents/Test/build/codesign/gradle-1426501345283.keychain"
"/Users/deltatechnology/Desktop/ChangedThePathTest/build/codesign/gradle-1426503958699.keychain"
"/Library/Keychains/System.keychain"
:keychainClean (Thread[main,5,main]) completed. Took 0.033 secs.
:keychainCreate (Thread[main,5,main]) started.
:keychainCreate
Executing task ':keychainCreate' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:get] Getting: file://localhost/Users/deltatechnology/Desktop/Cer/EmployeeDirectory/PrivateKey.p12
[ant:get] To: /Users/deltatechnology/Desktop/ChangedThePathTest/build/codesign/PrivateKey.p12
[ant:get] .
import "/Users/deltatechnology/Desktop/ChangedThePathTest/build/codesign/PrivateKey.p12" "-k" "/Users/deltatechnology/Desktop/ChangedThePathTest/build/codesign/gradle-1426504177590.keychain" "-P" "Delta#123" "-T" "/usr/bin/codesign"
1 identity imported.
"/Users/deltatechnology/Library/Keychains/login.keychain"
"/Users/deltatechnology/Documents/Test/build/codesign/gradle-1426501345283.keychain"
"/Library/Keychains/System.keychain"
:keychainCreate (Thread[main,5,main]) completed. Took 0.202 secs.
:provisioningClean (Thread[main,5,main]) started.
:provisioningClean
Executing task ':provisioningClean' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
/Users/deltatechnology/Library/MobileDevice/Provisioning Profiles/gradle-32dc6244-716b-48f1-ad3f-13893b9338a9.mobileprovision
:provisioningClean (Thread[main,5,main]) completed. Took 0.008 secs.
:provisioningInstall (Thread[main,5,main]) started.
:provisioningInstall
Executing task ':provisioningInstall' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:get] Getting: file://localhost/Users/deltatechnology/Desktop/Cer/EmployeeDirectory/Employee_Directory_Adhoc-3.mobileprovision
[ant:get] To: /Users/deltatechnology/Desktop/ChangedThePathTest/build/provision/Employee_Directory_Adhoc-3.mobileprovision
[ant:get] .
:provisioningInstall (Thread[main,5,main]) completed. Took 0.036 secs.
:xcodebuild (Thread[main,5,main]) started.
:xcodebuild
Executing task ':xcodebuild' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Build settings from command line:
CODE_SIGN_IDENTITY = iPhone Distribution: Republic Services Inc. (YKXBJ5R297)
CODE_SIGN_RESOURCE_RULES_PATH = $(SDKROOT)/ResourceRules.plist
DSTROOT = /Users/deltatechnology/Desktop/ChangedThePathTest/build/dst
OBJROOT = /Users/deltatechnology/Desktop/ChangedThePathTest/build/obj
OTHER_CODE_SIGN_FLAGS = --keychain=/Users/deltatechnology/Desktop/ChangedThePathTest/build/codesign/gradle-1426504177590.keychain
PROVISIONING_PROFILE = 32dc6244-716b-48f1-ad3f-13893b9338a9
SDKROOT = iphoneos8.1
SHARED_PRECOMPS_DIR = /Users/deltatechnology/Desktop/ChangedThePathTest/build/shared
SYMROOT = /Users/deltatechnology/Desktop/ChangedThePathTest/build/sym

2015-03-16 16:39:39.131 xcodebuild[2539:1007] [MT] DVTAssertions: Warning in /SourceCache/IDEFrameworks/IDEFrameworks-6611/IDEFoundation/SourceControl/Model/IDESourceControlManager.m:423
Details: Error Domain=com.apple.dt.IDESourceControlErrorDomain Code=-1 "Missing extension: public.vcs.subversion" UserInfo=0x7fb19ad18540 {NSLocalizedDescription=Missing extension: public.vcs.subversion}
Object: <IDESourceControlManager: 0x7fb19ad07c10>
Method: -loadRepositories
Thread: <NSThread: 0x7fb198c14400>{name = (null), num = 1}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
=== BUILD TARGET Test OF PROJECT Test WITH CONFIGURATION Release ===

Check dependencies

ProcessProductPackaging /Users/deltatechnology/Library/MobileDevice/Provisioning\ Profiles/gradle-32dc6244-716b-48f1-ad3f-13893b9338a9.mobileprovision build/sym/Release-iphoneos/Test.app/embedded.mobileprovision
cd /Users/deltatechnology/Desktop/ChangedThePathTest
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/deltatechnology/Desktop/gradle-2.3/bin"
builtin-productPackagingUtility /Users/deltatechnology/Library/MobileDevice/Provisioning\ Profiles/gradle-32dc6244-716b-48f1-ad3f-13893b9338a9.mobileprovision -o /Users/deltatechnology/Desktop/ChangedThePathTest/build/sym/Release-iphoneos/Test.app/embedded.mobileprovision

Touch build/sym/Release-iphoneos/Test.app
cd /Users/deltatechnology/Desktop/ChangedThePathTest
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/deltatechnology/Desktop/gradle-2.3/bin"
/usr/bin/touch -c /Users/deltatechnology/Desktop/ChangedThePathTest/build/sym/Release-iphoneos/Test.app

CodeSign build/sym/Release-iphoneos/Test.app
cd /Users/deltatechnology/Desktop/ChangedThePathTest
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/deltatechnology/Desktop/gradle-2.3/bin"

Signing Identity: "iPhone Distribution: Republic Services Inc. (YKXBJ5R297)"
Provisioning Profile: "Employee Directory Adhoc"
(32dc6244-716b-48f1-ad3f-13893b9338a9)

/usr/bin/codesign --force --sign 9A3A6FCAFA74060657E5521A26839A8E123BC6F1 --resource-rules=/Users/deltatechnology/Desktop/ChangedThePathTest/build/sym/Release-iphoneos/Test.app/ResourceRules.plist --keychain=/Users/deltatechnology/Desktop/ChangedThePathTest/build/codesign/gradle-1426504177590.keychain --entitlements /Users/deltatechnology/Desktop/ChangedThePathTest/build/obj/Test.build/Release-iphoneos/Test.build/Test.app.xcent /Users/deltatechnology/Desktop/ChangedThePathTest/build/sym/Release-iphoneos/Test.app

/Users/deltatechnology/Desktop/ChangedThePathTest/build/sym/Release-iphoneos/Test.app: replacing existing signature

Validate build/sym/Release-iphoneos/Test.app
cd /Users/deltatechnology/Desktop/ChangedThePathTest
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/deltatechnology/Desktop/gradle-2.3/bin"
export PRODUCT_TYPE=com.apple.product-type.application
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Users/deltatechnology/Desktop/ChangedThePathTest/build/sym/Release-iphoneos/Test.app

** BUILD SUCCEEDED **

Done
:xcodebuild (Thread[main,5,main]) completed. Took 1.117 secs.
:archive (Thread[main,5,main]) started.
:archive
Executing task ':archive' (up-to-date check took 0.001 secs) due to:
Task has not declared any outputs.
TestName
[ant:exec] cp: /Users/deltatechnology/Desktop/ChangedThePathTest/build/sym/Release-iphoneos/TestName.app: No such file or directory
:archive FAILED
:archive (Thread[main,5,main]) completed. Took 0.045 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':archive'.

    exec returned: 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 4.172 secs
pbxddxl:ChangedThePathTest deltatechnology$

@renep
Copy link
Contributor

renep commented Mar 16, 2015

The archive task looks for a TestName.app but a Test.app was create.
Do you set the CFBundleName or ProductName somewere to TestName ?

@AkhileshwarBV
Copy link
Author

Yes I changed the bundle name to TestName
now I removed that
and its working fine

renew how can i change the bundle name through script?

and my main issues is resolved I can able to create ipa file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants