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 all 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
8 changes: 6 additions & 2 deletions iphone/Classes/TiUIScrollableViewProxy.m
Expand Up @@ -6,8 +6,12 @@
*/
#ifdef USE_TI_UISCROLLABLEVIEW

#import "TiUIScrollableViewProxy.h"
#if TARGET_OS_MACCATALYST
#import <AppKit/AppKit.h>
#endif

#import "TiUIScrollableView.h"
#import "TiUIScrollableViewProxy.h"

@implementation TiUIScrollableViewProxy
@synthesize viewProxies;
Expand Down Expand Up @@ -88,7 +92,7 @@ - (void)setViews:(id)args
#else
TiThreadPerformOnMainThread(
^{
[[oldViewProxy view] removeFromSuperview];
[[oldViewProxy view] performSelector:@selector(removeFromSuperview)];
},
YES);
#endif
Expand Down
14 changes: 12 additions & 2 deletions iphone/cli/commands/_build.js
Expand Up @@ -1278,7 +1278,17 @@ iOSBuilder.prototype.configOptionTarget = function configOptionTarget(order) {
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 @@ -2864,7 +2874,7 @@ iOSBuilder.prototype.checkIfNeedToRecompile = async function checkIfNeedToRecomp
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 @@ iOSBuilder.prototype.createXcodeProject = function createXcodeProject(next) {
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
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