MDM iOS 9 app install failure - ios

Why will the IPA SideLoad, but not install via AirWatch?Our in house application will install when side-loaded from a Mac using iTunes.
However, for enterprise wide distribution, we use AirWatch. When using the exact same IPA, via AirWatch, the app fails to install, returning an error that reads "Unable to Install" without any other information. So what am I missing?
If the provision profiles and signing are not correct, I shouldn't be able to build the app in the first place. Correct?
And once built, and side-loadable, it stand to reason that it should install via AirWatch without issue.
When exploring the IPA from Apple Configurator, we have retrieved the following from the log file:
Oct 23 14:19:23 Grant-Test-iPad ondemandd[171] : Unable to update manifest, we cannot find its bundle URL.Oct 23 14:19:23 Grant-Test-iPad ondemandd[171] : Calling applicationDownloadInitiated: reply block with error : Error Domain=_OnDemandResourcesErrorDomain Code=114 "(null)" UserInfo={NSLocalizedRecoverySuggestion=LSApplicationProxy returned no bundle URL.}Oct 23 14:19:23 Grant-Test-iPad itunesstored[130] : [ApplicationWorkspace]: Installing software package with bundleID: com.healthsouth.HSPreassessment: bundleVersion: 1.1.10023 path: /var/mobile/Media/Downloads/1966681134488032800/-3221430272025313765Oct 23 14:19:23 Grant-Test-iPad itunesstored[130] : File starts with 0x0d0a0d0a; expected 0x504b0304Oct 23 14:19:23 Grant-Test-iPad itunesstored[130] : BundleValidator: Invalid archive for bundlerIdenfier: com.healthsouth.HSPreassessment path: /var/mobile/Media/Downloads/1966681134488032800/-3221430272025313765Oct 23 14:19:23 Grant-Test-iPad itunesstored[130] : [ApplicationWorkspace]: Bundle validated for bundleIdentifier: com.healthsouth.HSPreassessment success: 0Oct 23 14:19:23 Grant-Test-iPad itunesstored[130] : [ApplicationWorkspace]: Uninstalling application placeholder for bundleIdentifier: com.healthsouth.HSPreassessment; success: 0Oct 23 14:19:23 Grant-Test-iPad itunesstored[130] : [ApplicationWorkspace]: Failed to install application: com.healthsouth.HSPreassessment; /var/mobile/Media/Downloads/1966681134488032800/-3221430272025313765; (null)Oct 23 14:19:31 Grant-Test-iPad corecaptured[425] : CCProfileMonitor::freeResources doneOct 23 14:19:31 Grant-Test-iPad corecaptured[425] : Got an XPC error: Connection invalidOct 23 14:19:31 Grant-Test-iPad corecaptured[425] : CCLogTap::profileRemoved, Owner: com.apple.driver.AppleBCMWLANCore0, Name: DriverLogs
Obviously the device being used is named Grant-Test-iPad.The question to me seems to be that if, as the first line suggest, the manifest cannot be updated, how are we able to side-load the app?

TL;DR: You could install an IPA (built for AdHoc distribution) using iTunes, but you won't be able to run it if the device isn't included in the list.
The error could be referring to the manifest file included in IPAs built for Ad-Hoc distribution.
To build an App in XCode you need a valid AppID and development and distribution certificates and provisioning profiles.
To distribute the IPAs with AirWatch (or via website) you'll need an IPA signed for enterprise distribution, and the user will need to grant trust to the development team

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.

GluonVM launching on iOS Device [issues]

I am giving a try of GluonVM on iOS with Oracle JDK 10.2.
I have noticed that although I have "com.javasuns.test" in src/ios/Default-Info.plist, when I run the "./gradlew launchIOSDevice" command, the bundle ID is taken from the mainClassName defined in build.gradle.
Here is my example:
Default-Info.plist
<key>CFBundleIdentifier</key>
<string>com.javasuns.test</string>
build.gradle
dependencies {
compile 'com.gluonhq:charm:5.0.2'
}
mainClassName = 'test.TestFX'
fxmobile {
javafxportsVersion = '8.60.12'
ios { ...... }
}
./gradlew launchIOSDevice
com.gluonhq.higgs.Higgs: non-fatal issue for class javafx.scene.web.JSObjectIosImpl (no known superclass)
command to dsymutil: xcrun dsymutil -o /Volumes/MyApps/testFX/build/gvm/testFX.app.dSYM /Volumes/MyApps/testFX/build/gvm/testFX.app/testFX
Error getting ProvisioninedDevices, ignore
created
created
created
created
Error getting ProvisioninedDevices, ignore
created
provprofile asked, bid = test.TestFX and origbid = test.TestFX
provprofile asked, bid = test.* and origbid = test.TestFX
provprofile asked, bid = * and origbid = test.TestFX
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
Warning, getProvisioningProfile is failing
java.lang.NullPointerException
I have managed to bypass the issue by creating a new java main class named "test.java" under "com.javasuns" package (ignoring that java type names usually start with an uppercase letter).
build.gradle (Changed)
mainClassName = 'com.javasuns.test'
However, now a new error appears that I do not know how to get through it:
13:17:45:491] BosonAppSupport: Validating codesign...
[SUB] /Volumes/MyApps/testFX/build/gvm/testFX.app: valid on disk
[SUB] /Volumes/MyApps/testFX/build/gvm/testFX.app: satisfies its Designated Requirement
[13:17:46:269] BosonAppSupport: Validation codesign result: true
[13:17:46:270] BosonAppSupport: Codesign done
[13:17:46:333] BosonAppBuilder: UploadInternal start
[13:17:51:041] : Upload Progress: 10%
[13:17:51:573] : Upload Progress: 20%
[13:17:52:104] : Upload Progress: 30%
[13:17:52:916] : Upload Progress: 40%
[13:17:53:947] : Upload Progress: 50%
[13:17:54:696] : Upload Progress: 60%
[13:17:55:520] : Upload Progress: 70%
[13:17:56:372] : Upload Progress: 80%
[13:17:57:367] : Upload Progress: 90%
[13:17:58:414] : Upload Progress: 100%
[13:17:58:460] BosonAppBuilder: uploadInternal done
[13:17:58:796] : Progress: CreatingStagingDirectory [5%]
[13:17:58:798] : Progress: ExtractingPackage [15%]
[13:17:58:799] : Progress: InspectingPackage [20%]
[13:17:58:802] : Progress: TakingInstallLock [20%]
[13:17:58:804] : Progress: PreflightingApplication [30%]
[13:17:58:805] : Progress: InstallingEmbeddedProfile [30%]
[13:17:58:812] : Progress: VerifyingApplication [40%]
[13:17:58:954] : Error: APIInternalError, Description: Failed to unhide archs in executable file:///private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.LXITKr/extracted/testFX.app/TestApp
> Task :launchIOSDevice
[13:17:58:955] BosonAppBuilder: Installing finished due to an error.
[13:17:58:958] BosonAppBuilder: Install internal failed
[13:17:58:958] BosonAppBuilder: Something went wrong. App wasn't installed on the device
Any ideas of how I can solve both issues?
There are two main keys that you have to set properly: CFBundleIdentifier and CFBundleExecutable.
You can check the sample SingleView-GluonVM:
Main className (see build.gradle): com.gluonhq.samples.singleviewgvm.SingleViewWithGluonVM
CFBundleIdentifier (see Default-info.plist): com.gluonhq.samples.singleviewgvm.SingleViewWithGluonVM
and
Gradle project (see settings.gradle): singleview-gluonvmApp
CFBundleExecutable (see Default-info.plist): singleview-gluonvmApp
or the sample DeepLearning-LinearClassifier, with similar settings.
As you can see, the Gluon IDE plugin sets by default the CFBundleIdentifier as the main class name and the CFBundleExecutable as the name of your mobile project.
CFBundleIdentifier
When you want to deploy your app to iOS, the provisioning profile should have this bundle ID. However, you can also use wildcards. Just make sure you have downloaded and installed to your machine the provisioning profile (it should be under /Users/<user>/Library/MobileDevice/Provisioning Profiles), with extension .mobileprovision.
If you preview it (from Finder for instance), the AppID from this file could be something like <TEAM ID>.<mainClassName>, or <TEAM ID>.*.
This is where the jfxmobile plugin sets the appId.
CFBundleExecutable
About the CFBundleExecutable, this is the name your application under build/gvm/ will have. It is mandatory in this case that it uses the name of your project (as in the gradle name).
This is where the jfxmobile plugin sets the appName.
You will find your app under /<appName>/build/gvm/<appName>.app (though Finder will show just <appName>:
If you see the content of the app, you will find the executable file under /<appName>/build/gvm/<appName>.app/<appName>:
The error you are getting;
[13:17:58:954] : Error: APIInternalError, Description: Failed to unhide archs in executable file:///private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.LXITKr/extracted/testFX.app/TestApp
shows testFX.app/TestApp, so probably your project name is testFX, but should be TestApp?
Alternatively, you can simple match the value you have set in CFBundleExecutable, by adding a settings.gradle file to your project, with:
rootProject.name = "<your bundle executable value>"

Codename One - iOS debug build install fails

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

Error no mobile provisioning profile found

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

"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