Yes, it can be done, though it's a little bit messy.
— Start by creating two framework targets, one for OS X and one for iOS. Call them, for example, MyLibOSX and MyLibIOS. Note that this is going to create two subfolders using those names. (Subfolders of the main project folder, I mean.)
— In the Finder, create a third subfolder called MyLib.
— In Xcode, create a new group called MyLib, and associate it with the MyLib subfolder. (Select the MyLib group. In the File inspector, click on the tiny folder icon under the Location popup, then choose MyLib in the Open dialog that results.)
— If you have existing files for the frameworks, move them into the MyLib subfolder. If the files are already in your Xcode project, they will have turned red. Fix that by deleting the references and re-adding, or by dragging them into the MyLib group and re-associating them. (Select all of the files, then in the File inspector, click on the tiny folder icon, then choose MyLib in the Open dialog.) Use the File inspector to ensure that the files are included in both framework targets.
Similarly, if you add new files, add them in the MyLib group (which will cause the files to be created in the MyLib subfolder), and make sure you put them in both targets.
— Go to your build settings for each framework target in turn. You have 3 settings to consider:
1. Module name. When you click on this, you'll see that it's actually set to be the same as the target name. Replace what's there with module name MyLib. This is the essential step, because it's the module name that you put in an "import" statement, so you want it to be the same in each framework target.
2. Bundle ID. If you don't like the bundle IDs that Xcode chose, you can retype them with the bundle IDs you want. (I don't like having uppercase letters, because that can cause confusion later, so I usually choose my own.)
3. Product Name. This isn't technically important, since it's going to be the dylib file name that a user never sees, but if you want you can change it to something else.
— When you created the framework targets, Xcode should have defaulted to adding them the app target for the correct platform. If this didn't happen (if the app targets didn't exist at the time, or you have multiple targets for the same platform), go to each app target's Info pane, and click the "+" sign under the Embedded Binaries list. You'll get a dialog where you can add the appropriate framework to the app target. There'll be 2 MyLib entries in the list. In Xcode 7.2, it'll tell you which platform each is for. In earlier Xcode versions it didn't, so it's easier to make sure this step is done *before* you start renaming modules.
(Optional)
If you want, you can consolidate the files in the MyLibOSX and MyLibIOS subfolders into the MyLib subfolder. This also has a couple of steps:
— In Xcode, rename the 2 info.plist files so that their names don't conflict.
— In the Finder, move all 4 files to the common MyLib subfolder.
— In Xcode, again the files will have turned red. Re-associate them like before by clicking the tiny folder icon, and choosing the MyLib subfolder.
— Go to the Info pane for each target. In Xcode 7.2, you should see a button near the top to re-choose the info.plist files. Do so in each target. (In older Xcodes, you must go to the build settings and do this manually.)
At this point you should be good to go. Note that if your framework code is exclusively Swift, you need to add at least one .swift file to the framework targets if you want them to build. (Otherwise you'll get a weird error message about bridging headers.)
This seems like a lot of steps, overall. However, if you're methodical about it, it's not fundamentally hard.