Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Conversation

drdaz
Copy link
Member

@drdaz drdaz commented Nov 6, 2018

Using Swift 4 it's impossible to build this using CocoaPods as-is.

This bumps the version of Bolts-Swift to the version supporting Swift 4. I've done some brief manual testing and everything seems to be working fine.

@flovilmart flovilmart merged commit 00ae5ab into parse-community:master Nov 6, 2018
@flovilmart
Copy link
Contributor

Thanks! Is the dependency also bumped for Carthage?

@drdaz
Copy link
Member Author

drdaz commented Nov 6, 2018

No worries.

It's locked to a commit (e9baa72d04521c3b25ef4fa6fef12b340953ee02) which supports Swift 4, but isn't a release... which I thought was odd.

@drdaz
Copy link
Member Author

drdaz commented Nov 7, 2018

... with that said, the Parse-SDK-iOS-OSX doesn't build using Carthage as-is. It needs the patch I provided here: parse-community/Parse-SDK-iOS-OSX#1359.

@flovilmart
Copy link
Contributor

I just merged it, it seems there are still some issues with building portions of the SDK. As you may have seen in the build status

@drdaz
Copy link
Member Author

drdaz commented Nov 7, 2018

I have to confess I haven't worked much with automatic builds on the Apple ecosystem. But I took a quick look at the build log after you merged parse-community/Parse-SDK-iOS-OSX#1359.

It seems the Apple TV build is failing. The only thing I can think of, looking at the output, is that there isn't an OS version specified for the Apple TV build. The build fails with this error:

xcodebuild: error: Unable to find a destination matching the provided destination specifier: { platform:tvOS Simulator, name:Apple TV 1080p }

No OS version specified.

While the available destinations all provide an OS version:

Available destinations for the "Parse-tvOS" scheme: { platform:tvOS Simulator, id:81BBAE1D-178C-4647-804A-256205077FDE, OS:11.1, name:Apple TV }

Here, version 11.1 is specified.

I'm not sure where I'd look to correct this, or indeed if this the actual root of the issue.

@flovilmart
Copy link
Contributor

flovilmart commented Nov 7, 2018

There is a set of scripts in the vendor folder as a submodule that provide the ruby tool chain that builds all the SDKs, and run the tests. (Those are inherited from the good old days, but still work).

The problem is that those build scripts are looking for a particular tvOS simulator that isn’t available on the CI. So there are 2 options:

  1. Update the scripts to use a version that exist
  2. Programmatically create a simulator that is compatible with the one specified in the destinations

Check this out:
https://github.com/parse-community/xctoolchain/blob/master/Scripts/xctask/build_framework_task.rb#L130

@drdaz
Copy link
Member Author

drdaz commented Nov 7, 2018

Alright, I've made a change that may or may not fix this. Is there some way of checking that locally? Or should I just commit and see if the auto-build now works?

@flovilmart
Copy link
Contributor

you can change the submodule to point to another repo / commit and this should go ahead. I added you to the xctoolchain repo so you can push your changes directly in a branch (not master please) and point the submodule to that branch.

@drdaz
Copy link
Member Author

drdaz commented Nov 7, 2018

Special powers; nice. Thanks.

you can change the submodule

You lost me here :D Do I need access to your CI to do this thing?

@drdaz
Copy link
Member Author

drdaz commented Nov 7, 2018

Right... GitHub login :)

@flovilmart
Copy link
Contributor

We're talking about the iOS SDK not the liveQuery SDK here right?

For the submodule we are talking about what is in Vendor/xctoolchain depending what you need to change.

I believe you will need to commit and push to it's remote (https://github.com/parse-community/xctoolchain/tree/1dcfb1bb57695ba56a084913f64b87de943fec5f)

So the following should do the trick (if you made a change in the xctoolchain)

From Parse-SDK-iOS-OSX folder:

cd Vendor/xctoolchain
git checkout -b fix-appletv # create a branch
git add .
git commit -m 'My fix'
git push origin fix-appletv
cd ../../
git add Vendor/xctoolchain 
git commit -m 'Updates submodule to support latest SDK'
git push

Does this help?

@drdaz
Copy link
Member Author

drdaz commented Nov 7, 2018

It does. And it was a good excuse to read up on git submodules.

But I'll probably need push access to the iOS SDK for the last step?

@flovilmart
Copy link
Contributor

For the last step, you can push to your branch on your repo, this should work, and then open a PR ;)

@drdaz
Copy link
Member Author

drdaz commented Nov 7, 2018

I've opened a PR here parse-community/Parse-SDK-iOS-OSX#1364

For some reason it includes the earlier change I made, and that you merged earlier.

It feels really weird to be pushing changes having no idea if they've actually fixed anything...

@drdaz
Copy link
Member Author

drdaz commented Nov 7, 2018

I've opened another PR that hopefully fixes things; syntax was off in the last one.

parse-community/Parse-SDK-iOS-OSX#1365

@drdaz
Copy link
Member Author

drdaz commented Nov 7, 2018

@flovilmart This is weird. More tests are failing for the new PR than the old. Test builds seem to be failing because they can't find some Bolts headers.

It also seems some changes came with my commit that weren't actually changes I made. I'm feeling pretty confused just now.

@drdaz
Copy link
Member Author

drdaz commented Nov 7, 2018

The travis-ci build still fails.

The problem now is that there are too many matching destinations. There are 2 'Apple TV 1080p' destinations for iOS 11.0. I'll try another config...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants