I'm trying to build an app for IOS made with Flutter.
I have no mac device to do the job so I'm trying to generate my IPA file from codemagic.io .
I created an account for Apple Developer Program and paid the bill.
I followed the instructions for using Codemagic, including instructions for iOS code signing : https://docs.codemagic.io/code-signing/ios-code-signing/ .
I created a repository on GitHub and generated a configuration file (codemagic.yaml).
So when I try to build my app (release version), I have the following problem:
Building iOS
1m 23s
== Building for iOS ==
> /usr/local/bin/flutter build ios --release --no-codesign
/Users/builder/clone/ios/Runner/Info.plist: Property List error: Found non-key inside <dict> at line 44 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building fr.remax.franckehrart for device (ios-release)...
Project base configurations detected, removing.
Running pod install...
6.2s
/Users/builder/clone/ios/Runner/Info.plist: Property List error: Found non-key inside <dict> at line 44 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
Running Xcode build...
Xcode build done. 48.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
../programs/flutter/.pub-cache/hosted/pub.dartlang.org/neumorphic-0.3.2/lib/src/components/selection_controls.dart:182:10: Error: The method '_NeuSelectionControls.buildToolbar' has fewer positional arguments than those of overridden method 'TextSelectionControls.buildToolbar'.
Widget buildToolbar(
^
../programs/flutter/packages/flutter/lib/src/widgets/text_selection.dart:136:10: Context: This is the overridden method ('buildToolbar').
Widget buildToolbar(
^
../programs/flutter/.pub-cache/hosted/pub.dartlang.org/neumorphic-0.3.2/lib/src/components/selection_controls.dart:222:59: Error: Too few positional arguments: 2 required, 1 given.
handleCopy: canCopy(delegate) ? () => handleCopy(delegate) : null,
^
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Encountered error while building for device.
Build failed :|
Failed to build for iOS
I don't understand. Is it a problem with code signing ?
On my Apple Developer Account I can see that a certificate has been generated.
The previous step on Codemagic seems to be ok :
== Fetch code signing files from Apple Developer Portal ==
Automatically detected bundle identifier "fr.remax.franckehrart" from project
Fetch App Store signing files for bundle identifier "fr.remax.franckehrart"
Initializing Apple Developer Portal session with david.matoska#gmail.com
Using Apple Developer Portal team david matoska (HBD2Z7384F) to fetch signing files
Found App ID "fr remax franckehrart" for bundle identifier "fr.remax.franckehrart"
Found code signing certificate "Apple Push Services: fr.remax.franckehrart"
Found code signing certificate "iOS Distribution: david matoska"
Found iOS Distribution provisioning profile "fr remax franckehrart app_store 1597698130"
> keychain initialize
Initialize new keychain to store code signing certificates at /var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/build_4qw6y93s.keychain
Create keychain /var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/build_4qw6y93s.keychain
Set keychain /var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/build_4qw6y93s.keychain timeout to "no timeout"
Set keychain /var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/build_4qw6y93s.keychain to system default keychain
Unlock keychain /var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/build_4qw6y93s.keychain
> keychain add-certificates --certificate /tmp/aps_uiasoh6i.p12 --certificate-password #env:CERTIFICATE_PASSWORD
Add certificates to keychain /private/var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/build_4qw6y93s.keychain
Searching for files matching /tmp/aps_uiasoh6i.p12
Add certificate /tmp/aps_uiasoh6i.p12 to keychain /private/var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/build_4qw6y93s.keychain
1 identity imported.
> keychain add-certificates --certificate /tmp/ios_distribution_ln2czakc.p12 --certificate-password #env:CERTIFICATE_PASSWORD
Add certificates to keychain /private/var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/build_4qw6y93s.keychain
Searching for files matching /tmp/ios_distribution_ln2czakc.p12
Add certificate /tmp/ios_distribution_ln2czakc.p12 to keychain /private/var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/build_4qw6y93s.keychain
1 identity imported.
== Install Flutter dependencies ==
> /usr/local/bin/flutter packages pub get
Resolving dependencies...
> async 2.4.2 (was 2.4.1) (2.5.0-nullsafety available)
+ characters 1.0.0 (1.1.0-nullsafety.2 available)
+ clock 1.0.1 (1.1.0-nullsafety available)
> collection 1.14.13 (was 1.14.12) (1.15.0-nullsafety.2 available)
+ fake_async 1.1.0 (1.2.0-nullsafety available)
> matcher 0.12.8 (was 0.12.6) (0.12.9 available)
> path 1.7.0 (was 1.6.4) (1.8.0-nullsafety available)
> stack_trace 1.9.5 (was 1.9.3) (1.10.0-nullsafety available)
> test_api 0.2.17 (was 0.2.15) (0.2.18 available)
> typed_data 1.2.0 (was 1.1.6) (1.3.0-nullsafety.2 available)
These packages are no longer being depended on:
- quiver 2.1.3
Downloading flutter_rename_app 1.0.0...
Downloading flutter_launcher_icons 0.7.5...
Downloading neumorphic 0.3.2...
Downloading curved_navigation_bar 0.3.3...
Downloading ansicolor 1.0.2...
Downloading process_run 0.10.12+1...
Downloading image 2.1.12...
Downloading xml 3.6.1...
Downloading petitparser 2.4.0...
Downloading crypto 2.1.4...
Changed 11 dependencies!
Can you please help me ?
So ... It worked :) !!!!!!
I had to change my pubspec.yaml file.
I took the 0.4.0 version of Neumorphic (versus 0.3.2 version).
#Captivity , thank you again for your help with the info.plist file.
Bye.
Okey, Your 'key' UIViewControllerBasedStatusBarAppearance there is no assigned value.
Related
I have updated Xcode to Version 13.4.1 (13F100),
Then tried to run a flutter project
Launching lib/main.dart on iPhone SE (3rd generation) in debug mode...
Xcode build done. 2.9s
Failed to build iOS app
Error output from Xcode build:
↳
2022-06-11 12:51:51.546 xcodebuild[45221:416597] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-11 12:51:51.547 xcodebuild[45221:416597] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-11 12:51:51.625 xcodebuild[45221:416597] [MT] DVTPlugInExtensionFaulting: Failed to fire fault for extension (null): (null)
2022-06-11 12:51:51.628 xcodebuild[45221:416597] [MT] DVTPlugInExtensionFaulting: Failed to fire fault for extension (null): (null)
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/l6/zr2yb4p1787b1cbhjdn2ltvr0000gn/T/flutter_tools.tQVcwl/flutter_ios_build_temp_dirmZJ1FK/temporary_xcresult_bundle
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
error: failed to read asset tags: The command `(cd /Volumes/Code/Git/svg/ios && /usr/bin/actool --print-asset-tag-combinations --output-format xml1 /Volumes/Code/Git/svg/ios/Runner/Assets.xcassets)` exited with status 72. The command's standard error was:
actool: error: Failed to locate 'actool'.
xcode-select: Failed to locate 'actool', requesting installation of command line developer tools.
(in target 'Runner' from project 'Runner')
Result bundle written to path:
/var/folders/l6/zr2yb4p1787b1cbhjdn2ltvr0000gn/T/flutter_tools.tQVcwl/flutter_ios_build_temp_dirmZJ1FK/temporary_xcresult_bundle
Error (Xcode): failed to read asset tags: The command `(cd /Volumes/Code/Git/svg/ios && /usr/bin/actool --print-asset-tag-combinations --output-format xml1 /Volumes/Code/Git/svg/ios/Runner/Assets.xcassets)` exited with status 72. The command's standard error was:
actool: error: Failed to locate 'actool'.
xcode-select: Failed to locate 'actool', requesting installation of command line developer tools.
Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).
Exited
with an alert
The "actool" command requires the command line developer tools. Would
you like to install the tools now?
And if I run it from Xcode it gives me this error:
Showing All Messages
failed to read asset tags: The command `(cd /Volumes/Code/Git/svg/ios && /usr/bin/actool --print-asset-tag-combinations --output-format xml1 /Volumes/Code/Git/svg/ios/Runner/Assets.xcassets)` exited with status 72. The command's standard error was:
actool: error: Failed to locate 'actool'.
xcode-select: Failed to locate 'actool', requesting installation of command line developer tools.
This repetitively occurs even if I press the "Install" button.
Same issue here, but with git instead of actool. Another coworker just also got this but with clang... what is going on over at apple?
What just fixed mine was actually opening up xcode and having it run its installer there instead of allowing the automatic pop-up to continue to "install" and then ask again in a few minutes.
I just installed the latest version of flutter and xcode and I'm getting an error when I try running the flutter app on an actual iPhone. Works on ios simulator. The weird thing is that it works when I run it from xcode, but when I run it from vsCode, I get the following error:
It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
open ios/Runner.xcworkspace
What I tried doing:
Change the bundle identifier to myEmailAddress#gmail.com.appTitle
Clean and build the ios app
clean then ran flutter build bundle
What am I doing wrong and how can I get vsCode to run the app on an iPhone?
Here's the full error:
Launching lib/main.dart on Jessica’s iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: ITYTO5RCWD
Xcode build done. 25.4s
Failed to build iOS app
Error output from Xcode build:
↳
2020-04-19 13:53:51.828 xcodebuild[2046:21215] [MT] iPhoneConnect: 📱<DVTiOSDevice ...> == Underlying device preparation errors ==
2020-04-19 13:53:51.828 xcodebuild[2046:21215] [MT] iPhoneConnect: Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Domain: com.apple.platform.iphoneos
Code: 5
Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <"...platform info...">. DTDKDeviceIdentifierIsIDID: 0
User Info: {
DVTDeviceDescription = "...device info..."
}
--
2020-04-19 13:53:51.829 xcodebuild[2046:21215] [MT] iPhoneConnect: 📱<"...platform info..."> == END: Underlying device preparation errors ==
** BUILD FAILED **
Xcode's output:
↳
/Users/Jessica/Development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/darwin/Classes/AudioplayersPlugin.m:88:37: warning: incompatible pointer types sending 'FlutterEngine *' to parameter of type 'NSObject<FlutterBinaryMessenger> * _Nonnull' [-Wincompatible-pointer-types]
binaryMessenger:_headlessEngine];
^~~~~~~~~~~~~~~
In module 'Flutter' imported from /Users/Jessica/Development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/darwin/Classes/AudioplayersPlugin.h:2:
/Users/Jessica/Desktop/flutter_game2/ios/Flutter/Flutter.framework/Headers/FlutterChannels.h:178:74: note: passing argument to parameter 'messenger' here
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
^
1 warning generated.
/Users/Jessica/Desktop/flutter_game2/build/ios/Debug-iphoneos/Runner.app: resource fork, Finder information, or similar detritus not allowed
Command CodeSign failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
open ios/Runner.xcworkspace
Error launching application on Jessica’s iPhone.
Exited (sigterm)
Alright, so i solved this problem by pressing on the search icon on the top left of vscode, then searching for com.example
then i saw three search results that were in the ios folder click on it and replace all three com.example with the identifier you created in xcode.
you can change your signing identifier in Xcode
To do that, just open your workspace with app in Xcode, then go to signing and capabilities to change default com.example to anything else...
Better to use as follows to give app company / organization name
flutter create --org com.yourdomain your_app_name
Swift, Kotlin, and androidx dependencies are the default options
After just open the created project in Android Studio or in VSCode
Parameter
--org com.yourcompany
will form applicationId for Android:
com.yourcompany.yourappname
and iOS PRODUCT_BUNDLE_IDENTIFIER:
com.yourcompany.yourAppName
To explore all possible parameters type
flutter create --help
I am trying to build a complicated xcworkspace that contains 8 xcodeproj.
Main project (target app, framework, app extension)
Pods
6 cpp projects with one static library target each (these have dependencies with each other and added to the final project)
I can build the project via xcodebuild command. I am also able to Archive it, but I cannot export the IPA file, it always gets the following error:
2020-03-18 19:04:49.801 xcodebuild[28749:691158] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/vr/1fb5zcxd0gg92359ynn0r2gm0000gn/T/xxxxx_2020-03-18_19-04-49.800.xcdistributionlogs'.
2020-03-18 19:04:49.834 xcodebuild[28749:691158] [MT] IDEDistributionMethodManager: -[IDEDistributionMethodManager orderedDistributionMethodsForTask:archive:]: Error = Error Domain=IDEDistributionMethodManagerErrorDomain Code=2 "Unknown Distribution Error" UserInfo={NSLocalizedDescription=Unknown Distribution Error}
error: exportArchive: exportOptionsPlist error for key 'method': expected one of {}, but no value was provided
Error Domain=IDEFoundationErrorDomain Code=1 "exportOptionsPlist error for key 'method': expected one of {}, but no value was provided" UserInfo={NSLocalizedDescription=exportOptionsPlist error for key 'method': expected one of {}, but no value was provided}
I also tried to use the XCode 10.3 (10G8) UI in order to perform the same actions. This results to the Organizer screen where I see the xcarchive erroneous located in a group "Other Items" and not "iOS Apps" as it should.
Additionally, the option
"Validate Content" is disabled.
"Distribute Content" does not provide anything for iOS packing.
I have verified that my build commands are correct as the project was able to build with these in its previous state.
I've tried changing static project libraries dependencies but when adding all dependencies to all items it ends with a build error of multiple symbols.
I suspect that something in the build settings, or library/header references is faulty, but I cannot really troubleshoot it.
Is there any way to get additional information for the problem?
I had the same issue. I had to reset my developer certificate on our build server to resolve this.
I hope this helps others.
With "Send iOS Debug build" command I successfully obtained the debug version of my app.
I used a 64-bit iPad mini 2 (you can verify here it has a 64-bit architecture) [INCORRECT, READ UPDATE 3] as test device, so I didn't add the ios.debug.archs build hint.
For installing the app, I sent the OTA link through email, but the process produced the error "Unable to Download App... could not be installed at this time.".
I followed the iOS Signing Wizard (http://www.codenameone.com/manual/signing.html) to generate certificates and I verified all described here (https://www.codenameone.com/blog/my-ios-build-wont-install.html).
What can I do?
UPDATE
These are logs from the iPad:
installd[987] : 0x3c3000 -[MIInstallableBundle performVerificationWithError:]: 487: Incorrect architecture at file:///private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.vRoN6W/extracted/Payload/MyApplication.app/MyApplication
installd[987] : 0x3c3000 -[MIInstaller performInstallationWithError:]: Verification stage failed
itunesstored[916] : 0x1ca5000 __MobileInstallationInstallForLaunchServices_block_invoke240: Returned error Error Domain=MIInstallerErrorDomain Code=15 "Incorrect architecture at file:///private/var/mobile/Library
UPDATE 2
This is the codenameone_settings.properties file:
codename1.arg.java.version=8
codename1.ios.appid=F35988TNH4.it.sitespa.ios.socialapp
codename1.ios.release.provision=C\:\\Users\\[...]\\SocialAppForIOS_distribution.mobileprovision
codename1.arg.rim.obfuscation=false
codename1.arg.ios.newStorageLocation=true
codename1.arg.ios.objC=true
codename1.j2me.nativeTheme=nbproject/nativej2me.res
codename1.arg.ios.project_type=ios
codename1.arg.ios.interface_orientation=UIInterfaceOrientationPortrait\:UIInterfaceOrientationPortraitUpsideDown\:UIInterfaceOrientationLandscapeLeft\:UIInterfaceOrientationLandscapeRight
codename1.displayName=SocialAppForIOS
codename1.arg.ios.pods.platform=,7.0
codename1.android.keystoreAlias=
codename1.ios.release.certificate=C\:\\Users\\[...]\\SocialAppForIOS_distribution.p12
codename1.android.keystorePassword=
codename1.ios.provision=
codename1.arg.android.release=true
codename1.arg.ios.dsym=false
codename1.arg.ios.glAppDelegateHeader=\n\#import "GoogleMaps/GoogleMaps.h"
codename1.arg.ios.statusbar_hidden=false
codename1.arg.ios.afterFinishLaunching=[GMSServices provideAPIKey\:#"[...]"];
codename1.languageLevel=5
codename1.android.keystore=
codename1.arg.ios.pods=,GoogleMaps
codename1.vendor=CodenameOne
codename1.arg.javascript.googlemaps.key=[...]
codename1.arg.win.ver=8
codename1.arg.ios.locationUsageDescription=Some functionality of the application depends on your location
codename1.arg.android.playService.maps=true
codename1.ios.certificatePassword=
codename1.ios.debug.certificatePassword=password
codename1.arg.android.GoogleMaps.minPlayServicesVersion=9.4.0
codename1.mainName=MyApplication
codename1.arg.ios.pods.sources=,https\://github.com/CocoaPods/Specs.git
codename1.ios.release.certificatePassword=password
codename1.arg.ios.prerendered_icon=false
codename1.ios.debug.certificate=C\:\\Users\\[...]\\SocialAppForIOS_development.p12
libVersion=202
codename1.arg.android.xpermissions=<uses-permission android\:name\="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android\:name\="com.google.android.providers.gsf.permission.READ_GSERVICES"/><uses-feature android\:glEsVersion\="0x00020000" android\:required\="true"/>
codename1.arg.ios.application_exits=false
codename1.description=
codename1.secondaryTitle=CodenameOne_Template
codename1.ios.debug.provision=C\:\\Users\\[...]\\SocialAppForIOS_development.mobileprovision
codename1.arg.j2me.nativeThemeConst=0
codename1.rim.certificatePassword=
codename1.version=1.0
codename1.ios.certificate=
codename1.icon=icon.png
codename1.rim.signtoolCsk=
codename1.arg.android.debug=false
codename1.rim.signtoolDb=
codename1.arg.ios.includePush=false
codename1.arg.ios.testFlight=false
codename1.packageName=it.sitespa.ios.socialapp
UPDATE 3
I checked with Apple support my device. It's a 32-bit iPad mini (details here). I set ios.debug.archs as armv7, but from device logs I can notice the same "incorrect architecture" error.
Go over that list again and see if there is something you might have missed. If all else fails connecting the device with a cable and looking at the device logs is what I do in that case.
I solved installing the .ipa file by means of a third-party software (iTools).
While using the build system instruction from https://webrtc.org/native-code/ios/ all went fine except following error
Error: no mobile provisioning profile found for
When i do xcrun security find-identity -v -p codesigning i do see my certificates, Is there anyway to fix it?
$ gn gen out/ios_64 --args='target_os="ios" target_cpu="arm64"'
Done. Made 719 targets from 110 files in 2444ms
$ ninja -C out/ios_64 AppRTCMobile
ninja: Entering directory `out/ios_64'
[2086/2100] CODE SIGNING //webrtc/sdk:r...(//build/toolchain/mac:ios_clang_arm64)
FAILED: WebRTC.framework/WebRTC WebRTC.framework/_CodeSignature/CodeResources WebRTC.framework/embedded.mobileprovision
python ../../build/config/ios/codesign.py code-sign-bundle -t=iphoneos -i=3F06B010E7BE32A3D212219D02DF440B0F20D6A3 -e=../../build/config/ios/entitlements.plist -b=obj/webrtc/sdk/WebRTC WebRTC.framework
Error: no mobile provisioning profile found for "org.webrtc.WebRTC".
ninja: build stopped: subcommand failed.
Let me tell the steps that works for me
Edit the file src/examples/objc/AppRTCMobile/ios/Info.plist and change the value com.google.AppRTCMobile with your own bundle identifier.
Edit the file src/sdk/objc/Framework/Info.plist and change the value org.webrtc.WebRTC with your own bundle identifier
I have created bundle identifiers on Xcode and after that build is successful