Skip to content

Instantly share code, notes, and snippets.

View douglasiacovelli's full-sized avatar

Douglas Iacovelli douglasiacovelli

  • @contratadome
  • Bertioga
View GitHub Profile
team_name "Your company's team name"
team_id "Your company's team id"
itc_team_id "Your company's Appstore connect id"
itc_team_name "Your company's team name"
platform :ios do
# ... here comes the lanes we've created earlier
desc "deploy"
lane :deploy do
setup_ci
sync_code_signing(
type: "appstore",
app_identifier: 'com.company.example',
readonly: true
platform :ios do
desc "Get certificates"
lane :certificates do
sync_code_signing(
type: "development",
app_identifier: ['com.company.example', 'com.company.example.stg'],
force_for_new_devices: true,
readonly: true
)
# These keys must be filled in order to fetch the certificates
# Git basic authorization for match encoded in base64
# This is only needed if the user is not authenticated using ssh on git or if you're running on CI/CD server.
# MATCH_GIT_BASIC_AUTHORIZATION=
# Password used to encrypt/decrypt certificates
MATCH_PASSWORD=
# (Optional) Your local machine password, such as the one you use to login.
@douglasiacovelli
douglasiacovelli / Matchfile
Created March 26, 2021 15:47
Matchfile sample
git_url("git@github.com:<yourcompany>/<repo>.git")
storage_mode("git")
type("development") # The default type, can be: appstore, adhoc, enterprise or development
import 'dart:async';
void main() {
escutarDeepLinks().listen((e) {
print(e);
}, onError: (error) {
print('deu erro vei. $error');
});
@douglasiacovelli
douglasiacovelli / auth_interceptor.dart
Created January 5, 2021 11:40
This is a code for an auth interceptor for Dio, which uses a header to avoid retrying indefinitely to refresh the token.
/// This interceptor is simplified because is doesn't contemplate
/// a refresh token, which you should take care of.
/// I haven't tested this code, but I believe it should work.
/// If you have some feedback, please leave a comment and I'll review it :) Thanks.
class AuthInterceptor extends InterceptorsWrapper {
final Dio loggedDio;
final Dio tokenDio;
class Credentials {
final String givenName;
final String familyName;
Credentials(this.givenName, this.familyName);
}
void main() {
final credentials1 = Credentials('Doug', 'blabla');
data class ErrorResponse(
val error_description: String, // this is the translated error shown to the user directly from the API
val causes: Map<String, String> = emptyMap() //this is for errors on specific field on a form
)
@douglasiacovelli
douglasiacovelli / AirbnbFlavorBuild.gradle
Created October 24, 2019 14:19
Airbnb snippet on how to add modules to app according to flavor
project.flavors.each { flavor, config ->
project.dependencies.add("${flavor}Compile", project(config.entryModule))
}