Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23652] iOS10: Unable to build Hyperloop projects containing Swift sources

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-07-21T20:33:28.000+0000
Affected Version/sRelease 5.4.0
Fix Version/sRelease 5.4.0
ComponentsHyperloop
Labelshyperloop, ios10, swift
ReporterHans Knöchel
AssigneeHans Knöchel
Created2016-07-19T07:36:34.000+0000
Updated2017-03-20T20:02:28.000+0000

Description

When using swift sources in iOS 10 with Hyperloop (e.g. the [hyperloop-examples](https://github.com/appcelerator/hyperloop-examples) project), the problem fails with the following log: https://gist.github.com/hansemannn/7645aad70c821557cc6a99802b4a59ad The main error is {quote} [ERROR] :0: warning: using sysroot for 'iPhoneSimulator' but targeting 'MacOSX' {quote} I guess it is a dynlib that is hardcoded somewhere and / or the renaming from MacOSX to macOS. Steps to reproduce: 1. Download the latest Hyperloop version from [here](https://github.com/appcelerator/hyperloop.next/releases) 2. Include the module in the hyperloop-examples project 3. Run the project Expected behavior: The build finishes successfully and you can access the Swift example Actual behavior: The build fails with the above error

Comments

  1. Hans Knöchel 2016-07-19

    More infos: We are trying to run swiftc -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -dump-ast /Users/hans/Documents/Apps/hyperloop-examples/src/MySwift.swift that fails. We don't go into the if-statement that sets the target, because xcodeTargetOS is iphonesimulator and not iphoneos. If we add it to the statement, -target armv7-apple-ios7.1 is added, because iOS 7.1 is our mininum SDK. Unfortunately, that still does not work. I thought changing it to 10.0, but that does not change much. *Update*: Changing the following line in swift.js generates the correct metabase:
       if (xcodeTargetOS === 'iphoneos' || xcodeTargetOS === 'iphonesimulator') {
       	args.push('-target');
       	args.push((xcodeTargetOS === 'iphoneos' ? 'armv7' : 'i386') + '-apple-ios' + iosMinVersion);
       }
       
    But in the very end, it complains about a corrupt Info.plist (which I THINK we fixed in another open PR, right??): {quote} [ERROR] Failed to parse app's Info.plist: /Users/hans/Documents/Apps/hyperloop-examples/build/iphone/build/Products/Debug-iphonesimulator/Hyperloop_Sample.app/Info.plist {quote} *Update 2*: It's TIMOB-23518 and it works on Titanium 6.0. [~cng] [~jvennemann]
  2. Hans Knöchel 2016-07-19

    PR: https://github.com/appcelerator/hyperloop.next/pull/42
  3. Lee Morris 2017-03-20

    Closing ticket as fixed.

JSON Source