Coder Social home page Coder Social logo

kickstarter / ios-oss Goto Github PK

View Code? Open in Web Editor NEW
8.4K 206.0 1.2K 3.1 GB

Kickstarter for iOS. Bring new ideas to life, anywhere.

Home Page: https://www.kickstarter.com/mobile

License: Apache License 2.0

Swift 99.77% Makefile 0.05% Shell 0.05% Ruby 0.12%
reactivecocoa reactiveswift ios swift functional-programming ios-app swift-language functional-reactive-programming frp

ios-oss's Introduction

Kickstarter for iOS

Circle CI

Welcome to Kickstarter’s open source iOS app! Come on in, take your shoes off, stay a while—explore how Kickstarter’s native squad has built and continues to build the app.

We’ve also open sourced our Android app, and read more about our journey to open source here.

Getting Started

  1. Install Xcode. We currently support XCode 14.3 Swift 5.8.
  2. Clone this repository.

* To provide a mock version that serves up hard-coded data immediately, set KsApi.Secrets.isOSS = true.

Some fun things to explore

If you’re just looking for a quick glance at a few things we’re particularly proud of, look no further:

  • The snapshots directory in each feature folder of Kickstarter-Framework-iOS together holds nearly 600 screenshots of various screens in every language, device and edge-case state that we like to make sure stays true. For example, a backer viewing a project in Japanese here , or a creator looking at their dashboard in German and on an iPad here.

  • We use view models as a lightweight way to isolate side effects and embrace a functional core. We write these as a pure mapping of input signals to output signals, and test them heavily, including tests for localization, accessibility and event tracking.

Testing the project

  • Run all tests from the command line by running make test-all.
  • Run an individual scheme's tests by selecting that scheme in Xcode and hitting CMD+U.

Documentation

While we’re at it, why not share our docs? Check out the native docs we have written so far for more documentation.

Dependencies

We make heavy use of the following projects, and so it can be helpful to be familiar with them:

1st party

  • Circle CI Prelude: Foundation of types and functions we feel are missing from the Swift standard library.

  • Circle CI ReactiveExtensions: A collection of operators we like to add to ReactiveCocoa. Built on top of ReactiveSwift.

3rd party

Notices for 3rd party libraries in this repository are contained in NOTICE.md.

Contributing

We intend for this project to be an educational resource: we are excited to share our wins, mistakes, and methodology of iOS development as we work in the open. Our primary focus is to continue improving the app for our users in line with our roadmap.

The best way to submit feedback and report bugs is to open a GitHub issue. Please be sure to include your operating system, device, version number, and steps to reproduce reported bugs. Keep in mind that all participants will be expected to follow our code of conduct.

Code of Conduct

We aim to share our knowledge and findings as we work daily to improve our product, for our community, in a safe and open space. We work as we live, as kind and considerate human beings who learn and grow from giving and receiving positive, constructive feedback. We reserve the right to delete or ban any behavior violating this base foundation of respect.

Find this interesting?

We do too, and we’re hiring!

License

Copyright 2021 Kickstarter, PBC.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

ios-oss's People

Contributors

amancevice avatar amy-at-kickstarter avatar andrewkstrt avatar bormind avatar cdolm92 avatar christopherwright avatar dnywh avatar dusi avatar eoji avatar ifbarrera avatar ifosli avatar jgsamudio avatar jovannyespinal avatar justinswart avatar kyeah avatar luoser avatar mbrandonw avatar moderateepheezy avatar msadoon avatar robjaq avatar runway-github[bot] avatar scollaco avatar scottkicks avatar singhhari avatar stephencelis avatar theginbin avatar tikidunpon avatar tkohout avatar tobitech avatar yatriks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-oss's Issues

Questiona about ViewModels architecture

First things first... I LOVE you guys for sharing your project with the World. I believe you're making a huge contribution to the community ❤️

Today I started exploring your codebase. I absolutely love your Playground Driven Development™️ approach and will get to it soon, but I've started with AppDelegate and View Models first.

I seen your doc about the structure of VMs and I like the idea of composing them out of inputs and outputs. The concern I always had in my code was "How to clearly separate inputs and outputs in VMs?" and you solved it in your design, but at the same time by conforming to ...ViewModelInput and ...ViewModelOutput in ...ViewModel you've broken the clear separation, so now placing a . after View Model object in code gives overwhelming breadth of opportunities 😉

I believe that having inputs and outputs as a separate objects (such a shame that we cannot make anonymous classes in Swift) and removing conformance out of View Model itself will highly improve understandability and ease of use of your code. What do you think, maybe I overlooked something, or your design decision have some other background?

All the best and thanks again!

Errors when building

Thank you so much for open-sourcing this project...there seems to be a wealth of truly fantastic code and I can't wait to really dive in.

Unfortunately when I try to build the application I get the following error:

.../Library/ViewModels/EmptyStatesViewModel.swift:1:8: No such module 'KsApi'

Am I missing something?

Thank you.

Instructions for Using Playgrounds in Project

It's very exciting to take a look through this project; thanks for open-sourcing it!

Maybe this is a dumb question, but for whatever reason I haven't seen much of the playground-embedded-in-project-with-required-modules style, and I'm having some trouble using the many playgrounds in the project. I feel like I should be able to figure this out, but I haven't.

Maybe some brief instructions could be included describing how to get playgrounds within the project running?

(Basically, I get "No such module 'Module Name'" in the playgrounds that import an included module)

No such module 'Alamofire' in AlamofireImage iOS Target

I'm unable to build any of the other targets because they all end up with this error. The first occurence of this error is on line 23 of AlamofireImage.xcodeproj>Source>ImageDownloader.swift

The Alamofire target builds without error.

I am building in Xcode 7.3.1 (Swift 2.2) for the iPhone 6s Plus simulator (though this error occurs for all simulators) and make test-all passes with no errors.

Thank you for open-sourcing this project, and I'm very excited to take a look at it!

404 error - looks like native-secrets no longer available

output from make test-all

git clone https://github.com/kickstarter/native-secrets Frameworks/ios-ksapi/Frameworks/native-secrets
Cloning into 'Frameworks/ios-ksapi/Frameworks/native-secrets'...
remote: Repository not found.
fatal: repository 'https://github.com/kickstarter/native-secrets/' not found
make[1]: [secrets] Error 128 (ignored)
if [ ! -d Frameworks/ios-ksapi/Frameworks/native-secrets ];
then
mkdir -p Frameworks/ios-ksapi/Frameworks/native-secrets/ios
&& cp -n Configs/Secrets.swift.example Frameworks/ios-ksapi/Frameworks/native-secrets/ios/Secrets.swift
|| true;
fi
xcodebuild test -scheme Kickstarter-Framework-iOS -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3'
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:iOS Simulator, OS:9.3, name:iPhone 6 }

The requested device could not be found because no available devices matched the request.

Available destinations for the "Kickstarter-Framework-iOS" scheme:
	{ platform:iOS Simulator, id:A64A1C8E-8CF6-4034-9D5D-8015FE315B88, OS:10.2, name:iPad Air }
	{ platform:iOS Simulator, id:08D76504-6C4C-40BE-8A77-0A91E651E364, OS:10.2, name:iPad Air 2 }
	{ platform:iOS Simulator, id:3B625A32-BFFF-47F7-A050-8830AB66678C, OS:10.2, name:iPad Pro (9.7 inch) }
	{ platform:iOS Simulator, id:CF9411AA-6A47-4AF9-AC0E-50E6249745E2, OS:10.2, name:iPad Pro (12.9 inch) }
	{ platform:iOS Simulator, id:FB771706-E415-4BCE-8268-CF9830424BB4, OS:10.2, name:iPad Retina }
	{ platform:iOS Simulator, id:E55D6180-D535-4495-A515-CB1572823996, OS:10.2, name:iPhone 5 }
	{ platform:iOS Simulator, id:539BD7CE-725B-4022-B632-15589028DA8C, OS:10.2, name:iPhone 5s }
	{ platform:iOS Simulator, id:6836D9A2-188C-49A3-91B7-B288158B92BC, OS:10.2, name:iPhone 6 }
	{ platform:iOS Simulator, id:37FD242D-910B-4C06-B66D-7FD6473FB08A, OS:10.2, name:iPhone 6 Plus }
	{ platform:iOS Simulator, id:9251A038-47F8-45ED-B806-EECCE8059409, OS:10.2, name:iPhone 6s }
	{ platform:iOS Simulator, id:097FE47F-E23A-438B-8DF5-88EC4EAADB7A, OS:10.2, name:iPhone 6s Plus }
	{ platform:iOS Simulator, id:A9146875-7C3C-44FE-A142-FE728162A1C4, OS:10.2, name:iPhone 7 }
	{ platform:iOS Simulator, id:564D152F-FA64-4DCA-8A3F-DB14C45DEAAA, OS:10.2, name:iPhone 7 Plus }
	{ platform:iOS Simulator, id:6935EC5F-6099-4DCA-AC16-E0AB76F6F59A, OS:10.2, name:iPhone SE }

Ineligible destinations for the "Kickstarter-Framework-iOS" scheme:
	{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
	{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }

make[1]: *** [test] Error 70
make: *** [test-all] Error 2

Check dependencies Error

when I run on Simulator, It's ok.But run on iPhone,It's show the "check dependencis"error.
Detail:
"Check dependencies
CodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 9.3'"'

How to fix this?Thanks

Doesn't compile - a lot of errors

CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
    cd /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi
    export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name KsApi -Onone -Xfrontend -warn-long-function-bodies=500 -D DEBUG -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk -target i386-apple-ios9.0 -g -module-cache-path /Users/apple/Library/Developer/Xcode/DerivedData/ModuleCache -Xfrontend -serialize-debugging-options -application-extension -enable-testing -I /Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Products/Debug-iphonesimulator -F /Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Products/Debug-iphonesimulator -c -j4 /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/SurveyResponseLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/ProjectsEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/lib/auth/ClientAuth.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ShippingRulesEnvelopeLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/ServiceType.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ProjectTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/extensions/NSURLSession.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/DiscoveryParams.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Project.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/MessageThreadsEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ActivityLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/DiscoveryParamsLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ShippingRuleLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/RewardsItemTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Project.Video.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ActivityTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/ProjectNotification.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ProjectStatsEnvelopeTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Activity.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/RewardTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ConfigLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ProjectStatsEnvelope.FundingDateStatsTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/MessageThreadTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/lib/auth/OauthToken.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/lib/EncodableType.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/ErrorEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/DiscoveryEnvelopeTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/MockService.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/UpdateTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Update.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/Project.PhotoLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/MessageSubject.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/SurveyResponseTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ProjectNotificationTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Category.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/Project.MemberDataLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ProjectStatsEnvelope.CumulativeStatsLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/UpdatePledgeEnvelopeTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/Project.VideoTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Backing.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/UpdateDraft.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/RewardLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ProjectStatsEnvelopeLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/CommentsEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/BackingLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ProjectStatsEnvelope.CumulativeStatsTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/CategoriesEnvelopeTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/StarEnvelopeLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/CategoriesEnvelopeLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ProjectLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Message.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/User.StatsLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ChangePaymentMethodEnvelopeTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/Project.PersonalizationLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Location.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/Service.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/UpdateDraftTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/CommentLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/CreatePledgeEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/MessageLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Item.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Param.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/lib/MimeType.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Project.Country.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/Project.DatesLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/SurveyResponse.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/lib/Decodable.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ProjectStatsEnvelope.RewardDistributionLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/UpdateDraftLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/Reward.ShippingLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/lib/auth/BasicHTTPAuth.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/RewardItemLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Reward.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/AccessTokenEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/LocationLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/BackingTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/Project.VideoLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/CommentTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ProjectNotificationLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/User.NotificationsLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/FindFriendsEnvelopeLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/ShippingRulesEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ItemLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/PushEnvelopeLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/SubmitApplePayEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/ProjectStatsEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/ChangePaymentMethodEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ProjectStatsEnvelope.VideoStatsLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ProjectStatsEnvelope.FundingDateStatsLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/User.NotificationsTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/User.NewsletterSubscriptionsLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/Frameworks/native-secrets/ios/Secrets.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/UpdateLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/ActivityEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/UserTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/DiscoveryEnvelopeLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/Project.StatsLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/FriendStatsEnvelopeTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/StarEnvelopeTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/UserLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/ProjectActivityEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/VoidEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/CheckoutEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ProjectStatsEnvelope.RewardDistributionTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/User.AvatarLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/ShippingRule.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/FriendStatsEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/lib/Route.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/ServerConfig.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Config.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/SubmitApplePayTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/CreatePledgeEnvelopeTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ShippingRulesEnvelopeTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/FriendStatsEnvelopeLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/MessageThread.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/UpdatePledgeEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ProjectStatsEnvelope.VideoStatsTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ProjectStatsEnvelope.ReferrerStatsTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/User.StatsTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/SubmitApplePayEnvelopeLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/LocationTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/FindFriendsEnvelopeTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ConfigTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/RewardsItem.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/CheckoutEnvelopeLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/Comment.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/MessageThreadLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/MessageTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/StarEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/FindFriendsEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ProjectNotification.ProjectLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ShippingRuleTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/CategoryTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/MessageThreadEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/CreatePledgeEnvelopeLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/CheckoutEnvelopeTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/Project.PhotoTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/PushEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/CategoryLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/lib/Method.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/ProjectStatsEnvelope.ReferrerStatsLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/ItemTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/User.MemberDataTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/User.NewsletterSubscriptionsTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/templates/User.AvatarTemplates.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/Activity.MemberDataLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/DiscoveryEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/lenses/FriendStatsEnvelope.StatsLenses.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/CategoriesEnvelope.swift /Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi/KsApi/models/User.swift -output-file-map /Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/Debug-iphonesimulator/KsApi-iOS.build/Objects-normal/i386/KsApi-iOS-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/Debug-iphonesimulator/KsApi-iOS.build/Objects-normal/i386/KsApi.swiftmodule -Xcc -I/Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/Debug-iphonesimulator/KsApi-iOS.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/Debug-iphonesimulator/KsApi-iOS.build/KsApi-generated-files.hmap -Xcc -I/Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/Debug-iphonesimulator/KsApi-iOS.build/KsApi-own-target-headers.hmap -Xcc -I/Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/Debug-iphonesimulator/KsApi-iOS.build/KsApi-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/Debug-iphonesimulator/KsApi-iOS.build/KsApi-project-headers.hmap -Xcc -I/Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/Debug-iphonesimulator/KsApi-iOS.build/DerivedSources/i386 -Xcc -I/Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/Debug-iphonesimulator/KsApi-iOS.build/DerivedSources -Xcc -DDEBUG=1 -emit-objc-header -emit-objc-header-path /Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/Debug-iphonesimulator/KsApi-iOS.build/Objects-normal/i386/KsApi-Swift.h -import-underlying-module -Xcc -ivfsoverlay -Xcc /Users/apple/Library/Developer/Xcode/DerivedData/Kickstarter-dqhoxrlwnpqgfngbixbutwpubtlc/Build/Intermediates/KsApi.build/Debug-iphonesimulator/KsApi-iOS.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/apple/Documents/xcode_projects/ios-oss/Frameworks/ios-ksapi

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

Dispatch Model updates

Hi there! Thanks for sharing the project with the open source community, it's a great learning resource!

I was wondering how are you dispatching an update done to a model to all the View Controllers that are displaying it?

eg: updating a Project's name and see the new name on all the View Controllers that are showing this project (without having to reload the data from the server)

Thanks!

'liveView' is deprecated in Playground Pages

I get the following error when trying to build and run the playgrounds in the project in Xcode 8.2:

warning: 'liveView' is deprecated: Use 'PlaygroundPage.current.liveView' from the 'PlaygroundSupport' module instead

Is this expected?

Question: How can I import my project on Playground?

Hi everyone.

I couldn't figure out how you did to make it possible to import the project itself on the playground and then visualize the view controllers and make all that playground driven development. Could you explain how can I do that from a new project? What are the steps to make it possible to import my own app on the playground and see my view controllers?

I had a look at this Test Drive but I do not know if that works on my own project. It seems that you generate a library of ios-oss and then import that library to the playground, correct me if I picked it wrongly.

Thanks in advance 😄

Any further plan with Realm

Hi @folks
I am working on side-project base on your source structure for a couple of months. I learned a lot of new things. And I have some questions:

  • Why we don't try to use cache database: Core Data, Realm.
  • Why we don't define data model as class instead struct

Thanks

Any issues with AppEnvironment.current not being Observable?

I notice that the current AppEnvironment, which contains the current user, the api service, some tracking information is not observable and I'm curious if that has presented any issues. It seems like you make use of NotificationCenter notifications for the user switching (or session ending) which perhaps handles updating necessary values specific to the user.

If the AppEnvironment.current is replaced due to a user switching or logging in, how do you make sure the views react to it accordingly? Specifically, in the BackerViewController, if the current app environment (and subsequently the current user) changes after viewDidLoad is called, would the view continue to show the data for the previous current user?

Additionally, if this is handled by the NotificationCenter notifications elsewhere, is the need to observe changes to the AppEnvironment unnecessary given the way the app works (if, for example, user logging in only happens in an isolated part of the app and you know there will be no long-standing view controllers that need to listen for changes to that).

Submodule not found https://github.com/kickstarter/native-secrets/

Hi Kickstarter team,

I run "make bootstrap" and run into this issue. The "native-secrets" repo shows 404 "page not found". Could you please recheck? Thanks.

Cloning into 'Frameworks/ios-ksapi/Frameworks/native-secrets'...
remote: Repository not found.
fatal: repository 'https://github.com/kickstarter/native-secrets/' not found

Kickstarter-iOS requires a provisioning profile

I get the following error when I try to run: ('Automatically signing project' is unchecked)
screen shot 2017-01-17 at 7 49 09 pm

and I get Your account does not have sufficient permissions to modify containers. and No profiles for 'com.MYDOMAINNAME.kickstarter.alpha' were found when I checkmark 'Automatically signing project'

Please help!

make bootstrap error

Xcode is 8.2.1 and i'm clone it execute "make bootstrap"then always error and i don't know why
curl -s -N -L https://tokbox.com/downloads/opentok-ios-sdk-2.10.0 \ | tar -xz --strip 1 --directory Frameworks/OpenTok OpenTok-iOS-2.10.0/OpenTok.framework tar: Error opening archive: (Empty error message) make: *** [opentok] Error 1

Question: How does Playground work on the project?

I'm trying to see the playground pages.

But I'm getting errors like

error: Couldn't lookup symbols:
  __T0So6BundleC21Kickstarter_FrameworkE9frameworkABfgZ
  __T021Kickstarter_Framework23LoginToutViewControllerCMa
  __T017PlaygroundSupport0A4PageC7currentACfau
  __T021Kickstarter_Framework10StoryboardO11instantiatexxm_So6BundleC02inE0tSo16UIViewControllerCRbzlF
  __T0So16UIViewControllerC17PlaygroundSupport0C12LiveViewableACWP
  __T017PlaygroundSupport0A4PageC8liveViewAA0A12LiveViewable_pSgfs
  __T017PlaygroundSupport0A4PageCMa
  __T021Kickstarter_Framework10StoryboardO11instantiatexxm_So6BundleC02inE0tSo16UIViewControllerCRbzlFfA0_

I don't really know how it does work. So, sorry if it is a silly question. But I could not get it working.
I was expecting to see the view controller.

Thanks in advance 😄

why swizzle UIView & UIViewController?

I'm trying to understand the tradeoff that was made when the decision to swizzle was made.

It seems to me that the objective in your swizzle was to remove your binding code from ViewControllers in your application and keep it in this arguably unsafe swizzled function instead.

Why not subclass instead? And do all of the binding in a KickstarterViewController or BindingViewController, and have your application VCs inherit from that subclass?

(Question) Using default HTML Parser

Hey. I see you're using NSHtmlTextDocumentType while initing NSAttributedString to parse and present html. I went through your code and I'm not sure you're caching the result. You're also required to use this from the main queue. The reason why I bought this up is I have been using it in my own project and I have seen some really weird crashes whenever I use it in a TableView or CollectionView and reload a cell or the whole view. Have you experienced anything similar? I have been using DTCoreText as an alternative.

Any plan to upgrade to Swift 3?

Swift 2.3 would be deprecated in the next release of Xcode. Do you have any plan to upgrade the entire code base and dependencies?

How are you guys generating your screenshots?

Hello

I saw that you guys have a lot of screenshots on various devices in various orientations and in multiple languages. I also saw that you guys are not using fast lane's snapshot to do this. How are you guys generating these screenshots? I'm looking for a way to do that and with fast lane's snapshot I'm forced to use the UI Automation framework which makes it a bit tricky to mock underlying dependencies of my app to produce the desired states which I want to screenshot. Thanks for your input!

Kind regards
Chris

Question: non-retina icons

Why do you still keep non-retina @1x icons around? As far as I understand you only support retina devices and those icons can be removed and excluded when adding new icons.

Bootstrapping fails because of native-secrets

First of all: congrats on open sourcing the mobile apps 👏 Thanks for doing so!

I'd like to explore the code and have tried to set it up on my machine. But make bootstrap fails. Probably because https://github.com/kickstarter/native-secrets.git is available for Kickstarter employees only. Maybe the bootstrap script can be modified to allow people outside of Kickstarter to setup and then build & run the app locally? Thanks in advance.

➜  kickstarter git:(master)  make bootstrap
...
Cloning into '/Users/yas/code/kickstarter/Frameworks/ios-ksapi/Frameworks/Curry'...
Cloning into '/Users/yas/code/kickstarter/Frameworks/ios-ksapi/Frameworks/Prelude'...
Cloning into '/Users/yas/code/kickstarter/Frameworks/ios-ksapi/Frameworks/ReactiveExtensions'...
Cloning into '/Users/yas/code/kickstarter/Frameworks/ios-ksapi/Frameworks/native-secrets'...
Username for 'https://github.com':

build error

Hi there, while build project, I detected build error,
I attached some log,
check please..

Hope great Kickstarter!!

:0: error: no such file or directory: '/Users/leesanggyu/Documents/Project/kickstarter_heyken/Frameworks/ios-ksapi/Frameworks/native-secrets/ios/Secrets.swift'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

Ineligible destinations for the "Kickstarter-Framework-iOS" scheme

I am getting this error on xcode 8.3.2

Ineligible destinations for the "Kickstarter-Framework-iOS" scheme:
		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
		{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
make[1]: *** [test] Error 70
make: *** [test-all] Error 2

Will this app not work on this xcode?

facebook login error

When I login in Facebook, It appeared 'Couldn't log into Facebook' popup
so I couldn't use app more.

I attached some log.

P.S:
It's occured on app store version, too

2017-01-04 14:29:55.641 KickDebug[7496:438241] CFNetwork SSLHandshake failed (-9824)
2017-01-04 14:29:55.641 KickDebug[7496:438241] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)
2017-01-04 14:29:55.643 KickDebug[7496:438047] [Koala Track]: Errored User Login, properties: ["device_fingerprint": ########-010E-4AA6-BB56-8126A3C9EAEC, "manufacturer": Apple, "koala_lib": kickstarter_ios, "client_type": native, "time": 1483507795.643244, "model": x86_64, "preferred_content_size_category": UICTContentSizeCategoryXL, "os_version": 9.3, "client_platform": ios, "app_version": 9999, "distinct_id": #########-010E-4AA6-BB56-8126A3C9EAEC, "iphone_uuid":########-010E-4AA6-BB56-8126A3C9EAEC, "app_release": 3.1, "mp_lib": kickstarter_ios, "device_format": phone, "apple_pay_capable": 1, "os": iPhone OS, "screen_width": 375, "DEPRECATED": 1, "wifi_connection": 1, "screen_height": 667, "device_orientation": Portrait, "apple_pay_device": 1, "user_logged_in": 0]

2017-01-04 14 33 40

Use flatMap instead compact

public extension Array where Element: OptionalType {

  /**
   - returns: A new array with `nil` values removed.
   */
  public func compact() -> [Element.Wrapped] {
    return self.filter { $0.optional != nil }.map { $0.optional! }
  }
}

We are making this new protocol OptionalType & extend Optional to confront to this only to write the compact function above?
with compact we can use flatMap like array.flatMap({ $0 })

Stop support iOS 8?

I saw in deployment target is minimum 9.0. Are you dropped iOS 8 devices ?.
And can you give me a extension to use instead Alamofire

ReactiveSwift causes build error

make bootstrap works without problems, make test-all fails because of Atomic.swift in ReactiveSwift. The project doesn't build in Xcode as well, giving the error below:

/Users/akaralar/Development/github/ios-oss/Frameworks/ios-ksapi/Frameworks/ReactiveExtensions/Frameworks/ReactiveSwift/Sources/Atomic.swift:65:42: Let 'value' is private and cannot be referenced from an '@inline(__always)' function

Seems like this issue was fixed in ReactiveSwift by this commit: ReactiveCocoa/ReactiveSwift@b5c3832

I'm using Xcode 8.3.3 on macOS 10.12.6

Thanks for sharing knowledge!

About UI Test on CI environment.

Hello.
We are referring to your iOS source when we adjusted MVVM architecture in our project.
ViewModel and DataSource were applied and these are working good.
But UI Test has been failed in Travis-CI environment.
(Interestingly our UI Test is successful in a local.)
Of course there is also a comparison image in the ReferenceImages_64 folder on GitHub's repository.

If KickStarter had been had issue a similar issue, advice for us please.

Test code

This is our source code for UI Test.
        [Device.phone4inch, Device.phone4_7inch, Device.phone5_5inch].forEach { (device) in
            withMock(with: MockService.init(userResponse: mockUser), body: {
                let vc = ProfileTableViewController.instantiate()
                let (parent, _) = traitControllers(device: device, orientation: .portrait, child: vc)
                FBSnapshotVerifyView(parent.view, identifier: "\(device)")
            })
        }

Error message in CI

  test_viewcontroller_screenshot, failed - Snapshot comparison failed: Optional(Error Domain=FBSnapshotTestControllerErrorDomain Code=4 "Images different" UserInfo={NSLocalizedFailureReason=image pixels differed by more than 0.00% from the reference image, FBDiffedImageKey=<UIImage: 0x7fe2862caf70> size {414, 736} orientation 0 scale 2.000000, FBReferenceImageKey=<UIImage: 0x7fe2862c5df0> size {414, 736} orientation 0 scale 2.000000, FBCapturedImageKey=<UIImage: 0x7fe28634d0b0> size {414, 736} orientation 0 scale 2.000000, NSLocalizedDescription=Images different})

Explain your playground workflow?

First of all: thank you for deciding to go open source. Tons of learnings in here 🙏

I was wondering how y'all generated and worked with your playgrounds. Are they auto-generated or handwritten per-controller?
Also, how are they used by Kickstarter engineers? Are they used:

  1. whilst creating new views (i.e. one would create a view with a vm, setup inputs and outputs, and then create a playground to have a hot-reloady environment to build the view), or
  2. as artifacts to admire once a view is completely built, and as a tool to confidently make changes to existing views + for sanity checking and screenshot testing to prevent UI regressions?

Both?

Also: I do love how you've modeled the AppEnvironment and used it's co-effecting qualities to such great effect ❤️

How to run bootstrap?

I cloned the source code and run the program,but Xcode told me the “KSapi” is missing,I don’t know why, and I run bootstrap ,the terminal issued me no sucn directory,I’m a fish,fresh fish,Please help me.Thanks

Hi, how i can use pipe forward in our project

When i try to add this function:

/**
 Pipe a value into a function.
 
 - parameter x: A value.
 - parameter f: A function
 
 - returns: The value from apply `f` to `x`.
 */
public func |> <A, B> (x: A, f: (A) -> B) -> B {
    return f(x)
}

to our project. Xcode notices an error:
Operator implementation without matching operator declaration on | character

Downloading OpenTok v2.10.0 tar: OpenTok-iOS-2.10.0/OpenTok.framework: Not found in archive tar: Error exit delayed from previous errors.

I run "make bootstrap", then I get above error. Next,I run "make test-all", I get this--"Testing failed: No such module 'OpenTok'".
edb34b96-a96a-4e8a-b3c8-51fa7ba170e3
So I guess there must be something wrong with it. I download it again from it's website. Unzip it by "tar -jxvf OpenTok-iOS-2.10.1.tar.bz2", then show me below results:
029a1184-6801-4d81-a3c6-18dc5234f8e8
I ignored these errors and added it into the project, as I expected ,the project can't compiled。Xcode prompt “no such module 'OpenTok' ”. I have tried to set building setting->searchPath, but it' not work. Finally,I stuck here.
2b7e3b83-efa3-46b6-8505-0259d9abd3c2

about import class

Hello, I am a green hand in Swift, this is the very first time that I know import class UIKit.UIView.
I would like to ask you for help that what is specific meaning of the following code in three lines ?
Thank you so much and look forward your reply!

import class UIKit.UIView

import UIKit.UIView

import UIKit

Icorrect screen sizes in TraitController?

While looking through the code, I noticed that the TraitController class seems to have the wrong screen sizes for the 4" and 5.5" iPhones.

The height for 4" is 575, when it should be 568.
The size for 5.5" is 540x960, when it should be 414x736.

Is this maybe intentional, that some of the sizes differ from the actual screen size, or were they entered wrong?

Playgrounds no longer working after migration?

Hello!
first of all I want to thank you guys for open sourcing your code, it's always awesome to learn from code of other app developers.

I noticed that the playgrounds are not yet migrated to the swift 3. Is it because they don't work so well under the xcode 8.x or you just didn't get around to it?

The reason I ask is that we got excited about the possibilities of playground driven development and tried it out in project of our own. But when the project got larger the playgrounds were starting very slow and they often crash under mysterious circumstances. E.g. it runs on every third attempt, otherwise it crash on pthread_rwlock_rdlock failed and others. Did you also encounter those issues?

When I try to migrate and run any of your playgrounds in Xcode 8.2.1 i get errors like this:

Playground execution failed: error: Couldn't lookup symbols:
  __TMaC21Kickstarter_Framework13RootViewModel

when trying to use anything that's inside the Kickstarter framework.

Thanks
Tomas

naming nitpick: "ViewModel"

I see that you use the name ViewModel for objects that have no inherent view (e.g. the AppDelegateViewModel) and I'm confused as to why. Can you explain why you chose to name objects with that role as ViewModels?

To me, your ViewModels seem like MVC controllers since they do many MVC control-y things; they don't simply map models into a viewable format. That comes with it's own host of issues of bloated controllers: anything that isn't view or data related becomes controller territory - persistence, networking, etc.
The iOS community has become very trigger happy calling objects that reduce code in a view controller a "view model" ever since MVVM became popular

From my understanding, it seems like you folks are using your view controllers simply as views that ferry messages back and forth from a view model, and your view models are making all of the hard decisions.
That to me no longer sounds like an object that maps data -> view (a view model), and more like a controller (terribly broad name, I agree)

The reason I'm asking is not to beat a dead horse or go into a naming holy war (please stop me if that's the direction this is heading in), but because I'm genuinely curious as to why you decided to classify your objects in the way you did 😛

Unable to get tests to run properly

When I run make test-all I'm getting some errors:

$ make test-all
PLATFORM=iOS /Applications/Xcode.app/Contents/Developer/usr/bin/make test
git submodule sync --recursive || true
Synchronizing submodule url for 'Frameworks/AlamofireImage'
Synchronizing submodule url for 'Frameworks/AlamofireImage/Carthage/Checkouts/Alamofire'
Synchronizing submodule url for 'Frameworks/ios-ksapi'
Synchronizing submodule url for 'Frameworks/ios-ksapi/Frameworks/Argo'
Synchronizing submodule url for 'Frameworks/ios-ksapi/Frameworks/Curry'
Synchronizing submodule url for 'Frameworks/ios-ksapi/Frameworks/Prelude'
Synchronizing submodule url for 'Frameworks/ios-ksapi/Frameworks/ReactiveExtensions'
Synchronizing submodule url for 'Frameworks/ios-ksapi/Frameworks/native-secrets'
Synchronizing submodule url for 'Frameworks/ios-snapshot-test-case'
Synchronizing submodule url for 'Frameworks/onepassword-app-extension'
git submodule update --init --recursive || true
fatal: destination path '/Users/adam/Development/GitHub/kickstarter/ios-oss/Frameworks/ios-ksapi/Frameworks/native-secrets' already exists and is not an empty directory.
fatal: clone of 'https://github.com/kickstarter/native-secrets.git' into submodule path '/Users/adam/Development/GitHub/kickstarter/ios-oss/Frameworks/ios-ksapi/Frameworks/native-secrets' failed
Failed to clone 'Frameworks/native-secrets'. Retry scheduled
fatal: destination path '/Users/adam/Development/GitHub/kickstarter/ios-oss/Frameworks/ios-ksapi/Frameworks/native-secrets' already exists and is not an empty directory.
fatal: clone of 'https://github.com/kickstarter/native-secrets.git' into submodule path '/Users/adam/Development/GitHub/kickstarter/ios-oss/Frameworks/ios-ksapi/Frameworks/native-secrets' failed
Failed to clone 'Frameworks/native-secrets' a second time, aborting
Failed to recurse into submodule path 'Frameworks/ios-ksapi'
git submodule foreach git checkout 
Entering 'Frameworks/AlamofireImage'
Entering 'Frameworks/ios-ksapi'
M	Frameworks/Argo
M	Frameworks/Curry
M	Frameworks/Prelude
M	Frameworks/ReactiveExtensions
Entering 'Frameworks/ios-snapshot-test-case'
Entering 'Frameworks/onepassword-app-extension'
cd Frameworks/ios-ksapi
git submodule foreach git checkout 
Entering 'Frameworks/AlamofireImage'
Entering 'Frameworks/ios-ksapi'
M	Frameworks/Argo
M	Frameworks/Curry
M	Frameworks/Prelude
M	Frameworks/ReactiveExtensions
Entering 'Frameworks/ios-snapshot-test-case'
Entering 'Frameworks/onepassword-app-extension'
mkdir -p Frameworks/ios-ksapi/Frameworks/native-secrets/ios
cp -n Configs/Secrets.swift.example Frameworks/ios-ksapi/Frameworks/native-secrets/ios/Secrets.swift || true
xcodebuild test -scheme Kickstarter-Framework-iOS -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' 
xcodebuild: error: Failed to build project Kickstarter with scheme Kickstarter-Framework-iOS.
	Reason: Could not determine bundle identifier for Kickstarter-Framework-iOSTests's TEST_HOST: "/Users/adam/Library/Developer/Xcode/DerivedData/Kickstarter-acvdvuhlopkbghdsdczqpvttunki/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/KickDebug.app"
make[1]: *** [test] Error 70
make: *** [test-all] Error 2

Question about `paginate` function in ViewModel

Hello there. I am trying to understand the how the paginate function works in ViewModel for recent several days.

    let (paginatedActivities, isLoading, pageCount) = paginate(
            requestFirstPageWith: requestFirstPage,
            requestNextPageWhen: isCloseToBottom,
            clearOnNewRequest: false,
            valuesFromEnvelope: { $0.activities },
            cursorFromEnvelope: { $0.isEnd == "1" ? pageCount : ++pageCount },
            requestFromParams: { _ in AppEnvironment.current.apiService.getGameJoinPlayers(gameId: "", page: pageCount) },
            requestFromCursor: { AppEnvironment.current.apiService.getGameJoinPlayers(gameId: "", page: pageCount)})

The code from kickstarter is using moreActivities url for the next pagination signalProducer.

For some reason, the existing codebase now we using is passing a parameter called page to request the pagination data and an isEnd which return from my backend server (we call it cursor?) to indicate the pagination whether is end or not. So the cursorFromEnvelope closure I am trying to do something like $0.isEnd == "1" ? nil : ++pageCount.

So there is a question: How to use the pageCount recursively which return from the paginate function? And so that we can somehow unify the requestFromParams and requestFromCursor to use the same closure for signalProducer , cause the requestFromParams and requestFromCursor functions are actually using the same request but with a different page count parameter ?

Thanks for you patient answering this.

I can't request API.

Well, I try to request some API. but, I can't polling.
Did you intent to action?

I wish to handle this project.
Thank you.

2017-01-05 14:10:36.411 KickDebug[5440:573804] CFNetwork SSLHandshake failed (-9824)
2017-01-05 14:10:36.411 KickDebug[5440:573804] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)

Compile time error ?

I have cloned the repo as per the given instructions -

Clone this repository.
Run make bootstrap to install tools and dependencies.
Run make test-all to build and run tests on all platforms.

But I am getting error when i try to compile the project. See screenshot
screen shot 2017-03-14 at 4 35 34 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.