Skip to content

Commit a1e1cd6

Browse files
committed
feat: Add Podfile and PrivacyInfo.xcprivacy; update Info.plist for improved device integration
1 parent a65be04 commit a1e1cd6

4 files changed

Lines changed: 71 additions & 3 deletions

File tree

client/ios/Podfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
platform :ios, '12.0'
2+
3+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
4+
5+
project 'Runner', {
6+
'Debug' => :debug,
7+
'Profile' => :release,
8+
'Release' => :release,
9+
}
10+
11+
def flutter_root
12+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
13+
unless File.exist?(generated_xcode_build_settings_path)
14+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
15+
end
16+
17+
File.foreach(generated_xcode_build_settings_path) do |line|
18+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
19+
return matches[1].strip if matches
20+
end
21+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
22+
end
23+
24+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
25+
26+
flutter_ios_podfile_setup
27+
28+
target 'Runner' do
29+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
30+
31+
target 'RunnerTests' do
32+
inherit! :search_paths
33+
end
34+
end
35+
36+
post_install do |installer|
37+
installer.pods_project.targets.each do |target|
38+
flutter_additional_ios_build_settings(target)
39+
40+
target.build_configurations.each do |config|
41+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
42+
'$(inherited)',
43+
'PERMISSION_LOCATION=1',
44+
'PERMISSION_BLUETOOTH=1',
45+
]
46+
end
47+
end
48+
end

client/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11+
1A2B3C4D5E6F77889900A1B2 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 1A2B3C4D5E6F77889900A1B1 /* PrivacyInfo.xcprivacy */; };
1112
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
1213
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1314
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
@@ -42,6 +43,7 @@
4243
/* Begin PBXFileReference section */
4344
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
4445
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
46+
1A2B3C4D5E6F77889900A1B1 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
4547
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
4648
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4749
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
@@ -113,6 +115,7 @@
113115
97C146FD1CF9000F007C117D /* Assets.xcassets */,
114116
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
115117
97C147021CF9000F007C117D /* Info.plist */,
118+
1A2B3C4D5E6F77889900A1B1 /* PrivacyInfo.xcprivacy */,
116119
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
117120
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
118121
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
@@ -212,6 +215,7 @@
212215
isa = PBXResourcesBuildPhase;
213216
buildActionMask = 2147483647;
214217
files = (
218+
1A2B3C4D5E6F77889900A1B2 /* PrivacyInfo.xcprivacy in Resources */,
215219
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
216220
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
217221
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,

client/ios/Runner/Info.plist

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,16 @@
5252
<key>NSLocationWhenInUseUsageDescription</key>
5353
<string>We need access to your location to display maps.</string>
5454
<key>NSLocalNetworkUsageDescription</key>
55-
<string>We need access to the local network to discover and connect to Borneo devices.</string>
55+
<string>We need access to the local network to discover and connect to Borneo-IoT devices.</string>
5656
<key>NSBonjourServices</key>
5757
<array>
5858
<string>_borneo._udp.</string>
5959
</array>
6060
<key>NSBluetoothAlwaysUsageDescription</key>
61-
<string>We need access to Bluetooth to provision WiFi networks for Borneo devices.</string>
61+
<string>We need access to Bluetooth to provision WiFi networks for Borneo-IoT devices.</string>
6262
<key>NSBluetoothPeripheralUsageDescription</key>
63-
<string>We need access to Bluetooth peripherals to provision WiFi networks for Borneo devices.</string>
63+
<string>We need access to Bluetooth peripherals to provision WiFi networks for Borneo-IoT devices.</string>
64+
<key>NSPhotoLibraryUsageDescription</key>
65+
<string>We need access to your photo library so you can choose scene images for device customization.</string>
6466
</dict>
6567
</plist>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>NSPrivacyTracking</key>
6+
<false/>
7+
<key>NSPrivacyTrackingDomains</key>
8+
<array/>
9+
<key>NSPrivacyCollectedDataTypes</key>
10+
<array/>
11+
<key>NSPrivacyAccessedAPITypes</key>
12+
<array/>
13+
</dict>
14+
</plist>

0 commit comments

Comments
 (0)