This is a code signing issue that persist in the new OS X Yosemite and OS X Mavericks 9.5 or higher. Stencyl has no current fix for this nor does Apple. Although this is the solution: (Follow links below.)
Open Terminal on the Mac
Then:
You need to find your project in the "stencylworks" folder. Go to games-generated and look for your .api. You should also see a Cert.p12 and an AppStore.mobileprovisions in the same folder. Use the code below inside terminal to force sign your .api file OR use this: codesign -f -s CERTIFICATE IDENTITY CODE ["stencylworks folder location"/games-generated/NAME OF YOUR GAME/AppStore.mobileprovisions] to code sign the .mobileprovisions file. It is important to note that if you use the second command your must sign the AppStore.mobileprovisions file and NOT the .api file.
https://devforums.apple.com/thread/239255?start=0&tstart=0Continuing with my little monologue, it looks like I figured it out. When I re-signed the components of my app, I did so with the following command:
codesign -f --preserve-metadata=identifier,entitlements,resource-rules,requirements -s [identifier (certificate)] [path to app bundle (.api file)]
Preserving the resource rules was the culprit apparently, because re-signing once more with...
codesign -f --preserve-metadata=identifier,entitlements,requirements -s [identifier (certificate)] [path to app bundle (.api file)]
...solved the "obsolete resource envelope" issue for both the components and the parent app, according to spctl on Yosemite DP5.
As mentioned in an earlier post, none of those components ever had custom resource rules. My working theory for now is that the default resource rules used by codesign on OS X 10.9 are different from the corresponding default resource rules on earlier systems. So even though I had never specified any custom resource rules, carrying over the default values from a pre-10.9 system alone was reason enough for Yosemite DP5's spctl to balk at the signature.
Lessons learned:
1) The "obsolete resource envelope" message doesn't necessarily indicate a version 1 signature.
2) If you re-sign manually, make sure you don't carry over old resource rules, even if they weren't your own custom resource rules.
3) It's probably best to just let Xcode handle the codesigning whenever that's a viable option.
I hope this will help others avoid similar frustration.