[TIMOB-27292] iOS: App crashes on startup on iOS 9
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-09-02T11:05:52.000+0000 |
Affected Version/s | Release 8.2.0 |
Fix Version/s | Release 8.2.0 |
Components | iOS |
Labels | engSchedule, regression |
Reporter | Ewan Harris |
Assignee | Ewan Harris |
Created | 2019-07-29T15:08:34.000+0000 |
Updated | 2019-11-18T20:38:46.000+0000 |
Description
Description
When building to an iOS 9 simulator/device the app crashes on startup with the below, I believe this is due to the ios version change in [this commit](https://github.com/appcelerator/titanium_mobile/commit/8cac1f88cb226c36a4b9be6e4dee0beffda9b4ce#diff-09cce02f0aa7063f10a4c555dc65a141R23), as this is used to pass in the min iOS version to babel [here](https://github.com/appcelerator/titanium_mobile/blob/a48d707984e88e92f05287dcd3c2588025c9c9f2/build/lib/packager.js#L88) which means we're probably dropping some polyfills that are required. I'm not too sure why we haveminIosVersion
and a supported ios version range.
[ERROR] Script Error {
[ERROR] line = 769;
[ERROR] sourceURL = "file:///Users/eharris/Library/Developer/CoreSimulator/Devices/2A296A6B-E602-4231-9396-E35DDEBA2BB9/data/Containers/Bundle/Application/77BAC47A-6617-4AE4-B2C5-AE54D7C2C443/darkmodetesting.app/ti.main.js";
https://github.com/appcelerator/titanium_mobile/pull/11091
The problem is in the packager:
In the Titanium iOS
package.json
, there arevendorDependencies.xcode
andvendorDependencies\['ios sdk'\]
as well asminIosVersion
. Thexcode
property is the supported range of Xcode versions. This aligns with the"ios sdk"
version range. The"ios sdk"
version range is the supported range of iOS SDKs used to COMPILE the app, not run the app. The minimum"ios sdk"
version is not the actual minimum version that the app will run on. TheminIosVersion
is the minimum iOS version the app will run on and is the default for theIPHONEOS_DEPLOYMENT_TARGET
Xcode project setting. This is the version that Babel should be transpiling down to. So, the fix should be in the packager and the above line should be:That was my understanding but tbh I just assumed we had some duplication :) I'll update my PR to update that code and the scons-xcode-project-build file that also incorrectly references that, but surely the point still stands that if that's a minimum for compiling then we cant bump that outside of a major version otherwise we'd be introducing a breaking change?
[~eharris] Correct, we cannot bump the
minIosVersion
or the Xcode and iOS SDK range minimum versions until 9.0.FR Passed. App builds and launches successfully on iOS 9 simulator
*Closing ticket*, fix verified in SDK version
8.2.0.v20190829124255
. Also tested on an iOS 9 device and everything seems to run fine. Note* Improvement will be merged into 8_3_X at a later date. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11091There are still problems with *iOS 9* Test with *SDK8.3.0.v20191016161716 *
Error: {quote}[ERROR] : Script Error { [ERROR] : column = 119; [ERROR] : line = 5633; [ERROR] : message = "undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(TypedArrayPrototype, Symbol.toStringTag).get')"; [ERROR] : sourceURL = "file:///var/containers/Bundle/Application/97D6BC75-49AF-46CC-A4C0-E6E25289FEBA/Test%20iOS%209.app/ti.main.js"; [ERROR] : stack = " at global code@file:///var/containers/Bundle/Application/97D6BC75-49AF-46CC-A4C0-E6E25289FEBA/Test%20iOS%209.app/ti.main.js:5633:119)"; [ERROR] : }{quote}
[~smohammed] I noticed per your comment that the fix wasn't merged to 8.3.X right away. Do you know whether this has been merged yet to 8.3.X? If so, is the build that he's using, SDK8.3.0.v20191016161716, before the merge? cc:[~eharris]
[~ahutton] can you please triage with the latest test case from Nicolo? We may have to reopen the ticket.
[~amukherjee], Nicolo's comment is a separate issue to this ticket only present on 8.3.0, I opened TIMOB-27484 for that and am working on the fix.