Asset Catalog Compiler Options missing - iphone

I just switched a project over to using Asset Catalogs for icons and launch images. It appears that something has gotten borked, though, because the assets are not getting built into the app. I can't be sure, but I suspect the problem is related to the fact that the Asset Catalog Compiler – Options panel is missing from my project/target Build Settings. In new apps, or other apps that I have switched over, once the target is using an Asset Catalog that panel will appear. For this project, when I enable an catalog (under the General tab), I get ASSETCATALOG_COMPILER_APPICON_NAME and ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME, but they are listed under User-Defined settings, and the other settings that should appear in the
Asset Catalog Compiler are missing.
Anyone have any ideas how to coerce Xcode to find these settings?

Evidently the Build Settings won't parse asset-related settings correctly unless there is an asset in the Copy Bundle Resources of the target. Simple solution, but something I overlooked, since migrating to an asset catalog for icons and launch images apparently doesn't always add itself to the target automatically.

Related

How do I compare local and remote asset bundle versions without actually downloading the asset bundle?

What I'm trying to do
I'm working on a sort of portal to showcase several of the projects my organization has made in Unity. To keep it flexible and light, I've designed an architecture using asset bundles:
When the user downloads the portal, all they download is a bootstrap scene that loads in the main menu scene automatically. This keeps the initial download very light and allows them to get going quicker. Also, having everything else in asset bundles maximizes the amount of 3D content we can update after delivery.
When the main menu downloads and loads, the user is presented with a list of projects. Each project is tied to an asset bundle that can be downloaded on-demand. That way, if they are interested in one project and not another, they don't have to waste time and disk space downloading a project they'd never explore.
If they haven't already downloaded a specific project's asset bundle, they are prompted by a button to download it. If they have an older version, they are prompted to update it. If all up-to-date, they are prompted to visit it.
The Problem
The problem I'm having is two-fold:
I'm unsure what is the best library to use to do what I'm trying to do. Currently, there seem to be two ways of downloading asset bundles WWW.LoadFromCacheOrDownload and UnityWebRequest.GetAssetBundle. Not to mention, Unity just teased ResourceManager and addressable assets at Unite 2017 (but that seems far off).
No matter which library I use, neither seems to have a built-in way of checking a local or remote asset bundle version without downloading the bundle itself.
What I've done so far
In the meantime, I've used UWR to download the remote bundle manifest and Regexed for the CRC and hash. Now looking at Caching.IsVersionCached to Regex the local version and compare, but that method is obsolete...
Any ideas?

Three20/Three20.h file not found for Archive

I'm trying to update an app that already have the Three20 library. Now i'm using xcode 4.5 and everytime i try to make an Archive i recive this error:
Three20/Three20.h file not found
At the beginning i wasn't able to make any kind of build,but after the adding of $(BUILT_PRODUCTS_DIR)/../three20 and $(BUILT_PRODUCTS_DIR)/../../three20 in the Header Search Path of the build and the target settings i can make a Build in my Device. Anyway if i try to made an Archive to publish my app, the same errors returns. What i can do? I have already reinstall the last version of Three20.... I have to try this solution that i found on internet:
Go to Xcode4 Preferences (Cmd + ,) > Locations > Build Location > and select “Place build products in locations specified by targets”
In xcode 4.5 i can't approach this solution...Maybe Build Location menù is changed, i can't find the option “Place build products in locations specified by targets” .... Someone knows where i can found this setting?
At least there's someone how have made successfully an Archive on Xcode4.5 and Three20?
I also support switching away from three20, but sometimes it's not that simple.
To resolve your issues, you can try to use CocoaPods. it's a library dependencies tool that let's you add any library you need. someone added a pod for three20 few weeks ago.
That should let you build your project using the standard xcode archive process.
If you don't feel like using cocoapods, you can also build that app using the "Build for..." -> "Archiving". you can find it in the same "Product" menu. it will generate a .app file that you can submit using the Application Loader app.
you can find the .app file by secondary clicking on the target name under the "Products" folder in your project sidebar.
I did the following to make it work for me:
for the three20 static library, I used cocoapods to include the files within the main project.. it just got rid of all the trouble three20 was giving me (and they are lots..) btw i tried replacing three20 with Nimbus.. but Nimbus was lacking on some of the features that my project was using three20 for.. so Nimbus wasn't helpful.
set skip install to yes under build settings for all other sub projects/static libraries and switched the copy headers from public to project under build phases
most importantly: under the sub libraries.. under build phases i ensured that copy files destination was changed from Absolute path to products directory.
and that was it!
hint: to get an idea of the offending files that's causing your archive to create an archive file rather than an ipa do this:
Select the archive and click the Distribute button.
Select the 'Save Built Products' option.
Hit Next and Save.
Browse the created directory in Finder.
The 'libraries' subdirectory will identify the libraries that you need to set the Skip Install to Yes.
in some cases usr/local/include will identify the culprit header files you need to move from Public to Project or the files that you have to change from absolute path to products directory. but that directory (ie usr/local/include) varies depending on your sublibrary directory structure
Three20 has't update in long time.And it has many bugs.set up this framework is very hard.
you can try nimbus.It come from three20.
Nimbus' Background
Nimbus has been built with much inspiration from the Three20
framework. That being said, there are a number of fundamental problems
with Three20 that Nimbus works very hard to avoid. Among them:
Poor documentation. Spaghetti dependencies. Suffering from a "kitchen
sink" complex. A complex build structure. An enormous number of
difficult-to-solve bugs. Next-to-zero test coverage. For its
weaknesses, Three20 does provide a good deal of value through its
feature set. It is used in over 100 apps in the app store by companies
such as Facebook, LinkedIn, Posterous, Meetup, and SCVNGR.
Nimbus hopes to one day provide as much value as Three20 does on a
feature-by-feature comparison, but with the invaluable benefit of
sublime documentation and test coverage.

In Xcode under iPhone-SDK 3.0, where can I set my Bundle Identifier globally

To clarify, I mean that when I create a new project in the AppName-Info.plist there is a key named Bundle Identifier. It defaults to com.yourcompany.${PRODUCT_NAME:rfc1034identifier}
This means that I have to change "yourcompany" to my company name every time I create a new project that I want to run on a device.
When I first setup Xcode under SDK 2.2, I found a way to set it so my company name got put in new projects automatically, but I've forgotten how I did it.
Poking around Xcode prefs and searching on Google produced no good results.
Where is that setting?
Edit the template for new applications. By default, it will be found in:
/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates
There you will find all the various project templates where you can change the defaults to something more to your liking. It might be better, however, to copy the default templates into your personal Library and then select the template from there when creating new projects. To do this, copy the templates into:
~/Library/Application Support/Developer/Shared/Xcode/Project Templates and they will show up under the User Defined Templates heading in Xcode.

iPhone xcode search path for device vs simulator?

I am confused at this setting (Project -> Edit Active Target).
The Search Paths can differ based on the SDK setting (simulator vs device).
But if I provide both simulator and device paths, for lets say the Frameworks path, then i get linker errors. But it seems if I only provide the proper path for whichever SDK i have selected, then it builds fine!
How can I keep both path settings? Currently Im having to cut and paste the appropriate path based on the SDK i have selected to build.
Thanks!
Which kind of search path are you talking about? The system search paths are automatically handled for you, so I assume that your problem is some custom library.
There are two solutions. You can use conditional settings, or you can use universal libraries. I've grown to love universal libraries, but haven't had time to write up full instructions yet. The way they work is to build a static library for the simulator and for the device, and then use lipo to glue them together. You can then use the same library for both platforms. I really need to write up full instructions for this because it's very useful.
There are two more approaches. First you can use conditional settings. In xcconfig files (see my talk on why to use xcconfig files), you put something like this:
LD_FLAGS[sdk=iphonesimulator*] = -lsasl2
That links sasl2 just for the simulator. Set whatever you flag you need. Another solution is variable substitution:
HEADER_SEARCH_PATHS = "$(SRCROOT)/MyPackage/build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/include"
This assumes that MyPackage is in a subdirectory of your project and it was built into the build directory. It'll look in, for example, Debug-iphoneos for its variables.
You can also do both of the above in the build pane, but I really recommend folks get away from the build pane for any serious project. Variable substitution works identically in the build pane, and conditional settings are accessible from right-clicking on a setting.
You should have two separate build target profiles set up, one for sim and one for device, rather than constantly editing the same one. That's kind of the point of targets.
If you're only using
project headers
SDK framework headers
sqlite3 headers
then your Header Search Paths should be empty. Xcode provides search paths for your project headers, SDK frameworks, and /usr/include/*.h automatically, and adjusts those for the framework in use.
The only reasons to have custom Header Search Paths is when you have references to headers that are not in the SDK, are in "deep" locations in the SDK (such as in subdirectories of /usr/include or in buried frameworks), or are in other targets or projects your project cross-references.
Rob already hinted at this, but to clarify, here's how you'd set it using the build window.
In the build settings window, select the setting you want to modify (like "Framework search paths"). Then click the gear in the lower left, and select "Add Build Setting Condition." Then you can add a value that applies only to iOS Simulator builds, and a second build setting condition to apply only to device builds.

How do I create a bundle of reusable code in Xcode?

I am developing an iPhone app and have to parse xml files in order to put them into a database. I will also be using those same xml parsers in my app so users can import their own data. I was wondering how I can extract those xml parsers into a bundle or a library so I can use them both in my iPhone app and in a command line app where I just populate a sqlite3 database.
Thanks in advance!
Create a static library project, then use the interproject dependency feature of Xcode to build them in the correct order and link the app with the static library. You'll need to have a common build directory set for all the projects for this to work correctly (at least you did around Xcode 3.0, didn't check if this is still a problem with 3.1).
You can set the build directory from the target or project's build settings (in the Get Info pane). To create an interpoject dependency:
Drag the library project into the application project's Files & Groups pane.
Set up target dependency in the application target's Get Info pane. Make it dependent on the library's target.
Drag the library product in the application target's Link With Libraries step. You can find the library product by expanding the library project within the app project's Files & Groups (click the arrow).
Sounds more complicated than it is. It isn't much.
(Small extras: yes, you need a common build folder as indicated in the Xcode Project Management Guide, and the Xcode Build System Guide can help you "get" Xcode's build system, which -- at the cost of starting a religion war -- I think is one of the most flexible and simple build systems out there.)