Photos Extension Issue - Reinstall Photos?

I have a photo app with an action extension (not photo editing) that works well in Photos. I'm in the process of converting that app to freemium (different bundleID but same display names for the extension and app) and at one point I installed the new app with the original app still there during testing on a real phone. Then I saw two "identical" actions when a photo is selected and the action button is tapped.


So, I looked and I may (or may not) have mixed bundleIDs for the various parts (or something), so I changed the display name for the newest app (over and over).


Long story short, after deinstalling the original app, resetting the iPhone, cleaning the project, quitting/restarting Xcode, deleting both apps from the phone, reinstalling the new app alone, etc. when I try to use the free app on my phone bizarre things happen (and BTW, everything works fine in the simulator).


What happens is that when I select a photo, tap the action button, my action icon is not there. But when I look under More… the single action is there and the switch is ON. I flip the switch OFF and ON and tap Done, and then the icon appears as I select/deselect other photos in the same album (only one at a time is allowed). But when I navigate to another album and select a photo, the action icon is not there (again) and (again) the action switch is ON in More....


So, it sounds to me like something is screwed up on my phone, maybe with the bundle IDs within Photos, and maybe something in Photos is cached (bundle IDs?, names?) on my phone and even withstands resets of the phone, the apps, Xcode, etc.


Is there a way to get a clean install of Photos, or am I missing something else?

Answered by DrMiller in 12890022

Found the issue. I had *assumed* that entire bundle identifiers were unique and that's why we prefix them like com.domain.appname so they would not collide with other apps/extensions/actions/etc.


In this case, I originally used com.domain.photoapp as the prefix and the complete bundle identifier for the original app was com.domain.photoapp and com.domain.photoapp.photoaction for the original action. In the free app I used com.domain.freephotoapp and com.domain.freephotoapp.photoaction for the newer app and action as I did NOT change the target names from the original app, again thinking those complete bundle identifiers were totally different from the original app and would be recognized as such. Wrong.


The fix was to change the target name for the action and thus change the bundle identifier to com.domain.freephotoapp.freephotoaction. Apparently Photos only looks at the name of the action and not the entire bundle identifier??? Maybe it's in the docs and I didn't see it.

Accepted Answer

Found the issue. I had *assumed* that entire bundle identifiers were unique and that's why we prefix them like com.domain.appname so they would not collide with other apps/extensions/actions/etc.


In this case, I originally used com.domain.photoapp as the prefix and the complete bundle identifier for the original app was com.domain.photoapp and com.domain.photoapp.photoaction for the original action. In the free app I used com.domain.freephotoapp and com.domain.freephotoapp.photoaction for the newer app and action as I did NOT change the target names from the original app, again thinking those complete bundle identifiers were totally different from the original app and would be recognized as such. Wrong.


The fix was to change the target name for the action and thus change the bundle identifier to com.domain.freephotoapp.freephotoaction. Apparently Photos only looks at the name of the action and not the entire bundle identifier??? Maybe it's in the docs and I didn't see it.

Photos Extension Issue - Reinstall Photos?
 
 
Q