bpeng / tickets

0 stars 0 forks source link

Swift #20

Open bpeng opened 7 years ago

bpeng commented 7 years ago

resource:

https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html#//apple_ref/doc/uid/TP40014097-CH2-ID1

https://github.com/alexcomu/swift3-tutorial

https://www.youtube.com/watch?v=AzesJrOcFDU

https://www.hackingwithswift.com/read/0/1/how-to-install-xcode-and-create-a-playground

https://www.ralfebert.de/tutorials/ios-swift-uitableviewcontroller/custom-cells/

share social media
https://stackoverflow.com/questions/31792506/how-to-exclude-notes-and-reminders-apps-from-the-uiactivityviewcontroller

http://stefansdevplayground.blogspot.co.nz/2015/03/how-to-add-social-media-integration-to.html

https://www.appcoda.com/social-framework-introduction/
https://developers.facebook.com/docs/swift/sharing/content-types
https://dev.twitter.com/twitterkit/ios/installation

https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift/index.html#//apple_ref/doc/uid/TP40015214

bpeng commented 6 years ago

side menu https://www.raywenderlich.com/177353/create-slide-navigation-panel-swift

picker view https://stackoverflow.com/questions/30319718/making-a-drop-down-list-using-swift

dropdown https://github.com/Azuritul/AZDropdownMenu

https://github.com/AssistoLab/DropDown

https://github.com/younatics/YNDropDownMenu

bpeng commented 6 years ago

UA https://docs.urbanairship.com/platform/ios/?swift# https://github.com/urbanairship/ios-library

Steps of UA setup:

  1. from UA console: settings/API integration, get iOS bundle id and enter in the project (xocde) general/identity (note: change between development and production)
  2. enable iOS in settings/platform (need authentication, development key etc.)
  3. run application and from debug message get the Device token: and use it to send push notifications from console or command:
2017-11-27 21:10:04.960667+0000 SwiftQuake[271:8631] [I] +[UAirship executeUnsafeTakeOff:] [Line 185] UAirship Take Off! Lib Version: 8.6.3 App Key: R6NMn_RiS7-vxvuS_NWLaA Production: NO.
2017-11-27 21:10:05.002992+0000 SwiftQuake[271:8631] Channel ID: 6a04fd7a-5986-47ea-b9df-a3b49e5dfc52
2017-11-27 21:10:05.050074+0000 SwiftQuake[271:8631] [D] -[UANamedUser update] [Line 65] New or re-install, skipping named user update.
2017-11-27 21:10:05.152152+0000 SwiftQuake[271:8631] [I] +[UAirship executeUnsafeTakeOff:] [Line 265] Automatic setup enabled.
2017-11-27 21:10:05.153406+0000 SwiftQuake[271:8631] [D] -[UASwizzler swizzle:protocol:implementation:] [Line 39] Adding implementation for application:didRegisterForRemoteNotificationsWithDeviceToken: class SwiftQuake.AppDelegate
2017-11-27 21:10:05.153588+0000 SwiftQuake[271:8631] [D] -[UASwizzler swizzle:protocol:implementation:] [Line 39] Adding implementation for application:didFailToRegisterForRemoteNotificationsWithError: class SwiftQuake.AppDelegate
2017-11-27 21:10:05.153721+0000 SwiftQuake[271:8631] [D] -[UASwizzler swizzle:protocol:implementation:] [Line 39] Adding implementation for application:didReceiveRemoteNotification:fetchCompletionHandler: class SwiftQuake.AppDelegate
2017-11-27 21:10:05.153857+0000 SwiftQuake[271:8631] [D] -[UASwizzler swizzle:protocol:implementation:] [Line 39] Adding implementation for application:performFetchWithCompletionHandler: class SwiftQuake.AppDelegate
2017-11-27 21:10:05.153986+0000 SwiftQuake[271:8631] [D] -[UASwizzler swizzle:implementation:] [Line 47] Swizzling implementation for setDelegate: class UNUserNotificationCenter
2017-11-27 21:10:05.159823+0000 SwiftQuake[271:8631] [D] -[UASwizzler swizzle:protocol:implementation:] [Line 39] Adding implementation for userNotificationCenter:willPresentNotification:withCompletionHandler: class UAAutoIntegrationDummyDelegate
2017-11-27 21:10:05.160036+0000 SwiftQuake[271:8631] [D] -[UASwizzler swizzle:protocol:implementation:] [Line 39] Adding implementation for userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler: class UAAutoIntegrationDummyDelegate
2017-11-27 21:10:05.246865+0000 SwiftQuake[271:8708] [I] -[UAInboxMessageList refreshInboxWithCompletionHandler:]_block_invoke [Line 295] Inbox messages updated.
2017-11-27 21:10:05.313137+0000 SwiftQuake[271:8631] [D] -[UAAnalytics addEvent:] [Line 176] Adding app_init event 11AA423F-C443-44BA-B9B0-2C846F5548C6.
2017-11-27 21:10:05.313417+0000 SwiftQuake[271:8631] [D] -[UAEventManager scheduleUploadWithDelay:] [Line 269] Enqueuing attempt to schedule event upload with delay on main queue.
2017-11-27 21:10:05.475589+0000 SwiftQuake[271:8631] [D] -[UAEventManager scheduleUploadWithDelay:]_block_invoke [Line 272] Attempting to schedule event upload with delay: 31.658473 seconds.
2017-11-27 21:10:05.475724+0000 SwiftQuake[271:8631] [D] -[UAEventManager scheduleUploadWithDelay:]_block_invoke [Line 286] Scheduling upload.
2017-11-27 21:10:05.479943+0000 SwiftQuake[271:8631] [D] -[UAPush updateRegistration] [Line 778] APNS registration is out of date, updating.
2017-11-27 21:10:05.506282+0000 SwiftQuake[271:8631] [I] +[UAAppIntegration application:didRegisterForRemoteNotificationsWithDeviceToken:] [Line 43] Application registered device token: 1cfd838a42b8b47d8f0b8893e3da171ac2f795d47cd67227616587da651c2ed1
2017-11-27 21:10:05.506728+0000 SwiftQuake[271:8631] [D] -[UAAnalytics addEvent:] [Line 176] Adding device_registration event 44DFD8BE-AE1E-47AC-A648-920FF00A157A.
2017-11-27 21:10:05.509940+0000 SwiftQuake[271:8631] [D] -[UAEventManager scheduleUploadWithDelay:] [Line 269] Enqueuing attempt to schedule event upload with delay on main queue.
2017-11-27 21:10:05.516397+0000 SwiftQuake[271:8631] Device token: 1cfd838a42b8b47d8f0b8893e3da171ac2f795d47cd67227616587da651c2ed1
2017-11-27 21:10:05.561827+0000 SwiftQuake[271:8631] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-11-27 21:10:05.571814+0000 SwiftQuake[271:8631] [MC] Reading from public effective user settings.
2017-11-27 21:10:05.595836+0000 SwiftQuake[271:8631] [D] -[UAChannelRegistrar updateChannel:channelLocation:withPayload:] [Line 68] Updating channel 6a04fd7a-5986-47ea-b9df-a3b49e5dfc52
2017-11-27 21:10:05.597840+0000 SwiftQuake[271:8631] [D] -[UAEventManager scheduleUploadWithDelay:]_block_invoke [Line 272] Attempting to schedule event upload with delay: 31.461976 seconds.
2017-11-27 21:10:05.597963+0000 SwiftQuake[271:8631] [D] -[UAEventManager scheduleUploadWithDelay:]_block_invoke [Line 277] Upload already scheduled for an earlier time.
2017-11-27 21:10:12.480117+0000 SwiftQuake[271:8631] [I] -[UAPush registrationSucceededWithPayload:] [Line 921] Channel registration updated successfully.

In order to receive real notification for your app,

  1. Set app bundle id to nz.cri.gns.geonetquake
  2. Build Release mode. (So you'll need GeoNet's certificate if you don't have)
    1. Distribute it via CrashLytics(Fabric) or Apple's iTunesConnect TestFlight.
bpeng commented 6 years ago

Insecure network links

To allow navigation hyperlinks from webview (e.g. FAQ), App domain security settings have to include a Allow arbitrary loads, or add the intended domains into the Exception domains

bpeng commented 6 years ago

app design: https://projects.invisionapp.com/d/main/default/#/projects/prototypes/12789986 https://app.zeplin.io/project/5a2daa357a39b7533a625c97/dashboard

bpeng commented 6 years ago

UI testing https://stackoverflow.com/questions/44431136/find-table-cell-in-xcode-ui-testing-swift

https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/08-automation.html

 xcodebuild -derivedDataPath output -workspace SwiftQuake.xcworkspace -scheme SwiftQuake -destination 'platform=iOS Simulator,name=iPhone 8,OS=11.2' -sdk iphonesimulator test | xcpretty
bpeng commented 6 years ago

map custom callout: http://www.surekhatech.com/blog/custom-callout-view-for-ios-map

bpeng commented 6 years ago

split view: https://useyourloaf.com/blog/split-view-controller-display-modes/ https://www.raywenderlich.com/173753/uisplitviewcontroller-tutorial-getting-started-2