import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: .fromSeed(seedColor: Colors.deepPurple),
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State createState() => _MyHomePageState();
}
class _MyHomePageState extends State {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: .center,
children: [
const Text('You have pushed the button this many times:'),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
);
}
}
- В Apple Developer создайте идентификатор для тестируемого приложения.
- В папке ios откройте Runner.xcworkspace с помощью Xcode.
- В разделе «Подписание и возможности» добавьте команду для режима выпуска.
- В терминале запустите flutter build ipa. -v
Я использую macbook m4, macos Tahoe 26.2
[+47275 ms] ** EXPORT FAILED **
2026-01-08 15:52:44.930 xcodebuild[47510:426644] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]:
Created bundle at path "/var/folders/mk/xv05ym3s34j2gq1k019t0lwm0000gn/T/Runner_2026-01-08_15-52-44.930.xcdistributionlogs".
error: exportArchive Copy failed
[ ] Building App Store IPA... (completed in 47.3s)
[ +1 ms] Encountered error while creating the IPA:
[ ] error: exportArchive Copy failed
[ ] Try distributing the app in Xcode:
[ ] open /Users/victor/Documents/work/tubatay_three/build/ios/archive/Runner.xcarchive
[ ] "flutter ipa" took 124,960ms.
[ +3 ms] executing: sw_vers -productName
[ +12 ms] Exit code 0 from: sw_vers -productName
[ ] macOS
[ ] executing: sw_vers -productVersion
[ +7 ms] Exit code 0 from: sw_vers -productVersion
[ ] 26.2
[ ] executing: sw_vers -buildVersion
[ +7 ms] Exit code 0 from: sw_vers -buildVersion
[ ] 25C56
[ ] executing: uname -m
[ +3 ms] Exit code 0 from: uname -m
[ ] arm64
[ +7 ms] Running 3 shutdown hooks
[ ] Shutdown hooks complete
[ +257 ms] exiting with code 0
FLUTTER DOCTOR
[✓] Flutter (Channel stable, 3.38.2, on macOS 26.2 25C56 darwin-arm64, locale en-KZ) [266ms]
• Flutter version 3.38.2 on channel stable at /Users/victor/flutter/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f5a8537f90 (7 weeks ago), 2025-11-18 09:27:21 -0500
• Engine revision b5990e5ccc
• Dart version 3.10.0
• DevTools version 2.51.1
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations,
enable-native-assets, omit-legacy-version-file, enable-lldb-debugging
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [2.6s]
• Android SDK at /Users/victor/Library/Android/sdk
• Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
• Platform android-36, build-tools 36.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.7+-13880790-b1038.58)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 26.2) [1,350ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 17C52
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [4ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (2 available) [5.7s]
• macOS (desktop) • macos • darwin-arm64 • macOS 26.2 25C56 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 143.0.7499.170
! Error: Browsing on the local area network for iPad (Victor). Ensure the device is unlocked and attached with a cable or associated with the
same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources [966ms]
• All expected network resources are available.
Подробнее здесь: https://stackoverflow.com/questions/798 ... opy-failed
Мобильная версия