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

Appfile template #19

Closed
turowicz opened this issue Jan 27, 2015 · 12 comments
Closed

Appfile template #19

turowicz opened this issue Jan 27, 2015 · 12 comments

Comments

@turowicz
Copy link

Hey - I've accidentally messed up my Appfile and I didn't have a previous version commited.

Can someone give me the template of the appfile with the app ide, bundle etc. so I can set my values and carry on? thanks

@KrauseFx
Copy link
Member

Sure thing: https://github.com/KrauseFx/fastlane/blob/master/lib/assets/AppfileTemplate

It's a very simple file with just this 2 values.

@turowicz
Copy link
Author

Thanks! It's working again :)

Now I have one last issue: I suspect the code signing when building the ipa is either not happening or it's downloading the incorrect certificate.

The last step breaks when uploading to itunes connect.

Problem 1: The file that sigh downloaded looks correct using QuickLook (app store profile) but when I do "ipa info" it displays my team provisioning profile, along with all of the devices.

Problem 2: Sigh, on startup, displays all of the 8 schemas I have in the workspace. Is it possible to hard code the schema name or number so it doesn't do that? I'm trying to automate the deployment.

Great project mate :)

@KrauseFx
Copy link
Member

Problem 1: Mh, not sure what's the problem there. Are you sure this is related to sigh?

Problem 2: sigh does not access your Xcode project. Are you talking about snapshot maybe? It shows the current step in the fastlane output. If so, you can set the scheme using the Snapfile Scheme Config

@turowicz
Copy link
Author

Problem 1: You are right, build settings error (in xcode) - finally managed to upload to itunes connect!!

Problem 2: 'snapshot' commented out (don't need screenshots at this point). Here's the output:

Wojciechs-MacBook-Pro:src wojtek$ fastlane beta --trace
INFO [2015-01-27 11:29:37.83]: Driving the lane 'beta'
INFO [2015-01-27 11:29:37.83]: Step: increment_build_number
INFO [2015-01-27 11:29:37.83]: [SHELL COMMAND]: agvtool next-version -all
INFO [2015-01-27 11:29:38.07]: [SHELL OUTPUT]: Setting version of project Mailcloud to:
INFO [2015-01-27 11:29:38.07]: [SHELL OUTPUT]: 54.
INFO [2015-01-27 11:29:38.07]: [SHELL OUTPUT]: 
INFO [2015-01-27 11:29:38.09]: [SHELL OUTPUT]: Also setting CFBundleVersion key (assuming it exists)
INFO [2015-01-27 11:29:38.09]: [SHELL OUTPUT]: 
INFO [2015-01-27 11:29:38.11]: [SHELL OUTPUT]: Updating CFBundleVersion in Info.plist(s)...
INFO [2015-01-27 11:29:38.11]: [SHELL OUTPUT]: 
INFO [2015-01-27 11:29:38.12]: [SHELL OUTPUT]: Updated CFBundleVersion in "Mailcloud.xcodeproj/../Mailcloud/Info.plist" to 54
INFO [2015-01-27 11:29:38.13]: [SHELL OUTPUT]: Updated CFBundleVersion in "Mailcloud.xcodeproj/../MailcloudTests/Info.plist" to 54
INFO [2015-01-27 11:29:38.13]: [SHELL OUTPUT]: 
INFO [2015-01-27 11:29:38.13]: [SHELL OUTPUT]: 
INFO [2015-01-27 11:29:38.34]: Step: cocoapods
INFO [2015-01-27 11:29:38.34]: [SHELL COMMAND]: pod install
INFO [2015-01-27 11:29:38.67]: [SHELL OUTPUT]: Analyzing dependencies
INFO [2015-01-27 11:29:48.51]: [SHELL OUTPUT]: 
INFO [2015-01-27 11:29:48.51]: [SHELL OUTPUT]: CocoaPods 0.36.0.beta.1 is available.
INFO [2015-01-27 11:29:48.51]: [SHELL OUTPUT]: To update use: `gem install cocoapods --pre`
INFO [2015-01-27 11:29:48.51]: [SHELL OUTPUT]: [!] This is a test version we'd love you to try.
INFO [2015-01-27 11:29:48.51]: [SHELL OUTPUT]: 
INFO [2015-01-27 11:29:48.51]: [SHELL OUTPUT]: For more information see http://blog.cocoapods.org
INFO [2015-01-27 11:29:48.51]: [SHELL OUTPUT]: and the CHANGELOG for this version http://git.io/BaH8pQ.
INFO [2015-01-27 11:29:48.51]: [SHELL OUTPUT]: 
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Downloading dependencies
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Using GTMHTTPFetcher (1.141)
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Using GZIP (1.0.3)
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Using JDStatusBarNotification (1.5.0)
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Using Mixpanel (2.6.2)
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Using NSDate+TimeAgo (1.0.3)
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Using OpenSSL-Universal (1.0.1.k)
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Using SZTextView (1.1.10)
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Using SlackTextViewController (1.4.1)
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Using Tweaks (1.1.0)
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Using gtm-oauth2 (0.1.0)
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Using mailcore2 (0.4.7)
INFO [2015-01-27 11:29:49.46]: [SHELL OUTPUT]: Generating Pods project
INFO [2015-01-27 11:29:50.34]: [SHELL OUTPUT]: Integrating client projects
INFO [2015-01-27 11:29:50.97]: [SHELL OUTPUT]: 
INFO [2015-01-27 11:29:50.97]: [SHELL OUTPUT]: [!] GTMHTTPFetcher has been deprecated in favor of gtm-http-fetcher
INFO [2015-01-27 11:29:50.97]: [SHELL OUTPUT]: 
INFO [2015-01-27 11:29:50.97]: [SHELL OUTPUT]: [!] mailcore2 has been deprecated in favor of mailcore2-ios
INFO [2015-01-27 11:29:51.00]: Step: sigh
INFO [2015-01-27 11:29:53.34]: Login into iOS Developer Center
INFO [2015-01-27 11:30:10.91]: Login successful
INFO [2015-01-27 11:30:11.51]: Fetching all available provisioning profiles...
INFO [2015-01-27 11:30:12.21]: Checking if profile is available. (7 profiles found)
INFO [2015-01-27 11:30:13.59]: Downloading profile...
INFO [2015-01-27 11:30:15.48]: Successfully downloaded provisioning profile
INFO [2015-01-27 11:30:15.48]: Exported provisioning profile to '/Users/wojtek/Workspace/mailcloud-ios/src/Distribution_com.Mailcloud.Mailcloud.mobileprovision'
INFO [2015-01-27 11:30:15.48]: [SHELL COMMAND]: open '/Users/wojtek/Workspace/mailcloud-ios/src/Distribution_com.Mailcloud.Mailcloud.mobileprovision'
INFO [2015-01-27 11:30:15.51]: Step: deliver
Select a scheme:
1. JDStatusBarNotificationModule
2. Mailcloud
3. MailcloudApi
4. MailcloudCommon
5. MailcloudData
6. MailcloudModels
7. MailcloudSecurity
8. MailcloudServices
9. UnusedTarget
?  

@KrauseFx
Copy link
Member

  1. Glad to hear it works
  2. Step: deliver, that means, deliver is executed. Could you also post your Deliverfile? I'm sure there is some xcodebuild or ipa build command in the ipa block.

@turowicz
Copy link
Author

# This is the example Deliverfile
# For more information about each property, visit the GitHub documentation: https://github.com/krausefx/deliver
#
# You can remove those parts you don't need
#
# A list of available language codes can be found here: https://github.com/krausefx/deliver#available-language-codes
#
# Everything next to a # is a comment and will be ignored

# hide_transporter_output # remove the '#' in the beginning of the line, to hide the output while uploading

########################################
# App Metadata
########################################


# This folder has to include one folder for each language
# More information about automatic screenshot upload:
# https://github.com/KrauseFx/deliver#upload-screenshots-to-itunes-connect
screenshots_path "./screenshots"
apple_id '929626944'

# version '1.2' # you can pass this if you want to verify the version number with the ipa file
#
# title({
#   "en-US" => "Your App Name"
# })
#
# changelog({
#   "en-US" => "iPhone 6 (Plus) Support"
# })



########################################
# Building and Testing
########################################

# Dynamic generation of the ipa file
# I'm using Shenzhen by Mattt, but you can use any build tool you want
# Remove the whole block if you do not want to upload an ipa file
ipa do
    # Add any code you want, like incrementing the build
    # number or changing the app identifier

    # Attention: When you return a valid ipa file, this file will get uploaded and released
    # If you only want to upload app metadata, remove the complete ipa block.

    # system("ipa build --verbose") # build your project using Shenzhen
    "./src.ipa" # Tell 'Deliver' where it can find the finished ipa file
end

# ipa "./latest.ipa" # this can be used instead of the `do` block, if you prefer manually building the ipa file

beta_ipa do
    system("cd ..; ipa build --verbose") # customize this to build beta version
    "../Mailcloud.ipa" # upload ipa file using `deliver --beta`
end

# unit_tests do
#   If you use fastlane (http://github.com/krausefx/fastlane), run the tests there
#   system("xctool test")
# end

success do
  system("say 'Successfully deployed a new version.'")
end

@KrauseFx
Copy link
Member

Are you using :beta in your Fastfile? Please post it as well.

@turowicz
Copy link
Author

# Customise this file, documentation can be found here: 
# https://github.com/krausefx/fastlane#customise-the-fastfile

# Change the syntax highlighting to Ruby

# All lines starting with a # are ignored when running `fastlane`

before_all do
  # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."

  # sh "./customShellScript.sh"

  increment_build_number

  cocoapods

  # xctool
end

lane :test do 
  # snapshot
end

lane :beta do
  # snapshot
  sigh
  deliver :skip_deploy, :beta
  # sh "your_script.sh"
end

lane :deploy do
  # snapshot
  sigh
  deliver :skip_deploy, :force
  # frameit
end

lane :inhouse do

  say "It works"
  # insert your code here
end

# You can define as many lanes as you want

after_all do |lane|
  # This block is called, only if the executed lane was successful
  # slack({
  #   message: "Successfully deployed new App Update for [App](http://link.com).",
  #   success: true,
  #   channel: 'development'
  # })
end


error do |lane, exception|
  say lane
  say exception
  # Something bad happened
end

@turowicz
Copy link
Author

I'm calling
fastlane beta

@KrauseFx
Copy link
Member

You use

beta_ipa do
    system("cd ..; ipa build --verbose") # customize this to build beta version
    "../Mailcloud.ipa" # upload ipa file using `deliver --beta`
end

which runs ipa build, which shows you the scheme selection. Please take a look at the documentation of shenzhen.

@turowicz
Copy link
Author

Cool thanks, I'll try looking for the answer and if not I'll create an issue there.

@KrauseFx
Copy link
Member

It is possible (ipa build --help):

    -s, --scheme SCHEME  Scheme used to build app

KrauseFx pushed a commit that referenced this issue Mar 7, 2016
Provide a better error message for when no screenshots have been taken
KrauseFx added a commit that referenced this issue Mar 7, 2016
@fastlane fastlane locked and limited conversation to collaborators Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants