Somebody please help me out. This problem is killing me.
I went through tones of documents and posts. All seems to suggest that simply add a UIFileSharing key into info.plist and set boolean value to YES, files in App's Documents folder (not sub-folder, I know) will show up in iTunes.
However my problem is that I don't have an iPhone, so I really have no clue about what exactly the behaviors of both iPhone or iTunes will be when try to verify this file sharing thing. And what is the right way to verify this.
So when my client try to verify this off my watch (we are on different sides of earth), he keeps reporting back that file sharing feature not work. It is certain that file is properly stored under Documents folder.
In the last attempt, he claimed that he can see the app but not files.
I would like to know the following things, so I can guide him through this and end this pain:
Is it really plain and simple like add one key, no changes to code needed? Or did I miss something?
Are there any special requirements for building (like, only work for release build?), deploying?
What will really happen when plug the iPhone into the computer and sync with iTunes? Will the app show up in the Apps tab anyway, or only show up if file sharing feature are enabled correctly?
Thank you all.
Is it really plain and simple like add one key, no changes to code needed? Or did I miss something?
Yes
Are there any special requirements for building (like, only work for release build?), deploying?
No
What will really happen when plug the iPhone into the computer and sync with iTunes? Will the app show up in the Apps tab anyway, or only show up if file sharing feature are enabled correctly?
It will show up in the app view (on top) all the times. But you will only see them in the file sharing area if you have an app with enabled filesharing.
File sharing is only available on iPhone OS 4 onwards and iPad 3.2
Make sure your client has iOS4 or later.
Related
I'm just trying to load my first app up to App Connect in order to let a few friends test it. So they can download it.
Got though the first few headaches like Frameworks not being set up correctly...
Now of course the final authorisation has failed due to lack of certain images and icons non of which I'm bothered to do right now I just want to be able to remotely share the app.
Do I really have to get all that stuff fixed first?
Is it not possible to share a slightly rough version via TestFlight?
EDIT:
These are my errors. Not sure what the first error means but the others obviously for missing image data.
First, I'd recommend fixing those errors anyway. They're simple. Just add an app icon with the correct sizes. It doesn't have to be a good/final icon yet. You can use my script here: https://gist.github.com/DaveWoodCom/0b9dd0efb9d10f0f0ba9977ccc35a86a
that takes a simple 1024x1024 png file and resizes it to all the required sizes for you. It even gives you a Contents.json asset catalog file.
Second, if you're just sending the beta to your friends, you don't really need to go through TestFlight review yet. You can either create a user account in App Store Connect for each of your friends (note: I'd recommending using your own email address me+friendsname#yourdomain.com for their accounts so they can't actually log into ASC and see any of your data), or you can create an Adhoc distribution profile for your app and include your friends device UUID's. Then you build your .ipa file and send it to them to install. You could even use a new project I've just created: https://github.com/DaveWoodCom/OTAgo and let them install the app over the air, via a web site. Note that project is brand new and thus is still in beta (will change a lot in the coming weeks, but it should be decent enough for your use case).
I'm developing an iPhone application that's particularly large, and contains loads of videos. (Not my fault, it's on behalf of a client).
I tried to run it on my iPhone, via XCode, not remembering I didn't have enough space on there to copy all the vids over, it errored halfway through.
However, it seems that the couple of videos it did manage to copy are still on the phone, and I now have 0 space on my phone, according to settings.
So I guess my question is where on the phones filesystem will these be stored, so that I can delete them?
EDIT: As the App didn't sucessfully install, theres no icon on the home screen for it.
Thanks
You can use iPhoneExplorer to explore/remove the files on your iPhone.
Have you tried the iPhone Configuration Utility? http://support.apple.com/kb/dl926
If the app has somehow been half-installed so it has no icon, then it might still appear in this tool where you can remove it.
If you can see the app on the organizer, try this:
1.- In the devices organizer, select Applications in the device.
2.- Select an application from the list of installed applications.
3.- Click Delete, and confirm that you want to remove the application.
Source: http://developer.apple.com/library/mac/documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/Devices/Devices.html
Figured it out, eventually found it in a folder called:
/private/var/mobile/Media/PublicStaging
I am working on a project where the iPad will be used for a specific purpose, and only run one app. When the device starts up, I want my app to run, and I want to override the home button so that it does not quit the app (like the iPhone/ iPod demos in the store).
I have seen bits and pieces of this functionality, but am unsure how to implement it. I realize that it would have to be on a jailbroken device, and the client is fine with that.
Any ideas?
Thanks!
Thomas
Edit 1: I found this site, which explains some iOS daemons. I'm still researching, so I'll just keep posting what I find.
Edit 2: I found Saurik's IRC channel and asked around in there. One of the participants told me that it is possible, but probably not as simple as I thought. I am still doing some digging around in the iPhone 3G filesystem now just to get the feel of what certain things do.
The project has been scrapped, but I'm still looking for help on this though....just cuz I'm interested lol.
Here's my progress on the issue. Question's still not completely answered, but I'm making some headway :-)
I've been researching Jailbreak and the iOS filesystem as well. That has helped my understanding of the issue some.
Without jailbreaking this would not be possible.
There has to be something in /etc somewhere that runs through all the things that start up, just like on Linux.
It so happens that my current ipod touch has a WALD screen after me manually deleting a few mp3 files. Some anti mp3 mocking code policing it, and not liking me touching the mp3 file structures... otherwise I'd look for you right now.
Do you know how to ssh into your ipod/iphone?
Well, I believe Apple itself uses this on the iPads running at the Apple Stores (those showing animations about the products where you can ask to talk with a blue shirt).
I would look for something on the official IPCU (iPhone Configuration Utility) to check if there is an option for auto-loading apps on boot time.
If not, try to get friends with someone working on an Apple Store and get some hints on how they run their app on those iPads.
you can add the "voip" key in the information plist.
This is backed up by Apple:
You can also see this sample project:
https://github.com/lithium3141/BootLaunch
PB.
Curious what practices people have learned before making their final build and submitting to the App Store? Aside from switching from Debug to Release & commenting out calls to NSLog what other basic and/or not so basic things should we be watching out for?
This is a good question and I'd like to restate some of the answers and add a few of my own. I've made this answer Community Wiki, feel free to add to it.
Delete the app from your device, turn off WiFi, off cellular data, now install and test app. Does it work properly (as much as it can without Internet)? Does it at least tell the user that a network connection is required (if it is) or does it crash?
If you use CLLocationManager: Delete the app, fresh install and run, but do not allow app to have Location Data. Does the app behave well or does it crash? Does it at least tell the user that it can't run without location data (if that is a requirement)? Does it work on an iPod Touch that does all geo location using WiFi only?
Run the app in the simulator and for each view controller do the following steps: (a) From the iPhone Simulator menu select "Hardware" --> "Simulate Memory Warning", (b) now navigate around your app to other view controllers and see if everything is working, (c) repeat test for another view controller.
If you support older firmware (ie: iOS 3.1.3), install your app on a device running 3.1.3 and test it there (if you don't have one, use the 3.2 simulator).
Start your app while on a phone call or when Personal Hotspot is active. Are all the screen layouts correct (the status bar is 40px high instead of 20)? Did the bottom 20px of the view get pushed off the screen or did it resize correctly?
Accept a phone call while in your app, does it resign active and resume properly? Do sounds from your app stop playing while in the phone call?
Start your app while playing music, does the music continue to play? Do your sounds mix properly or fade the music appropriately?
Test performance on a slower devices with limited RAM such as: iPhone 3G (128MB RAM, 412Mhz CPU) or iPod Touch (1st or 2nd gen).
Run the Clang static analyzer and fix (or at least understand) every warning.
Make sure NSZombiesEnabled is NO in the environment variables (caution: not sure if this is still a problem)
A few things:
I actually recommend not creating a build configuration called "Distribution" as Apple specifies, because I often am creating ad hoc builds for beta testers. I create two build configurations, one called Ad Hoc and one called AppStore, so I'm not confused. The only difference between the two is the presence of the Entitlements.plist file for the Ad Hoc build. This way I can test as closely as possible what I will be submitting to Apple.
Most developers are optimists. That's why we are working weekends to create an app that we just know is going to make us a millionaire. Before submitting though, be a pessimist. Imagine everything that can possibly go wrong, and double check it.
Don't assume anything. Don't assume that that tiny little change you made to the app won't affect anything else. Murphy's Law says that that tiny change will cause your app to crash on all iPod Touches or something. Test, test, test thoroughly between the final code edit and Appstore submission. If you have to make a tiny change, then repeat until it's perfect.
Remember that if the app doesn't crash for 99.9% of your users, then 1 out of every 1,000 downloads will result in a 1-star scathing review.
I use Clang static analyzer, Leaks and Object Allocations during development, but I do an extra run of these tools before submission just in case.
If you don't have an older device, get one, because the 3GS performance is significantly better and you may miss some important performance issues.
Test your app with the following configurations when network or location are applicable:
iPod Touch
iPhone 3G
iPhone 3GS
iPhone in Airplane mode
iPhone with Wi-Fi
iPhone with EDGE
Call the phone while using your app
Instead of switching to Release, I switch to "Distribution". It's a copy of Release, but that's is how I got taught by some Apple doc and iPhoneDeveloperTips.
Important points:
After the final build, but before you rush off to zip up your app, open the bundle using the Finder's Show Package Contents. Due to some bug in the MacOS, which bit me in versions prior to Snow Leopard (and it might still be there), if you zip up too fast (using the Finder's Compress or Archive menu item), some of the resources have yet to be flushed out into the file. When you do a Show Package Contents, the contents get updated. The way you would notice this problem is that the size of your compressed app would be between a fifth to a tenth or less of the expected size. You might think to yourself, "hey, that zip utility really does a great job of compressing", but that's not the case. This problem would occur at this point instead of during testing mainly because you are doing a "clean all" build and all the resources and contents of the app bundle are starting out empty and then being filled by Xcode. And for some reason, even after Xcode is done creating the file, the contents are still not actually there, if you compress, but would be there if you looked at them (sort of a reverse Heisenberg). Beware.
Another area I spend a lot of time on is to make a nice backup of the sources, after I have committed all the latest changes to SVN, made a new branch, and tagged the file. I also like to have my version number match my SVN build/commit number so I always know which SVN version matches my release. I have those two version numbers in my info.plist and can be pulled up by the app user when they hit i for info. For example, a current info.pist includes:
<key>CFBundleShortVersionString</key>
<string>2.0a1</string>
<key>CFBundleVersion</key>
<string>346</string>
There are different thoughts on how to use the CFBundleVersion. This is my way. Also useful is the command line utility, agvtool.
Once the app is built, after compressing so you're not actually making any changes to the compressed version, go check the app file and make sure it is signed with the right distribution cert and not your adhoc one. Learning to use the command line utility, codesign, is helpful for this kind of checking and debugging. By making the compressed copy first, you ensure that you're not in any way going to change the final copy that Xcode has handed you and that you will upload to itunesconnect, if all looks well.
Other things to remember are the app icon, the various other icons and graphics you need for the iTunes store, the info.plist, and the fact that when the uploading of the app fails with a cryptic error message, it usually has to do with one of these pieces being missing from the compressed file you are building (those pieces that belong in the app bundle).
Look into this check list document # Github
https://github.com/bapu/AppReleaseCheckList
It seems like Info.plist file has an ability to declare different roles for the same application bundle through the UIRoleInfo key. SpringBoard can recognize these roles after installing an app and may display separate icons for each application role.
For instance, iPhone shows MobileSlideShow.app as 2 different programs: Photos and Camera.
Unfortunately, there is no official Apple documentation about the subject at the moment. Would anybody advise how to organize the same behavior in a custom app?
This feature is going to be used in the Enterprise product for ad hoc distribution.
This isn't a supported feature, so if you do this you might have a hard time getting your app through the approval process. I wouldn't recommend using it.
Have you tried it to see if it works? If it doesn't work, you could create a second app that does nothing but launch the first one, with a custom URL scheme. The first app can recognize when it is being launched with that URL. This is not ideal as you will see the second app launch & quit (though it should be really fast).