salesforce mobilesdkに物申す
TRANSCRIPT
![Page 1: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/1.jpg)
Salesforce MobileSDK にモノ申す!
Masashi Nishiwaki
![Page 2: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/2.jpg)
※ 注意• Hybridの場合共通する部分も有りますが、全般的に述べられているのはiOS版に関してです
• あとHybrid版中心でお話します
• ただの愚痴です
• 共感 or 笑ってスルーしてください
• スライド34枚あります
• 言いたいことだけ言って流しまくります
• 私は”西脇”です
• ここ重要!
![Page 3: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/3.jpg)
アンケートタイム
![Page 4: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/4.jpg)
Mobileアプリ開発 やっている人
!
(・ω・)ノシ
![Page 5: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/5.jpg)
Mobile SDK 2.x 使っている人
!
(・ω・)ノシ
![Page 6: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/6.jpg)
for Android 使っている人
!
(・ω・)ノシ
![Page 7: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/7.jpg)
for iOS 使っている人
!
(・ω・)ノシ
![Page 8: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/8.jpg)
Native Appで 使っている人
!
(・ω・)ノシ
![Page 9: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/9.jpg)
Hybrid Appで 使っている人
!
(・ω・)ノシ
![Page 10: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/10.jpg)
zkSforce 使っている人
!
(・ω・)ノシ
![Page 11: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/11.jpg)
それ以外 or 自前でやっている人
!
(・ω・)ノシ
![Page 12: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/12.jpg)
What's New in 2.1
出展: https://github.com/forcedotcom/SalesforceMobileSDK-iOS
![Page 13: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/13.jpg)
Push Notifications
• Registration and delivery of push notifications are now supported from a Salesforce org that enables push notifications.
![Page 14: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/14.jpg)
アプリケーション接続
![Page 15: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/15.jpg)
アプリ側
![Page 16: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/16.jpg)
Apexコード
アプリケーション接続API名
Alert Message, Sound, Badge, User Data
![Page 17: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/17.jpg)
でも今はPilotなので…
• 今後本当にリリースされるかはSFDCさん次第?
• アプリケーション接続が作られた組織内のユーザに対してしかPushできない
• 管理パッケージに含める事が出来るようになれば…
![Page 18: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/18.jpg)
![Page 19: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/19.jpg)
Networking Enhancements
• The underlying networking library has been replaced with MKNetworkKit. MKNetworkKit provides the ability to configure advanced features, such as managing the network queue and cancelation of requests.
![Page 20: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/20.jpg)
• MKNetworkKitに換えて何か良くなったらしいです
![Page 21: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/21.jpg)
Files API Support• The Salesforce Mobile SDK now provides convenience methods that build specialized REST requests for file upload/download and sharing operations.
• A native sample app, FileExplorer, and a hybrid sample app, HybridFileExplorer, have been added to demonstrate these features.
![Page 22: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/22.jpg)
• やっと(ry
![Page 23: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/23.jpg)
SmartSync Enhancements• You can now access custom endpoints using the Force.RemoteObject and Force.RemoteObjectCollection classes.
• You can now access Apex REST endpoints using the Force.ApexRestObject and Force.ApexRestObjectCollection classes.
• NOTE:
• This feature is only available on hybrid apps.
![Page 24: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/24.jpg)
• hybridだけのはなし
• 裏はSmartStore
![Page 25: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/25.jpg)
Other Technical Improvements
• OAuth error handling is now configurable.
• Upgraded the openssl library to v1.0.1e to fix possible security concerns with older versions of openssl.
• You can now add one or more delegates to SFAuthenticationManager. This gives you more granular access to the authentication process.
• Various bug fixes.
![Page 26: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/26.jpg)
• openssl 1.0.1e えっ?
• Heartbeatは使っていないと思いますが
• 話題の話ですので更新してほしいですよね。。
![Page 27: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/27.jpg)
forcetk.mobilesdk.js• $jというGlobal変数が消えました (スコープ化)
• https://github.com/forcedotcom/SalesforceMobileSDK-Shared/commit/213b2ac5bc5a675c25d7b388d3eb8d0b3d841c82
• VFで使えなくなりました。。
• https://github.com/forcedotcom/SalesforceMobileSDK-Shared/commit/698eba5e2aacb2050df636ec21c11ca20ce8cb88
• マルチバイト対応しました (多分)
• escape => encodeURI
• https://github.com/forcedotcom/SalesforceMobileSDK-Shared/commit/cc90d6afb31d9c993dada9de0922b7cc5b3f5d9e
![Page 28: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/28.jpg)
旧バージョンから 引き継いでいる特徴
![Page 29: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/29.jpg)
Native App Point
• Nativeの方使っていない(ry
![Page 30: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/30.jpg)
Hybrid App Point• Cordova 2.3
• 古っ!
• jQuery.ajaxの書き方が古い
• Deferred使おうよ、、
• ajaxが同期/非同期かはインスタンス変数asyncAjaxによって定義
• えっ!?
• forcetk.Client.prototype.query等のレスポンスが生のオブジェクト
• DateとかDatetimeのパースめどい、、、
![Page 31: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/31.jpg)
Common Point
• 複数の組織にはログインできない
• arm64非対応
![Page 32: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/32.jpg)
私からの提案
• ForceTk sObjectを使ってみませんか?
• https://github.com/htz/Force.com-JavaScript-SObject-Toolkit
![Page 33: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/33.jpg)
特徴• Axpe上でsObjectを扱う位簡単にCRUD操作が可能
• 生のSOQL/SOSLクエリを記述する必要がない
• クエリの結果がforcetk.SObject.XXXオブジェクトの配列として返される
• DateやDatetime, Boolean等はそのままJavaScriptのDateやBooleanで扱える
• 初期化時にsObjectのメタデータ取得してModelに相当するものを作成
• 名前空間プレフィックスをシンプルに扱うことが可能
• VF, PhonegapおよびChrome Extentionで利用可能 (example内)
• Phonegap版はもちろんMobileSDK不要 (最新の3.1で動作確認済み)
![Page 34: Salesforce MobileSDKに物申す](https://reader033.vdocuments.site/reader033/viewer/2022060115/557ad40bd8b42a2c0f8b532d/html5/thumbnails/34.jpg)
forcetk.mobilesdk.jsのカスタマイズ
• jQuery.Deferredを利用した形に全て変更
• コードのネストが減って綺麗に書けます
• jQuery#ajaxと同様にasyncプロパティで呼び出し毎に設定できるように変更
• VF及びChrome Extension対応
• 全体的に自分好みに整形