Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sbertix committed Apr 8, 2021
1 parent 61c779a commit a126bd1
Show file tree
Hide file tree
Showing 21 changed files with 1,351 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,91 +1,115 @@
{
"images" : [
{
"filename" : "[email protected]",
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "[email protected]",
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"filename" : "[email protected]",
"idiom" : "iphone",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "[email protected]",
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "[email protected]",
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "[email protected]",
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "[email protected]",
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"filename" : "[email protected]",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "[email protected]",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"filename" : "[email protected]",
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"filename" : "[email protected]",
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "[email protected]",
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "[email protected]",
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "[email protected]",
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"filename" : "[email protected]",
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "[email protected]",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"filename" : "[email protected]",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"filename" : "[email protected]",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"filename" : "[email protected]",
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions Examples/Authenticator/Authenticator/Text.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// Created by Stefano Bertagno on 07/02/21.
//

import Foundation

import SwiftUI

extension Text {
Expand Down
42 changes: 17 additions & 25 deletions Examples/Followers/Followers.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
E0066A0D261F3F9F00BB10A1 /* SwiftagramCrypto in Frameworks */ = {isa = PBXBuildFile; productRef = E0066A0C261F3F9F00BB10A1 /* SwiftagramCrypto */; };
E028F0302418DFCC00F9C7F8 /* FollowersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E028F0212418DFCC00F9C7F8 /* FollowersView.swift */; };
E028F0312418DFCC00F9C7F8 /* FollowersModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E028F0222418DFCC00F9C7F8 /* FollowersModel.swift */; };
E028F0332418DFCC00F9C7F8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E028F0242418DFCC00F9C7F8 /* Assets.xcassets */; };
Expand All @@ -17,14 +18,13 @@
E028F0392418DFCC00F9C7F8 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E028F02D2418DFCC00F9C7F8 /* ContentView.swift */; };
E028F03B2418DFCC00F9C7F8 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E028F02F2418DFCC00F9C7F8 /* SceneDelegate.swift */; };
E06D4F71244C7EA500C9AD05 /* FetchImage in Frameworks */ = {isa = PBXBuildFile; productRef = E06D4F70244C7EA500C9AD05 /* FetchImage */; };
E0A49C5A25E58B200065CAD2 /* SwiftagramCrypto in Frameworks */ = {isa = PBXBuildFile; productRef = E0A49C5925E58B200065CAD2 /* SwiftagramCrypto */; };
E0A49C5C25E58B200065CAD2 /* Swiftagram in Frameworks */ = {isa = PBXBuildFile; productRef = E0A49C5B25E58B200065CAD2 /* Swiftagram */; };
E0B1314925D1794800317BEE /* AvatarButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0B1314825D1794800317BEE /* AvatarButton.swift */; };
E0B1315225D179EA00317BEE /* RemoteImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0B1315125D179EA00317BEE /* RemoteImage.swift */; };
E0EA4715246DE2C700F409E6 /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0EA4714246DE2C700F409E6 /* LoginView.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
E0066A0B261F3F1C00BB10A1 /* Swiftagram */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Swiftagram; path = ../..; sourceTree = "<group>"; };
E028F0082418DFAD00F9C7F8 /* Followers.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Followers.app; sourceTree = BUILT_PRODUCTS_DIR; };
E028F0212418DFCC00F9C7F8 /* FollowersView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FollowersView.swift; sourceTree = "<group>"; };
E028F0222418DFCC00F9C7F8 /* FollowersModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FollowersModel.swift; sourceTree = "<group>"; };
Expand All @@ -46,19 +46,27 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E0A49C5C25E58B200065CAD2 /* Swiftagram in Frameworks */,
E0A49C5A25E58B200065CAD2 /* SwiftagramCrypto in Frameworks */,
E0066A0D261F3F9F00BB10A1 /* SwiftagramCrypto in Frameworks */,
E06D4F71244C7EA500C9AD05 /* FetchImage in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
E0066A04261E2C1A00BB10A1 /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
E028EFFF2418DFAD00F9C7F8 = {
isa = PBXGroup;
children = (
E0066A0B261F3F1C00BB10A1 /* Swiftagram */,
E028F01F2418DFCC00F9C7F8 /* Followers */,
E0066A04261E2C1A00BB10A1 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -134,8 +142,7 @@
name = Followers;
packageProductDependencies = (
E06D4F70244C7EA500C9AD05 /* FetchImage */,
E0A49C5925E58B200065CAD2 /* SwiftagramCrypto */,
E0A49C5B25E58B200065CAD2 /* Swiftagram */,
E0066A0C261F3F9F00BB10A1 /* SwiftagramCrypto */,
);
productName = Followers;
productReference = E028F0082418DFAD00F9C7F8 /* Followers.app */;
Expand Down Expand Up @@ -167,7 +174,6 @@
mainGroup = E028EFFF2418DFAD00F9C7F8;
packageReferences = (
E06D4F6F244C7EA500C9AD05 /* XCRemoteSwiftPackageReference "FetchImage" */,
E0A49C5825E58B200065CAD2 /* XCRemoteSwiftPackageReference "Swiftagram" */,
);
productRefGroup = E028F0092418DFAD00F9C7F8 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -414,31 +420,17 @@
minimumVersion = 0.4.0;
};
};
E0A49C5825E58B200065CAD2 /* XCRemoteSwiftPackageReference "Swiftagram" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "[email protected]:sbertix/Swiftagram.git";
requirement = {
branch = development;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
E06D4F70244C7EA500C9AD05 /* FetchImage */ = {
isa = XCSwiftPackageProductDependency;
package = E06D4F6F244C7EA500C9AD05 /* XCRemoteSwiftPackageReference "FetchImage" */;
productName = FetchImage;
};
E0A49C5925E58B200065CAD2 /* SwiftagramCrypto */ = {
E0066A0C261F3F9F00BB10A1 /* SwiftagramCrypto */ = {
isa = XCSwiftPackageProductDependency;
package = E0A49C5825E58B200065CAD2 /* XCRemoteSwiftPackageReference "Swiftagram" */;
productName = SwiftagramCrypto;
};
E0A49C5B25E58B200065CAD2 /* Swiftagram */ = {
E06D4F70244C7EA500C9AD05 /* FetchImage */ = {
isa = XCSwiftPackageProductDependency;
package = E0A49C5825E58B200065CAD2 /* XCRemoteSwiftPackageReference "Swiftagram" */;
productName = Swiftagram;
package = E06D4F6F244C7EA500C9AD05 /* XCRemoteSwiftPackageReference "FetchImage" */;
productName = FetchImage;
};
/* End XCSwiftPackageProductDependency section */
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
6 changes: 3 additions & 3 deletions Examples/Followers/Followers/Models/FollowersModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Combine
import Foundation
import SwiftUI

import Swiftagram
import SwiftagramCrypto

/// An `ObservableObject` dealing with requests.
Expand All @@ -33,7 +32,7 @@ final class FollowersModel: ObservableObject {
.flatMap { secret -> AnyPublisher<User?, Never> in
guard let secret = secret else { return Just(nil).eraseToAnyPublisher() }
// Fetch the user.
return Endpoint.User.summary(for: secret.identifier)
return Endpoint.user(secret.identifier)
.unlock(with: secret)
.session(.instagram)
.map(\.user)
Expand All @@ -50,7 +49,8 @@ final class FollowersModel: ObservableObject {
.flatMap { secret -> AnyPublisher<[User]?, Never> in
guard let secret = secret else { return Just(nil).eraseToAnyPublisher() }
// Fetch followers.
return Endpoint.Friendship.following(secret.identifier)
return Endpoint.user(secret.identifier)
.followers
.unlock(with: secret)
.session(.instagram)
.pages(3)
Expand Down
Loading

0 comments on commit a126bd1

Please sign in to comment.