iOS Over-the-Air mobile Ad-Hoc downloading: "Could not Extract Archive" error - iphone

I am trying to download my application over the web on my iOS 4.2 device.
I have verified that the application I have built installs and runs correctly on my device through XCode - i.e. The application should be built and signed correctly. I package it through "Build and Archive" and "Share..." it - then upload the .plist and .ipa files to my server, which I have the correct links to, etc..etc...
When I try to install it (over-the-air), it says "Waiting...", then "Loading..." then "Installing...", then I get an error: "Unable to Download 'myAppName'" - (Done) (Retry).
Checking the console on my iPhone, I get the following:
Sat Jan 8 18:30:50 unknown
installd[26090] : 2ff66000
extract_package: Could not extract
archive Sat Jan 8 18:30:50 unknown
installd[26090] : 2ff66000
stage_package: Could not extract
/var/tmp/install_staging.ReUsa4/foo.zip
to /var/tmp/install_staging.ReUsa4/foo_extracted
Sat Jan 8 18:30:50 unknown
installd[26090] : 2ff66000
MobileInstallationInstall: Could not
stage the package Sat Jan 8 18:30:50
unknown installd[26090] :
2ff66000 handle_install: API failed
Sat Jan 8 18:30:50 unknown
com.apple.itunesstored[26087]
: MobileInstallationInstall:
failed with -1
Looks like a bunch of problems "Extracting Archive". Anyone know what this means?
Any ideas???
UPDATE: I the Diawi web site to install this - and it worked fine. So, it's not a code signing issue.

Are you positive that the URL you entered when you did the Enterprise distribution, points to your IPA file? The fact it is showing foo.zip in there seems to point in that direction.

Another thing one may check is the deployment target version vs. iPad iOS version. In my case I was building 4.3 target, while my iPad was at 4.2.1. After I built 4.2 and upload, things works fine.

Yes we had same problem
WRONG
Application URL:http://www.mycompany.com/
RIGHT
Application URL:http://www.mycompany.com/MyApp.ipa
A clue is in the progress bar under the icon:
if you see Unable to Download and the bar is at 0 then I found that something in the plist is wrong.
Test All URLS in plist. They should be openable/downloadable in a browser.
If the progress bar moves too quickly it can find the images but the IPA is a problem, check the URL.
If it moves slowly I found its downloding the IPA ok.
If it gets to 75% and fails it usually mean its downloaded what it can and is now failing on install.
Open organizer/Your device/Console logs
if you see unzip error - "cant unarchive" theres something wrong with ipa.
We had wrong URL http://www.mycompany.com/ so think it downloaded default.htm because we said this was the application URL then tried to unzip it and failed.
NONE OF THIS IS HELPED BY APPLES CRAPPY DOCs NOT GIVING AN EXAMPLE!!!!

Go to Product -> Edit Schema -> Build Configuration
Change Debug to Release and try it.

I figured my problem out, maybe you are having the same issue. When uploading the .ipa file to my website I was doing so as an ASCII file when it should have been as a binary. Whatever way you are using to upload the files make sure you can specify the transfer type used to upload them. Hope this helps

I was uploading my ipa to a shared host that I use for tinkering. I tried another host and it worked fine.
For future googlers, here's the errrors I was getting on my device in Organizer
unknown installd[1595] <Error>: 2fff9000 bom_file_error_handler: Payload/MyApp/thumb#2x.png:No such file or directory
unknown installd[1595] <Error>: 2fff9000 : Can't stat Payload/MyApp/thumb#2x.png: No such file or directory
unknown installd[1595] <Error>: 2fff9000 : Can't stat Payload/MyApp: No such file or directory
unknown installd[1595] <Error>: 2fff9000 extract_package: Could not extract archive
unknown installd[1595] <Error>: 2fff9000 stage_package: Could not extract /var/tmp/install_staging.mqnjNY/foo.zip to /var/tmp/install_staging.mqnjNY/foo_extracted
unknown com.apple.itunesstored[1605] <Notice>: MobileInstallationInstall: failed with -1
unknown installd[1595] <Error>: 2fff9000 MobileInstallationInstall: Could not stage the package
unknown installd[1595] <Error>: 2fff9000 handle_install: API failed
unknown installd[1595] <Error>: 2fff9000 send_message: failed to send mach message of 71 bytes: 10000003
unknown installd[1595] <Error>: 2fff9000 send_error: Could not send error response to client

I had the same problem.
I had created an Ad-Hoc Distribution release of my iPad app, had the URL correct, but then copied the .plist and .ipa files into the wrong directory on my FTP site.
Copying it to the correct place (which corresponded with the "Application URL" setting when I created the Archive) fixed this issue.
Sigh. Wouldn't it be nice if the Terminal gave us an easy-to-read description of why such apps had failed to install...

Related

Encountered an error communicating with IBAgent-iOS. Failed to boot device iPhone Xs

I am getting an Error on the top of my interface builder in Xcode 10.3 and while clicking on report bug and checking the log.txt file I found out that fails to open simulator. However I am not starting any simulator.
Here is the Error found in Log.txt
Encountered an error communicating with IBAgent-iOS. (Failure reason: IBAgent-iOS failed to launch): Failed to boot device iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown) for context <IBCocoaTouchToolLaunchContext: 0x7fe80e754ad0> toolName = IBAgent-iOS, description = <IBCocoaTouchPlatformToolDescription: 0x7fe80e2a0290> System content for IBCocoaTouchFramework-ElevenAndLater <IBSimulatorDeviceTypeDescription: 0x7fe80fab2f90> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-XS (Failure reason: Failed to boot iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown)): Unable to boot the Simulator. (Failure reason: launchd failed to respond.)
Error Domain=com.apple.InterfaceBuilder Code=-1 "Encountered an error communicating with IBAgent-iOS." UserInfo={NSLocalizedFailureReason=IBAgent-iOS failed to launch, NSUnderlyingError=0x7fe80ae44440 {Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" UserInfo={NSLocalizedFailureReason=Failed to boot iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown), NSLocalizedDescription=Failed to boot device iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown) for context <IBCocoaTouchToolLaunchContext: 0x7fe80e754ad0> toolName = IBAgent-iOS, description = <IBCocoaTouchPlatformToolDescription: 0x7fe80e2a0290> System content for IBCocoaTouchFramework-ElevenAndLater <IBSimulatorDeviceTypeDescription: 0x7fe80fab2f90> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-XS, NSUnderlyingError=0x7fe80bd300f0 {Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" UserInfo={NSLocalizedFailureReason=launchd failed to respond., NSLocalizedDescription=Unable to boot the Simulator.}}}}, NSLocalizedRecoverySuggestion=Please check Console.app for crash reports for "IBAgent-iOS" for further information., NSLocalizedDescription=Encountered an error communicating with IBAgent-iOS.}
If anyone still looking for an answer to this after Xcode 13 update, I have tried everything they mentioned on the internet and nothing worked except one. The only thing that worked is the complete re-installation of Xcode. Completely uninstall/delete Xcode first and restart the mac and reinstall Xcode then all should be good.
Delete Xcode from Applications Folder and Empty Trash.
Go to ~/Library/Developer and Delete CoreSimulator, Xcode, XCTestDevices Folder. Empty trash
Goto ~/Library/Caches and delete everything starting with com.apple.dt.Xcode, Empty trash
Then Restart your Mac and reinstall Xcode. I used my downloaded Xcode app, AppStore installation will also work, I guess.
Now it all working.
Before that, I have changed the storyboard file using Open as Source Code mode (coz I couldn't open it in Interface Builder - Xcode just hang)
I changed the storyboard design device to iPhone 13 instead of the older device version it had.
<device id="retina6_7" orientation="portrait" appearance="light"/>
I change the existing line with this line. It kinda solve another issue of Xcode hanging, when trying to open with Interface Builder, but it didn't solve Encountered an error communicating with IBAgent-iOS issue when trying to install the app. That issue only got solved when I completely reinstalled the Xcode.
I have managed to fix it just by changing preview device on interface builder
In my case it helped:
clean project
remove derived data
close Xcode
restart Mac
I used DevCleaner XC helper app:
https://apps.apple.com/us/app/devcleaner-for-xcode/id1388020431?mt=12
removed everything, and after that restarted mac. No XC reinstall needed.
This problem caused because, I deleted all directories under "Library/Developer/Xcode" for a purpose. But, I realised I also deleted wrong directories in same time. Then I put back directories from the Bin. It is solved for me.
If you have or have had multiple versions of Xcode open, you may need to reboot or completely re-install the CoreSimulatorService, an evil, globally installed background service that somehow remains online and available to many versions of Xcode despite it being compatible with only one version.
See more here: https://stackoverflow.com/a/72946533/731285
Other symptoms of this issue: Simulators not showing up in the Window > Devices and Simulators listing and simctl throwing errors and being unable to find base iOS SDKs similar to the following:
$ xcrun simctl list
...
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-15-5 --
iPhone 8 (55A90310-8202-4A0D-968B-00F440D42210) (Shutdown) (unavailable, runtime profile not found)
See also:
Command CompileAssetCatalog failed with a nonzero exit code
Xcode device Unavailable, runtime profile not found
In my case, I just had to set team in
Project > Targets > Signing & Capabilities > Team > Personal Team

Framework Pod says Library not loaded

Hi I'm making an application for ios that uses a pod library called Signature.Framework (Substantially allows you to make the signature). When I start the application on the XCode simulator everything works perfectly when I go to test the application on the physical device, I get the error below. What is more due and how can I solve it?
Error:
dyld: Library not loaded: #rpath/Signature.framework/Signature
Referenced from: /var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/myapp
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: code signing blocked mmap() of '/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature'
/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: code signing blocked mmap() of '/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature'
/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: stat() failed with errno=1
/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: code signing blocked mmap() of '/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature'
/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: stat() failed with errno=1
(lldb)
Linking:
Solution 1
In my case i set the Pods.framework to optional and it fixed the issue , It wasn't being copied to device by the .sh script and so the app crashed:
Solution 2
remove your project from DerivedData
User/YourPcName/Library/Developer/Xcode/DerivedData/ProjectNameFolder

ImageIO: CGImageRead_mapData 'open' failed error = 2 on app start

i made an iphone app and build it with 5.0.
on 5.0.1 it works fine. when i try to open the app on 5.1 or 5.1.1 the app crashes instantly.
in the log there are the following entries:
ImageIO: CGImageRead_mapData 'open' failed '/Applications/myApp.app/Icon.png'
error = 2 (No such file or directory)
libpng error: No IDATs written into file
i opened the folder and Icon.png exists!!
hope someone can help me :/
Please add icon.png in your application plist file under the row icon files.

Xcode says Build is successful, but app is not installed on iPhone

I'm using Xcode 4.3.2 with the deployment target set to 4.1 and the iOS is 4.2.1 on an iPhone 3Gs. Whenever I build and run the application with the iPhone 3Gs as the target, it says "finished running 'app name' on 'iPhone 3Gs'.
I have a provision profile setup for this iPhone 3Gs
I checked organizer, and the circle to the right of the iPhone name is green
I ran the same app on my iPhone 4s with the deployment target set to 4.1 and it installed and runs on my iPhone 4s.
Any ideas as to what might be going on that is not installing the app on the iPhone 3Gs? I even tried searching for the app using spotlight, and nothing came up.
Thanks!
EDIT:
this is what appears in my device console log:
Fri May 18 15:27:39 unknown lockdownd[16] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from iTunes. Killing connection
Fri May 18 15:27:39 unknown com.apple.mobile.lockdown[16] <Notice>: Could not receive size of message
Fri May 18 15:27:51 unknown MobileStorageMounter[4978] <Notice>: (0x3e7518b8) platform_supports_camera_import: Platform is NOT configured for camera import
Fri May 18 15:28:01 unknown MobileStorageMounter[4978] <Notice>: (0x3e7518b8) idle_timer_callback: Exiting after idle
Make sure you have armv6 and armv7 for your 'Valid Architectures' in Build settings, because the 3Gs won't work on the defaulted armv7 only

build problem in xcode

On all the sample projects from apple's site (like Simple Drill Down) when I do a compile I get "copystrings failed with exit code 71".
And old project of mine compiles. Seems to be be an issue with localized strings:
"copystrings failed with exit code 71" My old project doesn't have any localized strings of course.
here is a screenshot:
http://img.skitch.com/20090722-rn5gbps4f9endan6xpa5gegmbp.png
The error also indicates XCode can't find copystrings, but here it is:
here is an "ls" of the directory in question:
pswenson#zeppelin /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources]$ ls copystrings
-rwxrwxr-x 1 root admin 7689 Jul 2 17:52 copystrings
[pswenson#zeppelin /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources]$
any ideas?
What version of Xcode are you running? Because the newer projects will require Xcode 3.0 and up to compile
Or it could be related to: copyplist failed with exit code 71