Giter VIP home page Giter VIP logo

shenzhen's Introduction

Shenzhen


Note: shenzhen uses the Xcode 6 build API, which has been deprecated for almost 3 years now. This causes problems if your app makes use of Swift 3, watchOS and other app targets.

A maintained alternative to build your iOS apps is gym which uses the latest Xcode API. To distribute builds, you can use fastlane. More information on how to get started is available on the iOS Beta deployment guide.


Create .ipa files and distribute them from the command line, using any of the following methods:

Less cumbersome than clicking around in Xcode, and less hassle than rolling your own build script, Shenzhen radically improves the process of getting new builds out to testers and enterprises.

shenzhen is named for 深圳, the Chinese city famous for being the center of manufacturing for a majority of consumer electronics, including iPhones and iPads. It's part of a series of world-class command-line utilities for iOS development, which includes Cupertino (Apple Dev Center management), Houston (Push Notifications), Venice (In-App Purchase Receipt Verification), Dubai (Passbook pass generation), and Nashville (iTunes Store API).

Installation

$ gem install shenzhen

JSON Build Error

Users running Mac OS X Mavericks with Xcode 5.1 may encounter an error when attempting to install the json gem dependency. As per the Xcode 5.1 Release Notes:

The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified.

To work around this, install the json gem first with the following command:

$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install json

Usage

For best results, set your environment localization to UTF-8, with $ export LC_ALL="en_US.UTF-8". Otherwise, Shenzhen may return unexpectedly with the error "invalid byte sequence in US-ASCII".

Shenzhen adds the ipa command to your PATH:

$ ipa

Build and distribute iOS apps (.ipa files)

  Commands:
    build                       Create a new .ipa file for your app
    distribute:rivierabuild     Distribute an .ipa file over [RivieraBuild](http://rivierabuild.com)
    distribute:hockeyapp        Distribute an .ipa file over HockeyApp
    distribute:crashlytics      Distribute an .ipa file over Crashlytics
    distribute:deploygate       Distribute an .ipa file over deploygate
    distribute:fir              Distribute an .ipa file over fir.im
    distribute:itunesconnect    Upload an .ipa file to iTunes Connect for review
    distribute:pgyer            Distribute an .ipa file over Pgyer
    distribute:ftp              Distribute an .ipa file over FTP
    distribute:s3               Distribute an .ipa file over Amazon S3
    distribute:testfairy        Distribute an .ipa file over TestFairy
    info                        Show mobile provisioning information about an .ipa file
    help                        Display global or [command] help documentation.

  Global Options:
    -h, --help           Display help documentation
    -v, --version        Display version information
    -t, --trace          Display backtrace when an error occurs

Building & Distribution

$ cd /path/to/iOS Project/
$ ipa build
$ ipa distribute

RivieraBuild Distribution

$ ipa distribute:rivierabuild -k API_TOKEN -a AVAILABILITY

Shenzhen will load credentials from the environment variable RIVIERA_API_TOKEN unless otherwise specified. To get the list of availability options, visit http://api.rivierabuild.com

HockeyApp Distribution

$ ipa distribute:hockeyapp -a API_TOKEN

Shenzhen will load credentials from the environment variable HOCKEYAPP_API_TOKEN unless otherwise specified.

TestFairy Distribution

$ ipa distribute:testfairy -a API_KEY

Shenzhen will load credentials from the environment variable TESTFAIRY_API_KEY unless otherwise specified.

Crashlytics Beta Distribution

$ ipa distribute:crashlytics -c /path/to/Crashlytics.framework -a API_TOKEN -s BUILD_SECRET

Shenzhen will load credentials from the environment variables CRASHLYTICS_API_TOKEN & CRASHLYTICS_BUILD_SECRET, and attempt to run the submit executable submit in the path to Crashlytics.framework specified by CRASHLYTICS_FRAMEWORK_PATH unless otherwise specified.

DeployGate Distribution

$ ipa distribute:deploygate -a API_TOKEN -u USER_NAME

Shenzhen will load credentials from the environment variable DEPLOYGATE_API_TOKEN and DEPLOYGATE_USER_NAME unless otherwise specified.

FTP Distribution

$ ipa distribute:ftp --host HOST -u USER -p PASSWORD -P FTP_PATH

SFTP Distribution

$ ipa distribute:sftp --host HOST -u USER -p PASSWORD -P FTP_PATH

Amazon S3 Distribution

$ ipa distribute:s3 -a ACCESS_KEY_ID -s SECRET_ACCESS_KEY -b BUCKET

Shenzhen will load credentials from the environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_REGION unless otherwise specified.

FIR (Fly it Remotely)

$ ipa distribute:fir -u USER_TOKEN -a APP_ID

Shenzhen will load credentials from the environment variables FIR_USER_TOKEN, FIR_APP_ID unless otherwise specified.

蒲公英 (PGYER)

$ ipa distribute:pgyer -u USER_KEY -a APP_KEY

Shenzhen will load credentials from the environment variables PGYER_USER_KEY, PGYER_API_KEY unless otherwise specified.

iTunes Connect Distribution

$ ipa distribute:itunesconnect -a [email protected] -p myitunesconnectpassword -i appleid --upload

Shenzhen will load credentials from the environment variables ITUNES_CONNECT_ACCOUNT and ITUNES_CONNECT_PASSWORD unless otherwise specified. If only an account is provided, the keychain will be searched for a matching entry.

The -i (or --apple-id) flag is "An automatically generated ID assigned to your app". It can be found via iTunes Connect by navigating to:

  • My Apps -> [App Name] -> More -> About This App -> Apple ID

For a fully hands-free upload, in a CI environment for example, ensure your iTunes Connect credentials are stored in your keychain, and that the keychain item has the Validation app in its 'Always allow access' list. Running Shenzhen once with the --save-keychain flag, and clicking Always Allow on the prompt will set this up for you.

Displaying Embedded .mobileprovision Information

$ ipa info /path/to/app.ipa

+-----------------------------+----------------------------------------------------------+
| ApplicationIdentifierPrefix | DJ73OPSO53                                               |
| CreationDate                | 2014-03-26T02:53:00+00:00                                |
| Entitlements                | application-identifier: DJ73OPSO53.com.nomad.shenzhen    |
|                             | aps-environment: production                              |
|                             | get-task-allow: false                                    |
|                             | keychain-access-groups: ["DJ73OPSO53.*"]                 |
| CreationDate                | 2017-03-26T02:53:00+00:00                                |
| Name                        | Shenzhen                                                 |
| TeamIdentifier              | S6ZYP4L6TY                                               |
| TimeToLive                  | 172                                                      |
| UUID                        | P7602NR3-4D34-441N-B6C9-R79395PN1OO3                     |
| Version                     | 1                                                        |
+-----------------------------+----------------------------------------------------------+

License

Shenzhen is released under an MIT license. See LICENSE for more information.

shenzhen's People

Contributors

adamwaite avatar aenglund avatar codecaffeine avatar dankimio avatar drodriguez avatar egold avatar enriquez avatar felipesabino avatar icyleaf avatar iovortex avatar jedi4ever avatar jmoody avatar joemasilotti avatar krausefx avatar kylef avatar lmirosevic avatar martica avatar mathie avatar mattt avatar maxgabriel avatar mgamer avatar mikegottlieb avatar palleas avatar peymano avatar plu avatar qmoya avatar readmecritic avatar rjocoleman avatar tomdalling avatar viteinfinite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shenzhen's Issues

IPA file still required in `ipa distribute:hockeyapp` (and uploads if present)

ipa distribute:hockeyapp now (awesomely) does not hard-block shenzhen from executing without an IPA file (version 0.4.0) - however, the rest of the code still expects the file to exist.

Issue 1: If the IPA file exists in the directory, but is not specified in the command-line parameters, the IPA is automatically detected and submitted.

Issue 2: If the IPA file does NOT exist, parts of the code still attempt to use it, and fail. For example, hockeyapp.rb:22 specifically looks for this file, and seems to cause an issue at a lower level in the multi-part code if you remove the IPA from the directory and then run ipa distribute:hockeyapp.

Suggested Fix: I imagine many users prefer the IPA to auto-detect and auto-upload, so I I suggest to leave the auto-detection of IPA and dSYM files in the build.

Instead, perhaps there should be a --doNotUploadIPA command-line flag that can be set (and then create conditions in the Ruby code to prevent the file from being uploaded throughout the code if doNotUploadIPA == yes). This would allow all users their desired functionality (and simplify the command-line for users in my case, since the requisite files would be auto-detected, but only the dSYM would be uploaded).

Also, apologies, I'm totally illiterate in both the gemfile or the Ruby worlds - otherwise I would implement this fix & just pull request back.

Thank you!

ipa distribute:hockeyapp failing

Hi, not sure what I did wrong. I'm getting this error after saving and closing my textmate for release notes.
btw. I'm using cocoapods.running shenzhen 0.4.0

ipa build --trace
Configuration was not passed, defaulting to Debug
Building "XX.xcworkspace" with Scheme "XX" and
Configuration "Debug"

 xcodebuild  XX.xcworkspace

** BUILD FAILED **

The following build commands failed:
Check dependencies
(1 failure)

ipa distribute:hockeyapp --trace
Missing or unspecified .ipa file
API Token:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/multipart-post-1.2.0/lib/composite_io.rb:85:in initialize': can't convert nil into String (TypeError) from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/multipart-post-1.2.0/lib/composite_io.rb:85:inopen'
from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/multipart-post-1.2.0/lib/composite_io.rb:85:in initialize' from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/shenzhen-0.4.0/lib/shenzhen/plugins/hockeyapp.rb:22:innew'
from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/shenzhen-0.4.0/lib/shenzhen/plugins/hockeyapp.rb:22:in upload_build' from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/shenzhen-0.4.0/lib/shenzhen/plugins/hockeyapp.rb:83:inblock (2 levels) in <top (required)>'
from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.3/lib/commander/command.rb:180:in call' from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.3/lib/commander/command.rb:180:incall'
from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.3/lib/commander/command.rb:155:in run' from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.3/lib/commander/runner.rb:402:inrun_active_command'
from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.3/lib/commander/runner.rb:78:in run!' from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.3/lib/commander/delegates.rb:11:inrun!'
from /Users/rad182/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.3/lib/commander/import.rb:10:in `block in <top (required)>'

getting rm: /: is a directory warnings

Hi,

i just started using ipa build and i'm seeing a total of 3 warnings like this in the terminal:

rm: /: is a directory

i don't have much additional info other than they are printed after the "Building XXXX.xcodeproj" and before the "xcrun PackageApplication" lines.

thanks.

distribute:hockeyapp: `-t` option doesn't work

From ipa distribute:hockeyapp --help

  Options:
    -t, --token TOKEN    API Token. Available at https://rink.hockeyapp.net/manage/auth_tokens

If I supply -t TOKEN it interactively asks me for the token, as if I didn't specify it. However, the long form --token TOKEN works fine.

This is relatively minor, since there is a simple workaround, and it's possible I'm doing something wrong, but I thought you'd like to know :)

Thanks!

shifting list of build settings loses header

It appears that this line is losing the header line of the output of xcodebuild -showBuildSettings.

This header line is matched on line 73, and since it gets shifted out it's failing to capture a value for target.

It's not clear why the shift is necessary, perhaps I'm just missing something.

Xib UILabel font information lost, corrupted?

I've been trying to resolve this for a couple weeks. I'm still not sure what's causing it, hopefully someone is seeing something similar or has some insight.

What's happening: When building with shenzhen certain views in my apps have lost the font information for labels (defaults to Helvetica). This is only occurring in views where the label is created in a xib and the font is set in code.

Building and archiving from xcode does not have this issue.

--embed option not using the provision profile provided

Hi Matt,

The embed option isn't using the mobileprovision file I passed into it. Instead, it picked up one provision profile from the xcode default directory, Library/MobileDevice/Provision Profiles/. Could you please give me some help?

I used PROVISIONING_PROFILE="path/Provision.mobileprovision"
--embed $PROVISIONING_PROFILE

Improve error messages on failed builds

When the xcodebuild command fails, I get no information about the error.
Example:

Uploading the project to Testflight
     xcodebuild  7.xcworkspace
** BUILD FAILED **

** ARCHIVE FAILED **

Is there any way to get more information or read out the logs?

regexp not capturing scheme names with spaces

We happen to have a scheme name with an embedded blank in the name.

As a result, the regexp \"?(\w+) is not matching on it.

To find a solution, I've tested using the regexp \"?([^":]+)/ and it appears to fix this case.

Here's the test I used to verify that it works:

lines = ['Build settings for action build and target "Pink Pony":',
         'Build settings for action build and target "Pony":',
         'Build settings for action build and target Pink Pony:',
         'Build settings for action build and target Pony:']

for line in lines
  line =~ /Build settings for action build and target \"?([^":]+)/
  match = $1
  $stdout.write("match: #{match}\n")
end

Add support for a Configuration File

What do you think about adding support for a configuration file, which can be placed in the Xcode Project Directory. Then it would be possible to set some project specific parameters like api_token once in the config file and not on each distribution command call.

Space in app name crashes build

My ios app name is "SolarPower".
In Xcode, in target/Build Settings/Packaging/Product Name, I use "SolarPower". This builds fine.
If I add a space to the product name, e.g. "Solar Power", and leave everything else the same, the build fails, saying there was a failure in "Check dependencies".
I am using "ipa build" and "ipa build -c Debug", both of which fail identically.
Running ipa 0.5.0 on OSX 10.8.5
(Other than this, ipa is a dream come true)
Thanks.

Update: if I leave the ProductName as "SolarPower", but change the BundleDisplayName (in info.plist) to "Solar Power", it displays the name I want (with a space), and does not crash.

Building workspace project not working

I am receiving the following when trying to build a project within a workspace:

$ ipa build --trace
/Users/caleb/.rvm/gems/ruby-1.9.2-p320/gems/shenzhen-0.0.3/lib/shenzhen/commands/build.rb:94:in `determine_configuration!': undefined method `length' for nil:NilClass (NoMethodError)
    from /Users/caleb/.rvm/gems/ruby-1.9.2-p320/gems/shenzhen-0.0.3/lib/shenzhen/commands/build.rb:24:in `block (2 levels) in <top (required)>'
    from /Users/caleb/.rvm/gems/ruby-1.9.2-p320/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
    from /Users/caleb/.rvm/gems/ruby-1.9.2-p320/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
    from /Users/caleb/.rvm/gems/ruby-1.9.2-p320/gems/commander-4.1.2/lib/commander/command.rb:155:in `run'
    from /Users/caleb/.rvm/gems/ruby-1.9.2-p320/gems/commander-4.1.2/lib/commander/runner.rb:402:in `run_active_command'
    from /Users/caleb/.rvm/gems/ruby-1.9.2-p320/gems/commander-4.1.2/lib/commander/runner.rb:78:in `run!'
    from /Users/caleb/.rvm/gems/ruby-1.9.2-p320/gems/commander-4.1.2/lib/commander/delegates.rb:11:in `run!'
    from /Users/caleb/.rvm/gems/ruby-1.9.2-p320/gems/commander-4.1.2/lib/commander/import.rb:10:in `block in <top (required)>

It's worth mentioning that the xcodebuild -list 2> /dev/null command is returning the following:

Information about workspace "MyProjectWorkspace":
    Schemes:
        Three20UI
        Three20UICommon
        Three20Core
        Three20Style
        Three20Network
        Three20
        Three20UINavigator
        My Project

Seems as though the "Build Configurations" are missing... but "Build Configurations" belong to projects, not workspaces. The Scheme I want to load has 3 valid Build Configurations (Debug/Release/Ad Hoc)

build command's "output" arg seems to do nothing

The build command's help says it has an optional [output] argument, but does not describe its purpose.

Attempting to pass a directory path, perhaps to indicate where the ipa and dSYM should be saved, does nothing. At first I thought perhaps it was supposed to indicate the file path and name where the ipa file should be saved instead of using the cwd and product name, respectively, but that didn't work. Then I thought maybe it could be the output directory path, but that didn't work either; still ended up in the project dir.

Then I looked at the code and saw the args of the the build command's action block weren't being used.

I started to attempt a fix, but then realized I'm still not sure what the [output] argument should mean.

Missing sign parameter when package application

When i'm distribute to TestFlight, it prompts:
Error uploading to TestFlight: 'Invalid Profile: does not contain provisioned devices, are you sure this is not a developer profile?'.

Seems missing "--sign" parameter when package application.

Install locally from the git checkout

I've tried running gem install -l shenzhen from the checkout directory but obtain the error could not find gem shenzhen locally or in a repository. What are the installation instructions to build/install from the local checkout directly so as to use the local git version rather than some remote gem?

How to use notes from a file?

I have my release notes in a file called notes.md. How can I use the contents of this text file as the release notes on HockeyApp?

ipa distribute:hockeyapp --token [token] --markdown --notes nodes.md doesn't work, I get that. My bash skills are not good enough to get this to work though. Any help would be greatly appreciated :)

No details on what dependencies

I tried the following command
ipa build -c Debug -s Gacha -t

/Library/Ruby/Gems/1.8/gems/highline-1.6.15/lib/highline/system_extensions.rb:184: warning: Insecure world writable dir /opt/local/sbin in PATH, mode 040777
Faraday: you may want to install system_timer for reliable timeouts
/Library/Ruby/Gems/1.8/gems/shenzhen-0.2.1/lib/shenzhen/xcodebuild.rb:59: warning: Insecure world writable dir /opt/local/sbin in PATH, mode 040777
Building "Gacha.xcodeproj" with Scheme "Gacha" and Configuration "Debug"

 xcodebuild  Gacha.xcodeproj

/Library/Ruby/Gems/1.8/gems/shenzhen-0.2.1/lib/shenzhen/commands/build.rb:56: warning: Insecure world writable dir /opt/local/sbin in PATH, mode 040777
** BUILD FAILED **

The following build commands failed:
Check dependencies
(1 failure)

But there is no details on dependencies, so how do I know what is exactly causing the issue?

Add support for using an embedded .mobileprovision file

The xcrun command (used to sign an .ipa) can accept an --embed parameter, so you can use any .mobileprovision file instead of using the provisioning profile from the build setting in your project. This would be very handy in combination with the Cupertino gem.

You could add new devices to the profile, download the profile, create a build that uses that profile and upload to hockey. All from the command line.

Shenzhen::XcodeBuild#settings skips first target

When Shenzhen::XcodeBuild#settings is parsing xcodebuild's -showBuildSettings output, the first line, which contains the first target name, is shifted off before proceeding to iterate over the lines. Therefore the first target's settings are never returned in the Settings object. If the project only had one target, an empty Settings object is returned.

Steps to reproduce:

  1. Create a new iOS project named "Bazinga" in Xcode.
  2. Ensure that Include Unit Tests is not checked in the new project wizard.
  3. Invoke the following script in the project directory:
#!/usr/bin/env ruby
require "shenzhen"

foo = Shenzhen::XcodeBuild.settings("-project Bazinga.xcodeproj", "-scheme Bazinga", "-configuration Debug")
puts foo.members.length

I would expect the output to be 1 for the Bazinga target, but instead it's 0.

Perhaps in a version of Xcode prior to 4.5.2, xcodebuild emitted some unwanted first line in its output that needed to be discarded? Apparently this is no longer the case.

fails to build

using xcode 4.5 on mac os 10.7.4

upon doing ipa build I get an error like this:

Failed to load dependencies output contents from ``/Users/user/Library/Developer/Xcode/DerivedData/App-dhhhgbggewxkjrhdzbllaidjdkhk/Build/Intermediates/App.build/Ad-Hoc-iphoneos/App.build/Objects-normal/armv7/DatePicker.d''

Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “DatePicker.d” couldn’t be opened because there is no such file."

NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 "The operation couldn\U2019t be completed. No such file or directory"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *, void (^)(NSString *))

there is however a DatePicker.dia file in that folder. not sure what I might be doing wrong -- thanks!

Cannot upload ONLY dSYM using `ipa distribute:hockeyapp`

HockeyApp's /app_versions/upload endpoint does NOT require an IPA (as long as a dSYM is specified), but shenzhen's ipa distribute:hockeyapp cannot proceed without an IPA file.

More info here: http://support.hockeyapp.net/kb/api/api-upload-new-versions

I use HockeyApp for crash reporting (only), which only requires dSYM (for symbolication of production crashes). The IPA is a large and unnecessary upload in terms of both bandwidth and our limited HockeyApp storage.

This is a fairly common use case among the app developers I know. Would be awesome to support it. :)

ipa build : fails to build

$ ipa build
Configuration was not passed, defaulting to Debug
Building "ImageGrabber.xcodeproj" with Scheme "ImageGrabber" and Configuration "Debug"

 xcodebuild  ImageGrabber.xcodeproj

** CLEAN FAILED **

The following build commands failed:
Check dependencies
(1 failure)
** BUILD FAILED **

The following build commands failed:
Check dependencies
(1 failure)
** ARCHIVE FAILED **

The following build commands failed:
Check dependencies
(1 failure)

iOS [Redacted] Support

I can't get Shenzhen to work with XCode 5 and iOS 7.

When I attempt to build, I get a ton of warnings, and then:

** BUILD FAILED **

The following build commands failed:
CompileC "Build/Intermediates/[my app].build/Internal (Ad Hoc)-iphoneos/[my app].build/Objects-normal/armv7/[my app]AppDelegate.o" [my app]/Lib/[my app sdk]/[my app sdk]/[my app sdk]AppDelegate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

What other information can I provide here?

Thanks!

Run Script doesn't work

I use this command which works in xcode or invoked manually but ran using shenzhen doesn't spit out the localisation files which then results in a compilation error as it tries to copy the string files which don't exsist.

I can't see any output in the console.app, is their a way for my Run scripts to output to the console when I manually tell shenzhen to build ?

passing ONLY_ACTIVE_ARCH

I know that I can set this in build settings.
But is there a way I can pass it into ipa build?

Don't want build output to be supressed

Hello,

It seems that build IPA always suppresses build output. This seems to happen in the following line:

output = xcodebuild #{(args + args_from_options(options)).join(" ")} -showBuildSettings 2> /dev/null

Absolutely great when everything is working fine, but I have a situation where the build is failing (only on the command line) and I wish to be able to see this... Would it be possible to have this not thrown away if a --verbose option is passed?

Cheers

Proposal: rake task builders

Inspired by the task builders that ship with RSpec and Cucumber, I'd like to have task builders so that I can add Shenzhen tasks by adding something like this to a Rakefile:

Shenzhen::Rake::BuildTask.new

to create a shenzhen:build task which does the same as ipa build. The task would also be configurable by doing something like this in your Rakefile:

Shenzhen::Rake::BuildTask.new do |build_task|
  build_task.workspace = "MyWorkspace"
  build_task.clean = true
  build_task.archive = false
end

There could of course be similar builders for the distribute commands.

Thoughts? I'm happy to take a first stab at implementing this if you'd consider pulling it in.

TestFlight - (Faraday::Error::TimeoutError) - Yet App Is Uploaded to TestFlight

Hello,

Thank you soooo much for creating this tool. Anyway, I've used it fine on 1 app, but on the second app, when I do

ipa distribute:testflight ....

I get

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill': execution expired (Faraday::Error::TimeoutError)

Yet the app is actually put on testflight. So just wondering if you have any ideas why shenzhen is giving this error.

Thanks,
dehru

Can't install via gem

Myself and a coworker are unable to install the gem. The two error messages we've seen are as follows…

installing cupertino:

ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: cupertino requires shenzhen (>= 0.0.1)

installing shenzhen directly:

ERROR:  Could not find a valid gem 'shenzhen' (>= 0) in any repository
ERROR:  Possible alternatives: shenzhen

ipa build Fail

I was created a empty project.
I set Run/Archive Build Configuration is Debug and set Use Debug for command-line builds

ipa build  

error

 Configuration was not passed, defaulting to  Debug
 Building "nomad.xcodeproj" with Scheme "nomad" and Configuration "Debug"

     xcodebuild  nomad.xcodeproj
** BUILD FAILED **

The following build commands failed:
Check dependencies
(1 failure)

Distribution Profiles are not shown

When running
$ ios profiles:list

Only developer profiles are shown. No distribution profiles are available.

Is anyone else experiencing this issue? Or is this a known limitation?

ipa:distribute hangs after submitting release notes

running ipa:distribute pops up textmate where release notes are created. After saving/quitting textmate, nothing happens. Ctrl-C out shows app is still waiting within ask_editor / determine_notes!

What is the correct process for entering release notes which allows upload?

Single quotes in command-line arguments are not handled properly

When an argument contains a single quote (e.g. -s "Foo'bar"), the script exits with an error:

sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file
error: Shenzhen::XcodeBuild::NilOutputError. Use --trace to view backtrace

Wrapping the arguments in double instead of single quotes in commands/build.rb (lines 46-49 in flags) helped.

error: undefined method `[]' for nil:NilClass

After installing, if I change to a directory with a project and try "ipa build", I get:

error: undefined method `[]' for nil:NilClass. Use --trace to view backtrace

No combination of parameters that I've tried seems to work although different combinations will give different error messages.

Proposal: pass file name for testflight notes

Love this tool, thanks for sharing it!

Would be great to be able to pass in a file that contains release notes.

The use case for this is we have some apps that are clones of themselves and having to enter release notes in vim for each build is slow and tedious.

Would be great if we could give a filename where the release notes exist and all our builds could run without interaction.

Thoughts?

not scriptable for multiple targets

Great package, btw, many thanks. But if you try to script the building and deployment of multiple targets, the "distribute" command loses context and prompts you at console to select which .ipa you want to distribute.

To reproduce:

ipa build -c AdHoc -s Foo
ipa distribute -a $API_TOKEN -T $TEAM1 -m "message"
ipa build -c AdHoc -s Bar
ipa distribute -a $API_TOKEN -T $TEAM2 -m "message"

// output,
Select an .ipa File:

  1. Foo.ipa
  2. Bar.ipa

Build issue

ipa build --trace
Faraday: you may want to install system_timer for reliable timeouts
Configuration was not passed, defaulting to Debug
/Library/Ruby/Gems/1.8/gems/shenzhen-0.5.0/lib/shenzhen/commands/build.rb:117:in `determine_scheme!': undefined method `length' for nil:NilClass (NoMethodError)
    from /Library/Ruby/Gems/1.8/gems/shenzhen-0.5.0/lib/shenzhen/commands/build.rb:35
    from /Library/Ruby/Gems/1.8/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
    from /Library/Ruby/Gems/1.8/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
    from /Library/Ruby/Gems/1.8/gems/commander-4.1.5/lib/commander/command.rb:155:in `run'
    from /Library/Ruby/Gems/1.8/gems/commander-4.1.5/lib/commander/runner.rb:402:in `run_active_command'
    from /Library/Ruby/Gems/1.8/gems/commander-4.1.5/lib/commander/runner.rb:78:in `run!'
    from /Library/Ruby/Gems/1.8/gems/commander-4.1.5/lib/commander/delegates.rb:7:in `run!'
    from /Library/Ruby/Gems/1.8/gems/commander-4.1.5/lib/commander/import.rb:10
    from /usr/bin/ipa:19

ipa not using the correct SDK?

I have an iOS project in Xcode 5 using the iOS 6.1 SDK. Everything in the project is set up correctly, when I manually create an archive all is well. However, when I create a build with ipa, it always uses the iOS 7 SDK, ignoring the settings in my project.

Scheme problems

Even though I'm supplying the scheme to use, it still asks me what scheme to use. And then crashes.

shenzhen-0.5.1

$ ipa build -t -c Master -s "SiminnTV" --clean
Select a scheme:
1. SiminnTV
2. Mogenerator
?  1
/Users/kevin/.rvm/gems/ruby-1.9.3-p194/gems/shenzhen-0.5.1/lib/shenzhen/xcodebuild.rb:65:in `settings': Shenzhen::XcodeBuild::NilOutputError (Shenzhen::XcodeBuild::NilOutputError)
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p194/gems/shenzhen-0.5.1/lib/shenzhen/commands/build.rb:49:in `block (2 levels) in <top (required)>'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/command.rb:155:in `run'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/runner.rb:402:in `run_active_command'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/runner.rb:78:in `run!'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/delegates.rb:11:in `run!'
    from /Users/kevin/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in <top (required)>'
make: *** [createbuild] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.