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): use xcodeTargetOS of 'iphoneos' for mac catalyst #12118

Merged
merged 2 commits into from Sep 23, 2020

Conversation

sgtcoolguy
Copy link
Contributor

@sgtcoolguy sgtcoolguy commented Sep 22, 2020

4fwqku

Description:
Related to tidev/hyperloop.next#342 and #12112

Instead of fixing it in a hack way in the hyperloop code, this fixe step underlying issue int he SDK itself. Hyperloop relies on using the builder's xcodeTargetOS value to refer to sdks in Xcode related tooling. When we set it to 'maccatalyst' that breaks. So we retain a value of 'iphoneos' instead and just update the couple places in the SDK CLI where it was used to generate folder names to use a different variable.

I tested the following app.js with these changes via ti build -p ios -T macos (and the hyperloop module from #12112):

import { UIView, UIColor } from 'UIKit';
import { CoreGraphics } from 'CoreGraphics';

const CGRectMake = CoreGraphics.CGRectMake;
const CGAffineTransformRotate = CoreGraphics.CGAffineTransformRotate;
const CGAffineTransformScale = CoreGraphics.CGAffineTransformScale;
const CGAffineTransformIdentity = CoreGraphics.CGAffineTransformIdentity;

const win = Ti.UI.createWindow({ title: 'View Animation' });
const scrollView = Ti.UI.createScrollView();
const container = Ti.UI.createView({});
const button = Ti.UI.createButton({
    title: 'Animate'
});
const notice = Ti.UI.createLabel({});
scrollView.add(container);
scrollView.add(button);
scrollView.add(notice);
win.add(scrollView);

// create a view box we're going to animate when you click the button
const view = UIView.alloc().initWithFrame(CGRectMake(10, 10, 50, 50));
view.backgroundColor = UIColor.redColor;
container.add(view);

let flag = false;

button.addEventListener('click', () => {
    flag = !flag;
    notice.text = '';
    // animate the UIView
    UIView.animateWithDurationAnimationsCompletion(1.0, () => {
        // this function will be called to handle the animation
        // any changes done in this function will be animated
        if (flag) {
            view.frame = CGRectMake(100, 100, 200, 200);
            view.layer.opacity = 0.8;
            view.layer.cornerRadius = view.frame.size.width / 2;
            view.transform = CGAffineTransformScale(CGAffineTransformRotate(view.transform, Math.PI), 1.5, 1.5);
            view.backgroundColor = UIColor.blueColor;
        } else {
            view.frame = CGRectMake(10, 10, 50, 50);
            view.layer.opacity = 1;
            view.layer.cornerRadius = 0;
            view.transform = CGAffineTransformIdentity;
            view.backgroundColor = UIColor.redColor;
        }
    }, (_done) => {
        // this function is called after the animation completes
        notice.text = 'Animation completed!';
        setTimeout(() => notice.text = '', 2000);
    });
});

win.open();

@build
Copy link
Contributor

build commented Sep 22, 2020

Fails
🚫

Test suite crashed on iOS simulator. Please see the crash log for more details.

🚫 Tests have failed, see below for more information.
Warnings
⚠️ There is no linked JIRA ticket in the PR body. Please include the URL of the relevant JIRA ticket. If you need to, you may file a ticket on JIRA
Messages
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖 ❌ 1 tests have failed There are 1 tests failing and 720 skipped out of 8115 total tests.

Tests:

ClassnameNameTimeError
android.emulator.fs#copyFile() copies file asynchronously to destination (11)0.099
Error: expected false to be true
at Assertion.fail (/node_modules/should/cjs/should.js:275:13)
      at Assertion.value (/node_modules/should/cjs/should.js:356:9)
      at /fs.test.js:204:35
      at Stream.<anonymous> (<embedded>:9815:5)

Generated by 🚫 dangerJS against de368ec

@lokeshchdhry
Copy link
Contributor

FR Passed.
Checked with hyperloop 6.0.0 on MacOS using ti build -p ios -T macos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants