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 13, 2024
1 parent f19a0f0 commit 24fe5c0
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 27 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
2 changes: 1 addition & 1 deletion khelo/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,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
}
}
}
4 changes: 2 additions & 2 deletions khelo/ios/Runner/ExportOptions.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<key>provisioningProfiles</key>
<dict>
<key>com.canopas.khelo</key>
<string>74a6f92b-75d4-4c72-b610-435ae643721f</string>
<string>50a6cc64-dc79-426d-89e8-19a399e02860</string>
</dict>
<key>signingCertificate</key>
<string>1EDB213DC565912BC6BC866ADEBF192575C633DC</string>
<string>Apple Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>stripSwiftSymbols</key>
Expand Down
9 changes: 7 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,15 @@
<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>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
7 changes: 0 additions & 7 deletions khelo/macos/firebase_app_id_file.json

This file was deleted.

0 comments on commit 24fe5c0

Please sign in to comment.