Skip to content

Commit

Permalink
fix otp not sent
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sidhdhi-p committed Jun 12, 2024
1 parent f19a0f0 commit d1756ce
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 25 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/android_build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Android Build APK

on:
workflow_dispatch:
push:
branches:
- main
#on:
# workflow_dispatch:
# push:
# branches:
# - main

on: push

jobs:

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/android_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Publish to Google Play Store

on:
push:
branches:
- main
workflow_dispatch:
#on:
# push:
# branches:
# - main
# workflow_dispatch:

on: push

jobs:

Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/ios_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
cd khelo
echo $FIREBASE_OPTIONS_BASE64 | base64 --decode > lib/firebase_options.dart
echo $GOOGLE_SERVICE_INFO_PLIST_BASE64 | base64 --decode > ios/Runner/GoogleService-Info.plist
echo "Decoded Firebase options:"
cat lib/firebase_options.dart
echo "Decoded GoogleService-Info.plist:"
cat ios/Runner/GoogleService-Info.plist
- name: Install Dependencies
run: |
Expand All @@ -62,15 +66,24 @@ jobs:
PROFILE_PATH="$(mktemp "$PROFILES_HOME"/$(uuidgen).mobileprovision)"
echo ${DIST_PROFILE} | base64 --decode > "$PROFILE_PATH"
echo "Saved Provisioning profile $PROFILE_PATH"
echo "Provisioning Profile Content:"
cat "$PROFILE_PATH"
- name: Set up Signing certificate
run: |
echo $DIST_CERTIFICATE | base64 --decode > /tmp/certificate.p12
keychain add-certificates --certificate /tmp/certificate.p12 --certificate-password $DIST_CERTIFICATE_PASSWORD
echo "Signing certificate content:"
openssl pkcs12 -in /tmp/certificate.p12 -nokeys -passin pass:$DIST_CERTIFICATE_PASSWORD
- name: Set up code signing settings on Xcode project
run: xcode-project use-profiles

- name: print plist option
run: |
echo "Printing export options plist content:"
cat $HOME/export_options.plist
- name: Build ipa for distribution
run: |
cd khelo
Expand Down
2 changes: 1 addition & 1 deletion khelo/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ android {
applicationId "com.canopas.khelo"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
minSdkVersion 23
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
21 changes: 20 additions & 1 deletion khelo/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
48DBE20C4FFA0C6093DF577D /* [CP] Embed Pods Frameworks */,
3B5D640C1643D4235A93CC64 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
);
buildRules = (
);
Expand Down Expand Up @@ -295,6 +296,24 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
};
3B5D640C1643D4235A93CC64 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n";
};
48DBE20C4FFA0C6093DF577D /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -718,7 +737,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.canopas.khelo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "provision-khelo-distribution-2024-05-16";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "provision-khelo-distribution-2024-06-12";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
Expand Down
16 changes: 16 additions & 0 deletions khelo/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
import UIKit
import Flutter
import Firebase
import FirebaseAuth

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let firebaseAuth = Auth.auth()
firebaseAuth.setAPNSToken(deviceToken, type: AuthAPNSTokenType.unknown)
}

override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
let firebaseAuth = Auth.auth()
if (firebaseAuth.canHandleNotification(userInfo)){
print(userInfo)
return
}
}
}
10 changes: 8 additions & 2 deletions khelo/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<key>CFBundleURLSchemes</key>
<array>
<string>app-1-753506519474-ios-8cd38557e090c0b51e7cab</string>
<string>com.googleusercontent.apps.753506519474-6qolf71653023s197ur4ag97q2lvaf9r</string>
</array>
</dict>
</array>
Expand All @@ -40,11 +41,16 @@
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Capture a new profile image using your device's camera for a personalized and up-to-date appearance.</string>
<string>Capture a new profile image using your device&apos;s camera for a personalized and up-to-date appearance.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Select a profile image from your device's gallery to showcase your preferred photo in moments of your choice.</string>
<string>Select a profile image from your device&apos;s gallery to showcase your preferred photo in moments of your choice.</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand Down
2 changes: 1 addition & 1 deletion khelo/ios/Runner/RunnerRelease.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<string>unknown</string>
</dict>
</plist>
4 changes: 1 addition & 3 deletions khelo/lib/ui/flow/my_game/my_game_tab_screen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
Expand Down Expand Up @@ -147,8 +146,7 @@ class _MyGameTabScreenState extends ConsumerState<MyGameTabScreen>
return LargeIconButton(
backgroundColor: context.colorScheme.primary,
onTap: () async {
// AppRoute.addMatch().push(context);
FirebaseCrashlytics.instance.crash();
AppRoute.addMatch().push(context);
},
icon: Icon(
Icons.add_rounded,
Expand Down
19 changes: 19 additions & 0 deletions khelo/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
C5A2A7E27CC5C5F28F891F73 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
);
buildRules = (
);
Expand Down Expand Up @@ -332,6 +333,24 @@
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
C5A2A7E27CC5C5F28F891F73 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=macos --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
7 changes: 0 additions & 7 deletions khelo/macos/firebase_app_id_file.json

This file was deleted.

0 comments on commit d1756ce

Please sign in to comment.