I am using MacBook Air M2,
I am in APP Jam right now and I have left only 20 hours. I can’t solving this issue.
This is the issue:
^^^^^^^^^^^^^^
Failed to package /Users/renanuya/Desktop/flutter_projects/jam_swifttask_app.
Command PhaseScriptExecution failed with a nonzero exit code
note: Building targets in dependency order
/Users/renanuya/Desktop/flutter_projects/jam_swifttask_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'AppAuth' from project 'Pods')
/Users/renanuya/Desktop/flutter_projects/jam_swifttask_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'PromisesObjC' from project 'Pods')
/Users/renanuya/Desktop/flutter_projects/jam_swifttask_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'GoogleUtilities' from project 'Pods')
/Users/renanuya/Desktop/flutter_projects/jam_swifttask_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'FirebaseCoreInternal' from project 'Pods')
/Users/renanuya/Desktop/flutter_projects/jam_swifttask_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'FirebaseCore' from project 'Pods')
/Users/renanuya/Desktop/flutter_projects/jam_swifttask_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'GTMSessionFetcher' from project 'Pods')
/Users/renanuya/Desktop/flutter_projects/jam_swifttask_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'GTMAppAuth' from project 'Pods')
/Users/renanuya/Desktop/flutter_projects/jam_swifttask_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'GoogleSignIn-GoogleSignIn' from project 'Pods')
/Users/renanuya/Desktop/flutter_projects/jam_swifttask_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'GoogleSignIn' from project 'Pods')
warning: Run script build phase 'Thin Binary' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
Result bundle written to path:
/var/folders/2p/9n80m79j2rdd3pmx00z38nch0000gn/T/flutter_tools.LM9sht/flutter_ios_build_temp_diryrIlk6/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro.
Exited
This is the Third Page code:
import 'package:flutter/material.dart';
import 'package:jam_swifttask/getStartedPages/thirdpage.dart';
import 'secondpage.dart';
import 'package:jam_swifttask/loginPages/loginpage.dart';
import 'package:jam_swifttask/loginPages/auth_page.dart';
class ThirdPage extends StatelessWidget {
const ThirdPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
double _height = MediaQuery.of(context).size.height;
double _width = MediaQuery.of(context).size.width;
return Scaffold(
backgroundColor: Colors.grey[300],
body: Stack(
children: [
// Arka plan görüntüsü veya widget'ı burada ekleyebilirsiniz
Positioned(
top: 50,
right: 20,
child: TextButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const AuthPage()),
);
},
child: const Text(
'Geç',
style: TextStyle(
fontSize: 16,
color: Color(0xFF2F2F2F),
fontWeight: FontWeight.bold,
),
),
),
),
Center(
child: Padding(
padding: const EdgeInsets.all(30.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
SizedBox(
height: _height * 0.4,
width: _width * 0.8,
child: Image.asset('assets/bro3.png'),
),
SizedBox(height: _height * 0.01),
Container(
alignment: Alignment.center,
child: const Text(
'Her Zaman Hatırla',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Color(0xFF2F2F2F),
),
textAlign: TextAlign.center,
),
),
SizedBox(
height: _height * 0.035,
),
SizedBox(
width: _width * 0.7,
child: Text(
'Swift Task sayesinde görevlerinizi teslim tarihi gelemeden önce hatırlayabilirsiniz.',
style: TextStyle(
fontSize: 16,
color: Color(0xFF2F2F2F),
),
),
),
SizedBox(
height: _height * 0.24,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
SizedBox(
width: _width * 0.8,
height: _height * 0.06,
child: ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
AuthPage()), //normlade AuthPage()'e atmalı ama çalışmıyor
);
},
child: const Text(
'Sonraki',
style: TextStyle(
fontSize: 20,
color: Colors.white,
),
),
style: ElevatedButton.styleFrom(
backgroundColor: Color.fromRGBO(47, 47, 47, 1.0),
shape: RoundedRectangleBorder(
// <-- Radius
borderRadius: BorderRadius.circular(15.0),
),
),
),
),
SizedBox(height: _height * 0.1),
],
),
),
],
),
),
),
],
),
);
}
}
When I click the "Geç" TextButton and When I click the Elavated Button I get this issue.
This is the auth Page code:
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:jam_swifttask/dashboard_page.dart';
import 'loginpage.dart';
import 'package:jam_swifttask/dashboard_page.dart';
class AuthPage extends StatelessWidget {
const AuthPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: StreamBuilder<User?>(
stream: FirebaseAuth.instance.authStateChanges(),
builder: (context, snapshot) {
if (snapshot.hasData) {
return DashboardPage();
} else {
return const LoginPage();
}
},
));
}
}
I don’t know which information I need to give, please tell me if you need information to understand and solve the problem.
Well I try, this code
@override
Size computeDryLayout(BoxConstraints constraints) {
final hasBoundedHeight = constraints.hasBoundedHeight;
final hasBoundedWidth = constraints.hasBoundedWidth;
if (!hasBoundedHeight || !hasBoundedWidth) {
// Sınırları olmayan bir durumda, kapsayıcı widget'in sınırlarına uyacak şekilde boyutlandırıyoruz.
return Size(
hasBoundedWidth ? constraints.maxWidth : double.infinity,
hasBoundedHeight ? constraints.maxHeight : double.infinity,
);
}
return constraints.biggest;
}
3
Answers
If you still have an error in your code update Flutter
Check out this answer
Also you have warning about
IPHONEOS_DEPLOYMENT_TARGET
, you have to change it fromPodfile
inios
folderios/Podfile
uncomment this line
# platform :ios, '11.0'
or just add
platform :ios, '11.0'
I hope it may help you.
note :
I don't have enough rep to comment
If you downgrade the XCode version to 14.2, the problem will be solved.
or try flutter upgrade.