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

iOS: Various "start up" issues with 12.3.0 #13997

Open
1 task done
m1ga opened this issue Feb 26, 2024 · 9 comments
Open
1 task done

iOS: Various "start up" issues with 12.3.0 #13997

m1ga opened this issue Feb 26, 2024 · 9 comments
Labels
bug ios needs triage This issue hasn't been reviewed by maintainers

Comments

@m1ga
Copy link
Contributor

m1ga commented Feb 26, 2024

I have searched and made sure there are no existing issues for the issue I am filing

  • I have searched the existing issues

Description

we have some Slack users with various iOS issues with 12.3.0:

This PR 6e40edb did some changes to the start-up behavior so it might be the cause.

Reproducible sample

1: DEBUG=node-ios-device ti build -p ios will end up in an endless loop:

[INFO]  App successfully installed on device: iPhone von Michael
  node-ios-device Found 1 device +6ms
  node-ios-device Connected devices: 00008020-111 +0ms
Please manually launch the application or press CTRL-C to quit

  node-ios-device Trying to connect to port 46464 +254ms
  node-ios-device Trying to connect to port 46464 +4ms
  node-ios-device Trying to connect to port 46464 +253ms
  node-ios-device Trying to connect to port 46464 +254ms
  node-ios-device Trying to connect to port 46464 +256ms

3:

const win = Ti.UI.createWindow();
const lbl = Ti.UI.createLabel({text:"-", color:"#000"});

win.add(lbl);
win.open();

Ti.App.iOS.addEventListener('handleurl', event => {
	lbl.text = event.launchOptions.url;
});

tiapp.xml

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <!-- same as ti:app/id -->
        <string>com.miga.test</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <!-- your custom scheme -->
            <string>mycustomapp</string>
        </array>
    </dict>
</array>

link <a href="mycustomapp://?data=customValue">custom link</a>

Steps to reproduce

run the code

Platform

iOS

SDK version you are using

12.3.0

Alloy version you are using

No response

@m1ga m1ga added bug needs triage This issue hasn't been reviewed by maintainers ios labels Feb 26, 2024
@hansemannn
Copy link
Collaborator

Okay, so for case 1: DEBUG=node-ios-device ti build -p ios does not build for device, you probably meant DEBUG=node-ios-device ti build -p ios -p device?

@m1ga
Copy link
Contributor Author

m1ga commented Apr 15, 2024

ah yes, sorry. I always start it with a shortcut, forgot to add all parameters to the example. I use ti build -p ios -T foo and then the menu but it should be the same with the parameter. It happens for a normal "to device" build

@berutas
Copy link

berutas commented May 4, 2024

I've found that with 12.2.1 Ti.App.Arguments works as expected but with 12.3.0 it's empty on startup

@m1ga
Copy link
Contributor Author

m1ga commented May 4, 2024

@berutas can you please test the version you'll find at the bottom of this page: https://github.com/tidev/titanium-sdk/actions/runs/8695958494
Download the zip file and install it with ti sdk install filename.zip. Then in yout project change the sdk-version to 12.3.0.v20240415210917 and test it again.

@m1ga
Copy link
Contributor Author

m1ga commented May 21, 2024

as there is another report on slack I've tested Ti.App.arguments and it looks like it is not working with 12.3.0

const win = Ti.UI.createWindow();
const lbl = Ti.UI.createLabel({text:"-", color:"#000"});

win.add(lbl);
win.open();

Ti.App.iOS.addEventListener('handleurl', event => {
	lbl.text = event.launchOptions.url;
});

win.addEventListener("open", function(e){
  lbl.text = "open:\n " + Ti.App.arguments.url;
})

When you have the app closed and click on the URLScheme link the Ti.App.arguments.url are empty on 12.3.0 but are filled with 12.2.1.GA

@hansemannn
Copy link
Collaborator

Did the user try latest master? I thought I fixed that a few weeks ago

@m1ga
Copy link
Contributor Author

m1ga commented May 21, 2024

Ti.App.iOS.addEventListener('handleurl') is working but not the Ti.App.arguments.url. Using the build from 16th or May.

if you want to test it make sure you force close the app. So it will use the open event when opening it from a link.

@hansemannn
Copy link
Collaborator

Ahh that one! That should actually be fixed by the other change (#14028), where some other unreported application delegate issues were fixed as well).

@m1ga
Copy link
Contributor Author

m1ga commented May 21, 2024

Oh ok 😄 That one will crash right away as mentioned on slack. But good to know that is addressed there already 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ios needs triage This issue hasn't been reviewed by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants