Growthbeat SDK with Objective C - growthbeat/Growthbeat-SDK-iOS-Starter-Project GitHub Wiki
$ git clone git@github.com:sotayamashita/Growthbeat-SDK-iOS-Starter-Project.git
$ cd ios/GrowthbeatStarterProject
1. Growthbeat SDK を Xcode Project に追加
$ pods install
2. Xcode Project 設定
- Xcode で
growthbeat.plist
ファイルを作成して、右クリックして "Open As > Source Code" を選択 - 以下のコードのように
YOUR_APLICATION_ID
とYOUR_CREDENTIAL_ID
を追加
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GrowthbeatAppID</key>
<string>{YOUR_APLICATION_ID}</string>
<key>GrowthbeatCredentialID</key>
<string>{YOUR_CREDENTIAL_ID}</string>
</dict>
</plist>
3. Notification API を使用して通知を試す
$ ./script/send <GrowthbeatAppID> <GrowthbeatCredentialID> <Text>
$ curl -X POST \
-H 'Accept: application/json' \
--data "applicationId=${APPLICATION_ID}" \
--data "credentialId=${CREDENTIAL_ID}" \
--data-urlencode "text=${TEXT}" \
https://api.growthpush.com/3/notifications