Re: Implications of changing an app's bundle identifier
Re: Implications of changing an app's bundle identifier
- Subject: Re: Implications of changing an app's bundle identifier
- From: Ricky Sharp <email@hidden>
- Date: Sat, 24 Feb 2007 15:00:29 -0600
On Feb 24, 2007, at 2:17 PM, Bill Cheeseman wrote:
My products have used a bundle identifier in the Info.plist file that
includes the company's name, in compliance with standard Mac OS X
protocol.
Now, however, for good and sufficient business reasons, it is
necessary to
change the bundle identifier in the next versions of the products.
I wonder what repercussions I will have to deal with in my code
when I do
this. It occurs to me that others have likely been through this
process,
since company names do change.
The only thing I've thought of so far is that a user of a previous
version
will suddenly appear to have "lost" all the old preference
settings, because
the preference files are named using the old identifier. Offhand, I
think I
can easily hard-code a one-time search for the old file names and
rename the
files.
That approach should work well. I'm doing something similar with an
upcoming version of an app. While I didn't change the bundle
identifier, I'm changing the creator code (CFBundleSignature) and
also document extensions. Thankfully, my app only maintains a single
file to store data. At runtime, if I cannot find a file with the new
name, I look for an old one, and if found, rename it.
One thing to consider is if users will need multiple versions of your
app. If so, I would just copy the preferences file such that if they
run an older version, it would still have access to the original prefs.
Is there anything else I should watch out for? In particular, I wonder
what's going to happen in the Launch Services database in terms of the
Finder recognizing the new version as the owner of old document
files. (I'm
not concerned about UTI's for Spotlight, because I haven't used
UTI's in
previous versions, but it would be interesting to hear thoughts on
that
issue, as well.)
I think things will depend upon what extensions you use for your
documents. If you use ones shared by other apps, then I think your
users may need to launch the new app at least once to "re-bind"
documents. Or, they'll have to rebind documents to your app manually.
I just ran an experiment (I became curious as well) as to what
happens with signature changes. In my example, I created an app with
some signature and had it create a document with an extension unique
to the app.
I then removed the app, and rebuilt it with a different signature.
Double-clicking on the document launched the new instance just fine.
I then did a third change to the signature and also renamed the app
(bundle name change). Bringing up the documents inspector, the 'Open
with' popup correctly listed the app with the new name (it also
didn't have an entry for the old app). Thus, there appears to be
quite a bit going on to attempt to preserve document bindings to the
proper app.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden