App not installed...because its resources have been modified - iphone

One user cannot install my app because they continue to receive the error:
The application “myapp” was not installed on the iPhone “myPhone” because its resources have been modified
I've read the error occurs because of adding files after the app is built. I have not added any files. Last week, the user could install the ad hoc without issue. I've tried clean and rebuilt with no luck. As the developer, the ad hoc installs fine on my device from iTunes, even after deleting all profiles. Any ideas?

IF this is an adhoc distribution, I'd clean and re-build it, then give it to the user again, along with the provisioning profile : basically make sure they have a clean set of everything.
There is also a reported issue on Vista / Win7 where windows corrupts the Zip. It may be worthwhile distributing it as a ipa file rather than a zip

For me the issue was the .Double files being added to every directory on a shared network drive. We are primarily a Windows environment, and the Mac was saving .Double files on the drive, in every directory.
Literally, to fix the issue referenced above, I simply deleted the .Double files in every directory (of the app being copied to iTunes) and it fixed it.
Hope this helps someone!

This issue also occurs when the person trying to install the .app file has double clicked on the appname.app folder (its shown as a folder in windows environment). When they do it, a thumbnail file is created in the windows environment. This in turn means that the resources have been modified and hence the error. We have always instructed our clients not to double click on the .app folder when they extract it from the zip file.

Related

Unity3d OSX "Application can't be opened"

I'm using a PC and I've created a build for Mac standalone.
I shared the file with my test user by zipping and emailing the build, but when he tries to run the application he sees this error:
The application "SomeApp.app" can't be opened.
After some searching, I learned that I need to do chmod to open the file. Can anyone tell me how to do that on a Mac?
The zip format doesn't have easy support for Unix-like file permissions, so your transfer process is stripping any permission flags that OSX uses to recognize files within that zip that are supposed to be executable. This can also happen with other file transfer solutions, so it's something to watch out for.
The best solution would be to create an archive which does keep those permissions, such as a tar archive.
Failing that, you can have a Mac user open a terminal and set the permission flag manually:
chmod a+x SomeApp.app/Contents/MacOS/*
(Replace SomeApp.app with whatever your .app folder is named)
I had the same issue, I left an answer here, at the bottom: https://forum.unity.com/threads/mac-build-breaking-when-uploaded-to-storage.1093330/
The problem was not with the .zip, but rather with the build itself. Ran fine on my Mac, did NOT run fine once I uploaded it and downloaded it again (or if anyone else downloaded it).
Edited 12/8/2021, as per EmiOB's suggestion, to add the text of my answer (same as in the link):
This worked for me on 2020.3.16f1:
In the Unity Editor: Build Settings, check the box that lets you make an XCode project (requires having XCode installed, I believe I have Xcode 11)
Open the XCode project
Build
That solved my problem :)

Is there a method for sharing and syncing the iOS simulator Applications folder

Our sales team often needs to give demos of apps currently in development. We've used a variety of methods to get them installed on their laptops but everything has been very manual.
The initial method we were using had us downloading the source code and compiling each and every project for each and every salesman. Very time consuming and annoying.
Then we got a little smarter and realized that we could copy out the Applications folder for the iOS simulator and just past that over the iOS simulator's Applications folder on each salesman's laptop. Much better, but still the manual part of copying them all over to each laptop.
So I started poking around about some folder syncing options for macs and came across this technique http://www.youtube.com/watch?v=iWoXPWlu_Dk
Very awesome and seemed to meet my need exactly. I had one central shared folder I could throw new iOS applications into and then the salesmen's laptops would automagically sync with that applications folder and new apps would just appear with no need to ever have their laptops here.
Unfortunately, the iOS simulator does not seem to be recognizing the Applications folder when it's a symbolic link or alias. Is there some Mac magic that could make this work? (I'm a Windows guy normally, just recently been working in the iOS world, so there could be something basic I'm missing here).
I'd love to have the Applications folder /Application Support/iPhone Simulator/5.1/Applications be a shared folder that syncs automatically for them, grabbing any new applications we have ready for demos (and getting them updates to old ones). Just seems like a nice smooth way to get them early builds.
We've used services like TestFlight for the actual devices and that's a great option for that, but when they don't have a device handy or are just blasting through demos on their laptops we'd love to have a nice easy process for keeping them up to date with new builds for their simulator install.
First a bit of background, you don't really need this, but I like teaching :).
On Unix, and now MacOS, there are two basic kinds of links. 'normal' links, and symbolic links. Alias, on windows, unix and mac are a kind of symbolic link: the link contains a reference to the original file. Normal, or hard links create a second directory entry that points to the data, if you delete the original file, the OS knows that there is still another entry pointing to it, so it only actually deletes the file (or directory) when all hard links have been removed. The disadvantage of hard links is that they have to be on the same file system, so that the file system can keep count of how many hard links there are.
OK, I've just installed Dropbox, and it seems that it creates a real folder in the user's home directory, so unless you're a complicated disk partitioning scheme, or file vault 1, where the user's home directory is actually an encrypted disk image, you can use a hard link. It also means that you don't need to copy or sync, as Dropbox is already doing that.
One thing not corrected, but didn't actually point out is that in your post, you seem to be copying to /Application Support, not ~/Library/Application Support or /Library/Application Support. Since you've got the basic scheme working without dropbox, I'll assume that is a typo.
Before I give you the commands, you might want to delete the old iPhone Simulator Applications directory with the Finder, instead of using the rm command, as the rm command is potentially very destructive.
OK, finally, the commands to do the linking; the quotes are important whenever filenames contain spaces. This example is for ~/Library
rm -rf "~/Library/Application Support/iPhone Simulator/5.1/Applications"
ln "~/Dropbox/Simulator Applications" "~/Library/Application Support/iPhone Simulator/5.1/Applications"
This should work, you can stop reading now, the rest is just more education :)
Tilde (~) is a short cut for the users home directory. Use the commands without this to work on /Library instead.
If you want to be sure you've got the exact path, you can drag files and folders from a finder window into the terminal, the path gets pasted instead of the file.
If you're messing with stuff in the root filesystem, you might need superuser rights. If you are logged in with an admin account, you can run single commands with superuser access as follows.
sudo ln "/Library/Application Support/iPhone Simulator" fred
The shell asks for your password, and then runs the command for you as superuser.
sudo remembers the authorization for a few minutes, then you have to authenticate again.
Haven't tested this since I only have one Mac, but give this a try:
Install Dropbox
Create a shared folder there and copy your apps from /Users/USERNAME/Library/Application Support/iPhone Simulator/5.1/Applications
Create a shell script to copy them back to the simulator's location, and add it to the shared folder. It should look something like this:
#!/bin/sh
cp -R ~/Dropbox/Appfolder/appname ~/Library/Application Support/iPhone Simulator/5.1/Applications/
Have your users sync their dropboxes to get the files, then run the shell script to copy the files.

How to install a Ad Hoc provisioning app on windows itunes?

I drag the .mobileprovision and app.zip file in the list of applications in itunes, I also get add-cursor, but if release the mouse-button nothing happens. the list is still empty, whats wrong?
The only way I know to do this is to get the .app file in Mac, put it into a folder called "Payload". Then you have to ZIP this folder and change its name from "Payload.zip" to "MyAppName.ipa". Mac will ask if you are sure you want to change the extention, select "YES". Now you can drag and drop this file into itunes.
There's no other way to do it afaik. Windows makes problems with the macosx "fork" files (if you open the .app file there is a folder named "_MACOSX" or similar... and windows breaks this).
Unzip the app.zip. You will get a folder, e.g. MyApp.app. Now drag that folder into iTunes and it should be ok.
As mentioned - unzip it, but don't forget to drag the .mobileprovision too
If that doesn't work, check back in your provisioning so it's set to the right device.
Common mistake.
http://www.markj.net/iphone-ad-hoc-distribution-windows-mac/
You can save all this trouble though, but making a zip archive in the first place that doesn’t have the Mac resource fork. BetterZip is a handy Mac app that will do this for you. That preferences setting ‘Remove Mac specific stuff from archives’ keeps __MACOSX out of the zip, and the resulting zip will install on Mac and Windows. Another way to do this is to unzip in windows yourself, find the correct app folder, and re-zip.
Ive had this problem before. I'm pretty sure there can be no white spaces in the name as well... double check that before you try to add it.

update iphone app "CodeResources file must be a symbolic link"

I tried to update an iphone app, which lies in an other "itunes connect" profile. I used "application loader" and everything is fine until I try to upload the zip file
I get this strange message and cant figure out whats going wrong
"The CodeResources file must be a symbolic link to _CodeSignature/CodeResources"
I opened the bundle and the folder _CodeSignature is there.
I compiled the app with my distribution profile (no problems)
How are you zipping it? I'm betting that FooApp.app/CodeResources is a file, not a symlink.
If you're using command-line "zip", you need to use zip -y -r to preserve the symlink.
Had the same issue with XCode 3.2.5 (new submission interface), and all it took was to:
delete the build folder
clean, and then
build and archive again.
I had the same issue. But then I noticed that I was building in release mode to the simulator, and not a device. When I targeted a device, I got the proper application file, which I then zipped with the iTunes Artwork and submitted without issue.
I had the same issue here but I "fixed" it after I changed the "Deployment Target" from 2.0 to 3.0 in the target I was building and removed the "Architectures" to only armv6 (before I had both armv6 and armv7). Finally I had to put 'No' to 'Build Active Architecture Only'.
I haven't figured out why I keep getting this error for every binary I create. I've followed all the standard procedures (double-checking my project settings, deleting build folders, cleaning all targets, removing and reinstalling certificates and provisioning profiles, creating and installing new certificates and provisioning profiles, repairing disk permissions, etc) but none of them seem to solve the problem.
I think the problem is that my XCode installation is unable to create symbolic links. I might reinstall it (or even OS X) to see if that fixes the issue permanently.
But in the mean time, this works for me. I use terminal to navigate into the binary and run the following commands
rm CodeResources
ln -s _CodeSignature/CodeResources CodeResources
This deletes the invalid CodeResources file and replaces it with the required symbolic link to _CodeSignature/CodeResources.
I just ran across this issue. It turned out, I had two info.plist files in my resources folder (one for the iPhone version and another for the iPad version). Once I took care of that, the issue went away.
Try this on the command line:
cd (to where your project is)
ln -s _CodeSignature/CodeResources CodeResources
I've just had the same problem. Turns out the project file project.pbxproj in Project.xcodeproj had been corrupted while uploading to an SVN server.
My solution was simply to revert to an older revision, which worked fine.
You have to:
1. Enter the AppName.app folder
2. Create a file named CodeResources
3. Open the file with a plain text editor
4. Type in _CodeSignature/CodeResources (The path where the actual CodeResources file is.)
{The app will now know where the CodeResources file is, and will have an account for all the files in the .app folder.}

Problem installing ad-hoc app on iphone: "resources have been modified."

I can install an app on my development iPhone compiled with "Debug" configuration using my Ad Hoc provisioning and everything works OK.
But when I build it using "Release" configuration, iTunes says:
The application XXX was not installed on the iPhone "YYYY" because its resources have been modified.
I've never seen this message before. Does anybody know what it means?
Thanks!
Antonio
We had the same problem during our first Beta. Someone on Windows dug in the xxx.app folder then Explorer created a Thumbs.db file inside and, boom, he got the message "The application XXX was not installed on the iPhone "YYYY" because its resources have been modified." when he tried to install.
He had to remove the app from iTunes, deleted all the Thumbs.db from xxx.app and then it worked.
We finally got rid of the problem. We were trying to include an image for iTunes after creating the build, but when we used this method (http://iosdevelopertips.com/xcode/itunes-icon-for-ad-hoc-distributions.html) everything went smoothly.
Just in case it helps someone: In my case, I copied the .app to a network drive, then to my Win7 computer before dragging into iTunes - then it did not work. When I zipped the .app first before copying, and then unzipped it on the other end - it worked. Of course, I have no real idea why....
Your debug configuration and your release configuration have some important differences, and release is a lot closer to what ad-hoc should look like. So you first need to duplicate the release configuration and make and call your copy "Ad-Hoc", and make sure you use your ad-hoc provisioning profile with it. Then you need to create a new entitlements file. The new version of Xcode has a cool feature where you can build and archive your app into an ipa file that includes your provisioning profile.
How to do all of this is explained here: http://www.tuaw.com/2010/05/23/devsugar-a-better-way-to-share-ad-hoc-builds/
In those instructions, when it tells you to make the entitlements plist file, it says to uncheck get-task-allow in the plist file. When I created the entitlements file, there wasn't a get-task-allow row at all, so I created one, set the type to boolean, and left it unchecked. It worked great for me.
The best solution to avoid wierdness like this is to create an IPA file. A good step-by-step guide to creating an IPA target in XCode is here:
http://idotcomllc.wordpress.com/2009/05/26/how-to-build-a-ipa-file-from-xcode/
It starts out with an introductory project so search for "Aggregate" to find the point where it starts telling you how to create a new IPA target for build.
I directly upload the app to a server where the windows can also visit. Then compress it in Windows.
I had it, did a clean build and never saw it again.
Incomplete ipa/zip archives (received at the installation end) were the cause for us.
I had this problem using a run script to cp -R the .app file to the Payload folder, for some reason when the script copied the file it modified it somehow, if I used finder and manually copied the .app file into the payload folder and manually zipped the .ipa file it worked fine. I tested it several times using codesign -v to verify the .app file. it always through the error after a build and the run script. but no error when I would copy the file manually.
For me the issue was the .Double files being added to every directory on a shared network drive. We are primarily a Windows environment, and the Mac was saving .Double file on the drive, in every directory.
Literally, to fix the issue referenced above, I simply deleted the .Double files in every directory (of the app being copied to iTunes) and it fixed it.
Hope this helps someone!
I was tasked to test some apps and for some reason was the only one on my team getting this this error. I am working on an XP. All the apps we are testing use the same provisioning file yet some would sync while others would not. Not sure what fixed it but I did go into my *My Music\iTunes\iTunes Media\Mobile Applications* folder, deleted the existing .ipa file for the app I was trying to sync and it seemed to sync fine after. It might not be the answer to your problem but give it a try.
If you work with asstes on a Mac, or have versioned content, I had the same problem with .DS_Store files and hidden .git folders. Once deleted from assets, problem gone. It might be an issue with hidden files.