Skip to content

Commit

Permalink
Fix events in unity (#93)
Browse files Browse the repository at this point in the history
* Fix events in unity

* Reformat files

* Reformat files
  • Loading branch information
cp-sneha-s authored Apr 3, 2024
1 parent 07564b2 commit 3493a21
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ios_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ jobs:
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -k $KEYCHAIN_PATH -P "$P12_PASSWORD" -T usr/bin/codesign
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
chmod +x ios/install_dist_profile.sh && ./ios/install_dist_profile.sh
Expand Down
Binary file added debug.keystore
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.canopas.projectunity;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "unity-distribution-21-march-2024";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "unity-provisioning-profile-03April2024";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
Expand Down
2 changes: 1 addition & 1 deletion ios/Runner/ExportOptions.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>provisioningProfiles</key>
<dict>
<key>com.canopas.projectunity</key>
<string>205d1b89-17ca-49a3-bc88-1b79ea02204f</string>
<string>9e32b51b-cdf9-43aa-80fc-e785365ccc9</string>
</dict>
<key>signingCertificate</key>
<string>1EDB213DC565912BC6BC866ADEBF192575C633DC</string>
Expand Down
2 changes: 1 addition & 1 deletion ios/install_dist_profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
DIST_PROFILE_FILE=${DIST_PROVISION_UUID}.mobileprovision

# Recreate the certificate from the secure environment variable
echo $DIST_PROVISION | base64 --decode > $DIST_PROFILE_FILE
echo "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode > "$DIST_PROFILE_FILE"

# copy where Xcode can find it
cp ${DIST_PROFILE_FILE} "$HOME/Library/MobileDevice/Provisioning Profiles/${DIST_PROVISION_UUID}.mobileprovision"
Expand Down
13 changes: 6 additions & 7 deletions lib/data/core/utils/date_formatter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,13 @@ class DateFormatter {
}
}

String showAnniversaries(
{required DateTime dateOfJoining,
required DateTime upcomingDate,
required String name,
int? number}) {
String showAnniversaries({
required DateTime dateOfJoining,
required DateTime upcomingDate,
required String name,
}) {
final today = DateTime.now().dateOnly;
final difference = dateOfJoining.difference(today);
int yearDifference = (difference.inDays / 365).floor().abs();
int yearDifference = dateOfJoining.calculateDifferenceInYears(today);
if (upcomingDate.isAtSameMomentAs(today)) {
return _localization.present_anniversary_text(name, yearDifference);
} else {
Expand Down
2 changes: 2 additions & 0 deletions lib/data/services/auth_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ class AuthService {

firebase_auth.AppleAuthProvider appleProvider =
firebase_auth.AppleAuthProvider();
appleProvider.addScope('email');
appleProvider.addScope('name');
if (kIsWeb) {
credential = await firebase_auth.FirebaseAuth.instance
.signInWithPopup(appleProvider);
Expand Down
3 changes: 1 addition & 2 deletions lib/ui/sign_in/sign_in_screen.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:io';

import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
Expand Down Expand Up @@ -108,7 +107,7 @@ class SignInScreenState extends State<SignInScreen> {
const SizedBox(
height: 20,
),
if (kIsWeb || Platform.isIOS) const AppleSignInButton()
if (Platform.isIOS) const AppleSignInButton()
],
),
),
Expand Down

0 comments on commit 3493a21

Please sign in to comment.