diff --git a/README.md b/README.md old mode 100644 new mode 100755 index c0187716..b78d8121 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ Then, run the following command to install the dependency: $ pod install ``` +For Objective-C projects, set the **Embedded Content Contains Swift Code** flag in your project to **Yes** (found under **Build Options** in the **Build Phases** tab). + ### Carthage Uber Rides is also available through [Carthage](https://github.com/Carthage/Carthage), a decentralized dependency manager that builds dependencies and provides you with binary frameworks, giving you full control over your project structure and setup. @@ -48,7 +50,7 @@ $ brew install carthage To integrate Uber Rides into your Xcode project, navigate to the directory that contains your project and create a new **Cartfile** with `touch Cartfile` or open an existing one, then add the following line: -```ogdl +``` github "uber/rides-ios-sdk" ``` @@ -58,7 +60,13 @@ Build the framework: $ carthage update ``` -Now add the `UberRides.framework` (in `Carthage/Build/iOS`) as a Linked Framework in Xcode (See the **Linked Frameworks and Libraries** section under the **General** tab of your project target). +Now add the `UberRides.framework` (in `Carthage/Build/iOS`) as a Linked Framework in Xcode (See the **Linked Frameworks and Libraries** section under the **General** tab of your project target). + +Then, on your application targets' **Build Phases** tab, click the '+' button and choose **New Run Script Phase**. Add the run script `/usr/local/bin/carthage copy-frameworks` and add the path to the UberRides framework under **Input Files**: `$(SRCROOT)/Carthage/Build/iOS/UberRides.framework`. + +![Screenshot](/img/carthage_script.png?raw=true "Carthage Run Script Screenshot") + +For Objective-C projects, set the **Embedded Content Contains Swift Code** flag to **Yes** (found under **Build Options** in the **Build Phases** tab). ### Manually Add Subprojects diff --git a/UberRides.podspec b/UberRides.podspec index b3429d82..2f32b025 100644 --- a/UberRides.podspec +++ b/UberRides.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "UberRides" - s.version = "0.2.0" + s.version = "0.2.1" s.summary = "The Official Uber Rides iOS SDK." s.description = <<-DESC This Swift library allows you to integrate Uber into your iOS app. It is designed to make it quick and easy to add a 'Request a Ride' button in your application, seamlessly connecting your users with Uber. @@ -10,11 +10,10 @@ Pod::Spec.new do |s| s.screenshots = "https://raw.githubusercontent.com/uber/rides-ios-sdk/master/img/example_app.png" s.license = { :type => "MIT", :file => "LICENSE" } s.authors = { "Christine Kim" => "christinek@uber.com", "Farwa Naqi" => "farwa@uber.com" } - s.platform = :ios, "8.0" s.source = { :git => "https://github.com/uber/rides-ios-sdk.git", :tag => 'v' + s.version.to_s } s.source_files = "source/UberRides/*.swift" - s.resource = "source/UberRides/UberRidesResources.bundle/*" + s.resource = "source/UberRides/Resources/**" s.requires_arc = true end diff --git a/img/carthage_script.png b/img/carthage_script.png new file mode 100644 index 00000000..31d529e8 Binary files /dev/null and b/img/carthage_script.png differ diff --git a/source/UberRides.xcodeproj/project.pbxproj b/source/UberRides.xcodeproj/project.pbxproj index 8b4dbbe4..c6ff71ee 100644 --- a/source/UberRides.xcodeproj/project.pbxproj +++ b/source/UberRides.xcodeproj/project.pbxproj @@ -15,7 +15,10 @@ AC0404941BFACDAF00AC1501 /* RequestDeeplink.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC0404931BFACDAF00AC1501 /* RequestDeeplink.swift */; }; AC0404961BFACDC900AC1501 /* RidesClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC0404951BFACDC900AC1501 /* RidesClient.swift */; }; AC04049A1BFACE5400AC1501 /* RequestDeeplinkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC0404991BFACE5400AC1501 /* RequestDeeplinkTests.swift */; }; - D8F92D9A1C4486E100D65712 /* UberRidesResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D8F92D991C4486E100D65712 /* UberRidesResources.bundle */; }; + D8A196BB1C56FC250050A264 /* en.lproj in Resources */ = {isa = PBXBuildFile; fileRef = D8A196B71C56FC250050A264 /* en.lproj */; }; + D8A196BC1C56FC250050A264 /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D8A196B81C56FC250050A264 /* Media.xcassets */; }; + D8A196BD1C56FC250050A264 /* zh-Hans.lproj in Resources */ = {isa = PBXBuildFile; fileRef = D8A196B91C56FC250050A264 /* zh-Hans.lproj */; }; + D8A196BE1C56FC250050A264 /* zh-Hant.lproj in Resources */ = {isa = PBXBuildFile; fileRef = D8A196BA1C56FC250050A264 /* zh-Hant.lproj */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -40,7 +43,10 @@ AC0404931BFACDAF00AC1501 /* RequestDeeplink.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestDeeplink.swift; sourceTree = ""; }; AC0404951BFACDC900AC1501 /* RidesClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RidesClient.swift; sourceTree = ""; }; AC0404991BFACE5400AC1501 /* RequestDeeplinkTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestDeeplinkTests.swift; sourceTree = ""; }; - D8F92D991C4486E100D65712 /* UberRidesResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = UberRidesResources.bundle; sourceTree = ""; }; + D8A196B71C56FC250050A264 /* en.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; name = en.lproj; path = Resources/en.lproj; sourceTree = ""; }; + D8A196B81C56FC250050A264 /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Media.xcassets; path = Resources/Media.xcassets; sourceTree = ""; }; + D8A196B91C56FC250050A264 /* zh-Hans.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "zh-Hans.lproj"; path = "Resources/zh-Hans.lproj"; sourceTree = ""; }; + D8A196BA1C56FC250050A264 /* zh-Hant.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "zh-Hant.lproj"; path = "Resources/zh-Hant.lproj"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -83,13 +89,13 @@ AC0404771BFACD1D00AC1501 /* UberRides */ = { isa = PBXGroup; children = ( + D8A196B61C56FC1A0050A264 /* Resources */, AC0404781BFACD1D00AC1501 /* UberRides.h */, AC04047A1BFACD1D00AC1501 /* Info.plist */, AC04048F1BFACD6000AC1501 /* ColorUtil.swift */, AC0404911BFACD7C00AC1501 /* RequestButton.swift */, AC0404931BFACDAF00AC1501 /* RequestDeeplink.swift */, AC0404951BFACDC900AC1501 /* RidesClient.swift */, - D8F92D991C4486E100D65712 /* UberRidesResources.bundle */, ); path = UberRides; sourceTree = ""; @@ -104,6 +110,17 @@ path = UberRidesTests; sourceTree = ""; }; + D8A196B61C56FC1A0050A264 /* Resources */ = { + isa = PBXGroup; + children = ( + D8A196B71C56FC250050A264 /* en.lproj */, + D8A196B81C56FC250050A264 /* Media.xcassets */, + D8A196B91C56FC250050A264 /* zh-Hans.lproj */, + D8A196BA1C56FC250050A264 /* zh-Hant.lproj */, + ); + name = Resources; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -198,7 +215,10 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - D8F92D9A1C4486E100D65712 /* UberRidesResources.bundle in Resources */, + D8A196BE1C56FC250050A264 /* zh-Hant.lproj in Resources */, + D8A196BC1C56FC250050A264 /* Media.xcassets in Resources */, + D8A196BD1C56FC250050A264 /* zh-Hans.lproj in Resources */, + D8A196BB1C56FC250050A264 /* en.lproj in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/source/UberRides/Media.xcassets/Badge.imageset/Contents.json b/source/UberRides/Resources/Media.xcassets/Badge.imageset/Contents.json similarity index 100% rename from source/UberRides/Media.xcassets/Badge.imageset/Contents.json rename to source/UberRides/Resources/Media.xcassets/Badge.imageset/Contents.json diff --git a/source/UberRides/Media.xcassets/Badge.imageset/uber_badge_24.png b/source/UberRides/Resources/Media.xcassets/Badge.imageset/uber_badge_24.png similarity index 100% rename from source/UberRides/Media.xcassets/Badge.imageset/uber_badge_24.png rename to source/UberRides/Resources/Media.xcassets/Badge.imageset/uber_badge_24.png diff --git a/source/UberRides/Media.xcassets/Badge.imageset/uber_badge_24@2x.png b/source/UberRides/Resources/Media.xcassets/Badge.imageset/uber_badge_24@2x.png similarity index 100% rename from source/UberRides/Media.xcassets/Badge.imageset/uber_badge_24@2x.png rename to source/UberRides/Resources/Media.xcassets/Badge.imageset/uber_badge_24@2x.png diff --git a/source/UberRides/Media.xcassets/Badge.imageset/uber_badge_24@3x.png b/source/UberRides/Resources/Media.xcassets/Badge.imageset/uber_badge_24@3x.png similarity index 100% rename from source/UberRides/Media.xcassets/Badge.imageset/uber_badge_24@3x.png rename to source/UberRides/Resources/Media.xcassets/Badge.imageset/uber_badge_24@3x.png diff --git a/source/UberRides/Media.xcassets/Contents.json b/source/UberRides/Resources/Media.xcassets/Contents.json similarity index 100% rename from source/UberRides/Media.xcassets/Contents.json rename to source/UberRides/Resources/Media.xcassets/Contents.json diff --git a/source/UberRides/UberRidesResources.bundle/en.lproj/Localizable.strings b/source/UberRides/Resources/en.lproj/Localizable.strings similarity index 100% rename from source/UberRides/UberRidesResources.bundle/en.lproj/Localizable.strings rename to source/UberRides/Resources/en.lproj/Localizable.strings diff --git a/source/UberRides/UberRidesResources.bundle/zh-Hans.lproj/Localizable.strings b/source/UberRides/Resources/zh-Hans.lproj/Localizable.strings similarity index 100% rename from source/UberRides/UberRidesResources.bundle/zh-Hans.lproj/Localizable.strings rename to source/UberRides/Resources/zh-Hans.lproj/Localizable.strings diff --git a/source/UberRides/UberRidesResources.bundle/zh-Hant.lproj/Localizable.strings b/source/UberRides/Resources/zh-Hant.lproj/Localizable.strings similarity index 100% rename from source/UberRides/UberRidesResources.bundle/zh-Hant.lproj/Localizable.strings rename to source/UberRides/Resources/zh-Hant.lproj/Localizable.strings diff --git a/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/Contents.json b/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/Contents.json deleted file mode 100644 index c883a615..00000000 --- a/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "uber_badge_24.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "uber_badge_24@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "uber_badge_24@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/uber_badge_24.png b/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/uber_badge_24.png deleted file mode 100644 index 35465297..00000000 Binary files a/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/uber_badge_24.png and /dev/null differ diff --git a/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/uber_badge_24@2x.png b/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/uber_badge_24@2x.png deleted file mode 100644 index c0c0e076..00000000 Binary files a/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/uber_badge_24@2x.png and /dev/null differ diff --git a/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/uber_badge_24@3x.png b/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/uber_badge_24@3x.png deleted file mode 100644 index e7d8f7eb..00000000 Binary files a/source/UberRides/UberRidesResources.bundle/Media.xcassets/Badge.imageset/uber_badge_24@3x.png and /dev/null differ diff --git a/source/UberRides/UberRidesResources.bundle/Media.xcassets/Contents.json b/source/UberRides/UberRidesResources.bundle/Media.xcassets/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/source/UberRides/UberRidesResources.bundle/Media.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file