Skip to content
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

fix(ios): building for MacOS (Catalyst) now works with that fix #13903

Merged
merged 4 commits into from Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion iphone/Classes/TiUIScrollableViewProxy.m
hansemannn marked this conversation as resolved.
Show resolved Hide resolved
Expand Up @@ -88,7 +88,10 @@ - (void)setViews:(id)args
#else
TiThreadPerformOnMainThread(
^{
[[oldViewProxy view] removeFromSuperview];
[self makeViewPerformSelector:@selector(removeSubview:)
withObject:[oldViewProxy view]
createIfNeeded:NO
waitUntilDone:NO];
},
YES);
#endif
Expand Down
24 changes: 17 additions & 7 deletions iphone/cli/commands/_build.js
Expand Up @@ -1278,7 +1278,17 @@
break;

case 'dist-macappstore':

_t.conf.options['deploy-type'].values = [ 'production' ];
_t.conf.options['device-id'].required = false;
_t.conf.options['distribution-name'].required = true;
_t.conf.options['pp-uuid'].required = true;

// build lookup maps
iosInfo.provisioning.distribution.forEach(function (p) {
_t.provisioningProfileLookup[p.uuid.toLowerCase()] = p;
});

break;
}
},
Expand Down Expand Up @@ -1899,7 +1909,7 @@
// make sure they have Apple's WWDR cert installed
if (!this.iosInfo.certs.wwdr) {
logger.error(__('WWDR Intermediate Certificate not found') + '\n');
logger.log(__('Download and install the certificate from %s', 'https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer'.cyan) + '\n');
logger.log(__('Download and install the certificate from %s', 'https://www.apple.com/certificateauthority/AppleWWDRCAG2.cer'.cyan) + '\n');
m1ga marked this conversation as resolved.
Show resolved Hide resolved
process.exit(1);
}

Expand Down Expand Up @@ -2864,7 +2874,7 @@
return true;
}

if (this.target === 'dist-adhoc' || this.target === 'dist-appstore') {
if (this.target === 'dist-adhoc' || this.target === 'dist-appstore' || this.target === 'dist-macappstore') {
this.logger.info(__('Forcing rebuild: distribution builds require \'xcodebuild\' to be run so that resources are copied into the archive'));
return true;
}
Expand Down Expand Up @@ -3326,7 +3336,7 @@
outputPaths: [],
runOnlyForDeploymentPostprocessing: 0,
shellPath: '/bin/sh',
shellScript: `"/bin/cp -rf \\"$PROJECT_DIR/ArchiveStaging\\"/ \\"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\\" && /bin/mkdir \\"${buildProductsPath}\\""`,
shellScript: `"/bin/cp -rf \\"$PROJECT_DIR/ArchiveStaging\\"/ \\"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\\" && /bin/mkdir -p \\"${buildProductsPath}\\""`,
showEnvVarsInLog: 0
};
xobjs.PBXShellScriptBuildPhase[buildPhaseUuid + '_comment'] = '"' + name + '"';
Expand Down Expand Up @@ -5927,10 +5937,10 @@

// Do we need to flatten the default icon?
let osName = this.xcodeTargetOS;
if (this.target === 'macos' || this.target === 'dist-macappstore') {
osName = 'maccatalyst';
}
if (missingIcons.length !== 0 && defaultIcon && defaultIconChanged && defaultIconHasAlpha && osName !== 'maccatalyst') {
if (this.target === 'macos' || this.target === 'dist-macappstore') {

Check failure on line 5940 in iphone/cli/commands/_build.js

View workflow job for this annotation

GitHub Actions / JavaScript

Mixed spaces and tabs
osName = 'maccatalyst';

Check failure on line 5941 in iphone/cli/commands/_build.js

View workflow job for this annotation

GitHub Actions / JavaScript

Mixed spaces and tabs
}

Check failure on line 5942 in iphone/cli/commands/_build.js

View workflow job for this annotation

GitHub Actions / JavaScript

Mixed spaces and tabs
if (missingIcons.length !== 0 && defaultIcon && defaultIconChanged && defaultIconHasAlpha && osName !== 'maccatalyst') {

Check failure on line 5943 in iphone/cli/commands/_build.js

View workflow job for this annotation

GitHub Actions / JavaScript

Mixed spaces and tabs
this.defaultIcons = [ flattenedDefaultIconDest ];
flattenIcons.push({
name: path.basename(defaultIcon),
Expand Down
4 changes: 2 additions & 2 deletions iphone/iphone/Titanium.entitlements
Expand Up @@ -4,10 +4,10 @@
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.camera</key>
Expand Down
10 changes: 6 additions & 4 deletions iphone/iphone/Titanium.xcodeproj/project.pbxproj
Expand Up @@ -2382,7 +2382,6 @@
CODE_SIGN_ENTITLEMENTS = Titanium.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
Expand Down Expand Up @@ -2420,7 +2419,9 @@
PRODUCT_BUNDLE_IDENTIFIER = com.appcelerator.titanium;
PRODUCT_NAME = Titanium;
STRIP_STYLE = debugging;
SUPPORTS_MACCATALYST = NO;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Titanium-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
Expand All @@ -2443,7 +2444,6 @@
CODE_SIGN_ENTITLEMENTS = Titanium.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
Expand Down Expand Up @@ -2479,7 +2479,9 @@
PRODUCT_BUNDLE_IDENTIFIER = com.appcelerator.titanium;
PRODUCT_NAME = Titanium;
STRIP_STYLE = debugging;
SUPPORTS_MACCATALYST = NO;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Titanium-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down