{"action":"created","issue":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/6305","repository_url":"https://api.github.com/repos/fastlane/fastlane","labels_url":"https://api.github.com/repos/fastlane/fastlane/issues/6305/labels{/name}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/6305/comments","events_url":"https://api.github.com/repos/fastlane/fastlane/issues/6305/events","html_url":"https://github.com/fastlane/fastlane/issues/6305","id":179500239,"number":6305,"title":"Using produce enables_services --push-notification invalids the provisioning profile.","user":{"login":"stanBienaives","id":1055962,"avatar_url":"https://avatars.githubusercontent.com/u/1055962?v=3","gravatar_id":"","url":"https://api.github.com/users/stanBienaives","html_url":"https://github.com/stanBienaives","followers_url":"https://api.github.com/users/stanBienaives/followers","following_url":"https://api.github.com/users/stanBienaives/following{/other_user}","gists_url":"https://api.github.com/users/stanBienaives/gists{/gist_id}","starred_url":"https://api.github.com/users/stanBienaives/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanBienaives/subscriptions","organizations_url":"https://api.github.com/users/stanBienaives/orgs","repos_url":"https://api.github.com/users/stanBienaives/repos","events_url":"https://api.github.com/users/stanBienaives/events{/privacy}","received_events_url":"https://api.github.com/users/stanBienaives/received_events","type":"User","site_admin":false},"labels":[{"id":315718149,"url":"https://api.github.com/repos/fastlane/fastlane/labels/match","name":"match","color":"fad8c7","default":false},{"id":315718117,"url":"https://api.github.com/repos/fastlane/fastlane/labels/produce","name":"produce","color":"fbca04","default":false},{"id":153483179,"url":"https://api.github.com/repos/fastlane/fastlane/labels/question","name":"question","color":"cc317c","default":true},{"id":389827016,"url":"https://api.github.com/repos/fastlane/fastlane/labels/waiting-for-reply","name":"waiting-for-reply","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-27T13:56:35Z","updated_at":"2016-12-19T16:27:36Z","closed_at":null,"body":"### New Issue Checklist\n- [x] Updated fastlane to the latest version\n- [x] I have read the [Contribution Guidelines](https://github.com/fastlane/fastlane/blob/master/CONTRIBUTING.md)\n### Issue Description\n\nHello,\n\nThe profile created with match (or any other manner) are invalid as soon as I run the following command\n`sh produce enable_services --push-notification`\n\nThis behaviour is normal if the push-notification have not been enabled prior to the provisionning profile generation but it is not the case. \n\nIs there a way to know somehow what services are enabled for a particular APP ID before enabling it with produce?  Or run the enable_services in an idempotent  way?\n\nWe manage a LOT of applications. We use the same lane to update and create our branded applications. This is why I can't afford to manage it from Xcode UI. \n##### Complete output when running fastlane, including the stack trace and command used\n\n```\nINSERT OUTPUT HERE\n```\n### Configuration Files\n\nPlease copy the complete content of your `Fastfile` and any other configuration files you use below:\n\nFastfile:\n\n``` ruby\n\nupdate_fastlane\n\n# This is the minimum version number required.\n# Update this, if you use features of a newer version\nfastlane_version \"1.89.0\"\n\ndefault_platform :ios\n\n\nplatform :ios do\n  before_all do\n     ENV[\"SLACK_URL\"] = \"https://hooks.slack.com/services/T03PRCVD3/xxxxxxxxxi\"\n  end\n\n  desc \"Runs all the tests\"\n  lane :test do\n    scan\n  end\n\n  desc \"Submit a new Beta Build to Apple TestFlight\"\n  desc \"This will also make sure the profile is up to date\"\n  lane :beta do\n    produce ({\n       username: 'developer@sparted.com',\n       app_name: \"{{ name }}\",\n       app_identifier: \"com.sparted.{{ bundle_identifier }}\" ,\n       sku: \"com.sparted.{{ bundle_identifier }}\",\n       app_version: \"{{ app_version }}\"\n    })\n    sh \"produce enable_services --push-notification\"\n    match(type: \"appstore\") # more information: https://codesigning.guide\n    gym(\n      xcargs: \"PROVISIONING_PROFILE_SPECIFIER=\\\"match AppStore com.sparted.{{ instanceId }}\\\" DEVELOPMENT_TEAM=\\\"xxxxxxxxx\\\" CODE_SIGN_IDENTITY=\\\"iPhone Distribution\\\"\"\n    ) # Build your app - more options available\n    pilot\n  end\n\n  desc \"Deploy a new version to the App Store\"\n  lane :appstore do\n    # snapshot\n    produce ({\n       username: 'developer@sparted.com',\n       app_name: \"{{ name }}\",\n       app_identifier: \"com.sparted.{{ bundle_identifier }}\" ,\n       sku: \"com.sparted.{{ bundle_identifier }}\",\n       app_version: \"{{ app_version }}\"\n    })\n    farm_configure(\n      languages: \"{{ supported_localizations }}\",\n      instance_id: \"{{ instanceId }}\"\n    )\n    statuses = farm_ios(instance_id: \"{{ instanceId }}\")\n    actions = farm_decider(\n      status: statuses[0][:status],\n      version: statuses[0][:version],\n      target_version: \"{{ app_version }}\")\n\n    if actions.include? :deliver\n      match(type: \"appstore\") \n     pem({\n         username: 'developer@sparted.com',\n         app_identifier: \"com.sparted.{{ bundle_identifier }}\",\n         new_profile: Proc.new do |value|\n             # Code to upload PEM file to server\n             puts \"Creating SNS platform...\"\n             sh \"./create_sns_platform.sh {{ instanceId }}\"\n           end\n      })\n      sh \"produce enable_services --push-notification\"\n      match(type: \"appstore\")\n      gym(\n        xcargs: \"PROVISIONING_PROFILE_SPECIFIER=\\\"match AppStore com.sparted.{{ instanceId }}\\\" DEVELOPMENT_TEAM=\\\"xxxxxxxxxx\\\" CODE_SIGN_IDENTITY=\\\"iPhone Distribution\\\"\"\n      ) \n      deliver({\n        force: true,\n        ipa: \"build/{{ name }}.ipa\",\n        submission_information: {\n          export_compliance_uses_encryption: false,\n          content_rights_contains_third_party_content: false,\n        }\n      })\n      slack(\n        message: \"Successfully deployed new {{ instanceId }} IOS Update.\"\n      )\n    else\n      slack(\n        message: \"Skipped  Update {{ instanceId }}.\"\n      )\n    end\n\n\n    # frameit\n  end\n\n  desc \"push to submission\"\n  lane :submit do\n    deliver({\n      force: true,\n      submission_information: {\n        export_compliance_uses_encryption: false,\n        content_rights_contains_third_party_content: false,\n        add_id_info_limits_tracking: false,\n        add_id_info_serves_ads: false,\n        add_id_info_tracks_action: false,\n        add_id_info_tracks_install: false,\n        add_id_info_uses_idfa: false,\n        content_rights_has_rights: true,\n        export_compliance_platform: 'ios',\n        export_compliance_compliance_required: false,\n        export_compliance_encryption_updated: false,\n        export_compliance_app_type: nil,\n        export_compliance_is_exempt: false,\n        export_compliance_contains_third_party_cryptography: false,\n        export_compliance_contains_proprietary_cryptography: false,\n        export_compliance_available_on_french_store: false\n      },\n      submit_for_review: true,\n      skip_binary_upload: true,\n      skip_metadata: true,\n      skip_screenshots: true,\n      build_number: \"{{ bundle_version }}\",\n      app_version: \"{{ app_version }}\"\n    })\n    slack(\n      message: \"Successfully Submit {{ instanceId }} IOS Update.\"\n    )\n  end\n\n  desc \"do nothing\"\n  lane :nothing do\n     slack(\n       message: \"Successfully deployed new {{ instanceId }} IOS Update.\"\n     )\n  end\n\n  # You can define as many lanes as you want\n\n  after_all do |lane|\n    # This block is called, only if the executed lane was successful\n  end\n\n  error do |lane, exception|\n     slack(\n       message: \"{{ instanceId }}: #{exception.message}\",\n       success: false\n     )\n  end\nend\n\nplatform :android do\n  before_all do\n     ENV[\"SLACK_URL\"] = \"https://hooks.slack.com/services/T03PRCVD/xxxxxxxxxxx\"\n  end\n\n  desc \"Submit build on google play\"\n  lane :beta do\n    supply(\n      json_key: \"playstore.key.json\",\n      apk: \"{{ instanceId }}.apk\",\n      package_name: \"com.sparted.{{ instanceId }}\",\n      track: \"beta\",\n    )\n    slack(\n      message: \"Successfully deployed new {{ instanceId }} beta to google play store..\"\n    )\n  end\n\n\n  desc \"Publish latest build on google play\"\n  lane :publish do\n    supply(\n      json_key: \"playstore.key.json\",\n      apk: \"{{ instanceId }}.apk\",\n      package_name: \"com.sparted.{{ instanceId }}\",\n      track_promote_to: \"production\",\n      skip_upload_apk: true\n    )\n    slack(\n      message: \"Successfully Publish to production {{ instanceId }} beta to google play store..\"\n    )\n  end\n\n\n  error do |lane, exception|\n     slack(\n       message: \"{{ instanceId }}: #{exception.message}\",\n       success: false\n     )\n  end\nend\n\n\n# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md\n# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md\n\n# fastlane reports which actions are used\n# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer\n```\n### Environment\n\nfastlane version (run `fastlane -v`):\n\nDo you use bundler to execute fastlane (i.e. `bundle exec fastlane`)?\n\nDo you use a Ruby environment manager (e.g. `chruby`, `rbenv`, `rvm`)?\n"},"comment":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/comments/268008915","html_url":"https://github.com/fastlane/fastlane/issues/6305#issuecomment-268008915","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/6305","id":268008915,"user":{"login":"fastlane-bot","id":17056452,"avatar_url":"https://avatars.githubusercontent.com/u/17056452?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane-bot","html_url":"https://github.com/fastlane-bot","followers_url":"https://api.github.com/users/fastlane-bot/followers","following_url":"https://api.github.com/users/fastlane-bot/following{/other_user}","gists_url":"https://api.github.com/users/fastlane-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane-bot/subscriptions","organizations_url":"https://api.github.com/users/fastlane-bot/orgs","repos_url":"https://api.github.com/users/fastlane-bot/repos","events_url":"https://api.github.com/users/fastlane-bot/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane-bot/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T16:27:36Z","updated_at":"2016-12-19T16:27:36Z","body":"This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to [open a new one](https://github.com/fastlane/fastlane/issues/new) if you still experience this problem 👍"}}
{"actor":{"display_login":"fastlane-bot"}}