I am currently using Enterprise InHouse Build as a testing build for my testers before I release the actual AppStore Build, therefore my Enterprise InHouse Build is actually meant for development use.
However, when signing my InHouse distribution app, the aps-environment is always defaulted to production even though it was set as development in CODE_SIGNING_ENTITLEMENT.
I have tried to work around this by resigning the app with a new entitlements.plist file with:
1)codesign --entitlements entitlements.plist -v -f -s "iPhone Distribution: ****" Payload/****.app
2)compress the Payload and rename the zip as ***.ipa
However, this method gives me a "the executable was signed with invalid entitlements" when i try to install the app
Does anyone have any idea why is CODE_SIGNING_ENTITLEMENT being ignored, or the correct way to resign the app with a new aps-environment??