Difference between revisions of "IOS AddSDK 5.1.8"
From AdLocus
m (→設定 Info.plist) |
m (→設定編譯相容性) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
[[File:IOS_Add_File_2.jpg]] | [[File:IOS_Add_File_2.jpg]] | ||
* 在General 中 Embedded Binaries 中加入 AdLocus.framework | * 在General 中 Embedded Binaries 中加入 AdLocus.framework | ||
− | [[File:ios_embedded_binaries.jpg| | + | [[File:ios_embedded_binaries.jpg|800px]] |
− | [[File:ios_embedded_binaries2.jpg| | + | [[File:ios_embedded_binaries2.jpg|800px]] |
== 設定 Info.plist == | == 設定 Info.plist == | ||
Line 27: | Line 27: | ||
</pre> | </pre> | ||
− | [[File:ios_infoplist.jpg| | + | [[File:ios_infoplist.jpg|800px]] |
== 設定編譯相容性 == | == 設定編譯相容性 == | ||
Line 35: | Line 35: | ||
* Release 時移除模擬器用的 binary 檔: | * Release 時移除模擬器用的 binary 檔: | ||
** 在 Build Phases 中加入 Run Script | ** 在 Build Phases 中加入 Run Script | ||
− | [[File:ios_run_script_0.jpg| | + | [[File:ios_run_script_0.jpg|800px]] |
** 並填入: | ** 並填入: | ||
Line 69: | Line 69: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | [[File:ios_run_script_1.jpg| | + | [[File:ios_run_script_1.jpg|800px]] |
== iOS Capabilities 設定 == | == iOS Capabilities 設定 == | ||
Line 76: | Line 76: | ||
** Location updates | ** Location updates | ||
** Remote Notifications | ** Remote Notifications | ||
− | [[File:ios_backgroundfetch.jpg| | + | [[File:ios_backgroundfetch.jpg|800px]] |
* 在Capabilities 中開啟 Push Notifications | * 在Capabilities 中開啟 Push Notifications | ||
− | [[File:Notifications.jpg| | + | [[File:Notifications.jpg|800px]] |
+ | |||
+ | * 現在您可以設定您的應用 | ||
+ | ** [[iOS_Promotion_5.1.8|詳細說明]] |
Latest revision as of 11:27, 27 August 2020
加入 SDK Library
- 請將解壓縮後的AdLocus.framework拖曳到您的專案中,並勾選下面兩個選項:
- "Copy items into destination group's folder (if needed)"
- "Create group for any added folders"
- 在General 中 Embedded Binaries 中加入 AdLocus.framework
設定 Info.plist
- 在 Info.plist 中加入
- App Transport Security Settings
- Allow Arbitrary Loads = YES
- FirebaseAppDelegateProxyEnabled
- FirebaseAppDelegateProxyEnabled = NO
- App Transport Security Settings
- 地區堆播需要使用者開啟以下地理位置使用權限
- Privacy - Location Usage Description
- Privacy - Location Always and When In Use Usage Description
- Privacy - Location When In Use Usage Description
Important * Privacy - Location Always Usage Description This key is required if your iOS app uses APIs that access the user’s location at all times and deploys to targets earlier than iOS 11.
設定編譯相容性
- 在 Build Setting 中 Embedded Content Contains Swift Code 設為 YES
- Release 時移除模擬器用的 binary 檔:
- 在 Build Phases 中加入 Run Script
- 並填入:
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}" # This script loops through the frameworks embedded in the application and # removes unused architectures. find "$APP_PATH" -name 'AdLocus.framework' -type d | while read -r FRAMEWORK do FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable) FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME" echo "Executable is $FRAMEWORK_EXECUTABLE_PATH" EXTRACTED_ARCHS=() for ARCH in $ARCHS do echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME" lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH" EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH") done echo "Merging extracted architectures: ${ARCHS}" lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}" rm "${EXTRACTED_ARCHS[@]}" echo "Replacing original executable with thinned version" rm "$FRAMEWORK_EXECUTABLE_PATH" mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH" done
iOS Capabilities 設定
- 在Capabilities 中開啟 Background Mode 並勾選
- Background fetch
- Location updates
- Remote Notifications
- 在Capabilities 中開啟 Push Notifications
- 現在您可以設定您的應用