Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Xcode 9 upgrade #478

Merged
merged 2 commits into from
Sep 20, 2017
Merged

Xcode 9 upgrade #478

merged 2 commits into from
Sep 20, 2017

Conversation

joeyg
Copy link
Contributor

@joeyg joeyg commented Sep 19, 2017

I downloaded Xcode 9 from Apple Developer site today and ran into a few issues. These changes let me compile and run the app.

Firefox iOS has been Xcode 9 on master for a bit now so as a developer it would be helpful if both projects used the same Xcode version.

@Sdaswani Sdaswani requested a review from boek September 19, 2017 22:58
@boek
Copy link
Contributor

boek commented Sep 20, 2017

Hey @joeyg, thanks again for all the activity!

Did you have the latest changes from master? I Think these changes have already landed (https://github.com/mozilla-mobile/focus-ios/blob/master/Cartfile)

@joeyg
Copy link
Contributor Author

joeyg commented Sep 20, 2017

@boek Yeah i pulled down the latest from master and was having trouble building after clearing out my Carthage directory and Carthage cache. I am not sure if it matters but it looks like the only difference between the SnapKit "swift-4" branch and what is the in "4.0.0" release is that the .swift-version file was updated from 3.0.2 to 4.0.0

@boek
Copy link
Contributor

boek commented Sep 20, 2017

Interesting. What version of Xcode are you using? I'm on Version 9.0 (9A235) from the App Store and everything is working. I'll pull down your branch and check it out

@boek
Copy link
Contributor

boek commented Sep 20, 2017

Definitely want to lock on the release branch though!

@joeyg
Copy link
Contributor Author

joeyg commented Sep 20, 2017

@boek I am also using Version 9.0 (9A235) from the app store. and have the command line tools set to the same.

Copy link
Contributor

@boek boek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One potential bug. Other than that looks good to me

@@ -55,7 +55,7 @@ private class BlockerEnabledDetector9: BlockerEnabledDetector, SFSafariViewContr
enabled = true
self.callback = callback

let detectURL = URL(string: "http://localhost:\(server.port)/enabled-detector")!
let detectURL = URL(string: "http://localhost:\(server?.port)/enabled-detector")!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will print http://localhost:Optional(<port number>)/enabled-detector. We could either unwrap or map it.

@boek
Copy link
Contributor

boek commented Sep 20, 2017

@joeyg really interesting. Curious what else could be different about our environments.

@joeyg
Copy link
Contributor Author

joeyg commented Sep 20, 2017

Ahh I'll take care of the bug in a bit. Regarding my environment here is what I am seeing (but maybe it is just me):

After I do:

$ rm -rf Carthage ~/Library/Caches/org.carthage.CarthageKit
$ xcodebuild -version
Xcode 9.0
Build version 9A235
$ carthage bootstrap
...
 Checking out SnapKit at "d31148f449abe819fd1a58d5e07e94874c7e6003"
...
Building scheme "SnapKit" in SnapKit.xcworkspace
Build Failed
	Task failed with exit code 65:
	/usr/bin/xcrun xcodebuild -workspace focus-ios/Carthage/Checkouts/SnapKit/SnapKit.xcworkspace -scheme SnapKit -configuration Release -derivedDataPath Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/SnapKit/d31148f449abe819fd1a58d5e07e94874c7e6003 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES build (launched in /focus-ios/Carthage/Checkouts/SnapKit)

I start getting errors like this when compiling the SnapKit dependency:

focus-ios/Carthage/Checkouts/SnapKit/Source/ConstraintInsets.swift:34:41: error: 'EdgeInsets' has been renamed to 'NSEdgeInsets'
    public typealias ConstraintInsets = EdgeInsets
                                        ^~~~~~~~~~
                                        NSEdgeInsets
Foundation.EdgeInsets:2:18: note: 'EdgeInsets' was obsoleted in Swift 4

So then I updated SnapKit in the Cartfile to 4.0.0 and tried again and didn't receive the build errors.

@boek
Copy link
Contributor

boek commented Sep 20, 2017

@joeyg Just curious, if you delete your derived data will master build for you?

Also, this shouldn't be a factor. But do you get the same output if you run ./checkout.sh?

@joeyg
Copy link
Contributor Author

joeyg commented Sep 20, 2017

@boek ugh yes using ./checkout.sh does work. Pretty sure the issue is that was not passing platform --iOS to carthage. Sorry for all this!

@boek
Copy link
Contributor

boek commented Sep 20, 2017

good to hear! These are good changes regardless :)

@boek boek merged commit 57ffd36 into mozilla-mobile:master Sep 20, 2017
@joeyg
Copy link
Contributor Author

joeyg commented Sep 20, 2017

Thanks for all your help @boek glad I could help out.

isabelrios pushed a commit to isabelrios/firefox-ios that referenced this pull request Feb 14, 2024
* Xcode 9 upgrade
* Xcode 9: unwrap server for building server url string
isabelrios pushed a commit to isabelrios/firefox-ios that referenced this pull request Feb 20, 2024
* Xcode 9 upgrade
* Xcode 9: unwrap server for building server url string
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