Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23530] Hyperloop - IPHONEOS_DEPLOYMENT_TARGET of 7.0 despite value of min-ios-ver in tiapp.xml

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-06-29T01:52:24.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.4.0
ComponentsHyperloop, iOS
Labelshyperloop, swift
ReporterRon Piwetz
AssigneeHans Knöchel
Created2016-06-10T15:05:23.000+0000
Updated2016-08-02T22:20:09.000+0000

Description

I've set min-ios-ver to 9.0 within tiapp.xml, and when running appc ti build I can see an INFO message of Minimum iOS version: 9.0 When it gets to the Hyperloop section, I see a TRACE message of {noformat} [Hyperloop] CocoaPods IPHONEOS_DEPLOYMENT_TARGET = 7.0 {noformat} I believe this is leading to parameter of -target x86_64-apple-ios7.0 being set during swift compilation, causing an error for the particular pod I am trying to use (ImagePicker) One of the errors: {noformat} error: 'dispatch_queue_attr_make_with_qos_class' is only available on iOS 8.0 or newer {noformat} There are lots more like this in the logs Recreating this error can be done by using a Podfile with the below contents:
use_frameworks!
platform :ios, '9.0'
target 'Hyperloop_Sample' do
	pod 'ImagePicker'
end
I have copy/pasted the failing swift build command, replaced the -target x86_64-apple-ios7.0 with -target x86_64-apple-ios9.0 and it completes successfully.

Attachments

FileDateSize
build_iphone.log2016-06-15T19:42:06.000+000075504

Comments

  1. Sharif AbuDarda 2016-06-15

    Hello, Could you explain a little more about how you are seeing the issue. I tried to test the hyperloop 1.2.0 which I see it build fine. Please where you are making the modification in tiapp.xml and please provide the error log. Regards, Sharif.
  2. Ron Piwetz 2016-06-15

    in tiapp.xml, add 9.0 inside of the block You used the Podfile I provided and it built?
  3. Ron Piwetz 2016-06-15

    I attached my build log file. In it, you can see on line 483 where xcodebuild is being called with -alltargets IPHONEOS_DEPLOYMENT_TARGET=7.0 which leads to line 486 of [Hyperloop] CocoaPods IPHONEOS_DEPLOYMENT_TARGET = 7.0 so then on line 498, you see -target x86_64-apple-ios7.0 but if i change that target to be x86_64-apple-ios9.0 instead it works You can also see 10 instances of error: 'XXXXXX' is only available on iOS 8.0 or newer
  4. Brenton House 2016-06-15

    [~cng] Do you know if this will be in the GA build of Hyperloop coming out?
  5. Hans Knöchel 2016-06-15

    Did you make sure you set it inside the Podile (which has the 7.0 by default). See hyperloop-examples:
       platform :ios, '7.0'
       target 'Hyperloop_Sample' do
       	pod 'JBChartView'
       	pod 'GLCalendarView', '~> 1.2'
       	pod 'Shimmer'
       end
       
    Changing that to 9.0 should do it.
  6. Ron Piwetz 2016-06-15

    As shown in the original report, I have it set to 9.0 in the Podfile, but hyperloop is being told to use 7.0
  7. Hans Knöchel 2016-06-15

    Right. So the IOS_MIN inside plugins/hyperloop/<version>/hooks/ios/hyperloop.js is currently used hardcoded, although it should use the <min-ios-ver/> if existing.
  8. Hans Knöchel 2016-06-15

    PR to use this.builder.minIosVer instead of MIN_IOS in the CLI: https://github.com/appcelerator/hyperloop.next/pull/36
  9. Chee Kiat Ng 2016-06-17

    [~hansknoechel] Steps to test please.
  10. Hans Knöchel 2016-06-17

    *Steps to test*: 1. Use the [hyperloop-examples](https://github.com/appcelerator/hyperloop-examples) project and replace the Hyperloop module & plugin from [here](https://github.com/appcelerator/hyperloop.next/releases) 2. Paste <min-ios-ver>9.0</min-ios-ver> inside the <ios/> section of the tiapp.xml 3. Paste the following inside the Podfile:
        use_frameworks!
        platform :ios, '9.0'
        target 'Hyperloop_Sample' do
        	pod 'ImagePicker'
        end
        
    4. Run the project *Expected result*: The project does not fail *Note* Don't use cocoapods 1.0.0 as this doesn't work with hyperloop at the moment. use cocoa pods 0.39.0 instead. If you want to downgrade the version, refer to this link: http://stackoverflow.com/questions/20487849/downgrading-or-installing-older-version-of-cocoapods
  11. Ron Piwetz 2016-06-24

  12. Chee Kiat Ng 2016-06-26

    Smaller test case for PR

    1. *appc new -n testPod --classic* 2. Install hyperloop module from [here](https://github.com/appcelerator/hyperloop.next/releases) 3. Paste <min-ios-ver>9.0</min-ios-ver> inside the <ios/> section of the tiapp.xml 4. Paste the following inside the Podfile in root of project:
        use_frameworks!
        platform :ios, '9.0'
        target 'testPod' do
        	pod 'ImagePicker'
        end
        
    5. Include this in tiapp.xml
          <modules>
            <module>hyperloop</module>
          </modules>
          <plugins>
            <plugin>hyperloop</plugin>
          </plugins>
        
    6. *appc run -p ios*

    Expected result

    The project will build successfully *Note* Don't use cocoapods 1.0.0 as this doesn't work with hyperloop at the moment. use cocoa pods 0.39.0 instead. If you want to downgrade the version, refer to this link: http://stackoverflow.com/questions/20487849/downgrading-or-installing-older-version-of-cocoapods [~hansknoechel] Your fix removed the swift error in this ticket, but with my reproduce steps, I encountered a different error:
        [TRACE] ld: framework not found ImagePicker
        [TRACE] clang: error: linker command failed with exit code 1 (use -v to see invocation)
        [ERROR] ** BUILD FAILED **
        [ERROR] The following build commands failed:
        [ERROR]         Ld build/Products/Debug-iphonesimulator/SGTestCocoa.app/SGTestCocoa normal x86_64
        [ERROR] (1 failure)
        
    Can you please check to see what's wrong? could it be my configuration?
  13. Hans Knöchel 2016-06-29

    As discussed in TIMOB-23570, the above-described issue is another issue that should be handled independently from this one, so we can put it into 5.4.0.
  14. Wilson Luu 2016-07-20

    [~hansknoechel], [~cng], TIMOB-23570 is blocking us from verifying this ticket. If we want this fix to be in 5.4.0, should TIMOB-23570 be fixed first and put into 5.4.0?
  15. Chee Kiat Ng 2016-07-21

  16. Wilson Luu 2016-08-02

    Close ticket as fixed. Verified that <min-ios-ver> is being respected during build. *Note:* Needed to apply the workaround from TIMOB-23671 since I started encountering the segfault issue. Tested on: Appc CLI NPM: 4.2.7 Appc CLI Core: 5.4.0-37 Arrow: 1.8.2 SDK: 5.4.0.v20160801022303 Node: v4.4.7 OS: Mac OS X (10.11.6) Xcode: 7.3.1

JSON Source