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

refactor(ios): use CLGeocoder APIs to reverse geocode and forward geocode #12651

Merged
merged 2 commits into from Apr 5, 2021

Conversation

vijaysingh-axway
Copy link
Contributor

@vijaysingh-axway vijaysingh-axway commented Mar 23, 2021

https://jira.appcelerator.org/browse/TIMOB-28396

Backport of #12581

const win = Ti.UI.createWindow({ backgroundColor: 'gray' });
const scrollView = Ti.UI.createScrollView();
const label = Ti.UI.createLabel({
	top: 5,
	left: 5,
	color: 'white'
});

Ti.Geolocation.forwardGeocoder('440 N Bernardo Ave, Mountain View, CA 94043',
	e => label.text = `${label.text}forwardGeocoderCallback: ${JSON.stringify(e, null , 1)}\n`);

Ti.Geolocation.reverseGeocoder(37.4222617, -122.0862134,
	e => label.text = `${label.text}reverseGeocoderCallback: ${JSON.stringify(e, null , 1)}\n`);

scrollView.add(label);
win.add(scrollView);
win.open();`

@build
Copy link
Contributor

build commented Mar 23, 2021

Fails
🚫 Tests have failed, see below for more information.
Messages
📖 ❌ 7 tests have failed There are 7 tests failing and 905 skipped out of 14549 total tests.
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖

💾 Here's the generated SDK zipfile.

📖 👍 Hey!, You deleted more code than you added. That's awesome!

Tests:

ClassnameNameTimeError
android.emulator.Titanium.UI.Android.ProgressIndicatordialog indeterminant - show in different windows (11)5.176
Error: timeout of 5000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53723)
android.emulator.Titanium.UI.Clipboard.examplesCopy Text to the Clipboard (11)0.21
Error: Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference
at Context.<anonymous> (/ti.ui.clipboard.test.js:131:24)
      at Test.Runnable.run (/ti-mocha.js:6535:54163)
      at Runner.runTest (/ti-mocha.js:6535:58604)
      at /ti-mocha.js:6535:59445
      at next (/ti-mocha.js:6535:58013)
      at /ti-mocha.js:6535:57975
      at next (/ti-mocha.js:6535:57665)
      at /ti-mocha.js:6535:57759
      at Titanium.timeslice (/ti-mocha.js:5764:23)
ios.ipad.Titanium.UI.ListViewAll text should show if ListView.style is .INSET_GROUPED (14.4)0.934
Error: expected 'Ti.UI.View' to match image ('snapshots/listview_style_inset_grouped@2x~ipad.png')
    mismatched pixels
fail@file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/node_modules/should/cjs/should.js:275:23
value@file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/node_modules/should/cjs/should.js:356:23
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti.ui.listview.test.js:1441:28
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4376:41
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4763:17
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4840:23
next@file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4688:20
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4698:15
next@file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4636:30
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4665:13
timeslice@file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:5764:29
ios.ipad.Titanium.UI.TableViewAll text should show if TableView.style is .INSET_GROUPED (14.4)0.333
Error: expected 'Ti.UI.View' to match image ('snapshots/tableview_style_inset_grouped@2x.png')
    mismatched pixels
fail@file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/node_modules/should/cjs/should.js:275:23
value@file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/node_modules/should/cjs/should.js:356:23
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti.ui.tableview.test.js:1793:28
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4376:41
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4763:17
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4840:23
next@file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4688:20
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4698:15
next@file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4636:30
file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:4665:13
timeslice@file:///Users/build/Library/Developer/CoreSimulator/Devices/86F3F1B4-AE7A-4300-B790-6CC22207BDD2/data/Containers/Bundle/Application/99049201-1911-4F5C-8DE5-B27116959C65/mocha.app/ti-mocha.js:5764:29
ios.iphone.Titanium.UI.ListViewAll text should show if ListView.style is .INSET_GROUPED (14.4)1.338
Error: expected 'Ti.UI.View' to match image ('snapshots/listview_style_inset_grouped@3x.png')
    mismatched pixels
fail@file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/node_modules/should/cjs/should.js:275:23
value@file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/node_modules/should/cjs/should.js:356:23
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti.ui.listview.test.js:1441:28
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4376:41
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4763:17
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4840:23
next@file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4688:20
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4698:15
next@file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4636:30
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4665:13
timeslice@file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:5764:29
ios.iphone.Titanium.UI.TableViewAll text should show if TableView.style is .INSET_GROUPED (14.4)0.423
Error: expected 'Ti.UI.View' to match image ('snapshots/tableview_style_inset_grouped@3x.png')
    mismatched pixels
fail@file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/node_modules/should/cjs/should.js:275:23
value@file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/node_modules/should/cjs/should.js:356:23
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti.ui.tableview.test.js:1793:28
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4376:41
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4763:17
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4840:23
next@file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4688:20
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4698:15
next@file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4636:30
file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:4665:13
timeslice@file:///Users/build/Library/Developer/CoreSimulator/Devices/122BF252-6968-48E8-A332-50594D2BF160/data/Containers/Bundle/Application/86EAE75F-1714-4443-9FA1-EDF2BC7F548A/mocha.app/ti-mocha.js:5764:29
ios.macos.Titanium.UI.Semantic Colorsuse semantic colors via color properties (10.15.7)0.33
Error: expected 'Ti.UI.View' to match image ('snapshots/systemredcolor_light.png')
    expected 12 to be 6
fail@file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-12651/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/node_modules/should/cjs/should.js:275:23
value@file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-12651/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/node_modules/should/cjs/should.js:356:23
postlayout@file:///Users/build/jenkins/workspace/ium-sdk_titanium_mobile_PR-12651/tmp/mocha/build/iphone/build/Products/Debug-maccatalyst/mocha.app/Contents/Resources/ti.ui.test.js:363:34

Generated by 🚫 dangerJS against 8b5ee98

@lokeshchdhry
Copy link
Contributor

Running with 9.3.3 gives below error. Does not look related to this PR but putting it here:

[DEBUG] :  Preparing _app_props__json
[DEBUG] :  Preparing _env__json
[DEBUG] :  Preparing ti_main_js
[DEBUG] :  Preparing app_js
[DEBUG] :  Preparing ti_cloud/ti_cloud_js
[DEBUG] :  Preparing ti_internal/bootstrap_json
[DEBUG] :  Running /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/9.3.3.v20210323131957/iphone/titanium_prep "com.app.timob28396" "/Users/lchoudhary/Desktop/workspaces/workspace_2020/TIMOB-28396/build/iphone/assets"
[ERROR] :  Error: write EPIPE
    at afterWriteDispatched (internal/stream_base_commons.js:150:25)
    at writeGeneric (internal/stream_base_commons.js:141:3)
    at Socket._writeGeneric (net.js:771:11)
    at Socket._write (net.js:783:8)
    at doWrite (_stream_writable.js:431:12)
    at writeOrBuffer (_stream_writable.js:415:5)
    at Socket.Writable.write (_stream_writable.js:305:11)
    at iOSBuilder.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/9.3.3.v20210323131957/iphone/cli/commands/_build.js:6349:17)
    at check (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/9.3.3.v20210323131957/node_modules/async/dist/async.js:4460:13)
    at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/9.3.3.v20210323131957/iphone/cli/commands/_build.js:6340:12

@vijaysingh-axway
Copy link
Contributor Author

vijaysingh-axway commented Mar 30, 2021

@lokeshchdhry I created new app using the SDK and run it. It is working fine.
The error seems something related internet connection. Can you try again?

@sgtcoolguy sgtcoolguy merged commit f59f5b8 into tidev:9_3_X Apr 5, 2021
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