Thanks for your help to read crash log.
Now my app has rejected over 2weeks due to this crash log.
And this crash happens when app is on launch only on iPad.
When I testd iPad simulators and iPhones, they were successfully launched.
I look into main.dart code at first based on that.
main.dart
void main() async {
await runZonedGuarded(() async {
try {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: ".env");
KakaoSdk.init(nativeAppKey: dotenv.env["KAKAO_NATIVE_APP_KEY"]);
if (Firebase.apps.isEmpty) {
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
}
await Supabase.initialize(
url: dotenv.env["SUPABASE_URL"]!,
anonKey: dotenv.env["SUPABASE_ANONKEY"]!,
);
await SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
]);
await StepNotification().initializeService();
FirebaseMessaging.onBackgroundMessage(messagingBackgroundHandler);
if (Platform.isAndroid) {
await AndroidAlarmManager.initialize();
await AndroidAlarmManager.periodic(
const Duration(hours: 8),
10,
stepAlarmManager,
allowWhileIdle: true,
wakeup: true,
rescheduleOnReboot: true,
);
}
} catch (e) {
// ignore: avoid_print
print("initialize app: $e");
}
if (kDebugMode) {
runApp(
const riverpod.ProviderScope(
child: OnldoccFlutterApp(),
),
);
} else {
final dnsCode = dotenv.env["SENTRY_DNS"];
await SentryFlutter.init(
(options) {
options.dsn = dnsCode;
options.attachStacktrace = true;
},
appRunner: () => runApp(
const riverpod.ProviderScope(
child: OnldoccFlutterApp(),
),
),
);
}
}, (exception, stackTrace) async {
Sentry.captureException(exception, stackTrace: stackTrace);
});
}
The only code regarding package pedometer is StepNotification().initializeService(); from main.dart.
So I moved code StepNotification().initializeService(); that initialize process to count user's step into another part of app for test and submit this app.
But that app is also rejected with same issue.
[PS]
StepNotification().initializeService() initialized flutter_background_service and after user chooses to start background service, pedometer package will be initialized.
Since I already tested as moving this to another part, I guess that this line is not causing error.
And even this line also don't initialize package pedometer at the moment when app is on launch.
I look into AppDelegate.swift code on next.
AppDelegate.swift
import UIKit
import Flutter
import flutter_background_service_ios
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
SwiftFlutterBackgroundServicePlugin.taskIdentifier = "dev.flutter.background.refresh"
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
I think when GeneratedPluginRegistrant.register(with: self) is executed, all packages request corresponding permission before didFinishLaunchingWithOptions step and it takes long time.
But It's also weird that before 2weeks, I haven't get rejected from app review with this issue even though AppDelegate.swift code is same.
I don't know why this error happens suddenly even only on iPad that iOS test team uses.
And I also check that permission 'notification' that is used from other packages is also requested before app is launched (white blank screen before UX is drawn) even when I successfully launch my app.
Why permissions are requested before app is launched even though I don't make it that.
Post
Replies
Boosts
Views
Activity
Sorry Step means step to export archive, not related to package 'pedometer'.
After struggled with 4 days with this problem as changing a bunch of ios configuration, I just delete Xcode 15.3 and install 15.2 and succeeds.
I also deleted Xcode 15.3 and install 15.3, It didn't work as well, which means there should be some bug in Xcode 15.3 deployed March 24.
Please look through this problem..
I encountered almost similar issue.
I’ve export archive file to app Store so far, but all of sudden, build is done but distribute app kills Xcode with back trace.
xcode is the most recent version.
my issue is posed here.
please give us feedback apple team asap :(
btw do you use flutter package pedometer?
This error says something like STEP. My app is counting user’s step and now using this package.
I haven’t updated this package’s version.
This is my crash log
Thread 11 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x0000600003e7a2ce x5: 0x0000000138424e34 x6: 0x0000000000004400 x7: 0x000000016d1b55c8
x8: 0x45b0f2a35ac2f67f x9: 0x45b0f2a237d9867f x10: 0x0000000119d04990 x11: 0x000000000000003f
x12: 0x0000000000000020 x13: 0x0000000110a005f0 x14: 0x00000001dce106f0 x15: 0x00000001dce106f0
x16: 0x0000000000000148 x17: 0x00000001e6024db8 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x000000016d1b7000 x21: 0x0000000000014007 x22: 0x000000016d1b70e0 x23: 0x0000000000000000
x24: 0x0000000000000000 x25: 0x0000000000000000 x26: 0x0000600003435440 x27: 0x0000600002a32f20
x28: 0x00000001dcdf6c48 fp: 0x000000016d1b6210 lr: 0x0000000185b2ecc0
sp: 0x000000016d1b61f0 pc: 0x0000000185af711c cpsr: 0x40001000
far: 0x000000010848ef5c esr: 0x56000080 Address size fault
I checked that It happens in the process 'Signing App.framework..'
Then xCode closes.
Me too, I can't add firebase Crashlytics due to Xcode build error. any update?