Where are folders and images on the iPhone?[swift] - ios

I am adding folders and images in Assets.xcassets of Xcode.
Where is the folder or image of Assets.xcassets stored on the iPhone when testing the actual machine with Xcode?
Also, I would like to know how to check whether the folder and image of Assets.xcaassets is installed in iPhone storage place right after launching the application.
Ultimately I would like to install the image in my AWS on the iPhone of the user of the application at the first launch of the application.
I would like to reduce the file size of the application.
Adding images to the iPhone of the user of the application is not a malicious purpose.
And I do not know the best way.

The images are compiled by Xcode and a file called Assets.car (CoreUI archive) is created.
The file is then bundled in the ipa file created when you export the app.
If you uncompress the ipa (it's a simple zip file) you can see the car file inside the application packet.

Related

sqlite file gets picked up by the xcode simulator but not the ios device

I had a sqlite file which was working fine on the simulator and the device.
Under my app folder on the mac, I can also see the file - coredata.sqlite.
I created a new coredata.sqlite. After this, I had to copy it over to the paths which were different for different targets (iphone 5 vs 6 vs 6+) and looked along the lines of :
.../Library/Developer/CoreSimulator/Devices/26292D7B-5001-497E-B23B-99455953F5F4/data/Containers/Data/Application/64849BCC-B86B-45DE-818F-3E67346C4893/Documents/
Just copying over the new sqlite to the apps folder where the old sqlite was present did not work. Copying it to the above mentioned folders fixed it for the simulator.
Now, when I connect to my ios device though, it cant find the new sqlite. If I copy back the old sqlite to the apps folder, it still works but copying the new one to the apps folder, the various destinations for the simulator etc has no effect on the ios device.
Displaying the path where it is looking at shows :
/var/mobile/Containers/Data/Application/80302FBA-6D45-4843-A891-E10A7ED4D445/Documents/CoreData.sqlite
Any help on where the device is picking the sqlite from? Since it works on the simulator and the older one works on the device also, the code seems ok. What can I do to get it to pick my new sqlite?
Device will pick the files from mainBundle. While doing database related functionality we copy the db files from mainBundle to DocumentDirectory, so that it becomes editable.
What you did was that you manually copied the sqlite file to the app data document folder. You should actually add the file to specific target and then it will copy the file during build process.
Your new coredata.sqlite file is not attached to any target. Check inside build phases and see if it is there, otherwise add it. Also you should not have two files with same name inside the bundle, so remove the previous file from target.

My binary is not optimized for iPhone 5 while having localized splash screens

My app keeps getting rejected as an invalid binary after uploading it to iTunesConnect via ApplicationLoader. The e-mail notification I'm getting is:
Your binary is not optimized for iPhone 5 - - New iPhone apps and app updates submitted must support the 4-inch display on iPhone 5 and must include a launch image with the -568h size modifier immediately following the portion of the launch image's filename. Launch images must be PNG files and located at the top-level of your bundle, or provided within each .lproj folder if you localize your launch images. Learn more about iPhone 5 support and app launch images by reviewing the 'iOS Human Interface Guidelines' at /.../
Which is weird as I'm packing all splash screens in the binary, checked that through extracting my .ipa aswell and they are there (in their respective .lproj-s), correctly named and of correct sizes. I do not use the Asset Catalog, as I haven't found a way to localize that (yet).
What could be the issue for the rejection?
I also face the same problem in my case myapp plist file contains key "Launch Image" after remove the key from plist issue fixed on validation.
The issue here seemed to be that it was expected that the splashes would be in EVERY localization folder, even if I didn't localize the splash for that particular language. INCLUDING Base.lproj. After copying the english splashes into default, the app got through the initial check and is awaiting review as we speak.
We faced the same issue and couldn't solve it after trying many solutions, we believe it's a kind of bug in App submission.
But we found a workaround which can keep launch images localized and pass the submission verification.
Environment:
Xcode 6.1 (6A1052c) with iOS 8.1 SDK
Precondition:
Have following properties in your "*-info.plist" file.
Steps:
Go to your target's settings and in our standard scenario (localize
launch images, which uses "UILaunchImages" in "*-info.plist" but not
image assets), it should look like the image
Change the setting to use image assets (Note: after this step, Xcode will automatically REMOVE the "UILaunchImages" properties in your *-info.plist file. So please BACKUP the properties first.)
Go to the "LaunchImage" assets (can click the arrow button on the right) and fill with images from one of your *.lproj folder.
Now, go to the "LaunchImage" folder which contains images and "Contents.json" file.
Remove ALL the launch IMAGES just added, but kepp the "Contents.json" file.
Check the "Contents.json", it should contains properties like image below
Double check following items:
*-info.plist contains "UILaunchImages" properties
Project setting uses image asset for launch images
"Contents.json" in "LaunchImage" asset folder and the folder DOES NOT really have launch images
Now you can have a try for localized launch images and submit the binary to iTunes Connect. In our App, the workaround did work for "localized launch images" and "submission successful".
It should be a trick for avoiding the bug in submission checking.
Since the workaround above doesn't change any resource, except making the checking thinks we use image assets, we are more convinced that there are some bugs in Apple's checking.
Cheers!
I had the same problem. You don't need launch images if running in ios 8. I made a new launch screen as a storyboard and deleted the xib version. Change the settings in Targets -> General -> Launch Screen file to reflect the new file. And make sure Targets -> Info -> UILaunchStoryboardName is updated as well.

iPhone 5 Optimization Requirement (using Adobe AIR)

I keep receiving the following message from Apple when submitting my app for approval:
"iPhone 5 Optimization Requirement - Your binary is not optimized for iPhone 5. New iPhone apps and app updates submitted targeting iOS 6 and above must support the 4-inch display on iPhone 5 and must include a launch image with the -568h size modifier immediately following the portion of the launch image's filename. Launch images must be PNG files and located at the top-level of your bundle, or provided within each .lproj folder if you localize your launch images."
I'm using AIR SDK 3.9 (and I checked to make sure by tracing NativeApplication.nativeApplication.runtimeVersion).
I have a Default-568h#2x.png image in the src folder, and I checked the Project/Properties/ActionScript Build Settings/Package content (I'm using Flash Builder 4.6). It is definitely checked off to be included in the build. In "Export Release Build", I don't see it in the Package Contents there, but I don't see any of the other Default png's either, so I don't think that's the problem.
Does anyone know what I'm doing wrong?
Be sure that the launch images also located in the folder "bin-release-temp"... I have to put them manually into that folder...
The launch images cannot be referenced anywhere in the project. You cannot embed them. You cannot use them. If you do, they are not packaged as launch images, but as images used at runtime. I was having the same problem when I was referencing the images as a SplashScreenImage source. It's an unfortunate way for it to be handled, basically requiring you to include the same image twice, but it is what it is.
This link might help. It describes what and where to keep default images in air application for iPhone deployment.
http://rohitdhore1612.wordpress.com/2013/05/22/air-invalid-binary-iphone-5-optimization-requirement-your-binary-is-not-optimized-for-iphone-5/

Why PhoneGap always shows default splashscreen image?

I'm testing a sample iOS app now, although I set all new launch images in Xcode (Summary tab of Project Target screen), PhoneGap 3.0 keeps showing its default splashscreen. Why? even when splashscreen is a plugin and not included by default in PhoneGap 3.0 now.
iOS document say about launch images but not splashscreen, and it even strongly recommend us to use a "first screen" similar as launch image, not something like about screen. Are these same?
It's not about cleaning or caching issues at all. The problem is PhoneGap includes all possible launch images in project template by default. These files are under Resources folder and copied to bundle's root folder on build event. Although I properly selected my own launch images in Xcode (Target/Summary screen), default PhoneGap's specific files e.g. Default~iphone.png overridden my files :(
Once issue is identified, you can fix it someway, but I prefer below steps:
Delete all default icons and splashscreen files under /platforms/ios/AppName/icons and /splash folders. You surely don't need these placeholder images.
In Xcode, select Targets/AppName, then tab Build Phases, delete all file names of images in the above step in section Copy Bundle Resources.
Add your own images files for app icon and launch images here.
Edit Info.plist file (file AppName-Info.plist under /platforms/ios/AppName/) to include your images, you will need to use CFBundleIcons and UILaunchImageFile keys. Go to iOS developer site for reference.
Splashscreen and launch image are the same thing.
You probably did everything right but iOS (especially in the simulator) often just doesn't change those things (splashscreen, icon etc.) during development process. Try to delete your app, clean your project (in Xcode: Product -> Clean (shift+cmd+k)) and reinstall your app.

Trigger.io IOS package duplicating files

I have for the first time went to build my production IOS app with trigger.io and was a little shocked at the file size so when I went to look at the IPA I noticed that in the root of the IPA it had the splash screen images and in the src directory it had the same images.
This accounted for about 10 extra megs, when you start having all the different resolutions for IPAD Iphone etc these files cane be large.
So it looks like the IPA creation process grabs the files from the src directory and places them in the root of the IPA but does not remove them from the src location and now I have double the images I need and double the size at that.

Resources