-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to build with XCode 12.3? #183
Comments
Same message for me: Ionic CLI : 6.12.2 Cordova CLI : 10.0.0 OS : macOS Big Sur |
@philipphofmann pardon for pinging you but could you have someone have a look at this, it's a showstopper at least for us since it breaks the whole build/release process. |
same here |
Hi, |
As a workaround it seems like setting |
It works! |
@HazAT can you fix this issue? This blocks us to integrate Sentry to our Ionic project |
@HazAT The same issue on our project. All the workarounds don’t work for me :( |
I use this const fs = require('fs');
const path = require('path');
const xcode = require('xcode');
const shellScript = `
APP_PATH="\${TARGET_BUILD_DIR}/\${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
echo "Merging extracted architectures: \${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "\${EXTRACTED_ARCHS[@]}"
rm "\${EXTRACTED_ARCHS[@]}"
echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done
`;
module.exports = context => {
const projectDir = path.resolve(context.opts.projectRoot, 'platforms/ios')
const dirContent = fs.readdirSync(projectDir)
const matchingProjectFiles = dirContent.filter(filePath => /.*\.xcodeproj/gi.test(filePath));
const projectPath = path.join(projectDir, matchingProjectFiles[0], 'project.pbxproj');
const project = xcode.project(projectPath)
project.parse(error => {
if (error) {
console.error('Failed to parse project', error);
process.exit(1);
}
// Fix for: https://github.com/getsentry/sentry-cordova/issues/183
project.addBuildProperty('VALIDATE_WORKSPACE', 'YES')
const options = {
shellPath: '/bin/sh',
shellScript,
inputPaths: ['"$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)"']
};
project.addBuildPhase(
[],
'PBXShellScriptBuildPhase',
'Remove Unused Architectures',
project.getFirstTarget().uuid,
options
);
fs.writeFileSync(projectPath, project.writeSync());
})
}; |
Using [email protected] solved this issue for me. See apache/cordova-ios#1060 |
As [email protected] seems to solve this problem, we are closing this issue. Please open it again, if it doesn't work for you. |
I found that if I build the app using the --device flag Sentry only build for ARM. It actually makes sense because otherwise the app builds for the simulator which is i386. So using: |
We're getting a full release build failure for iOS now that XCode 12.3 is out, without having made any Sentry related changes on our side.
In short the error message is:
Target is arm64.
Env:
sentry-cordova 0.17.0
Ionic:
Ionic CLI : 6.12.3
Ionic Framework : ionic-angular 3.9.10
@ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : ios 6.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 12 other plugins)
System:
Android SDK Tools : 26.1.1 (/Users/user/Library/Android/sdk)
ios-deploy : 1.11.3
ios-sim : 8.0.2
NodeJS : v12.20.0
npm : 6.14.8
OS : macOS Big Sur
Xcode : Xcode 12.3 Build version 12C33
The text was updated successfully, but these errors were encountered: