Codename One - iOS debug build install fails - ios

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).

Related

Flutter - Codemagic - IOS build fail

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.

vsCode doesn't run flutter app on physical iPhone

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

Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65

I'm new to ios appium and trying to use appium for app testing which i did not have the source code nor ios developer account, the app is downloaded from crashlytics.
I've tried to modify the certificate for webdriveragent with my personal account but failed. And i saw the document from appium that i should able to use appium with only "app" or "bundleid" capability so i tried to remove the "app" then got another err.
Please advise, thank you in advance.
My capabilities set as below
capabilities['platformName'] = 'iOS'
capabilities['automationName'] = 'XCUITest'
capabilities['platformVersion'] = '11.4'
capabilities['deviceName'] = 'iPhone X'
capabilities['udid'] = 'my phone'
capabilities['bindleId'] = 'app.bundleId'
capabilities['app'] = '/pathtomyapp'
Appium log output
selenium.common.exceptions.WebDriverException An unknown server-side
error occurred while processing the command. Original error: Unable to
launch WebDriverAgent because of xcodebuild failure: "xcodebuild
failed with code 65".
If I remove the "app" from capablities then I get following error
selenium.common.exceptions.WebDriverException: Message: An unknown
server-side error occurred while processing the command. Original
error: The desired capabilities must include either an app or a
bundleId for iOS
https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md
a very comprehensive tutorial how to deal with your problem, you are missing
desired_caps['xcodeOrgId'] = 'YOURDEVID'
desired_caps['xcodeSigningId'] = "iPhone Developer"
I believe that this error normally happens because the wda is in the wrong directory. Which version of appium is this? If it's above 1.7.2 then you'll need to add the capabilities usePrebuiltWDA set to true and derivedDataPath set to the path of the derived data folder of the wda.
https://github.com/appium/appium-xcuitest-driver/blob/master/README.md
Hth
James

Xamarin.iOS Error: The Apple iOS SDK is not installed. (iOS9, XCode 7 beta)

I have installed XCode 7 beta, Xamarin.iOS 8.99.4 and Xamarin Studio 5.9 on Mac OSX 10.10.5.
I refer this article. https://developer.xamarin.com/guides/ios/platform_features/introduction_to_ios9/ .
If I debug/run a Xamarin.iOS app on iOS Simulator (iOS9), it works well.
But when I debug/run it on my iPhone5s device (iOS9), Xamarin shows this error message.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: The Apple iOS SDK is not installed. (ex33.iOS)
The "Build Output" window show following message.
__________________________________________________
Project "/Users/username/Projects/ex33/iOS/ex33.iOS.csproj" (Build target(s)):
Target PrepareForBuild:
Configuration: Debug Platform: iPhone
Target _DetectAppManifest:
FindItemWithLogicalName Task
Items:
Info.plist
Entitlements.plist
packages.config
LogicalName: Info.plist
ProjectDir: /Users/username/Projects/ex33/iOS
ResourcePrefix: Resources
Target _DetectSdkLocations:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: error : The Apple iOS SDK is not installed.
DetectSdkLocations Task
TargetFrameworkIdentifier: Xamarin.iOS
TargetArchitectures: ARMv7, ARM64
SdkVersion: <null>
XamarinSdkRoot: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current
SdkRoot: <null>
SdkDevPath: /Applications/Xcode-beta.app/Contents/Developer
SdkUsrPath: <null>
SdkPlatform: <null>
SdkIsSimulator: False
Task "DetectSdkLocations" execution -- FAILED
Done building target "_DetectSdkLocations" in project "/Users/username/Projects/ex33/iOS/ex33.iOS.csproj".-- FAILED
Done building project "/Users/username/Projects/ex33/iOS/ex33.iOS.csproj".-- FAILED
Build FAILED.
Errors:
/Users/username/Projects/ex33/iOS/ex33.iOS.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_DetectSdkLocations target) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: error : The Apple iOS SDK is not installed.
0 Warning(s)
1 Error(s)
---------------------- Done ----------------------
What can I do?
P.S. When I debug/run a app in XCode 7 beta, it works on my iPhone well.
Check the preferences in Xamarin Studio.. you may need to change the Apple SDK path to point to the Beta location.
By default, it should be looking in the default location, but that will only be present if you have the General Release (non Beta) Xcode and iOS SDK installed too.

"Signed resources have been added, removed, or modified" when running iOS app on device

I have an app with an extension. Install and run works fine in the simulator, but after running my app from Xcode to the device once, on subsequent runs I get the following lines in the device log:
Feb 22 16:10:02 Sams-iPad streaming_zip_conduit[7544] <Warning>: __dispatch_source_read_socket_block_invoke:203: Failed to install application at file:///var/mobile/Media/PublicStaging/Pinner.app_sparse.ipa/ : Error Domain=LaunchServicesError Code=0 "The operation couldn’t be completed. (LaunchServicesError error 0.)" UserInfo=0x13f5302a0 {Error=ApplicationVerificationFailed, ErrorDetail=-402620393, ErrorDescription=Failed to verify code signature of <MIPluginKitPluginBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.nhMRWT/extracted/Payload/Pinner.app/PlugIns/AddBookmarkExtension.appex identifier = com.blork.Pinner.AddBookmarkExtension type = 7> : 0xe8008017 (Signed resources have been added, removed, or modified)}
Here's my code signing setup for the app:
And for the extension:
After cleaning the build folder, the app will then install again. This happens on two separate devices (iPad, iPhone).
I am using CocoaPods - I've tried removing them and setting up the project again, no luck there.

Resources