Releasing to Apple
In Xcode, go to your app's target settings. On the
Build Phases
tab, AddNew Run Script Phase
and copy and paste the following script into the run script’s editor area and set it to use/bin/sh
.This build script will strip out the simulator slices from the framework.
The script will look through your built application’s Frameworks folder and make sure only the architectures you’re building for are present in each Framework.
Create an
Archive
build of the Consumer Project (Product > Archive in the menu) and submit it for validation (Window > Organizer in the menu; select the project in the Organizer, press “Validate…” button and follow on screen instructions). The app should pass validation as the simulator architectures were removed from the framework during the build process.Once the validation success Upload to App store.
Refer for more details - http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/