<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.adlocus.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.adlocus.com/index.php?action=history&amp;feed=atom&amp;title=IOS_FCM_AddSDK</id>
		<title>IOS FCM AddSDK - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.adlocus.com/index.php?action=history&amp;feed=atom&amp;title=IOS_FCM_AddSDK"/>
		<link rel="alternate" type="text/html" href="https://wiki.adlocus.com/index.php?title=IOS_FCM_AddSDK&amp;action=history"/>
		<updated>2026-11-19T20:04:23Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.1</generator>

	<entry>
		<id>https://wiki.adlocus.com/index.php?title=IOS_FCM_AddSDK&amp;diff=847&amp;oldid=prev</id>
		<title>Adlocuswikisysop: Created page with &quot;__TOC__ == 加入 SDK Library == * 請將解壓縮後的AdLocus.framework拖曳到您的專案中，並勾選下面兩個選項: ** &quot;Copy items into destination group's folder...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.adlocus.com/index.php?title=IOS_FCM_AddSDK&amp;diff=847&amp;oldid=prev"/>
				<updated>2020-08-27T03:33:20Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;__TOC__ == 加入 SDK Library == * 請將解壓縮後的AdLocus.framework拖曳到您的專案中，並勾選下面兩個選項: ** &amp;quot;Copy items into destination group&amp;#039;s folder...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__TOC__&lt;br /&gt;
== 加入 SDK Library ==&lt;br /&gt;
* 請將解壓縮後的AdLocus.framework拖曳到您的專案中，並勾選下面兩個選項:&lt;br /&gt;
** &amp;quot;Copy items into destination group's folder (if needed)&amp;quot;&lt;br /&gt;
** &amp;quot;Create group for any added folders&amp;quot;&lt;br /&gt;
[[File:IOS_Add_File_2.jpg]]&lt;br /&gt;
* 在General 中 Embedded Binaries 中加入 AdLocus.framework&lt;br /&gt;
[[File:ios_embedded_binaries.jpg|800px]]&lt;br /&gt;
[[File:ios_embedded_binaries2.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
== 設定 Info.plist ==&lt;br /&gt;
* 在 Info.plist 中加入&lt;br /&gt;
** App Transport Security Settings&lt;br /&gt;
*** Allow Arbitrary Loads   =  YES&lt;br /&gt;
** FirebaseAppDelegateProxyEnabled&lt;br /&gt;
*** FirebaseAppDelegateProxyEnabled = NO&lt;br /&gt;
&lt;br /&gt;
* 地區堆播需要使用者開啟以下地理位置使用權限&lt;br /&gt;
** Privacy - Location Usage Description&lt;br /&gt;
** Privacy - Location Always and When In Use Usage Description&lt;br /&gt;
** Privacy - Location When In Use Usage Description&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Important&lt;br /&gt;
* Privacy - Location Always Usage Description &lt;br /&gt;
&lt;br /&gt;
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.	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:ios_infoplist.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
== 設定編譯相容性 ==&lt;br /&gt;
* 在 Build Setting 中 Embedded Content Contains Swift Code 設為 YES&lt;br /&gt;
[[File:ios_embedded_contents_swift.jpg|900px]]&lt;br /&gt;
&lt;br /&gt;
* Release 時移除模擬器用的 binary 檔：&lt;br /&gt;
** 在 Build Phases 中加入 Run Script &lt;br /&gt;
[[File:ios_run_script_0.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
** 並填入：&lt;br /&gt;
&amp;lt;syntaxhighlight lang='bash'&amp;gt;&lt;br /&gt;
APP_PATH=&amp;quot;${TARGET_BUILD_DIR}/${WRAPPER_NAME}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# This script loops through the frameworks embedded in the application and&lt;br /&gt;
# removes unused architectures.&lt;br /&gt;
find &amp;quot;$APP_PATH&amp;quot; -name 'AdLocus.framework' -type d | while read -r FRAMEWORK&lt;br /&gt;
do&lt;br /&gt;
FRAMEWORK_EXECUTABLE_NAME=$(defaults read &amp;quot;$FRAMEWORK/Info.plist&amp;quot; CFBundleExecutable)&lt;br /&gt;
FRAMEWORK_EXECUTABLE_PATH=&amp;quot;$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME&amp;quot;&lt;br /&gt;
echo &amp;quot;Executable is $FRAMEWORK_EXECUTABLE_PATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EXTRACTED_ARCHS=()&lt;br /&gt;
&lt;br /&gt;
for ARCH in $ARCHS&lt;br /&gt;
do&lt;br /&gt;
echo &amp;quot;Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME&amp;quot;&lt;br /&gt;
lipo -extract &amp;quot;$ARCH&amp;quot; &amp;quot;$FRAMEWORK_EXECUTABLE_PATH&amp;quot; -o &amp;quot;$FRAMEWORK_EXECUTABLE_PATH-$ARCH&amp;quot;&lt;br /&gt;
EXTRACTED_ARCHS+=(&amp;quot;$FRAMEWORK_EXECUTABLE_PATH-$ARCH&amp;quot;)&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Merging extracted architectures: ${ARCHS}&amp;quot;&lt;br /&gt;
lipo -o &amp;quot;$FRAMEWORK_EXECUTABLE_PATH-merged&amp;quot; -create &amp;quot;${EXTRACTED_ARCHS[@]}&amp;quot;&lt;br /&gt;
rm &amp;quot;${EXTRACTED_ARCHS[@]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Replacing original executable with thinned version&amp;quot;&lt;br /&gt;
rm &amp;quot;$FRAMEWORK_EXECUTABLE_PATH&amp;quot;&lt;br /&gt;
mv &amp;quot;$FRAMEWORK_EXECUTABLE_PATH-merged&amp;quot; &amp;quot;$FRAMEWORK_EXECUTABLE_PATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:ios_run_script_1.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
== iOS Capabilities 設定 ==&lt;br /&gt;
* 在Capabilities 中開啟 Background Mode 並勾選&lt;br /&gt;
** Background fetch&lt;br /&gt;
** Location updates&lt;br /&gt;
** Remote Notifications&lt;br /&gt;
[[File:ios_backgroundfetch.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
* 在Capabilities 中開啟 Push Notifications&lt;br /&gt;
[[File:Notifications.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
* 現在您可以設定您的應用&lt;br /&gt;
** [[iOS_Promotion_5.1.8|詳細說明]]&lt;/div&gt;</summary>
		<author><name>Adlocuswikisysop</name></author>	</entry>

	</feed>