xcode 4 distribution build problem - macos

When trying to test my application created in XCode 4 on another computer (sent from an archive, just like the user guide says to do), I get this error in console. Any ideas?
3/27/11 10:20:16 PM com.apple.launchd.peruser.501[106] ([0x0-0x27be7bc].xxx.test[86534]) posix_spawn("/Users/Matt/Dropbox/test.app/Contents/MacOS/test", ...): Permission denied
The permissions appear to be fine on everything, I can't figure it out.

Dropbox does strange things to file permissions in bundles (Mac / iOS apps are bundles). It seems like you changed Xcode's default build folders (now called "derived data", etc.) to point at this DropBox folder. Don't do that.
Make sure the app is built somewhere aside from this folder and I'll bet it'll work.

Related

XCode, frameworks, app submission and SwiftFolder

I have built a Swift app. I added all libraries in Project -> Target -> Link binary with Libraries. I added external frameworks such as Parse to the project too.
I then selected all frameworks under the project and created a group folder called Frameworks.
I have observed/recorded three issues:
When I run ls -l in shell, the Frameworks folder is not actually there
Only frameworks such as Parse & Bolts are actually listed under the project. Other frameworks (e.g. QuartsCore, CoreGraphics etc.) are not listed anywhere with the ls -l command
If I try to archive the project, because the Frameworks folder is not 'there' as far as xcode is concerned, the SwiftFolder is not created (which would result in the app being rejected)
Surely it should be a straight forward process. What am I missing?
Apologies in advance for the fact that my code works yet I cannot solve such a simple problem!
1: A group in Xcode is not a file system folder, it's an in-app Xcode-specific construct. You can add file system folders to Xcode, but they are different and distinct from groups.
2: iOS frameworks will not be visible in your project folder as their location is managed by Xcode. They are added/linked to your app bundle at compile time.
3: Is your app failing validation/being rejected? Sounds like it could be a separate issue, everything else you're seeing sounds normal.
Only one thing worked - Shenzhen (failed on first attempt due to space issue). Here is what you need to do:
Go to Shenzhen on github, download, run and send apple the bill ;)
In case you are wondering, before I tried Shenzhen again, I actually tried the following:
Created a "Hello World" Single View Swift application in xcode. Added all the libraries and used the xcode archive facility to see if it generates the Payload and SwiftFolder. It failed on both.
I downloaded xcode 7.1 (beta) and tried again. This time I got the Payload folder but still no luck with SwiftFolder. So don't waste time on xcode 7.1 for this.
Called apple dev support (and yes, you are likely to be billed for this) - was transferred between three call centres (English spelling - sorry) and finally submitted the issue.

OS X application crashes when installed from pkg but copying the .app folder runs fine

I created a .pkg installer using Iceberg on OS X.
The installer runs fine, but when I try to run the installed application, it crashes within a couple seconds.
However if I take the same .app folder from the XCode build and copy it in the Finder to the Applications folder, the application runs fine and does not crash.
So the only difference is the copy method. From the .pkg installer the app crashes. If I just do a simple copy, the application runs fine.
In Iceberg, I even turned off "compress" in the archiving options to see if that was causing problems.
Can you think of any reason why the .PKG .app folder would be different?
Thanks for your help.
I figured it out.
It was a permissions problem, although I am not sure why.
Basically the installer pkg was set to copy everything with 755 permissions. Even though none of the files in the .app folder need write access in my code, I guess OS X must need group write permissions on some of the files.
Once I changed everything in the install to 775 permissions, the app started working fine. But with 755, the app would crash/exit right away.
Anyone know if there are certain system files in an application that need group write permissions?

Could not change executable permissions on the application

Just updated to iOS 6 sdk and latest Xcode and get this when trying to build to my 3gs.
I 've added armv6 under valid architectures?
"Could not change executable permissions on the application"
I could solve it erasing an application that I had previously uploaded using the same Bundle Identifier (xcode get's confused doing the chmod). Try checking the log from xCode Organizer (Your device's Name -> Console) you should get information from that log. Good luck!
folks, i get this resolved
- because i already have the same app using the same bundle identifier installed on the phone.
- what you need to do is to delete all those apps on your iphone which is using the same bundle identifier name.
- you'll make it!!
You probably have a different target name. You can start the app from scratch, but you'll need the same target name and the same bundle identifier.
Delete the apps that were already installed on iphone/ipad with the same Bundle identifier.iphone/ipad gets confused with the apps with same bundle identifier. so change change the Bundle identifier of the current app or delete the app that was already installed.
It can happen when you launch the app from Xcode and you have the appstore version installed in the phone with the same bundle-id but a different name. In my case I'm using App_Beta when in the appstore is App.
If the two versions does not have the same product name you wont be able to test the upgrade from the old to the new version. To solve make the names match.
I went into the Organizer and selected the Applications underneath my test device. Even though I had deleted the application on my device itself, it still showed up in my list of applications. I deleted it there, and this took care of the issue for me.
You need to delete all the app's using the same bundle identifier. I did the same, but still the same error persisted on my iPod, i cleaned the (cmd + shift + k) the build and restarted the iPod and i was able to run the app on the iPod.
You just delete the apps that were already installed on your device with the same identifier.
I ran into the same problem, but I needed to keep the current installed App in the device for debug purposes. My solution was to use the same:
Target Name
Bundle identifier
Product Name
I had this error, and what fixed it for me was Product Name under Build Settings. I had changed it to something else, and started getting this error. I changed it back and it fixed it.
Just delete all the previous versions of the application. Due to mismatch/confusion about bundle identifier it happens.
I removed all the existing application with the similar identifier and was able to install.
I was able to resolve this error message simply by unplugging the USB cable, and plugging it in again after a few seconds. YMMV!
You need to make sure that your device is not set to two applications with the same Bundle ID.
I had this error when I tried copying and pasting one xcode project to build another app. What I had to do was change the bundle identifier name to something different than my previous app.
Could not change executable permissions on the application
Cause: I had icons in the files system named 29x29.png, 58x58.png, 72x72.png, etc. I had soft links (ln -s) with the required names per App Icons on iPad and iPhone. For example, Icon-Small.png was a link to the real file 29x29.png.
I did this because my program runs on different platforms, from mobile phones to desktops. Android, Apple and Microsoft all have similar requirements. So "one set of icons" and "different links for different OS" made the most sense to me.
Fix: Don't use links. Apple does not tell you that. And their error message of "Could not change executable permissions on the application" is useless.
Looking at all the different answers (and causes), it looks like lots fo things can cause it.

Sharing an archived iOS build won't succeed on the clients side - no such file or directory

For one of my clients, I've developed a small iOS app. I'm a member of their dev team, so I've been using a development certificate to sign my local test builds.
Now the app is almost done and it should go into internal testing on the clients side. I created an archived build of the app which I then sent to my client. They imported it into the organizer and tried to "Share" it to be able to re-sign it using an ad hoc profile.
Creating the .ipa fails with an "no such file or directory" error though. The archive appears to be fine otherwise - the organizer shows all the usual information, the icon, and it will let them export it as another archive. Creating an .ipa without re-signing fails as well, which leads me to believe this is not an issue with ther certs and provisioning profile.
If I try the same thing on my side, writing an .ipa from the very same archive using my development cert, the operation succeeds.
It may be worth mentioning that the same procedure was working fine while we were still using XCode 3.x on earlier projects. This is the first time we've been trying this using XCode 4.
No additional (static) libraries have been used.
Any help greatly appreciated!!
Edit:
Someone at the apple dev forums suggested to me that I should check the system console for xcode error messages while attempting to export the .ipa - none were printed out. We discovered some other, older messages however, which read as follows:
18.04.11 13:54:35 /Developer/Applications/Xcode.app/Contents/MacOS/Xcode[123] /Users/User/Library/Developer/Xcode/Archives/2011-04-15/Foobar.xcarchive/dSYMs/Foobar.app.dSYM/Contents/Info.plist:
set flags (was: 00200000): Operation
not permitted
The timestamp is roughly at the time when my client first imported my archive, but we can't be sure since we didn't watch the console back then.
The message had been printed multiple time, once for every single ressource file contained in the bundle. Does this tell you guys something?
Problem solved.
Following another suggestion on the apple dev forum, we repaired permissions on both systems. Additionally, I built and archived the app again and used a different way to transmit the archive to my client. We did all of this in one try, so I can't quite tell which of these measures actually did the trick. If you stumble across this because you have the same problem, you might want to try all of this, too.
Thanks for listening!
Update:
It happened again - and this time, we tried to solve it step by step. Result: It's all about how the file is being transmitted. I just attached the archive package to a mail to my client, that's what broke it, although I don't know why. Zipping the archive before transmitting it solved the problem, however.
After downloading XCode 4.3 beta with the IOS 5 SDK, the Organizer function to share and archive stopped working with a cryptic error "No such file or directory found".
It turns out that this is related to having two different versions of codesign_allocate . To fix the problem, do the following in a terminal window.
sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin
Another hint - try the manual way to create a shared ipa - since it gives you a lot more detail of what went wrong. See http://blog.dmahajan.net
Can you see if this is also linked to your problem?
EasyCoder's answer fixed this issue for me - I have the 5.0 beta SDK and had the same problem.
I ran the following and it was fixed:
ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin/codesign_allocate

Overwriting an iPhone app from a different Xcode Project

One of the apps I've developed is submitted and approved to the appstore.
Because of some big changes and a more generic code I created a new XCode project for this app.
The problem is when trying to install the same app (based on bundle identifier) from the new XCode project, it quits with a crash. If I try to install again (Build & Run/Debug) from XCode, it seems to successfully overwrite and run. So it seems the first time there are some merge / overwrite conflicts. A second install, over the failed first attempt makes it work.
I wouldn't want this to happen with app updates downloaded from the store.
I've read that the idea is not to build from XCode, but use an Ad Hoc Build through iTunes instead. This would simulate a more natural end-user process. I've tried this, but somehow it won't sync / overwrite the existing app from the appstore (no errors, the app is just not changing).
Does someone have a hint on how to solve this?
Any help on this matter would be greatly appreciated!
I run into this problem all the time. I use one Developer Profile for all my dev work (and thus, one bundle identifier).
You have to delete the old App from the phone, and do a Clean Build.
These are similar problems. (1) (2)
As it seems working with an Ad Hoc build through iTunes does work.
Yesterday I double-clicked, but never got the iTunes message warning me of an older version existing in my apps and whether I want to replace it.
Dragging the .IPA into the iTunes app section did give me this message. Telling it to replace and next syncing works okay. iTunes sync status bar displays the message "YourAppName Updating". Afterwards launching it works fine with stored data intact.
The flow described here worked for me:
How to test an iPhone application update

Resources