Installing an ios app works without error from xCode, but installing an ios app from android studio gives me the error below. I checked the path to the info.plist file in both IDEs, and can confirm the the path is the same so, the error isn't caused by IDEs using different files. The error also occurs when using a new unedited project using the kmm template.
Error
failed transferring /Users/Dylan/StudioProjects/kmm2/build/ios/Debug-iphoneos/iosApp.app. Reason: AMDeviceSecureInstallApplicationBundle failed with err = -402653177(The argument is invalid.)
com.jetbrains.cidr.execution.debugger.backend.DebuggerFatalException: failed transferring /Users/Dylan/StudioProjects/kmm2/build/ios/Debug-iphoneos/iosApp.app. Reason: AMDeviceSecureInstallApplicationBundle failed with err = -402653177(The argument is invalid.)
info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>kmm</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
</dict>
<key>UILaunchScreen</key>
<dict/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
I am using android studio 2021.2.1 patch 2, kmm plugin 0.3.3, kotlin 1.7.10, kotlinx coroutines 1.6.4, but the error still occurs using older versions.
Credit to Intellij support team for guiding me and notifiying the kmm plugin dev of this problem.
Summary: The error was caused by the kmm plugin failing to automatically create a folder that the kmm plugin itself was coded to use during the process of transferring the built app to the iphone.
Diagnosing and Solving:
Execute log stream --level debug --predicate "sender == 'MobileDevice'"
in the terminal`
Try installing the app and look at the log stream in the terminal
log stream output: AMDeviceSecureInstallApplicationBundle (thread 0x10ef3b600): /var/folders/9r/cxtgjn5j55g243tbvmsb_6n80000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas does not exist: No such file or directory
mkdir -p /var/folders/9r/cxtgjn5j55g243tbvmsb_6n80000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.